google-cloud-security_center-v1 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -267,8 +267,19 @@ module Google
267
267
  endpoint: @config.endpoint,
268
268
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
269
269
  universe_domain: @config.universe_domain,
270
- credentials: credentials
270
+ credentials: credentials,
271
+ logger: @config.logger
271
272
  )
273
+
274
+ @security_center_stub.logger(stub: true)&.info do |entry|
275
+ entry.set_system_name
276
+ entry.set_service
277
+ entry.message = "Created client for #{entry.service}"
278
+ entry.set_credentials_fields credentials
279
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
280
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
281
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
282
+ end
272
283
  end
273
284
 
274
285
  ##
@@ -278,6 +289,15 @@ module Google
278
289
  #
279
290
  attr_reader :operations_client
280
291
 
292
+ ##
293
+ # The logger used for request/response debug logging.
294
+ #
295
+ # @return [Logger]
296
+ #
297
+ def logger
298
+ @security_center_stub.logger
299
+ end
300
+
281
301
  # Service calls
282
302
 
283
303
  ##
@@ -393,7 +413,7 @@ module Google
393
413
  @security_center_stub.bulk_mute_findings request, options do |result, operation|
394
414
  result = ::Gapic::Operation.new result, @operations_client, options: options
395
415
  yield result, operation if block_given?
396
- return result
416
+ throw :response, result
397
417
  end
398
418
  rescue ::Gapic::Rest::Error => e
399
419
  raise ::Google::Cloud::Error.from_error(e)
@@ -482,7 +502,6 @@ module Google
482
502
 
483
503
  @security_center_stub.create_security_health_analytics_custom_module request, options do |result, operation|
484
504
  yield result, operation if block_given?
485
- return result
486
505
  end
487
506
  rescue ::Gapic::Rest::Error => e
488
507
  raise ::Google::Cloud::Error.from_error(e)
@@ -565,7 +584,6 @@ module Google
565
584
 
566
585
  @security_center_stub.create_source request, options do |result, operation|
567
586
  yield result, operation if block_given?
568
- return result
569
587
  end
570
588
  rescue ::Gapic::Rest::Error => e
571
589
  raise ::Google::Cloud::Error.from_error(e)
@@ -653,7 +671,6 @@ module Google
653
671
 
654
672
  @security_center_stub.create_finding request, options do |result, operation|
655
673
  yield result, operation if block_given?
656
- return result
657
674
  end
658
675
  rescue ::Gapic::Rest::Error => e
659
676
  raise ::Google::Cloud::Error.from_error(e)
@@ -741,7 +758,6 @@ module Google
741
758
 
742
759
  @security_center_stub.create_mute_config request, options do |result, operation|
743
760
  yield result, operation if block_given?
744
- return result
745
761
  end
746
762
  rescue ::Gapic::Rest::Error => e
747
763
  raise ::Google::Cloud::Error.from_error(e)
@@ -831,7 +847,6 @@ module Google
831
847
 
832
848
  @security_center_stub.create_notification_config request, options do |result, operation|
833
849
  yield result, operation if block_given?
834
- return result
835
850
  end
836
851
  rescue ::Gapic::Rest::Error => e
837
852
  raise ::Google::Cloud::Error.from_error(e)
@@ -916,7 +931,6 @@ module Google
916
931
 
917
932
  @security_center_stub.delete_mute_config request, options do |result, operation|
918
933
  yield result, operation if block_given?
919
- return result
920
934
  end
921
935
  rescue ::Gapic::Rest::Error => e
922
936
  raise ::Google::Cloud::Error.from_error(e)
@@ -998,7 +1012,6 @@ module Google
998
1012
 
999
1013
  @security_center_stub.delete_notification_config request, options do |result, operation|
1000
1014
  yield result, operation if block_given?
1001
- return result
1002
1015
  end
1003
1016
  rescue ::Gapic::Rest::Error => e
1004
1017
  raise ::Google::Cloud::Error.from_error(e)
