google-cloud-channel-v1 1.1.0 → 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.
@@ -210,8 +210,19 @@ module Google
210
210
  universe_domain: @config.universe_domain,
211
211
  channel_args: @config.channel_args,
212
212
  interceptors: @config.interceptors,
213
- channel_pool_config: @config.channel_pool
213
+ channel_pool_config: @config.channel_pool,
214
+ logger: @config.logger
214
215
  )
216
+
217
+ @cloud_channel_service_stub.stub_logger&.info do |entry|
218
+ entry.set_system_name
219
+ entry.set_service
220
+ entry.message = "Created client for #{entry.service}"
221
+ entry.set_credentials_fields credentials
222
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
223
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
224
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
225
+ end
215
226
  end
216
227
 
217
228
  ##
@@ -221,6 +232,15 @@ module Google
221
232
  #
222
233
  attr_reader :operations_client
223
234
 
235
+ ##
236
+ # The logger used for request/response debug logging.
237
+ #
238
+ # @return [Logger]
239
+ #
240
+ def logger
241
+ @cloud_channel_service_stub.logger
242
+ end
243
+
224
244
  # Service calls
225
245
 
226
246
  ##
@@ -335,7 +355,7 @@ module Google
335
355
  @cloud_channel_service_stub.call_rpc :list_customers, request, options: options do |response, operation|
336
356
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, request, response, operation, options
337
357
  yield response, operation if block_given?
338
- return response
358
+ throw :response, response
339
359
  end
340
360
  rescue ::GRPC::BadStatus => e
341
361
  raise ::Google::Cloud::Error.from_error(e)
@@ -434,7 +454,6 @@ module Google
434
454
 
435
455
  @cloud_channel_service_stub.call_rpc :get_customer, request, options: options do |response, operation|
436
456
  yield response, operation if block_given?
437
- return response
438
457
  end
439
458
  rescue ::GRPC::BadStatus => e
440
459
  raise ::Google::Cloud::Error.from_error(e)
@@ -546,7 +565,6 @@ module Google
546
565
 
547
566
  @cloud_channel_service_stub.call_rpc :check_cloud_identity_accounts_exist, request, options: options do |response, operation|
548
567
  yield response, operation if block_given?
549
- return response
550
568
  end
551
569
  rescue ::GRPC::BadStatus => e
552
570
  raise ::Google::Cloud::Error.from_error(e)
@@ -650,7 +668,6 @@ module Google
650
668
 
651
669
  @cloud_channel_service_stub.call_rpc :create_customer, request, options: options do |response, operation|
652
670
  yield response, operation if block_given?
653
- return response
654
671
  end
655
672
  rescue ::GRPC::BadStatus => e
656
673
  raise ::Google::Cloud::Error.from_error(e)
@@ -751,7 +768,6 @@ module Google
751
768
 
752
769
  @cloud_channel_service_stub.call_rpc :update_customer, request, options: options do |response, operation|
753
770
  yield response, operation if block_given?
754
- return response
755
771
  end
756
772
  rescue ::GRPC::BadStatus => e
757
773
  raise ::Google::Cloud::Error.from_error(e)
@@ -846,7 +862,6 @@ module Google
846
862
 
847
863
  @cloud_channel_service_stub.call_rpc :delete_customer, request, options: options do |response, operation|
848
864
  yield response, operation if block_given?
849
- return response
850
865
  end
851
866
  rescue ::GRPC::BadStatus => e
852
867
  raise ::Google::Cloud::Error.from_error(e)
@@ -977,7 +992,6 @@ module Google
977
992
 
978
993
  @cloud_channel_service_stub.call_rpc :import_customer, request, options: options do |response, operation|
979
994
  yield response, operation if block_given?
980
- return response
981
995
  end
982
996
  rescue ::GRPC::BadStatus => e
983
997
  raise ::Google::Cloud::Error.from_error(e)
@@ -1101,7 +1115,7 @@ module Google
1101
1115
  @cloud_channel_service_stub.call_rpc :provision_cloud_identity, request, options: options do |response, operation|
