google-cloud-deploy-v1 1.3.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -305,15 +305,27 @@ module Google
305
305
  endpoint: @config.endpoint,
306
306
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
307
307
  universe_domain: @config.universe_domain,
308
- credentials: credentials
308
+ credentials: credentials,
309
+ logger: @config.logger
309
310
  )
310
311
 
312
+ @cloud_deploy_stub.logger(stub: true)&.info do |entry|
313
+ entry.set_system_name
314
+ entry.set_service
315
+ entry.message = "Created client for #{entry.service}"
316
+ entry.set_credentials_fields credentials
317
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
318
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
319
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
320
+ end
321
+
311
322
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
312
323
  config.credentials = credentials
313
324
  config.quota_project = @quota_project_id
314
325
  config.endpoint = @cloud_deploy_stub.endpoint
315
326
  config.universe_domain = @cloud_deploy_stub.universe_domain
316
327
  config.bindings_override = @config.bindings_override
328
+ config.logger = @cloud_deploy_stub.logger if config.respond_to? :logger=
317
329
  end
318
330
 
319
331
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -322,6 +334,7 @@ module Google
322
334
  config.endpoint = @cloud_deploy_stub.endpoint
323
335
  config.universe_domain = @cloud_deploy_stub.universe_domain
324
336
  config.bindings_override = @config.bindings_override
337
+ config.logger = @cloud_deploy_stub.logger if config.respond_to? :logger=
325
338
  end
326
339
  end
327
340
 
@@ -346,6 +359,15 @@ module Google
346
359
  #
347
360
  attr_reader :iam_policy_client
348
361
 
362
+ ##
363
+ # The logger used for request/response debug logging.
364
+ #
365
+ # @return [Logger]
366
+ #
367
+ def logger
368
+ @cloud_deploy_stub.logger
369
+ end
370
+
349
371
  # Service calls
350
372
 
351
373
  ##
@@ -442,7 +464,6 @@ module Google
442
464
 
443
465
  @cloud_deploy_stub.list_delivery_pipelines request, options do |result, operation|
444
466
  yield result, operation if block_given?
445
- return result
446
467
  end
447
468
  rescue ::Gapic::Rest::Error => e
448
469
  raise ::Google::Cloud::Error.from_error(e)
@@ -522,7 +543,6 @@ module Google
522
543
 
523
544
  @cloud_deploy_stub.get_delivery_pipeline request, options do |result, operation|
524
545
  yield result, operation if block_given?
525
- return result
526
546
  end
527
547
  rescue ::Gapic::Rest::Error => e
528
548
  raise ::Google::Cloud::Error.from_error(e)
@@ -631,7 +651,7 @@ module Google
631
651
  @cloud_deploy_stub.create_delivery_pipeline request, options do |result, operation|
632
652
  result = ::Gapic::Operation.new result, @operations_client, options: options
633
653
  yield result, operation if block_given?
634
- return result
654
+ throw :response, result
635
655
  end
636
656
  rescue ::Gapic::Rest::Error => e
637
657
  raise ::Google::Cloud::Error.from_error(e)
@@ -744,7 +764,7 @@ module Google
744
764
  @cloud_deploy_stub.update_delivery_pipeline request, options do |result, operation|
745
765
  result = ::Gapic::Operation.new result, @operations_client, options: options
746
766
  yield result, operation if block_given?
747
- return result
767
+ throw :response, result
748
768
  end
749
769
  rescue ::Gapic::Rest::Error => e
750
770
  raise ::Google::Cloud::Error.from_error(e)
@@ -860,7 +880,7 @@ module Google
860
880
  @cloud_deploy_stub.delete_delivery_pipeline request, options do |result, operation|
861
881
  result = ::Gapic::Operation.new result, @operations_client, options: options
862
882
  yield result, operation if block_given?
863
- return result
883
+ throw :response, result
864
884
  end
865
885
  rescue ::Gapic::Rest::Error => e
866
886
  raise ::Google::Cloud::Error.from_error(e)
@@ -961,7 +981,6 @@ module Google
961
981
 
962
982
  @cloud_deploy_stub.list_targets request, options do |result, operation|
963
983
  yield result, operation if block_given?
964
- return result
965
984
  end
966
985
  rescue ::Gapic::Rest::Error => e
967
986
  raise ::Google::Cloud::Error.from_error(e)
@@ -1061,7 +1080,6 @@ module Google
1061
1080
 