@@ -1083,7 +1096,6 @@ module Google
1083
1096
 
1084
1097
  @security_center_stub.delete_security_health_analytics_custom_module request, options do |result, operation|
1085
1098
  yield result, operation if block_given?
1086
- return result
1087
1099
  end
1088
1100
  rescue ::Gapic::Rest::Error => e
1089
1101
  raise ::Google::Cloud::Error.from_error(e)
@@ -1167,7 +1179,6 @@ module Google
1167
1179
 
1168
1180
  @security_center_stub.get_simulation request, options do |result, operation|
1169
1181
  yield result, operation if block_given?
1170
- return result
1171
1182
  end
1172
1183
  rescue ::Gapic::Rest::Error => e
1173
1184
  raise ::Google::Cloud::Error.from_error(e)
@@ -1249,7 +1260,6 @@ module Google
1249
1260
 
1250
1261
  @security_center_stub.get_valued_resource request, options do |result, operation|
1251
1262
  yield result, operation if block_given?
1252
- return result
1253
1263
  end
1254
1264
  rescue ::Gapic::Rest::Error => e
1255
1265
  raise ::Google::Cloud::Error.from_error(e)
@@ -1331,7 +1341,6 @@ module Google
1331
1341
 
1332
1342
  @security_center_stub.get_big_query_export request, options do |result, operation|
1333
1343
  yield result, operation if block_given?
1334
- return result
1335
1344
  end
1336
1345
  rescue ::Gapic::Rest::Error => e
1337
1346
  raise ::Google::Cloud::Error.from_error(e)
@@ -1414,7 +1423,6 @@ module Google
1414
1423
 
1415
1424
  @security_center_stub.get_iam_policy request, options do |result, operation|
1416
1425
  yield result, operation if block_given?
1417
- return result
1418
1426
  end
1419
1427
  rescue ::Gapic::Rest::Error => e
1420
1428
  raise ::Google::Cloud::Error.from_error(e)
@@ -1499,7 +1507,6 @@ module Google
1499
1507
 
1500
1508
  @security_center_stub.get_mute_config request, options do |result, operation|
1501
1509
  yield result, operation if block_given?
1502
- return result
1503
1510
  end
1504
1511
  rescue ::Gapic::Rest::Error => e
1505
1512
  raise ::Google::Cloud::Error.from_error(e)
@@ -1581,7 +1588,6 @@ module Google
1581
1588
 
1582
1589
  @security_center_stub.get_notification_config request, options do |result, operation|
1583
1590
  yield result, operation if block_given?
1584
- return result
1585
1591
  end
1586
1592
  rescue ::Gapic::Rest::Error => e
1587
1593
  raise ::Google::Cloud::Error.from_error(e)
@@ -1661,7 +1667,6 @@ module Google
1661
1667
 
1662
1668
  @security_center_stub.get_organization_settings request, options do |result, operation|
1663
1669
  yield result, operation if block_given?
1664
- return result
1665
1670
  end
1666
1671
  rescue ::Gapic::Rest::Error => e
1667
1672
  raise ::Google::Cloud::Error.from_error(e)
@@ -1744,7 +1749,6 @@ module Google
1744
1749
 
1745
1750
  @security_center_stub.get_effective_security_health_analytics_custom_module request, options do |result, operation|
1746
1751
  yield result, operation if block_given?
1747
- return result
1748
1752
  end
1749
1753
  rescue ::Gapic::Rest::Error => e
1750
1754
  raise ::Google::Cloud::Error.from_error(e)
@@ -1827,7 +1831,6 @@ module Google
1827
1831
 
1828
1832
  @security_center_stub.get_security_health_analytics_custom_module request, options do |result, operation|
1829
1833
  yield result, operation if block_given?
1830
- return result
1831
1834
  end
1832
1835
  rescue ::Gapic::Rest::Error => e
1833
1836
  raise ::Google::Cloud::Error.from_error(e)