1102
1116
  response = ::Gapic::Operation.new response, @operations_client, options: options
1103
1117
  yield response, operation if block_given?
1104
- return response
1118
+ throw :response, response
1105
1119
  end
1106
1120
  rescue ::GRPC::BadStatus => e
1107
1121
  raise ::Google::Cloud::Error.from_error(e)
@@ -1215,7 +1229,7 @@ module Google
1215
1229
  @cloud_channel_service_stub.call_rpc :list_entitlements, request, options: options do |response, operation|
1216
1230
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, request, response, operation, options
1217
1231
  yield response, operation if block_given?
1218
- return response
1232
+ throw :response, response
1219
1233
  end
1220
1234
  rescue ::GRPC::BadStatus => e
1221
1235
  raise ::Google::Cloud::Error.from_error(e)
@@ -1354,7 +1368,7 @@ module Google
1354
1368
  @cloud_channel_service_stub.call_rpc :list_transferable_skus, request, options: options do |response, operation|
1355
1369
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, request, response, operation, options
1356
1370
  yield response, operation if block_given?
1357
- return response
1371
+ throw :response, response
1358
1372
  end
1359
1373
  rescue ::GRPC::BadStatus => e
1360
1374
  raise ::Google::Cloud::Error.from_error(e)
@@ -1494,7 +1508,7 @@ module Google
1494
1508
  @cloud_channel_service_stub.call_rpc :list_transferable_offers, request, options: options do |response, operation|
1495
1509
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, request, response, operation, options
1496
1510
  yield response, operation if block_given?
1497
- return response
1511
+ throw :response, response
1498
1512
  end
1499
1513
  rescue ::GRPC::BadStatus => e
1500
1514
  raise ::Google::Cloud::Error.from_error(e)
@@ -1592,7 +1606,6 @@ module Google
1592
1606
 
1593
1607
  @cloud_channel_service_stub.call_rpc :get_entitlement, request, options: options do |response, operation|
1594
1608
  yield response, operation if block_given?
1595
- return response
1596
1609
  end
1597
1610
  rescue ::GRPC::BadStatus => e
1598
1611
  raise ::Google::Cloud::Error.from_error(e)
@@ -1741,7 +1754,7 @@ module Google
1741
1754
  @cloud_channel_service_stub.call_rpc :create_entitlement, request, options: options do |response, operation|
1742
1755
  response = ::Gapic::Operation.new response, @operations_client, options: options
1743
1756
  yield response, operation if block_given?
1744
- return response
1757
+ throw :response, response
1745
1758
  end
1746
1759
  rescue ::GRPC::BadStatus => e
1747
1760
  raise ::Google::Cloud::Error.from_error(e)
@@ -1881,7 +1894,7 @@ module Google
1881
1894
  @cloud_channel_service_stub.call_rpc :change_parameters, request, options: options do |response, operation|
1882
1895
  response = ::Gapic::Operation.new response, @operations_client, options: options
1883
1896
  yield response, operation if block_given?
1884
- return response
1897
+ throw :response, response
1885
1898
  end
1886
1899
  rescue ::GRPC::BadStatus => e
1887
1900
  raise ::Google::Cloud::Error.from_error(e)
@@ -2014,7 +2027,7 @@ module Google
2014
2027
  @cloud_channel_service_stub.call_rpc :change_renewal_settings, request, options: options do |response, operation|
2015
2028
  response = ::Gapic::Operation.new response, @operations_client, options: options
2016
2029
  yield response, operation if block_given?
2017
- return response
2030
+ throw :response, response
2018
2031
  end
2019
2032
  rescue ::GRPC::BadStatus => e
2020
2033
  raise ::Google::Cloud::Error.from_error(e)
@@ -2159,7 +2172,7 @@ module Google
2159
2172
  @cloud_channel_service_stub.call_rpc :change_offer, request, options: options do |response, operation|
2160
2173
  response = ::Gapic::Operation.new response, @operations_client, options: options