1062
1081
  @cloud_deploy_stub.rollback_target request, options do |result, operation|
1063
1082
  yield result, operation if block_given?
1064
- return result
1065
1083
  end
1066
1084
  rescue ::Gapic::Rest::Error => e
1067
1085
  raise ::Google::Cloud::Error.from_error(e)
@@ -1141,7 +1159,6 @@ module Google
1141
1159
 
1142
1160
  @cloud_deploy_stub.get_target request, options do |result, operation|
1143
1161
  yield result, operation if block_given?
1144
- return result
1145
1162
  end
1146
1163
  rescue ::Gapic::Rest::Error => e
1147
1164
  raise ::Google::Cloud::Error.from_error(e)
@@ -1251,7 +1268,7 @@ module Google
1251
1268
  @cloud_deploy_stub.create_target request, options do |result, operation|
1252
1269
  result = ::Gapic::Operation.new result, @operations_client, options: options
1253
1270
  yield result, operation if block_given?
1254
- return result
1271
+ throw :response, result
1255
1272
  end
1256
1273
  rescue ::Gapic::Rest::Error => e
1257
1274
  raise ::Google::Cloud::Error.from_error(e)
@@ -1364,7 +1381,7 @@ module Google
1364
1381
  @cloud_deploy_stub.update_target request, options do |result, operation|
1365
1382
  result = ::Gapic::Operation.new result, @operations_client, options: options
1366
1383
  yield result, operation if block_given?
1367
- return result
1384
+ throw :response, result
1368
1385
  end
1369
1386
  rescue ::Gapic::Rest::Error => e
1370
1387
  raise ::Google::Cloud::Error.from_error(e)
@@ -1476,7 +1493,7 @@ module Google
1476
1493
  @cloud_deploy_stub.delete_target request, options do |result, operation|
1477
1494
  result = ::Gapic::Operation.new result, @operations_client, options: options
1478
1495
  yield result, operation if block_given?
1479
- return result
1496
+ throw :response, result
1480
1497
  end
1481
1498
  rescue ::Gapic::Rest::Error => e
1482
1499
  raise ::Google::Cloud::Error.from_error(e)
@@ -1577,7 +1594,6 @@ module Google
1577
1594
 
1578
1595
  @cloud_deploy_stub.list_custom_target_types request, options do |result, operation|
1579
1596
  yield result, operation if block_given?
1580
- return result
1581
1597
  end
1582
1598
  rescue ::Gapic::Rest::Error => e
1583
1599
  raise ::Google::Cloud::Error.from_error(e)
@@ -1657,7 +1673,6 @@ module Google
1657
1673
 
1658
1674
  @cloud_deploy_stub.get_custom_target_type request, options do |result, operation|
1659
1675
  yield result, operation if block_given?
1660
- return result
1661
1676
  end
1662
1677
  rescue ::Gapic::Rest::Error => e
1663
1678
  raise ::Google::Cloud::Error.from_error(e)
@@ -1766,7 +1781,7 @@ module Google
1766
1781
  @cloud_deploy_stub.create_custom_target_type request, options do |result, operation|
1767
1782
  result = ::Gapic::Operation.new result, @operations_client, options: options
1768
1783
  yield result, operation if block_given?
1769
- return result
1784
+ throw :response, result
1770
1785
  end
1771
1786
  rescue ::Gapic::Rest::Error => e
1772
1787
  raise ::Google::Cloud::Error.from_error(e)
@@ -1879,7 +1894,7 @@ module Google
1879
1894
  @cloud_deploy_stub.update_custom_target_type request, options do |result, operation|
1880
1895
  result = ::Gapic::Operation.new result, @operations_client, options: options
1881
1896
  yield result, operation if block_given?
1882
- return result
1897
+ throw :response, result
1883
1898
  end
1884
1899
  rescue ::Gapic::Rest::Error => e
1885
1900
  raise ::Google::Cloud::Error.from_error(e)
@@ -1991,7 +2006,7 @@ module Google
1991
2006
  @cloud_deploy_stub.delete_custom_target_type request, options do |result, operation|
1992
2007
  result = ::Gapic::Operation.new result, @operations_client, options: options
1993
2008
  yield result, operation if block_given?
1994
- return result
2009
+ throw :response, result
1995
2010
  end
1996
2011
  rescue ::Gapic::Rest::Error => e