@@ -1907,7 +1910,6 @@ module Google
1907
1910
 
1908
1911
  @security_center_stub.get_source request, options do |result, operation|
1909
1912
  yield result, operation if block_given?
1910
- return result
1911
1913
  end
1912
1914
  rescue ::Gapic::Rest::Error => e
1913
1915
  raise ::Google::Cloud::Error.from_error(e)
@@ -2116,7 +2118,7 @@ module Google
2116
2118
  @security_center_stub.group_assets request, options do |result, operation|
2117
2119
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_assets, "group_by_results", request, result, options
2118
2120
  yield result, operation if block_given?
2119
- return result
2121
+ throw :response, result
2120
2122
  end
2121
2123
  rescue ::Gapic::Rest::Error => e
2122
2124
  raise ::Google::Cloud::Error.from_error(e)
@@ -2325,7 +2327,7 @@ module Google
2325
2327
  @security_center_stub.group_findings request, options do |result, operation|
2326
2328
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options
2327
2329
  yield result, operation if block_given?
2328
- return result
2330
+ throw :response, result
2329
2331
  end
2330
2332
  rescue ::Gapic::Rest::Error => e
2331
2333
  raise ::Google::Cloud::Error.from_error(e)
@@ -2539,7 +2541,7 @@ module Google
2539
2541
  @security_center_stub.list_assets request, options do |result, operation|
2540
2542
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_assets, "list_assets_results", request, result, options
2541
2543
  yield result, operation if block_given?
2542
- return result
2544
+ throw :response, result
2543
2545
  end
2544
2546
  rescue ::Gapic::Rest::Error => e
2545
2547
  raise ::Google::Cloud::Error.from_error(e)
@@ -2632,7 +2634,7 @@ module Google
2632
2634
  @security_center_stub.list_descendant_security_health_analytics_custom_modules request, options do |result, operation|
2633
2635
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
2634
2636
  yield result, operation if block_given?
2635
- return result
2637
+ throw :response, result
2636
2638
  end
2637
2639
  rescue ::Gapic::Rest::Error => e
2638
2640
  raise ::Google::Cloud::Error.from_error(e)
@@ -2852,7 +2854,7 @@ module Google
2852
2854
  @security_center_stub.list_findings request, options do |result, operation|
2853
2855
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options
2854
2856
  yield result, operation if block_given?
2855
- return result
2857
+ throw :response, result
2856
2858
  end
2857
2859
  rescue ::Gapic::Rest::Error => e
2858
2860
  raise ::Google::Cloud::Error.from_error(e)
@@ -2949,7 +2951,7 @@ module Google
2949
2951
  @security_center_stub.list_mute_configs request, options do |result, operation|
2950
2952
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options
2951
2953
  yield result, operation if block_given?
2952
- return result
2954
+ throw :response, result
2953
2955
  end
2954
2956
  rescue ::Gapic::Rest::Error => e
2955
2957
  raise ::Google::Cloud::Error.from_error(e)
@@ -3042,7 +3044,7 @@ module Google
3042
3044
  @security_center_stub.list_notification_configs request, options do |result, operation|
3043
3045
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options
3044
3046
  yield result, operation if block_given?
3045
- return result
3047
+ throw :response, result
3046
3048
  end
3047
3049
  rescue ::Gapic::Rest::Error => e
3048
3050
  raise ::Google::Cloud::Error.from_error(e)
@@ -3136,7 +3138,7 @@ module Google
3136
3138
  @security_center_stub.list_effective_security_health_analytics_custom_modules request, options do |result, operation|
3137
3139
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_security_health_analytics_custom_modules, "effective_security_health_analytics_custom_modules", request, result, options
3138
3140
  yield result, operation if block_given?
3139
- return result
3141
+ throw :response, result
3140
3142
  end
3141
3143
  rescue ::Gapic::Rest::Error => e
3142
3144
  raise ::Google::Cloud::Error.from_error(e)