2161
2174
  yield response, operation if block_given?
2162
- return response
2175
+ throw :response, response
2163
2176
  end
2164
2177
  rescue ::GRPC::BadStatus => e
2165
2178
  raise ::Google::Cloud::Error.from_error(e)
@@ -2291,7 +2304,7 @@ module Google
2291
2304
  @cloud_channel_service_stub.call_rpc :start_paid_service, request, options: options do |response, operation|
2292
2305
  response = ::Gapic::Operation.new response, @operations_client, options: options
2293
2306
  yield response, operation if block_given?
2294
- return response
2307
+ throw :response, response
2295
2308
  end
2296
2309
  rescue ::GRPC::BadStatus => e
2297
2310
  raise ::Google::Cloud::Error.from_error(e)
@@ -2420,7 +2433,7 @@ module Google
2420
2433
  @cloud_channel_service_stub.call_rpc :suspend_entitlement, request, options: options do |response, operation|
2421
2434
  response = ::Gapic::Operation.new response, @operations_client, options: options
2422
2435
  yield response, operation if block_given?
2423
- return response
2436
+ throw :response, response
2424
2437
  end
2425
2438
  rescue ::GRPC::BadStatus => e
2426
2439
  raise ::Google::Cloud::Error.from_error(e)
@@ -2554,7 +2567,7 @@ module Google
2554
2567
  @cloud_channel_service_stub.call_rpc :cancel_entitlement, request, options: options do |response, operation|
2555
2568
  response = ::Gapic::Operation.new response, @operations_client, options: options
2556
2569
  yield response, operation if block_given?
2557
- return response
2570
+ throw :response, response
2558
2571
  end
2559
2572
  rescue ::GRPC::BadStatus => e
2560
2573
  raise ::Google::Cloud::Error.from_error(e)
@@ -2689,7 +2702,7 @@ module Google
2689
2702
  @cloud_channel_service_stub.call_rpc :activate_entitlement, request, options: options do |response, operation|
2690
2703
  response = ::Gapic::Operation.new response, @operations_client, options: options
2691
2704
  yield response, operation if block_given?
2692
- return response
2705
+ throw :response, response
2693
2706
  end
2694
2707
  rescue ::GRPC::BadStatus => e
2695
2708
  raise ::Google::Cloud::Error.from_error(e)
@@ -2836,7 +2849,7 @@ module Google
2836
2849
  @cloud_channel_service_stub.call_rpc :transfer_entitlements, request, options: options do |response, operation|
2837
2850
  response = ::Gapic::Operation.new response, @operations_client, options: options
2838
2851
  yield response, operation if block_given?
2839
- return response
2852
+ throw :response, response
2840
2853
  end
2841
2854
  rescue ::GRPC::BadStatus => e
2842
2855
  raise ::Google::Cloud::Error.from_error(e)
@@ -2975,7 +2988,7 @@ module Google
2975
2988
  @cloud_channel_service_stub.call_rpc :transfer_entitlements_to_google, request, options: options do |response, operation|
2976
2989
  response = ::Gapic::Operation.new response, @operations_client, options: options
2977
2990
  yield response, operation if block_given?
2978
- return response
2991
+ throw :response, response
2979
2992
  end
2980
2993
  rescue ::GRPC::BadStatus => e
2981
2994
  raise ::Google::Cloud::Error.from_error(e)
@@ -3091,7 +3104,7 @@ module Google
3091
3104
  @cloud_channel_service_stub.call_rpc :list_channel_partner_links, request, options: options do |response, operation|
3092
3105
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, request, response, operation, options
3093
3106
  yield response, operation if block_given?
3094
- return response
3107
+ throw :response, response
3095
3108
  end
3096
3109
  rescue ::GRPC::BadStatus => e
3097
3110
  raise ::Google::Cloud::Error.from_error(e)
@@ -3195,7 +3208,6 @@ module Google
3195
3208
 
3196
3209
  @cloud_channel_service_stub.call_rpc :get_channel_partner_link, request, options: options do |response, operation|