1997
2012
  raise ::Google::Cloud::Error.from_error(e)
@@ -2092,7 +2107,6 @@ module Google
2092
2107
 
2093
2108
  @cloud_deploy_stub.list_releases request, options do |result, operation|
2094
2109
  yield result, operation if block_given?
2095
- return result
2096
2110
  end
2097
2111
  rescue ::Gapic::Rest::Error => e
2098
2112
  raise ::Google::Cloud::Error.from_error(e)
@@ -2172,7 +2186,6 @@ module Google
2172
2186
 
2173
2187
  @cloud_deploy_stub.get_release request, options do |result, operation|
2174
2188
  yield result, operation if block_given?
2175
- return result
2176
2189
  end
2177
2190
  rescue ::Gapic::Rest::Error => e
2178
2191
  raise ::Google::Cloud::Error.from_error(e)
@@ -2285,7 +2298,7 @@ module Google
2285
2298
  @cloud_deploy_stub.create_release request, options do |result, operation|
2286
2299
  result = ::Gapic::Operation.new result, @operations_client, options: options
2287
2300
  yield result, operation if block_given?
2288
- return result
2301
+ throw :response, result
2289
2302
  end
2290
2303
  rescue ::Gapic::Rest::Error => e
2291
2304
  raise ::Google::Cloud::Error.from_error(e)
@@ -2365,7 +2378,6 @@ module Google
2365
2378
 
2366
2379
  @cloud_deploy_stub.abandon_release request, options do |result, operation|
2367
2380
  yield result, operation if block_given?
2368
- return result
2369
2381
  end
2370
2382
  rescue ::Gapic::Rest::Error => e
2371
2383
  raise ::Google::Cloud::Error.from_error(e)
@@ -2474,7 +2486,7 @@ module Google
2474
2486
  @cloud_deploy_stub.create_deploy_policy request, options do |result, operation|
2475
2487
  result = ::Gapic::Operation.new result, @operations_client, options: options
2476
2488
  yield result, operation if block_given?
2477
- return result
2489
+ throw :response, result
2478
2490
  end
2479
2491
  rescue ::Gapic::Rest::Error => e
2480
2492
  raise ::Google::Cloud::Error.from_error(e)
@@ -2587,7 +2599,7 @@ module Google
2587
2599
  @cloud_deploy_stub.update_deploy_policy request, options do |result, operation|
2588
2600
  result = ::Gapic::Operation.new result, @operations_client, options: options
2589
2601
  yield result, operation if block_given?
2590
- return result
2602
+ throw :response, result
2591
2603
  end
2592
2604
  rescue ::Gapic::Rest::Error => e
2593
2605
  raise ::Google::Cloud::Error.from_error(e)
@@ -2699,7 +2711,7 @@ module Google
2699
2711
  @cloud_deploy_stub.delete_deploy_policy request, options do |result, operation|
2700
2712
  result = ::Gapic::Operation.new result, @operations_client, options: options
2701
2713
  yield result, operation if block_given?
2702
- return result
2714
+ throw :response, result
2703
2715
  end
2704
2716
  rescue ::Gapic::Rest::Error => e
2705
2717
  raise ::Google::Cloud::Error.from_error(e)
@@ -2799,7 +2811,6 @@ module Google
2799
2811
 
2800
2812
  @cloud_deploy_stub.list_deploy_policies request, options do |result, operation|
2801
2813
  yield result, operation if block_given?
2802
- return result
2803
2814
  end
2804
2815
  rescue ::Gapic::Rest::Error => e
2805
2816
  raise ::Google::Cloud::Error.from_error(e)
@@ -2879,7 +2890,6 @@ module Google
2879
2890
 
2880
2891
  @cloud_deploy_stub.get_deploy_policy request, options do |result, operation|
2881
2892
  yield result, operation if block_given?
2882
- return result
2883
2893
  end
2884
2894
  rescue ::Gapic::Rest::Error => e
2885
2895
  raise ::Google::Cloud::Error.from_error(e)
@@ -2964,7 +2974,6 @@ module Google
2964
2974
 
2965
2975
  @cloud_deploy_stub.approve_rollout request, options do |result, operation|
2966
2976
  yield result, operation if block_given?
2967
- return result
2968
2977
  end
2969
2978
  rescue ::Gapic::Rest::Error => e
2970
2979
  raise ::Google::Cloud::Error.from_error(e)