@@ -3230,7 +3232,7 @@ module Google
3230
3232
  @security_center_stub.list_security_health_analytics_custom_modules request, options do |result, operation|
3231
3233
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_security_health_analytics_custom_modules, "security_health_analytics_custom_modules", request, result, options
3232
3234
  yield result, operation if block_given?
3233
- return result
3235
+ throw :response, result
3234
3236
  end
3235
3237
  rescue ::Gapic::Rest::Error => e
3236
3238
  raise ::Google::Cloud::Error.from_error(e)
@@ -3323,7 +3325,7 @@ module Google
3323
3325
  @security_center_stub.list_sources request, options do |result, operation|
3324
3326
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options
3325
3327
  yield result, operation if block_given?
3326
- return result
3328
+ throw :response, result
3327
3329
  end
3328
3330
  rescue ::Gapic::Rest::Error => e
3329
3331
  raise ::Google::Cloud::Error.from_error(e)
@@ -3416,7 +3418,7 @@ module Google
3416
3418
  @security_center_stub.run_asset_discovery request, options do |result, operation|
3417
3419
  result = ::Gapic::Operation.new result, @operations_client, options: options
3418
3420
  yield result, operation if block_given?
3419
- return result
3421
+ throw :response, result
3420
3422
  end
3421
3423
  rescue ::Gapic::Rest::Error => e
3422
3424
  raise ::Google::Cloud::Error.from_error(e)
@@ -3504,7 +3506,6 @@ module Google
3504
3506
 
3505
3507
  @security_center_stub.set_finding_state request, options do |result, operation|
3506
3508
  yield result, operation if block_given?
3507
- return result
3508
3509
  end
3509
3510
  rescue ::Gapic::Rest::Error => e
3510
3511
  raise ::Google::Cloud::Error.from_error(e)
@@ -3590,7 +3591,6 @@ module Google
3590
3591
 
3591
3592
  @security_center_stub.set_mute request, options do |result, operation|
3592
3593
  yield result, operation if block_given?
3593
- return result
3594
3594
  end
3595
3595
  rescue ::Gapic::Rest::Error => e
3596
3596
  raise ::Google::Cloud::Error.from_error(e)
@@ -3681,7 +3681,6 @@ module Google
3681
3681
 
3682
3682
  @security_center_stub.set_iam_policy request, options do |result, operation|
3683
3683
  yield result, operation if block_given?
3684
- return result
3685
3684
  end
3686
3685
  rescue ::Gapic::Rest::Error => e
3687
3686
  raise ::Google::Cloud::Error.from_error(e)
@@ -3766,7 +3765,6 @@ module Google
3766
3765
 
3767
3766
  @security_center_stub.test_iam_permissions request, options do |result, operation|
3768
3767
  yield result, operation if block_given?
3769
- return result
3770
3768
  end
3771
3769
  rescue ::Gapic::Rest::Error => e
3772
3770
  raise ::Google::Cloud::Error.from_error(e)
@@ -3853,7 +3851,6 @@ module Google
3853
3851
 
3854
3852
  @security_center_stub.simulate_security_health_analytics_custom_module request, options do |result, operation|
3855
3853
  yield result, operation if block_given?
3856
- return result
3857
3854
  end
3858
3855
  rescue ::Gapic::Rest::Error => e
3859
3856
  raise ::Google::Cloud::Error.from_error(e)
@@ -3936,7 +3933,6 @@ module Google
3936
3933
 
3937
3934
  @security_center_stub.update_external_system request, options do |result, operation|
3938
3935
  yield result, operation if block_given?
3939
- return result
3940
3936
  end
3941
3937
  rescue ::Gapic::Rest::Error => e
3942
3938
  raise ::Google::Cloud::Error.from_error(e)
@@ -4029,7 +4025,6 @@ module Google
4029
4025
 
4030
4026
  @security_center_stub.update_finding request, options do |result, operation|
4031
4027
  yield result, operation if block_given?
4032
- return result
4033
4028
  end
