google-cloud-dataplex-v1 1.0.1 → 1.2.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/dataplex/v1/bindings_override.rb +120 -0
  4. data/lib/google/cloud/dataplex/v1/catalog_pb.rb +17 -1
  5. data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +626 -144
  6. data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +12 -15
  7. data/lib/google/cloud/dataplex/v1/catalog_service/paths.rb +19 -0
  8. data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +592 -144
  9. data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +72 -38
  10. data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +435 -133
  11. data/lib/google/cloud/dataplex/v1/catalog_service/rest.rb +4 -4
  12. data/lib/google/cloud/dataplex/v1/catalog_service.rb +4 -4
  13. data/lib/google/cloud/dataplex/v1/catalog_services_pb.rb +44 -20
  14. data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
  15. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
  16. data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
  17. data/lib/google/cloud/dataplex/v1/data_discovery_pb.rb +52 -0
  18. data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +1 -1
  19. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
  20. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +12 -15
  21. data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +36 -0
  22. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
  23. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +72 -38
  24. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
  25. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
  26. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +12 -15
  27. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
  28. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +72 -38
  29. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
  30. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
  31. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +12 -15
  32. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
  33. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +72 -38
  34. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
  35. data/lib/google/cloud/dataplex/v1/datascans_pb.rb +3 -1
  36. data/lib/google/cloud/dataplex/v1/logs_pb.rb +3 -1
  37. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
  38. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
  39. data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
  40. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  41. data/proto_docs/google/api/client.rb +39 -0
  42. data/proto_docs/google/api/field_info.rb +88 -0
  43. data/proto_docs/google/cloud/dataplex/v1/catalog.rb +710 -234
  44. data/proto_docs/google/cloud/dataplex/v1/data_discovery.rb +156 -0
  45. data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +4 -4
  46. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +7 -2
  47. data/proto_docs/google/cloud/dataplex/v1/datascans.rb +30 -12
  48. data/proto_docs/google/cloud/dataplex/v1/logs.rb +51 -1
  49. data/proto_docs/google/cloud/dataplex/v1/tasks.rb +3 -4
  50. data/proto_docs/google/longrunning/operations.rb +19 -14
  51. metadata +8 -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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
- return result
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
@@ -115,14 +115,6 @@ module Google
115
115
  # Lists operations that match the specified filter in the request. If the
116
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
117
117
  #
118
- # NOTE: the `name` binding allows API services to override the binding
119
- # to use different resource name schemes, such as `users/*/operations`. To
120
- # override the binding, API services can add a binding such as
121
- # `"/v1/{name=users/*}/operations"` to their service configuration.
122
- # For backwards compatibility, the default name includes the operations
123
- # collection id, however overriding users must ensure the name binding
124
- # is the parent resource, without the operations collection id.
125
- #
126
118
  # @overload list_operations(request, options = nil)
127
119
  # Pass arguments to `list_operations` via a request object, either of type
128
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -204,7 +196,7 @@ module Google
204
196
  @operations_stub.list_operations request, options do |result, operation|
205
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
206
198
  yield result, operation if block_given?
207
- return result
199
+ throw :response, result
208
200
  end
209
201
  rescue ::Gapic::Rest::Error => e
210
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -293,7 +285,7 @@ module Google
293
285
  @operations_stub.get_operation request, options do |result, operation|
294
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
295
287
  yield result, operation if block_given?
296
- return result
288
+ throw :response, result
297
289
  end
298
290
  rescue ::Gapic::Rest::Error => e
299
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -375,7 +367,6 @@ module Google
375
367
 
376
368
  @operations_stub.delete_operation request, options do |result, operation|
377
369
  yield result, operation if block_given?
378
- return result
379
370
  end
380
371
  rescue ::Gapic::Rest::Error => e
381
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -390,8 +381,9 @@ module Google
390
381
  # other methods to check whether the cancellation succeeded or whether the
391
382
  # operation completed despite cancellation. On successful cancellation,
392
383
  # the operation is not deleted; instead, it becomes an operation with
393
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
394
- # corresponding to `Code.CANCELLED`.
384
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
385
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
386
+ # `Code.CANCELLED`.
395
387
  #