3197
3210
  yield response, operation if block_given?
3198
- return response
3199
3211
  end
3200
3212
  rescue ::GRPC::BadStatus => e
3201
3213
  raise ::Google::Cloud::Error.from_error(e)
@@ -3309,7 +3321,6 @@ module Google
3309
3321
 
3310
3322
  @cloud_channel_service_stub.call_rpc :create_channel_partner_link, request, options: options do |response, operation|
3311
3323
  yield response, operation if block_given?
3312
- return response
3313
3324
  end
3314
3325
  rescue ::GRPC::BadStatus => e
3315
3326
  raise ::Google::Cloud::Error.from_error(e)
@@ -3425,7 +3436,6 @@ module Google
3425
3436
 
3426
3437
  @cloud_channel_service_stub.call_rpc :update_channel_partner_link, request, options: options do |response, operation|
3427
3438
  yield response, operation if block_given?
3428
- return response
3429
3439
  end
3430
3440
  rescue ::GRPC::BadStatus => e
3431
3441
  raise ::Google::Cloud::Error.from_error(e)
@@ -3529,7 +3539,6 @@ module Google
3529
3539
 
3530
3540
  @cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: options do |response, operation|
3531
3541
  yield response, operation if block_given?
3532
- return response
3533
3542
  end
3534
3543
  rescue ::GRPC::BadStatus => e
3535
3544
  raise ::Google::Cloud::Error.from_error(e)
@@ -3666,7 +3675,7 @@ module Google
3666
3675
  @cloud_channel_service_stub.call_rpc :list_customer_repricing_configs, request, options: options do |response, operation|
3667
3676
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, request, response, operation, options
3668
3677
  yield response, operation if block_given?
3669
- return response
3678
+ throw :response, response
3670
3679
  end
3671
3680
  rescue ::GRPC::BadStatus => e
3672
3681
  raise ::Google::Cloud::Error.from_error(e)
@@ -3797,7 +3806,6 @@ module Google
3797
3806
 
3798
3807
  @cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: options do |response, operation|
3799
3808
  yield response, operation if block_given?
3800
- return response
3801
3809
  end
3802
3810
  rescue ::GRPC::BadStatus => e
3803
3811
  raise ::Google::Cloud::Error.from_error(e)
@@ -3914,7 +3922,6 @@ module Google
3914
3922
 
3915
3923
  @cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: options do |response, operation|
3916
3924
  yield response, operation if block_given?
3917
- return response
3918
3925
  end
3919
3926
  rescue ::GRPC::BadStatus => e
3920
3927
  raise ::Google::Cloud::Error.from_error(e)
@@ -4018,7 +4025,6 @@ module Google
4018
4025
 
4019
4026
  @cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: options do |response, operation|
4020
4027
  yield response, operation if block_given?
4021
- return response
4022
4028
  end
4023
4029
  rescue ::GRPC::BadStatus => e
4024
4030
  raise ::Google::Cloud::Error.from_error(e)
@@ -4122,7 +4128,6 @@ module Google
4122
4128
 
4123
4129
  @cloud_channel_service_stub.call_rpc :get_channel_partner_repricing_config, request, options: options do |response, operation|
4124
4130
  yield response, operation if block_given?
4125
- return response
4126
4131
  end
4127
4132
  rescue ::GRPC::BadStatus => e
4128
4133
  raise ::Google::Cloud::Error.from_error(e)
@@ -4262,7 +4267,7 @@ module Google
4262
4267
  @cloud_channel_service_stub.call_rpc :list_channel_partner_repricing_configs, request, options: options do |response, operation|
4263
4268
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, request, response, operation, options
4264
4269
  yield response, operation if block_given?
4265
- return response
4270
+ throw :response, response
4266
4271
  end
4267
4272
  rescue ::GRPC::BadStatus => e
4268
4273
  raise ::Google::Cloud::Error.from_error(e)
@@ -4394,7 +4399,6 @@ module Google
4394
4399
 