4034
4029
  rescue ::Gapic::Rest::Error => e
4035
4030
  raise ::Google::Cloud::Error.from_error(e)
@@ -4111,7 +4106,6 @@ module Google
4111
4106
 
4112
4107
  @security_center_stub.update_mute_config request, options do |result, operation|
4113
4108
  yield result, operation if block_given?
4114
- return result
4115
4109
  end
4116
4110
  rescue ::Gapic::Rest::Error => e
4117
4111
  raise ::Google::Cloud::Error.from_error(e)
@@ -4195,7 +4189,6 @@ module Google
4195
4189
 
4196
4190
  @security_center_stub.update_notification_config request, options do |result, operation|
4197
4191
  yield result, operation if block_given?
4198
- return result
4199
4192
  end
4200
4193
  rescue ::Gapic::Rest::Error => e
4201
4194
  raise ::Google::Cloud::Error.from_error(e)
@@ -4278,7 +4271,6 @@ module Google
4278
4271
 
4279
4272
  @security_center_stub.update_organization_settings request, options do |result, operation|
4280
4273
  yield result, operation if block_given?
4281
- return result
4282
4274
  end
4283
4275
  rescue ::Gapic::Rest::Error => e
4284
4276
  raise ::Google::Cloud::Error.from_error(e)
@@ -4365,7 +4357,6 @@ module Google
4365
4357
 
4366
4358
  @security_center_stub.update_security_health_analytics_custom_module request, options do |result, operation|
4367
4359
  yield result, operation if block_given?
4368
- return result
4369
4360
  end
4370
4361
  rescue ::Gapic::Rest::Error => e
4371
4362
  raise ::Google::Cloud::Error.from_error(e)
@@ -4448,7 +4439,6 @@ module Google
4448
4439
 
4449
4440
  @security_center_stub.update_source request, options do |result, operation|
4450
4441
  yield result, operation if block_given?
4451
- return result
4452
4442
  end
4453
4443
  rescue ::Gapic::Rest::Error => e
4454
4444
  raise ::Google::Cloud::Error.from_error(e)
@@ -4538,7 +4528,6 @@ module Google
4538
4528
 
4539
4529
  @security_center_stub.update_security_marks request, options do |result, operation|
4540
4530
  yield result, operation if block_given?
4541
- return result
4542
4531
  end
4543
4532
  rescue ::Gapic::Rest::Error => e
4544
4533
  raise ::Google::Cloud::Error.from_error(e)
@@ -4626,7 +4615,6 @@ module Google
4626
4615
 
4627
4616
  @security_center_stub.create_big_query_export request, options do |result, operation|
4628
4617
  yield result, operation if block_given?
4629
- return result
4630
4618
  end
4631
4619
  rescue ::Gapic::Rest::Error => e
4632
4620
  raise ::Google::Cloud::Error.from_error(e)
@@ -4708,7 +4696,6 @@ module Google
4708
4696
 
4709
4697
  @security_center_stub.delete_big_query_export request, options do |result, operation|
4710
4698
  yield result, operation if block_given?
4711
- return result
4712
4699
  end
4713
4700
  rescue ::Gapic::Rest::Error => e
4714
4701
  raise ::Google::Cloud::Error.from_error(e)
@@ -4790,7 +4777,6 @@ module Google
4790
4777
 
4791
4778
  @security_center_stub.update_big_query_export request, options do |result, operation|
4792
4779
  yield result, operation if block_given?
4793
- return result
4794
4780
  end
4795
4781
  rescue ::Gapic::Rest::Error => e
4796
4782
  raise ::Google::Cloud::Error.from_error(e)
@@ -4890,7 +4876,7 @@ module Google
4890
4876
  @security_center_stub.list_big_query_exports request, options do |result, operation|
4891
4877
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options
4892
4878
  yield result, operation if block_given?
4893
- return result
4879
+ throw :response, result
4894
4880
  end
4895
4881
  rescue ::Gapic::Rest::Error => e
4896
4882
  raise ::Google::Cloud::Error.from_error(e)
@@ -4982,7 +4968,6 @@ module Google
4982
4968
 
4983
4969
  @security_center_stub.create_event_threat_detection_custom_module request, options do |result, operation|
4984
4970
  yield result, operation if block_given?
4985
- return result
4986
4971
  end
4987
4972
  rescue ::Gapic::Rest::Error => e
4988
4973
  raise ::Google::Cloud::Error.from_error(e)
@@ -5069,7 +5054,6 @@ module Google
5069
5054
 
5070
5055
  @security_center_stub.delete_event_threat_detection_custom_module request, options do |result, operation|
5071
5056
  yield result, operation if block_given?
5072
- return result
5073
5057
  end
5074
5058
  rescue ::Gapic::Rest::Error => e
5075
5059
  raise ::Google::Cloud::Error.from_error(e)
@@ -5154,7 +5138,6 @@ module Google
5154
5138
 
5155
5139
  @security_center_stub.get_event_threat_detection_custom_module request, options do |result, operation|
5156
5140
  yield result, operation if block_given?
5157
- return result
5158
5141
  end
5159
5142
  rescue ::Gapic::Rest::Error => e
5160
5143
  raise ::Google::Cloud::Error.from_error(e)
@@ -5258,7 +5241,7 @@ module Google
5258
5241
  @security_center_stub.list_descendant_event_threat_detection_custom_modules request, options do |result, operation|
5259
5242
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_descendant_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
5260
5243
  yield result, operation if block_given?
5261
- return result
5244
+ throw :response, result
5262
5245
  end
5263
5246
  rescue ::Gapic::Rest::Error => e
5264
5247
  raise ::Google::Cloud::Error.from_error(e)
@@ -5363,7 +5346,7 @@ module Google
5363
5346
  @security_center_stub.list_event_threat_detection_custom_modules request, options do |result, operation|
5364
5347
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_event_threat_detection_custom_modules, "event_threat_detection_custom_modules", request, result, options
5365
5348
  yield result, operation if block_given?
5366
- return result
5349
+ throw :response, result
5367
5350
  end
5368
5351
  rescue ::Gapic::Rest::Error => e
5369
5352
  raise ::Google::Cloud::Error.from_error(e)
@@ -5450,7 +5433,6 @@ module Google
5450
5433
 
5451
5434
  @security_center_stub.update_event_threat_detection_custom_module request, options do |result, operation|
5452
5435
  yield result, operation if block_given?
5453
- return result
5454
5436
  end
5455
5437
  rescue ::Gapic::Rest::Error => e
5456
5438
  raise ::Google::Cloud::Error.from_error(e)
@@ -5540,7 +5522,6 @@ module Google
5540
5522
 
5541
5523
  @security_center_stub.validate_event_threat_detection_custom_module request, options do |result, operation|
5542
5524
  yield result, operation if block_given?
5543
- return result
5544
5525
  end
5545
5526
  rescue ::Gapic::Rest::Error => e
5546
5527
  raise ::Google::Cloud::Error.from_error(e)
@@ -5626,7 +5607,6 @@ module Google
5626
5607
 
5627
5608
  @security_center_stub.get_effective_event_threat_detection_custom_module request, options do |result, operation|
5628
5609
  yield result, operation if block_given?
5629
- return result
5630
5610
  end
5631
5611
  rescue ::Gapic::Rest::Error => e
5632
5612
  raise ::Google::Cloud::Error.from_error(e)
@@ -5731,7 +5711,7 @@ module Google
5731
5711
  @security_center_stub.list_effective_event_threat_detection_custom_modules request, options do |result, operation|
5732
5712
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_effective_event_threat_detection_custom_modules, "effective_event_threat_detection_custom_modules", request, result, options
5733
5713
  yield result, operation if block_given?
5734
- return result
5714
+ throw :response, result
5735
5715
  end
