google-cloud-dataplex-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +45 -27
- data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +40 -27
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +222 -158
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- metadata +5 -5
@@ -270,15 +270,27 @@ module Google
|
|
270
270
|
endpoint: @config.endpoint,
|
271
271
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
272
272
|
universe_domain: @config.universe_domain,
|
273
|
-
credentials: credentials
|
273
|
+
credentials: credentials,
|
274
|
+
logger: @config.logger
|
274
275
|
)
|
275
276
|
|
277
|
+
@dataplex_service_stub.logger(stub: true)&.info do |entry|
|
278
|
+
entry.set_system_name
|
279
|
+
entry.set_service
|
280
|
+
entry.message = "Created client for #{entry.service}"
|
281
|
+
entry.set_credentials_fields credentials
|
282
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
283
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
284
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
285
|
+
end
|
286
|
+
|
276
287
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
277
288
|
config.credentials = credentials
|
278
289
|
config.quota_project = @quota_project_id
|
279
290
|
config.endpoint = @dataplex_service_stub.endpoint
|
280
291
|
config.universe_domain = @dataplex_service_stub.universe_domain
|
281
292
|
config.bindings_override = @config.bindings_override
|
293
|
+
config.logger = @dataplex_service_stub.logger if config.respond_to? :logger=
|
282
294
|
end
|
283
295
|
|
284
296
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -287,6 +299,7 @@ module Google
|
|
287
299
|
config.endpoint = @dataplex_service_stub.endpoint
|
288
300
|
config.universe_domain = @dataplex_service_stub.universe_domain
|
289
301
|
config.bindings_override = @config.bindings_override
|
302
|
+
config.logger = @dataplex_service_stub.logger if config.respond_to? :logger=
|
290
303
|
end
|
291
304
|
end
|
292
305
|
|
@@ -311,6 +324,15 @@ module Google
|
|
311
324
|
#
|
312
325
|
attr_reader :iam_policy_client
|
313
326
|
|
327
|
+
##
|
328
|
+
# The logger used for request/response debug logging.
|
329
|
+
#
|
330
|
+
# @return [Logger]
|
331
|
+
#
|
332
|
+
def logger
|
333
|
+
@dataplex_service_stub.logger
|
334
|
+
end
|
335
|
+
|
314
336
|
# Service calls
|
315
337
|
|
316
338
|
##
|
@@ -410,7 +432,7 @@ module Google
|
|
410
432
|
@dataplex_service_stub.create_lake request, options do |result, operation|
|
411
433
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
412
434
|
yield result, operation if block_given?
|
413
|
-
|
435
|
+
throw :response, result
|
414
436
|
end
|
415
437
|
rescue ::Gapic::Rest::Error => e
|
416
438
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -503,7 +525,7 @@ module Google
|
|
503
525
|
@dataplex_service_stub.update_lake request, options do |result, operation|
|
504
526
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
505
527
|
yield result, operation if block_given?
|
506
|
-
|
528
|
+
throw :response, result
|
507
529
|
end
|
508
530
|
rescue ::Gapic::Rest::Error => e
|
509
531
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +614,7 @@ module Google
|
|
592
614
|
@dataplex_service_stub.delete_lake request, options do |result, operation|
|
593
615
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
594
616
|
yield result, operation if block_given?
|
595
|
-
|
617
|
+
throw :response, result
|
596
618
|
end
|
597
619
|
rescue ::Gapic::Rest::Error => e
|
598
620
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -689,7 +711,6 @@ module Google
|
|
689
711
|
|
690
712
|
@dataplex_service_stub.list_lakes request, options do |result, operation|
|
691
713
|
yield result, operation if block_given?
|
692
|
-
return result
|
693
714
|
end
|
694
715
|
rescue ::Gapic::Rest::Error => e
|
695
716
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -769,7 +790,6 @@ module Google
|
|
769
790
|
|
770
791
|
@dataplex_service_stub.get_lake request, options do |result, operation|
|
771
792
|
yield result, operation if block_given?
|
772
|
-
return result
|
773
793
|
end
|
774
794
|
rescue ::Gapic::Rest::Error => e
|
775
795
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -863,7 +883,7 @@ module Google
|
|
863
883
|
@dataplex_service_stub.list_lake_actions request, options do |result, operation|
|
864
884
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, "actions", request, result, options
|
865
885
|
yield result, operation if block_given?
|
866
|
-
|
886
|
+
throw :response, result
|
867
887
|
end
|
868
888
|
rescue ::Gapic::Rest::Error => e
|
869
889
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -966,7 +986,7 @@ module Google
|
|
966
986
|
@dataplex_service_stub.create_zone request, options do |result, operation|
|
967
987
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
968
988
|
yield result, operation if block_given?
|
969
|
-
|
989
|
+
throw :response, result
|
970
990
|
end
|
971
991
|
rescue ::Gapic::Rest::Error => e
|
972
992
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1059,7 +1079,7 @@ module Google
|
|
1059
1079
|
@dataplex_service_stub.update_zone request, options do |result, operation|
|
1060
1080
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1061
1081
|
yield result, operation if block_given?
|
1062
|
-
|
1082
|
+
throw :response, result
|
1063
1083
|
end
|
1064
1084
|
rescue ::Gapic::Rest::Error => e
|
1065
1085
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1148,7 +1168,7 @@ module Google
|
|
1148
1168
|
@dataplex_service_stub.delete_zone request, options do |result, operation|
|
1149
1169
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1150
1170
|
yield result, operation if block_given?
|
1151
|
-
|
1171
|
+
throw :response, result
|
1152
1172
|
end
|
1153
1173
|
rescue ::Gapic::Rest::Error => e
|
1154
1174
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1245,7 +1265,7 @@ module Google
|
|
1245
1265
|
@dataplex_service_stub.list_zones request, options do |result, operation|
|
1246
1266
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zones, "zones", request, result, options
|
1247
1267
|
yield result, operation if block_given?
|
1248
|
-
|
1268
|
+
throw :response, result
|
1249
1269
|
end
|
1250
1270
|
rescue ::Gapic::Rest::Error => e
|
1251
1271
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1325,7 +1345,6 @@ module Google
|
|
1325
1345
|
|
1326
1346
|
@dataplex_service_stub.get_zone request, options do |result, operation|
|
1327
1347
|
yield result, operation if block_given?
|
1328
|
-
return result
|
1329
1348
|
end
|
1330
1349
|
rescue ::Gapic::Rest::Error => e
|
1331
1350
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1419,7 +1438,7 @@ module Google
|
|
1419
1438
|
@dataplex_service_stub.list_zone_actions request, options do |result, operation|
|
1420
1439
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, "actions", request, result, options
|
1421
1440
|
yield result, operation if block_given?
|
1422
|
-
|
1441
|
+
throw :response, result
|
1423
1442
|
end
|
1424
1443
|
rescue ::Gapic::Rest::Error => e
|
1425
1444
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1521,7 +1540,7 @@ module Google
|
|
1521
1540
|
@dataplex_service_stub.create_asset request, options do |result, operation|
|
1522
1541
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1523
1542
|
yield result, operation if block_given?
|
1524
|
-
|
1543
|
+
throw :response, result
|
1525
1544
|
end
|
1526
1545
|
rescue ::Gapic::Rest::Error => e
|
1527
1546
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1614,7 +1633,7 @@ module Google
|
|
1614
1633
|
@dataplex_service_stub.update_asset request, options do |result, operation|
|
1615
1634
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1616
1635
|
yield result, operation if block_given?
|
1617
|
-
|
1636
|
+
throw :response, result
|
1618
1637
|
end
|
1619
1638
|
rescue ::Gapic::Rest::Error => e
|
1620
1639
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1703,7 +1722,7 @@ module Google
|
|
1703
1722
|
@dataplex_service_stub.delete_asset request, options do |result, operation|
|
1704
1723
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1705
1724
|
yield result, operation if block_given?
|
1706
|
-
|
1725
|
+
throw :response, result
|
1707
1726
|
end
|
1708
1727
|
rescue ::Gapic::Rest::Error => e
|
1709
1728
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1801,7 +1820,7 @@ module Google
|
|
1801
1820
|
@dataplex_service_stub.list_assets request, options do |result, operation|
|
1802
1821
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_assets, "assets", request, result, options
|
1803
1822
|
yield result, operation if block_given?
|
1804
|
-
|
1823
|
+
throw :response, result
|
1805
1824
|
end
|
1806
1825
|
rescue ::Gapic::Rest::Error => e
|
1807
1826
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1881,7 +1900,6 @@ module Google
|
|
1881
1900
|
|
1882
1901
|
@dataplex_service_stub.get_asset request, options do |result, operation|
|
1883
1902
|
yield result, operation if block_given?
|
1884
|
-
return result
|
1885
1903
|
end
|
1886
1904
|
rescue ::Gapic::Rest::Error => e
|
1887
1905
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1975,7 +1993,7 @@ module Google
|
|
1975
1993
|
@dataplex_service_stub.list_asset_actions request, options do |result, operation|
|
1976
1994
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, "actions", request, result, options
|
1977
1995
|
yield result, operation if block_given?
|
1978
|
-
|
1996
|
+
throw :response, result
|
1979
1997
|
end
|
1980
1998
|
rescue ::Gapic::Rest::Error => e
|
1981
1999
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2070,7 +2088,7 @@ module Google
|
|
2070
2088
|
@dataplex_service_stub.create_task request, options do |result, operation|
|
2071
2089
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2072
2090
|
yield result, operation if block_given?
|
2073
|
-
|
2091
|
+
throw :response, result
|
2074
2092
|
end
|
2075
2093
|
rescue ::Gapic::Rest::Error => e
|
2076
2094
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2163,7 +2181,7 @@ module Google
|
|
2163
2181
|
@dataplex_service_stub.update_task request, options do |result, operation|
|
2164
2182
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2165
2183
|
yield result, operation if block_given?
|
2166
|
-
|
2184
|
+
throw :response, result
|
2167
2185
|
end
|
2168
2186
|
rescue ::Gapic::Rest::Error => e
|
2169
2187
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2251,7 +2269,7 @@ module Google
|
|
2251
2269
|
@dataplex_service_stub.delete_task request, options do |result, operation|
|
2252
2270
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2253
2271
|
yield result, operation if block_given?
|
2254
|
-
|
2272
|
+
throw :response, result
|
2255
2273
|
end
|
2256
2274
|
rescue ::Gapic::Rest::Error => e
|
2257
2275
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2347,7 +2365,6 @@ module Google
|
|
2347
2365
|
|
2348
2366
|
@dataplex_service_stub.list_tasks request, options do |result, operation|
|
2349
2367
|
yield result, operation if block_given?
|
2350
|
-
return result
|
2351
2368
|
end
|
2352
2369
|
rescue ::Gapic::Rest::Error => e
|
2353
2370
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2427,7 +2444,6 @@ module Google
|
|
2427
2444
|
|
2428
2445
|
@dataplex_service_stub.get_task request, options do |result, operation|
|
2429
2446
|
yield result, operation if block_given?
|
2430
|
-
return result
|
2431
2447
|
end
|
2432
2448
|
rescue ::Gapic::Rest::Error => e
|
2433
2449
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2521,7 +2537,7 @@ module Google
|
|
2521
2537
|
@dataplex_service_stub.list_jobs request, options do |result, operation|
|
2522
2538
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_jobs, "jobs", request, result, options
|
2523
2539
|
yield result, operation if block_given?
|
2524
|
-
|
2540
|
+
throw :response, result
|
2525
2541
|
end
|
2526
2542
|
rescue ::Gapic::Rest::Error => e
|
2527
2543
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2617,7 +2633,6 @@ module Google
|
|
2617
2633
|
|
2618
2634
|
@dataplex_service_stub.run_task request, options do |result, operation|
|
2619
2635
|
yield result, operation if block_given?
|
2620
|
-
return result
|
2621
2636
|
end
|
2622
2637
|
rescue ::Gapic::Rest::Error => e
|
2623
2638
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2697,7 +2712,6 @@ module Google
|
|
2697
2712
|
|
2698
2713
|
@dataplex_service_stub.get_job request, options do |result, operation|
|
2699
2714
|
yield result, operation if block_given?
|
2700
|
-
return result
|
2701
2715
|
end
|
2702
2716
|
rescue ::Gapic::Rest::Error => e
|
2703
2717
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2777,7 +2791,6 @@ module Google
|
|
2777
2791
|
|
2778
2792
|
@dataplex_service_stub.cancel_job request, options do |result, operation|
|
2779
2793
|
yield result, operation if block_given?
|
2780
|
-
return result
|
2781
2794
|
end
|
2782
2795
|
rescue ::Gapic::Rest::Error => e
|
2783
2796
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2877,7 +2890,7 @@ module Google
|
|
2877
2890
|
@dataplex_service_stub.create_environment request, options do |result, operation|
|
2878
2891
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2879
2892
|
yield result, operation if block_given?
|
2880
|
-
|
2893
|
+
throw :response, result
|
2881
2894
|
end
|
2882
2895
|
rescue ::Gapic::Rest::Error => e
|
2883
2896
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2970,7 +2983,7 @@ module Google
|
|
2970
2983
|
@dataplex_service_stub.update_environment request, options do |result, operation|
|
2971
2984
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2972
2985
|
yield result, operation if block_given?
|
2973
|
-
|
2986
|
+
throw :response, result
|
2974
2987
|
end
|
2975
2988
|
rescue ::Gapic::Rest::Error => e
|
2976
2989
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3059,7 +3072,7 @@ module Google
|
|
3059
3072
|
@dataplex_service_stub.delete_environment request, options do |result, operation|
|
3060
3073
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
3061
3074
|
yield result, operation if block_given?
|
3062
|
-
|
3075
|
+
throw :response, result
|
3063
3076
|
end
|
3064
3077
|
rescue ::Gapic::Rest::Error => e
|
3065
3078
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3158,7 +3171,7 @@ module Google
|
|
3158
3171
|
@dataplex_service_stub.list_environments request, options do |result, operation|
|
3159
3172
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_environments, "environments", request, result, options
|
3160
3173
|
yield result, operation if block_given?
|
3161
|
-
|
3174
|
+
throw :response, result
|
3162
3175
|
end
|
3163
3176
|
rescue ::Gapic::Rest::Error => e
|
3164
3177
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3238,7 +3251,6 @@ module Google
|
|
3238
3251
|
|
3239
3252
|
@dataplex_service_stub.get_environment request, options do |result, operation|
|
3240
3253
|
yield result, operation if block_given?
|
3241
|
-
return result
|
3242
3254
|
end
|
3243
3255
|
rescue ::Gapic::Rest::Error => e
|
3244
3256
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3342,7 +3354,7 @@ module Google
|
|
3342
3354
|
@dataplex_service_stub.list_sessions request, options do |result, operation|
|
3343
3355
|
result = ::Gapic::Rest::PagedEnumerable.new @dataplex_service_stub, :list_sessions, "sessions", request, result, options
|
3344
3356
|
yield result, operation if block_given?
|
3345
|
-
|
3357
|
+
throw :response, result
|
3346
3358
|
end
|
3347
3359
|
rescue ::Gapic::Rest::Error => e
|
3348
3360
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3422,6 +3434,11 @@ module Google
|
|
3422
3434
|
# default endpoint URL. The default value of nil uses the environment
|
3423
3435
|
# universe (usually the default "googleapis.com" universe).
|
3424
3436
|
# @return [::String,nil]
|
3437
|
+
# @!attribute [rw] logger
|
3438
|
+
# A custom logger to use for request/response debug logging, or the value
|
3439
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
3440
|
+
# explicitly disable logging.
|
3441
|
+
# @return [::Logger,:default,nil]
|
3425
3442
|
#
|
3426
3443
|
class Configuration
|
3427
3444
|
extend ::Gapic::Config
|
@@ -3450,6 +3467,7 @@ module Google
|
|
3450
3467
|
# by the host service.
|
3451
3468
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
3452
3469
|
config_attr :bindings_override, {}, ::Hash, nil
|
3470
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
3453
3471
|
|
3454
3472
|
# @private
|
3455
3473
|
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
|
##
|