4395
4400
  @cloud_channel_service_stub.call_rpc :create_channel_partner_repricing_config, request, options: options do |response, operation|
4396
4401
  yield response, operation if block_given?
4397
- return response
4398
4402
  end
4399
4403
  rescue ::GRPC::BadStatus => e
4400
4404
  raise ::Google::Cloud::Error.from_error(e)
@@ -4511,7 +4515,6 @@ module Google
4511
4515
 
4512
4516
  @cloud_channel_service_stub.call_rpc :update_channel_partner_repricing_config, request, options: options do |response, operation|
4513
4517
  yield response, operation if block_given?
4514
- return response
4515
4518
  end
4516
4519
  rescue ::GRPC::BadStatus => e
4517
4520
  raise ::Google::Cloud::Error.from_error(e)
@@ -4614,7 +4617,6 @@ module Google
4614
4617
 
4615
4618
  @cloud_channel_service_stub.call_rpc :delete_channel_partner_repricing_config, request, options: options do |response, operation|
4616
4619
  yield response, operation if block_given?
4617
- return response
4618
4620
  end
4619
4621
  rescue ::GRPC::BadStatus => e
4620
4622
  raise ::Google::Cloud::Error.from_error(e)
@@ -4735,7 +4737,7 @@ module Google
4735
4737
  @cloud_channel_service_stub.call_rpc :list_sku_groups, request, options: options do |response, operation|
4736
4738
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, request, response, operation, options
4737
4739
  yield response, operation if block_given?
4738
- return response
4740
+ throw :response, response
4739
4741
  end
4740
4742
  rescue ::GRPC::BadStatus => e
4741
4743
  raise ::Google::Cloud::Error.from_error(e)
@@ -4855,7 +4857,7 @@ module Google
4855
4857
  @cloud_channel_service_stub.call_rpc :list_sku_group_billable_skus, request, options: options do |response, operation|
4856
4858
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, request, response, operation, options
4857
4859
  yield response, operation if block_given?
4858
- return response
4860
+ throw :response, response
4859
4861
  end
4860
4862
  rescue ::GRPC::BadStatus => e
4861
4863
  raise ::Google::Cloud::Error.from_error(e)
@@ -4952,7 +4954,6 @@ module Google
4952
4954
 
4953
4955
  @cloud_channel_service_stub.call_rpc :lookup_offer, request, options: options do |response, operation|
4954
4956
  yield response, operation if block_given?
4955
- return response
4956
4957
  end
4957
4958
  rescue ::GRPC::BadStatus => e
4958
4959
  raise ::Google::Cloud::Error.from_error(e)
@@ -5050,7 +5051,7 @@ module Google
5050
5051
  @cloud_channel_service_stub.call_rpc :list_products, request, options: options do |response, operation|
5051
5052
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_products, request, response, operation, options
5052
5053
  yield response, operation if block_given?
5053
- return response
5054
+ throw :response, response
5054
5055
  end
5055
5056
  rescue ::GRPC::BadStatus => e
5056
5057
  raise ::Google::Cloud::Error.from_error(e)
@@ -5161,7 +5162,7 @@ module Google
5161
5162
  @cloud_channel_service_stub.call_rpc :list_skus, request, options: options do |response, operation|
5162
5163
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, options
5163
5164
  yield response, operation if block_given?
5164
- return response
5165
+ throw :response, response
5165
5166
  end
5166
5167
  rescue ::GRPC::BadStatus => e
5167
5168
  raise ::Google::Cloud::Error.from_error(e)
@@ -5278,7 +5279,7 @@ module Google
5278
5279
  @cloud_channel_service_stub.call_rpc :list_offers, request, options: options do |response, operation|
5279
5280
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, options
5280
5281
  yield response, operation if block_given?
5281
- return response
5282
+ throw :response, response
5282
5283
  end
5283
5284
  rescue ::GRPC::BadStatus => e
5284
5285
  raise ::Google::Cloud::Error.from_error(e)