5736
5716
  rescue ::Gapic::Rest::Error => e
5737
5717
  raise ::Google::Cloud::Error.from_error(e)
@@ -5815,7 +5795,6 @@ module Google
5815
5795
 
5816
5796
  @security_center_stub.batch_create_resource_value_configs request, options do |result, operation|
5817
5797
  yield result, operation if block_given?
5818
- return result
5819
5798
  end
5820
5799
  rescue ::Gapic::Rest::Error => e
5821
5800
  raise ::Google::Cloud::Error.from_error(e)
@@ -5894,7 +5873,6 @@ module Google
5894
5873
 
5895
5874
  @security_center_stub.delete_resource_value_config request, options do |result, operation|
5896
5875
  yield result, operation if block_given?
5897
- return result
5898
5876
  end
5899
5877
  rescue ::Gapic::Rest::Error => e
5900
5878
  raise ::Google::Cloud::Error.from_error(e)
@@ -5974,7 +5952,6 @@ module Google
5974
5952
 
5975
5953
  @security_center_stub.get_resource_value_config request, options do |result, operation|
5976
5954
  yield result, operation if block_given?
5977
- return result
5978
5955
  end
5979
5956
  rescue ::Gapic::Rest::Error => e
5980
5957
  raise ::Google::Cloud::Error.from_error(e)
@@ -6074,7 +6051,7 @@ module Google
6074
6051
  @security_center_stub.list_resource_value_configs request, options do |result, operation|
6075
6052
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options
6076
6053
  yield result, operation if block_given?
6077
- return result
6054
+ throw :response, result
6078
6055
  end
6079
6056
  rescue ::Gapic::Rest::Error => e
6080
6057
  raise ::Google::Cloud::Error.from_error(e)
@@ -6156,7 +6133,6 @@ module Google
6156
6133
 
6157
6134
  @security_center_stub.update_resource_value_config request, options do |result, operation|
6158
6135
  yield result, operation if block_given?
6159
- return result
6160
6136
  end
6161
6137
  rescue ::Gapic::Rest::Error => e
6162
6138
  raise ::Google::Cloud::Error.from_error(e)
@@ -6279,7 +6255,7 @@ module Google
6279
6255
  @security_center_stub.list_valued_resources request, options do |result, operation|
6280
6256
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options
6281
6257
  yield result, operation if block_given?
6282
- return result
6258
+ throw :response, result
6283
6259
  end
6284
6260
  rescue ::Gapic::Rest::Error => e
6285
6261
  raise ::Google::Cloud::Error.from_error(e)
@@ -6382,7 +6358,7 @@ module Google
6382
6358
  @security_center_stub.list_attack_paths request, options do |result, operation|
6383
6359
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options
6384
6360
  yield result, operation if block_given?
6385
- return result
6361
+ throw :response, result
6386
6362
  end
6387
6363
  rescue ::Gapic::Rest::Error => e
6388
6364
  raise ::Google::Cloud::Error.from_error(e)
@@ -6462,6 +6438,11 @@ module Google
6462
6438
  # default endpoint URL. The default value of nil uses the environment
6463
6439
  # universe (usually the default "googleapis.com" universe).
6464
6440
  # @return [::String,nil]
6441
+ # @!attribute [rw] logger
6442
+ # A custom logger to use for request/response debug logging, or the value
6443
+ # `:default` (the default) to construct a default logger, or `nil` to
6444
+ # explicitly disable logging.
6445
+ # @return [::Logger,:default,nil]
6465
6446
  #
6466
6447
  class Configuration
6467
6448
  extend ::Gapic::Config
@@ -6483,6 +6464,7 @@ module Google
6483
6464
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
6484
6465
  config_attr :quota_project, nil, ::String, nil
6485
6466
  config_attr :universe_domain, nil, ::String, nil
6467
+ config_attr :logger, :default, ::Logger, nil, :default
6486
6468
 
6487
6469
  # @private
6488
6470
  def initialize parent_config = nil