@@ -3049,7 +3058,6 @@ module Google
3049
3058
 
3050
3059
  @cloud_deploy_stub.advance_rollout request, options do |result, operation|
3051
3060
  yield result, operation if block_given?
3052
- return result
3053
3061
  end
3054
3062
  rescue ::Gapic::Rest::Error => e
3055
3063
  raise ::Google::Cloud::Error.from_error(e)
@@ -3132,7 +3140,6 @@ module Google
3132
3140
 
3133
3141
  @cloud_deploy_stub.cancel_rollout request, options do |result, operation|
3134
3142
  yield result, operation if block_given?
3135
- return result
3136
3143
  end
3137
3144
  rescue ::Gapic::Rest::Error => e
3138
3145
  raise ::Google::Cloud::Error.from_error(e)
@@ -3232,7 +3239,6 @@ module Google
3232
3239
 
3233
3240
  @cloud_deploy_stub.list_rollouts request, options do |result, operation|
3234
3241
  yield result, operation if block_given?
3235
- return result
3236
3242
  end
3237
3243
  rescue ::Gapic::Rest::Error => e
3238
3244
  raise ::Google::Cloud::Error.from_error(e)
@@ -3312,7 +3318,6 @@ module Google
3312
3318
 
3313
3319
  @cloud_deploy_stub.get_rollout request, options do |result, operation|
3314
3320
  yield result, operation if block_given?
3315
- return result
3316
3321
  end
3317
3322
  rescue ::Gapic::Rest::Error => e
3318
3323
  raise ::Google::Cloud::Error.from_error(e)
@@ -3428,7 +3433,7 @@ module Google
3428
3433
  @cloud_deploy_stub.create_rollout request, options do |result, operation|
3429
3434
  result = ::Gapic::Operation.new result, @operations_client, options: options
3430
3435
  yield result, operation if block_given?
3431
- return result
3436
+ throw :response, result
3432
3437
  end
3433
3438
  rescue ::Gapic::Rest::Error => e
3434
3439
  raise ::Google::Cloud::Error.from_error(e)
@@ -3515,7 +3520,6 @@ module Google
3515
3520
 
3516
3521
  @cloud_deploy_stub.ignore_job request, options do |result, operation|
3517
3522
  yield result, operation if block_given?
3518
- return result
3519
3523
  end
3520
3524
  rescue ::Gapic::Rest::Error => e
3521
3525
  raise ::Google::Cloud::Error.from_error(e)
@@ -3602,7 +3606,6 @@ module Google
3602
3606
 
3603
3607
  @cloud_deploy_stub.retry_job request, options do |result, operation|
3604
3608
  yield result, operation if block_given?
3605
- return result
3606
3609
  end
3607
3610
  rescue ::Gapic::Rest::Error => e
3608
3611
  raise ::Google::Cloud::Error.from_error(e)
@@ -3702,7 +3705,6 @@ module Google
3702
3705
 
3703
3706
  @cloud_deploy_stub.list_job_runs request, options do |result, operation|
3704
3707
  yield result, operation if block_given?
3705
- return result
3706
3708
  end
3707
3709
  rescue ::Gapic::Rest::Error => e
3708
3710
  raise ::Google::Cloud::Error.from_error(e)
@@ -3782,7 +3784,6 @@ module Google
3782
3784
 
3783
3785
  @cloud_deploy_stub.get_job_run request, options do |result, operation|
3784
3786
  yield result, operation if block_given?
3785
- return result
3786
3787
  end
3787
3788
  rescue ::Gapic::Rest::Error => e
3788
3789
  raise ::Google::Cloud::Error.from_error(e)
@@ -3865,7 +3866,6 @@ module Google
3865
3866
 
3866
3867
  @cloud_deploy_stub.terminate_job_run request, options do |result, operation|
3867
3868
  yield result, operation if block_given?
3868
- return result
3869
3869
  end
3870
3870
  rescue ::Gapic::Rest::Error => e
3871
3871
  raise ::Google::Cloud::Error.from_error(e)
@@ -3944,7 +3944,6 @@ module Google
3944
3944
 
3945
3945
  @cloud_deploy_stub.get_config request, options do |result, operation|
3946
3946
  yield result, operation if block_given?
3947
- return result
3948
3947
  end
3949
3948
  rescue ::Gapic::Rest::Error => e
3950
3949
  raise ::Google::Cloud::Error.from_error(e)