396
388
  # @overload cancel_operation(request, options = nil)
397
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -463,7 +455,6 @@ module Google
463
455
 
464
456
  @operations_stub.cancel_operation request, options do |result, operation|
465
457
  yield result, operation if block_given?
466
- return result
467
458
  end
468
459
  rescue ::Gapic::Rest::Error => e
469
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -543,6 +534,11 @@ module Google
543
534
  # default endpoint URL. The default value of nil uses the environment
544
535
  # universe (usually the default "googleapis.com" universe).
545
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]
546
542
  #
547
543
  class Configuration
548
544
  extend ::Gapic::Config
@@ -564,6 +560,7 @@ module Google
564
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
565
561
  config_attr :quota_project, nil, ::String, nil
566
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
567
564
 
568
565
  # @private
569
566
  def initialize parent_config = nil
@@ -683,16 +680,18 @@ module Google
683
680
 
684
681
  response = @client_stub.make_http_request(
685
682
  verb,
686
- uri: uri,
687
- body: body || "",
688
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
689
687
  options: options
690
688
  )
691
689
  operation = ::Gapic::Rest::TransportOperation.new response
692
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
693
-
694
- yield result, operation if block_given?
695
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
696
695
  end
697
696
 
698
697
  ##
@@ -721,16 +720,18 @@ module Google
721
720
 
722
721
  response = @client_stub.make_http_request(
723
722
  verb,
724
- uri: uri,
725
- body: body || "",
726
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
727
727
  options: options
728
728
  )
729
729
  operation = ::Gapic::Rest::TransportOperation.new response
730
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
731
-
732
- yield result, operation if block_given?
733
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
734
735
  end
735
736
 
736
737
  ##
@@ -759,16 +760,18 @@ module Google
759
760
 
760
761
  response = @client_stub.make_http_request(
761
762
  verb,
762
- uri: uri,
763
- body: body || "",
764
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
765
767
  options: options
766
768
  )
767
769
  operation = ::Gapic::Rest::TransportOperation.new response
768
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, operation if block_given?
771
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
772
775
  end
773
776
 
774
777
  ##
@@ -797,16 +800,18 @@ module Google
797
800
 
798
801
  response = @client_stub.make_http_request(
799
802
  verb,
800
- uri: uri,
801
- body: body || "",
802
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
803
807
  options: options
804
808
  )
805
809
  operation = ::Gapic::Rest::TransportOperation.new response
806
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
807
-
808
- yield result, operation if block_given?
809
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
810
815
  end
811
816
 
812
817
  ##
@@ -827,6 +832,13 @@ module Google
827
832
  ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
828
833
  ]
829
834
  )
835
+ .with_bindings(
836
+ uri_method: :get,
837
+ uri_template: "/v1/{name}",
838
+ matches: [
839
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
840
+ ]
841
+ )
830
842
  transcoder.transcode request_pb
831
843
  end
832
844
 
@@ -848,6 +860,13 @@ module Google
848
860
  ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
849
861
  ]
850
862
  )
863
+ .with_bindings(
864
+ uri_method: :get,
865
+ uri_template: "/v1/{name}",
866
+ matches: [
867
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
868
+ ]
869
+ )
851
870
  transcoder.transcode request_pb
852
871
  end
853
872
 
@@ -869,6 +888,13 @@ module Google
869
888
  ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
870
889
  ]
871
890
  )
891
+ .with_bindings(
892
+ uri_method: :delete,
893
+ uri_template: "/v1/{name}",
894
+ matches: [
895
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
896
+ ]
897
+ )
872
898
  transcoder.transcode request_pb
873
899
  end
874
900
 
@@ -891,6 +917,14 @@ module Google
891
917
  ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
892
918
  ]
893
919
  )
920
+ .with_bindings(
921
+ uri_method: :post,
922
+ uri_template: "/v1/{name}:cancel",
923
+ body: "*",
924
+ matches: [
925
+ ["name", %r{^organizations/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false]
926
+ ]
927
+ )
894
928
  transcoder.transcode request_pb
895
929
  end
896
930
  end