google-cloud-deploy-v1 1.4.0 → 1.6.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.
@@ -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)
@@ -4773,6 +4767,13 @@ module Google
4773
4767
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4774
4768
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4775
4769
  # * (`nil`) indicating no credentials
4770
+ #
4771
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
4772
+ # external source for authentication to Google Cloud, you must validate it before
4773
+ # providing it to a Google API client library. Providing an unvalidated credential
4774
+ # configuration to Google APIs can compromise the security of your systems and data.
4775
+ # For more information, refer to [Validate credential configurations from external
4776
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
4776
4777
  # @return [::Object]
4777
4778
  # @!attribute [rw] scope
4778
4779
  # The OAuth scopes
@@ -4805,6 +4806,11 @@ module Google
4805
4806
  # default endpoint URL. The default value of nil uses the environment
4806
4807
  # universe (usually the default "googleapis.com" universe).
4807
4808
  # @return [::String,nil]
4809
+ # @!attribute [rw] logger
4810
+ # A custom logger to use for request/response debug logging, or the value
4811
+ # `:default` (the default) to construct a default logger, or `nil` to
4812
+ # explicitly disable logging.
4813
+ # @return [::Logger,:default,nil]
4808
4814
  #
4809
4815
  class Configuration
4810
4816
  extend ::Gapic::Config
@@ -4833,6 +4839,7 @@ module Google
4833
4839
  # by the host service.
4834
4840
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4835
4841
  config_attr :bindings_override, {}, ::Hash, nil
4842
+ config_attr :logger, :default, ::Logger, nil, :default
4836
4843
 
4837
4844
  # @private
4838
4845
  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
- return result
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
- return result
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)
@@ -504,6 +502,13 @@ module Google
504
502
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
505
503
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
506
504
  # * (`nil`) indicating no credentials
505
+ #
506
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
507
+ # external source for authentication to Google Cloud, you must validate it before
508
+ # providing it to a Google API client library. Providing an unvalidated credential
509
+ # configuration to Google APIs can compromise the security of your systems and data.
510
+ # For more information, refer to [Validate credential configurations from external
511
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
507
512
  # @return [::Object]
508
513
  # @!attribute [rw] scope
509
514
  # The OAuth scopes
@@ -536,6 +541,11 @@ module Google
536
541
  # default endpoint URL. The default value of nil uses the environment
537
542
  # universe (usually the default "googleapis.com" universe).
538
543
  # @return [::String,nil]
544
+ # @!attribute [rw] logger
545
+ # A custom logger to use for request/response debug logging, or the value
546
+ # `:default` (the default) to construct a default logger, or `nil` to
547
+ # explicitly disable logging.
548
+ # @return [::Logger,:default,nil]
539
549
  #
540
550
  class Configuration
541
551
  extend ::Gapic::Config
@@ -557,6 +567,7 @@ module Google
557
567
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
568
  config_attr :quota_project, nil, ::String, nil
559
569
  config_attr :universe_domain, nil, ::String, nil
570
+ config_attr :logger, :default, ::Logger, nil, :default
560
571
 
561
572
  # @private
562
573
  def initialize parent_config = nil
@@ -676,16 +687,18 @@ module Google
676
687
 
677
688
  response = @client_stub.make_http_request(
678
689
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
690
+ uri: uri,
691
+ body: body || "",
692
+ params: query_string_params,
693
+ method_name: "list_operations",
682
694
  options: options
683
695
  )
684
696
  operation = ::Gapic::Rest::TransportOperation.new response
685
697
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
698
+ catch :response do
699
+ yield result, operation if block_given?
700
+ result
701
+ end
689
702
  end
690
703
 
691
704
  ##
@@ -714,16 +727,18 @@ module Google
714
727
 
715
728
  response = @client_stub.make_http_request(
716
729
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
730
+ uri: uri,
731
+ body: body || "",
732
+ params: query_string_params,
733
+ method_name: "get_operation",
720
734
  options: options
721
735
  )
722
736
  operation = ::Gapic::Rest::TransportOperation.new response
723
737
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
738
+ catch :response do
739
+ yield result, operation if block_given?
740
+ result
741
+ end
727
742
  end
728
743
 
729
744
  ##
@@ -752,16 +767,18 @@ module Google
752
767
 
753
768
  response = @client_stub.make_http_request(
754
769
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
770
+ uri: uri,
771
+ body: body || "",
772
+ params: query_string_params,
773
+ method_name: "delete_operation",
758
774
  options: options
759
775
  )
760
776
  operation = ::Gapic::Rest::TransportOperation.new response
761
777
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
778
+ catch :response do
779
+ yield result, operation if block_given?
780
+ result
781
+ end
765
782
  end
766
783
 
767
784
  ##
@@ -790,16 +807,18 @@ module Google
790
807
 
791
808
  response = @client_stub.make_http_request(
792
809
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
810
+ uri: uri,
811
+ body: body || "",
812
+ params: query_string_params,
813
+ method_name: "cancel_operation",
796
814
  options: options
797
815
  )
798
816
  operation = ::Gapic::Rest::TransportOperation.new response
799
817
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
818
+ catch :response do
819
+ yield result, operation if block_given?
820
+ result
821
+ end
803
822
  end
804
823
 
805
824
  ##