@@ -4054,7 +4053,7 @@ module Google
4054
4053
  @cloud_deploy_stub.create_automation request, options do |result, operation|
4055
4054
  result = ::Gapic::Operation.new result, @operations_client, options: options
4056
4055
  yield result, operation if block_given?
4057
- return result
4056
+ throw :response, result
4058
4057
  end
4059
4058
  rescue ::Gapic::Rest::Error => e
4060
4059
  raise ::Google::Cloud::Error.from_error(e)
@@ -4167,7 +4166,7 @@ module Google
4167
4166
  @cloud_deploy_stub.update_automation request, options do |result, operation|
4168
4167
  result = ::Gapic::Operation.new result, @operations_client, options: options
4169
4168
  yield result, operation if block_given?
4170
- return result
4169
+ throw :response, result
4171
4170
  end
4172
4171
  rescue ::Gapic::Rest::Error => e
4173
4172
  raise ::Google::Cloud::Error.from_error(e)
@@ -4280,7 +4279,7 @@ module Google
4280
4279
  @cloud_deploy_stub.delete_automation request, options do |result, operation|
4281
4280
  result = ::Gapic::Operation.new result, @operations_client, options: options
4282
4281
  yield result, operation if block_given?
4283
- return result
4282
+ throw :response, result
4284
4283
  end
4285
4284
  rescue ::Gapic::Rest::Error => e
4286
4285
  raise ::Google::Cloud::Error.from_error(e)
@@ -4360,7 +4359,6 @@ module Google
4360
4359
 
4361
4360
  @cloud_deploy_stub.get_automation request, options do |result, operation|
4362
4361
  yield result, operation if block_given?
4363
- return result
4364
4362
  end
4365
4363
  rescue ::Gapic::Rest::Error => e
4366
4364
  raise ::Google::Cloud::Error.from_error(e)
@@ -4461,7 +4459,6 @@ module Google
4461
4459
 
4462
4460
  @cloud_deploy_stub.list_automations request, options do |result, operation|
4463
4461
  yield result, operation if block_given?
4464
- return result
4465
4462
  end
4466
4463
  rescue ::Gapic::Rest::Error => e
4467
4464
  raise ::Google::Cloud::Error.from_error(e)
@@ -4541,7 +4538,6 @@ module Google
4541
4538
 
4542
4539
  @cloud_deploy_stub.get_automation_run request, options do |result, operation|
4543
4540
  yield result, operation if block_given?
4544
- return result
4545
4541
  end
4546
4542
  rescue ::Gapic::Rest::Error => e
4547
4543
  raise ::Google::Cloud::Error.from_error(e)
@@ -4642,7 +4638,6 @@ module Google
4642
4638
 
4643
4639
  @cloud_deploy_stub.list_automation_runs request, options do |result, operation|
4644
4640
  yield result, operation if block_given?
4645
- return result
4646
4641
  end
4647
4642
  rescue ::Gapic::Rest::Error => e
4648
4643
  raise ::Google::Cloud::Error.from_error(e)
@@ -4725,7 +4720,6 @@ module Google
4725
4720
 
4726
4721
  @cloud_deploy_stub.cancel_automation_run request, options do |result, operation|
4727
4722
  yield result, operation if block_given?
4728
- return result
4729
4723
  end
4730
4724
  rescue ::Gapic::Rest::Error => e
4731
4725
  raise ::Google::Cloud::Error.from_error(e)
@@ -4805,6 +4799,11 @@ module Google
4805
4799
  # default endpoint URL. The default value of nil uses the environment
4806
4800
  # universe (usually the default "googleapis.com" universe).
4807
4801
  # @return [::String,nil]
4802
+ # @!attribute [rw] logger
4803
+ # A custom logger to use for request/response debug logging, or the value
4804
+ # `:default` (the default) to construct a default logger, or `nil` to
4805
+ # explicitly disable logging.
4806
+ # @return [::Logger,:default,nil]
4808
4807
  #
4809
4808
  class Configuration
4810
4809
  extend ::Gapic::Config
@@ -4833,6 +4832,7 @@ module Google
4833
4832
  # by the host service.
4834
4833
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4835
4834
  config_attr :bindings_override, {}, ::Hash, nil
4835
+ config_attr :logger, :default, ::Logger, nil, :default
4836
4836
 
4837
4837
  # @private
4838
4838
  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
  ##