@@ -5392,7 +5393,7 @@ module Google
5392
5393
  @cloud_channel_service_stub.call_rpc :list_purchasable_skus, request, options: options do |response, operation|
5393
5394
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, options
5394
5395
  yield response, operation if block_given?
5395
- return response
5396
+ throw :response, response
5396
5397
  end
5397
5398
  rescue ::GRPC::BadStatus => e
5398
5399
  raise ::Google::Cloud::Error.from_error(e)
@@ -5509,7 +5510,7 @@ module Google
5509
5510
  @cloud_channel_service_stub.call_rpc :list_purchasable_offers, request, options: options do |response, operation|
5510
5511
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, request, response, operation, options
5511
5512
  yield response, operation if block_given?
5512
- return response
5513
+ throw :response, response
5513
5514
  end
5514
5515
  rescue ::GRPC::BadStatus => e
5515
5516
  raise ::Google::Cloud::Error.from_error(e)
@@ -5610,7 +5611,6 @@ module Google
5610
5611
 
5611
5612
  @cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: options do |response, operation|
5612
5613
  yield response, operation if block_given?
5613
- return response
5614
5614
  end
5615
5615
  rescue ::GRPC::BadStatus => e
5616
5616
  raise ::Google::Cloud::Error.from_error(e)
@@ -5716,7 +5716,6 @@ module Google
5716
5716
 
5717
5717
  @cloud_channel_service_stub.call_rpc :register_subscriber, request, options: options do |response, operation|
5718
5718
  yield response, operation if block_given?
5719
- return response
5720
5719
  end
5721
5720
  rescue ::GRPC::BadStatus => e
5722
5721
  raise ::Google::Cloud::Error.from_error(e)
@@ -5825,7 +5824,6 @@ module Google
5825
5824
 
5826
5825
  @cloud_channel_service_stub.call_rpc :unregister_subscriber, request, options: options do |response, operation|
5827
5826
  yield response, operation if block_given?
5828
- return response
5829
5827
  end
5830
5828
  rescue ::GRPC::BadStatus => e
5831
5829
  raise ::Google::Cloud::Error.from_error(e)
@@ -5938,7 +5936,6 @@ module Google
5938
5936
 
5939
5937
  @cloud_channel_service_stub.call_rpc :list_subscribers, request, options: options do |response, operation|
5940
5938
  yield response, operation if block_given?
5941
- return response
5942
5939
  end
5943
5940
  rescue ::GRPC::BadStatus => e
5944
5941
  raise ::Google::Cloud::Error.from_error(e)
@@ -6064,7 +6061,7 @@ module Google
6064
6061
  @cloud_channel_service_stub.call_rpc :list_entitlement_changes, request, options: options do |response, operation|
6065
6062
  response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, request, response, operation, options
6066
6063
  yield response, operation if block_given?
6067
- return response
6064
+ throw :response, response
6068
6065
  end
6069
6066
  rescue ::GRPC::BadStatus => e
6070
6067
  raise ::Google::Cloud::Error.from_error(e)
@@ -6153,6 +6150,11 @@ module Google
6153
6150
  # default endpoint URL. The default value of nil uses the environment
6154
6151
  # universe (usually the default "googleapis.com" universe).
6155
6152
  # @return [::String,nil]
6153
+ # @!attribute [rw] logger
6154
+ # A custom logger to use for request/response debug logging, or the value
6155
+ # `:default` (the default) to construct a default logger, or `nil` to
6156
+ # explicitly disable logging.
6157
+ # @return [::Logger,:default,nil]
6156
6158
  #
6157
6159
  class Configuration
6158
6160
  extend ::Gapic::Config
@@ -6177,6 +6179,7 @@ module Google
6177
6179
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
6178
6180
  config_attr :quota_project, nil, ::String, nil
6179
6181
  config_attr :universe_domain, nil, ::String, nil
6182
+ config_attr :logger, :default, ::Logger, nil, :default
6180
6183
 
6181
6184
  # @private
6182
6185
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil