google-cloud-dlp-v2 1.4.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,13 +30,9 @@ module Google
30
30
  ##
31
31
  # REST client for the DlpService service.
32
32
  #
33
- # The Cloud Data Loss Prevention (DLP) API is a service that allows clients
34
- # to detect the presence of Personally Identifiable Information (PII) and other
35
- # privacy-sensitive data in user-supplied, unstructured data streams, like text
36
- # blocks or images.
37
- # The service also includes methods for sensitive data redaction and
38
- # scheduling of data scans on Google Cloud Platform based data sets.
39
- #
33
+ # Sensitive Data Protection provides access to a powerful sensitive data
34
+ # inspection, classification, and de-identification platform that works
35
+ # on text, images, and Google Cloud storage repositories.
40
36
  # To learn more about concepts and find how-to guides see
41
37
  # https://cloud.google.com/sensitive-data-protection/docs/.
42
38
  #
@@ -351,14 +347,26 @@ module Google
351
347
  endpoint: @config.endpoint,
352
348
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
353
349
  universe_domain: @config.universe_domain,
354
- credentials: credentials
350
+ credentials: credentials,
351
+ logger: @config.logger
355
352
  )
356
353
 
354
+ @dlp_service_stub.logger(stub: true)&.info do |entry|
355
+ entry.set_system_name
356
+ entry.set_service
357
+ entry.message = "Created client for #{entry.service}"
358
+ entry.set_credentials_fields credentials
359
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
360
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
361
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
362
+ end
363
+
357
364
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
358
365
  config.credentials = credentials
359
366
  config.quota_project = @quota_project_id
360
367
  config.endpoint = @dlp_service_stub.endpoint
361
368
  config.universe_domain = @dlp_service_stub.universe_domain
369
+ config.logger = @dlp_service_stub.logger if config.respond_to? :logger=
362
370
  end
363
371
  end
364
372
 
@@ -369,6 +377,15 @@ module Google
369
377
  #
370
378
  attr_reader :location_client
371
379
 
380
+ ##
381
+ # The logger used for request/response debug logging.
382
+ #
383
+ # @return [Logger]
384
+ #
385
+ def logger
386
+ @dlp_service_stub.logger
387
+ end
388
+
372
389
  # Service calls
373
390
 
374
391
  ##
@@ -482,7 +499,6 @@ module Google
482
499
 
483
500
  @dlp_service_stub.inspect_content request, options do |result, operation|
484
501
  yield result, operation if block_given?
485
- return result
486
502
  end
487
503
  rescue ::Gapic::Rest::Error => e
488
504
  raise ::Google::Cloud::Error.from_error(e)
@@ -595,7 +611,6 @@ module Google
595
611
 
596
612
  @dlp_service_stub.redact_image request, options do |result, operation|
597
613
  yield result, operation if block_given?
598
- return result
599
614
  end
600
615
  rescue ::Gapic::Rest::Error => e
601
616
  raise ::Google::Cloud::Error.from_error(e)
@@ -728,7 +743,6 @@ module Google
728
743
 
729
744
  @dlp_service_stub.deidentify_content request, options do |result, operation|
730
745
  yield result, operation if block_given?
731
- return result
732
746
  end
733
747
  rescue ::Gapic::Rest::Error => e
734
748
  raise ::Google::Cloud::Error.from_error(e)
@@ -856,7 +870,6 @@ module Google
856
870
 
857
871
  @dlp_service_stub.reidentify_content request, options do |result, operation|
858
872
  yield result, operation if block_given?
859
- return result
860
873
  end
861
874
  rescue ::Gapic::Rest::Error => e
862
875
  raise ::Google::Cloud::Error.from_error(e)
@@ -951,7 +964,6 @@ module Google
951
964
 
952
965
  @dlp_service_stub.list_info_types request, options do |result, operation|
953
966
  yield result, operation if block_given?
954
- return result
955
967
  end
956
968
  rescue ::Gapic::Rest::Error => e
957
969
  raise ::Google::Cloud::Error.from_error(e)
@@ -1062,7 +1074,6 @@ module Google
1062
1074
 
1063
1075
  @dlp_service_stub.create_inspect_template request, options do |result, operation|
1064
1076
  yield result, operation if block_given?
1065
- return result
1066
1077
  end
1067
1078
  rescue ::Gapic::Rest::Error => e
1068
1079
  raise ::Google::Cloud::Error.from_error(e)
@@ -1150,7 +1161,6 @@ module Google
1150
1161
 
1151
1162
  @dlp_service_stub.update_inspect_template request, options do |result, operation|
1152
1163
  yield result, operation if block_given?
1153
- return result
1154
1164
  end
1155
1165
  rescue ::Gapic::Rest::Error => e
1156
1166
  raise ::Google::Cloud::Error.from_error(e)
@@ -1234,7 +1244,6 @@ module Google
1234
1244
 
1235
1245
  @dlp_service_stub.get_inspect_template request, options do |result, operation|
1236
1246
  yield result, operation if block_given?
1237
- return result
1238
1247
  end
1239
1248
  rescue ::Gapic::Rest::Error => e
1240
1249
  raise ::Google::Cloud::Error.from_error(e)
@@ -1362,7 +1371,7 @@ module Google
1362
1371
  @dlp_service_stub.list_inspect_templates request, options do |result, operation|
1363
1372
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_inspect_templates, "inspect_templates", request, result, options
1364
1373
  yield result, operation if block_given?
1365
- return result
1374
+ throw :response, result
1366
1375
  end
1367
1376
  rescue ::Gapic::Rest::Error => e
1368
1377
  raise ::Google::Cloud::Error.from_error(e)
@@ -1446,7 +1455,6 @@ module Google
1446
1455
 
1447
1456
  @dlp_service_stub.delete_inspect_template request, options do |result, operation|
1448
1457
  yield result, operation if block_given?
1449
- return result
1450
1458
  end
1451
1459
  rescue ::Gapic::Rest::Error => e
1452
1460
  raise ::Google::Cloud::Error.from_error(e)
@@ -1557,7 +1565,6 @@ module Google
1557
1565
 
1558
1566
  @dlp_service_stub.create_deidentify_template request, options do |result, operation|
1559
1567
  yield result, operation if block_given?
1560
- return result
1561
1568
  end
1562
1569
  rescue ::Gapic::Rest::Error => e
1563
1570
  raise ::Google::Cloud::Error.from_error(e)
@@ -1646,7 +1653,6 @@ module Google
1646
1653
 
1647
1654
  @dlp_service_stub.update_deidentify_template request, options do |result, operation|
1648
1655
  yield result, operation if block_given?
1649
- return result
1650
1656
  end
1651
1657
  rescue ::Gapic::Rest::Error => e
1652
1658
  raise ::Google::Cloud::Error.from_error(e)
@@ -1730,7 +1736,6 @@ module Google
1730
1736
 
1731
1737
  @dlp_service_stub.get_deidentify_template request, options do |result, operation|
1732
1738
  yield result, operation if block_given?
1733
- return result
1734
1739
  end
1735
1740
  rescue ::Gapic::Rest::Error => e
1736
1741
  raise ::Google::Cloud::Error.from_error(e)
@@ -1858,7 +1863,7 @@ module Google
1858
1863
  @dlp_service_stub.list_deidentify_templates request, options do |result, operation|
1859
1864
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_deidentify_templates, "deidentify_templates", request, result, options
1860
1865
  yield result, operation if block_given?
1861
- return result
1866
+ throw :response, result
1862
1867
  end
1863
1868
  rescue ::Gapic::Rest::Error => e
1864
1869
  raise ::Google::Cloud::Error.from_error(e)
@@ -1943,7 +1948,6 @@ module Google
1943
1948
 
1944
1949
  @dlp_service_stub.delete_deidentify_template request, options do |result, operation|
1945
1950
  yield result, operation if block_given?
1946
- return result
1947
1951
  end
1948
1952
  rescue ::Gapic::Rest::Error => e
1949
1953
  raise ::Google::Cloud::Error.from_error(e)
@@ -2050,7 +2054,6 @@ module Google
2050
2054
 
2051
2055
  @dlp_service_stub.create_job_trigger request, options do |result, operation|
2052
2056
  yield result, operation if block_given?
2053
- return result
2054
2057
  end
2055
2058
  rescue ::Gapic::Rest::Error => e
2056
2059
  raise ::Google::Cloud::Error.from_error(e)
@@ -2137,7 +2140,6 @@ module Google
2137
2140
 
2138
2141
  @dlp_service_stub.update_job_trigger request, options do |result, operation|
2139
2142
  yield result, operation if block_given?
2140
- return result
2141
2143
  end
2142
2144
  rescue ::Gapic::Rest::Error => e
2143
2145
  raise ::Google::Cloud::Error.from_error(e)
@@ -2221,7 +2223,6 @@ module Google
2221
2223
 
2222
2224
  @dlp_service_stub.hybrid_inspect_job_trigger request, options do |result, operation|
2223
2225
  yield result, operation if block_given?
2224
- return result
2225
2226
  end
2226
2227
  rescue ::Gapic::Rest::Error => e
2227
2228
  raise ::Google::Cloud::Error.from_error(e)
@@ -2304,7 +2305,6 @@ module Google
2304
2305
 
2305
2306
  @dlp_service_stub.get_job_trigger request, options do |result, operation|
2306
2307
  yield result, operation if block_given?
2307
- return result
2308
2308
  end
2309
2309
  rescue ::Gapic::Rest::Error => e
2310
2310
  raise ::Google::Cloud::Error.from_error(e)
@@ -2457,7 +2457,7 @@ module Google
2457
2457
  @dlp_service_stub.list_job_triggers request, options do |result, operation|
2458
2458
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_job_triggers, "job_triggers", request, result, options
2459
2459
  yield result, operation if block_given?
2460
- return result
2460
+ throw :response, result
2461
2461
  end
2462
2462
  rescue ::Gapic::Rest::Error => e
2463
2463
  raise ::Google::Cloud::Error.from_error(e)
@@ -2540,7 +2540,6 @@ module Google
2540
2540
 
2541
2541
  @dlp_service_stub.delete_job_trigger request, options do |result, operation|
2542
2542
  yield result, operation if block_given?
2543
- return result
2544
2543
  end
2545
2544
  rescue ::Gapic::Rest::Error => e
2546
2545
  raise ::Google::Cloud::Error.from_error(e)
@@ -2621,7 +2620,6 @@ module Google
2621
2620
 
2622
2621
  @dlp_service_stub.activate_job_trigger request, options do |result, operation|
2623
2622
  yield result, operation if block_given?
2624
- return result
2625
2623
  end
2626
2624
  rescue ::Gapic::Rest::Error => e
2627
2625
  raise ::Google::Cloud::Error.from_error(e)
@@ -2721,7 +2719,6 @@ module Google
2721
2719
 
2722
2720
  @dlp_service_stub.create_discovery_config request, options do |result, operation|
2723
2721
  yield result, operation if block_given?
2724
- return result
2725
2722
  end
2726
2723
  rescue ::Gapic::Rest::Error => e
2727
2724
  raise ::Google::Cloud::Error.from_error(e)
@@ -2805,7 +2802,6 @@ module Google
2805
2802
 
2806
2803
  @dlp_service_stub.update_discovery_config request, options do |result, operation|
2807
2804
  yield result, operation if block_given?
2808
- return result
2809
2805
  end
2810
2806
  rescue ::Gapic::Rest::Error => e
2811
2807
  raise ::Google::Cloud::Error.from_error(e)
@@ -2885,7 +2881,6 @@ module Google
2885
2881
 
2886
2882
  @dlp_service_stub.get_discovery_config request, options do |result, operation|
2887
2883
  yield result, operation if block_given?
2888
- return result
2889
2884
  end
2890
2885
  rescue ::Gapic::Rest::Error => e
2891
2886
  raise ::Google::Cloud::Error.from_error(e)
@@ -2997,7 +2992,7 @@ module Google
2997
2992
  @dlp_service_stub.list_discovery_configs request, options do |result, operation|
2998
2993
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_discovery_configs, "discovery_configs", request, result, options
2999
2994
  yield result, operation if block_given?
3000
- return result
2995
+ throw :response, result
3001
2996
  end
3002
2997
  rescue ::Gapic::Rest::Error => e
3003
2998
  raise ::Google::Cloud::Error.from_error(e)
@@ -3077,7 +3072,6 @@ module Google
3077
3072
 
3078
3073
  @dlp_service_stub.delete_discovery_config request, options do |result, operation|
3079
3074
  yield result, operation if block_given?
3080
- return result
3081
3075
  end
3082
3076
  rescue ::Gapic::Rest::Error => e
3083
3077
  raise ::Google::Cloud::Error.from_error(e)
@@ -3192,7 +3186,6 @@ module Google
3192
3186
 
3193
3187
  @dlp_service_stub.create_dlp_job request, options do |result, operation|
3194
3188
  yield result, operation if block_given?
3195
- return result
3196
3189
  end
3197
3190
  rescue ::Gapic::Rest::Error => e
3198
3191
  raise ::Google::Cloud::Error.from_error(e)
@@ -3347,7 +3340,7 @@ module Google
3347
3340
  @dlp_service_stub.list_dlp_jobs request, options do |result, operation|
3348
3341
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_dlp_jobs, "jobs", request, result, options
3349
3342
  yield result, operation if block_given?
3350
- return result
3343
+ throw :response, result
3351
3344
  end
3352
3345
  rescue ::Gapic::Rest::Error => e
3353
3346
  raise ::Google::Cloud::Error.from_error(e)
@@ -3431,7 +3424,6 @@ module Google
3431
3424
 
3432
3425
  @dlp_service_stub.get_dlp_job request, options do |result, operation|
3433
3426
  yield result, operation if block_given?
3434
- return result
3435
3427
  end
3436
3428
  rescue ::Gapic::Rest::Error => e
3437
3429
  raise ::Google::Cloud::Error.from_error(e)
@@ -3517,7 +3509,6 @@ module Google
3517
3509
 
3518
3510
  @dlp_service_stub.delete_dlp_job request, options do |result, operation|
3519
3511
  yield result, operation if block_given?
3520
- return result
3521
3512
  end
3522
3513
  rescue ::Gapic::Rest::Error => e
3523
3514
  raise ::Google::Cloud::Error.from_error(e)
@@ -3603,7 +3594,6 @@ module Google
3603
3594
 
3604
3595
  @dlp_service_stub.cancel_dlp_job request, options do |result, operation|
3605
3596
  yield result, operation if block_given?
3606
- return result
3607
3597
  end
3608
3598
  rescue ::Gapic::Rest::Error => e
3609
3599
  raise ::Google::Cloud::Error.from_error(e)
@@ -3713,7 +3703,6 @@ module Google
3713
3703
 
3714
3704
  @dlp_service_stub.create_stored_info_type request, options do |result, operation|
3715
3705
  yield result, operation if block_given?
3716
- return result
3717
3706
  end
3718
3707
  rescue ::Gapic::Rest::Error => e
3719
3708
  raise ::Google::Cloud::Error.from_error(e)
@@ -3804,7 +3793,6 @@ module Google
3804
3793
 
3805
3794
  @dlp_service_stub.update_stored_info_type request, options do |result, operation|
3806
3795
  yield result, operation if block_given?
3807
- return result
3808
3796
  end
3809
3797
  rescue ::Gapic::Rest::Error => e
3810
3798
  raise ::Google::Cloud::Error.from_error(e)
@@ -3888,7 +3876,6 @@ module Google
3888
3876
 
3889
3877
  @dlp_service_stub.get_stored_info_type request, options do |result, operation|
3890
3878
  yield result, operation if block_given?
3891
- return result
3892
3879
  end
3893
3880
  rescue ::Gapic::Rest::Error => e
3894
3881
  raise ::Google::Cloud::Error.from_error(e)
@@ -4013,7 +4000,7 @@ module Google
4013
4000
  @dlp_service_stub.list_stored_info_types request, options do |result, operation|
4014
4001
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_stored_info_types, "stored_info_types", request, result, options
4015
4002
  yield result, operation if block_given?
4016
- return result
4003
+ throw :response, result
4017
4004
  end
4018
4005
  rescue ::Gapic::Rest::Error => e
4019
4006
  raise ::Google::Cloud::Error.from_error(e)
@@ -4097,7 +4084,6 @@ module Google
4097
4084
 
4098
4085
  @dlp_service_stub.delete_stored_info_type request, options do |result, operation|
4099
4086
  yield result, operation if block_given?
4100
- return result
4101
4087
  end
4102
4088
  rescue ::Gapic::Rest::Error => e
4103
4089
  raise ::Google::Cloud::Error.from_error(e)
@@ -4225,7 +4211,7 @@ module Google
4225
4211
  @dlp_service_stub.list_project_data_profiles request, options do |result, operation|
4226
4212
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_project_data_profiles, "project_data_profiles", request, result, options
4227
4213
  yield result, operation if block_given?
4228
- return result
4214
+ throw :response, result
4229
4215
  end
4230
4216
  rescue ::Gapic::Rest::Error => e
4231
4217
  raise ::Google::Cloud::Error.from_error(e)
@@ -4366,7 +4352,7 @@ module Google
4366
4352
  @dlp_service_stub.list_table_data_profiles request, options do |result, operation|
4367
4353
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_table_data_profiles, "table_data_profiles", request, result, options
4368
4354
  yield result, operation if block_given?
4369
- return result
4355
+ throw :response, result
4370
4356
  end
4371
4357
  rescue ::Gapic::Rest::Error => e
4372
4358
  raise ::Google::Cloud::Error.from_error(e)
@@ -4509,7 +4495,7 @@ module Google
4509
4495
  @dlp_service_stub.list_column_data_profiles request, options do |result, operation|
4510
4496
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_column_data_profiles, "column_data_profiles", request, result, options
4511
4497
  yield result, operation if block_given?
4512
- return result
4498
+ throw :response, result
4513
4499
  end
4514
4500
  rescue ::Gapic::Rest::Error => e
4515
4501
  raise ::Google::Cloud::Error.from_error(e)
@@ -4589,7 +4575,6 @@ module Google
4589
4575
 
4590
4576
  @dlp_service_stub.get_project_data_profile request, options do |result, operation|
4591
4577
  yield result, operation if block_given?
4592
- return result
4593
4578
  end
4594
4579
  rescue ::Gapic::Rest::Error => e
4595
4580
  raise ::Google::Cloud::Error.from_error(e)
@@ -4735,7 +4720,7 @@ module Google
4735
4720
  @dlp_service_stub.list_file_store_data_profiles request, options do |result, operation|
4736
4721
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_file_store_data_profiles, "file_store_data_profiles", request, result, options
4737
4722
  yield result, operation if block_given?
4738
- return result
4723
+ throw :response, result
4739
4724
  end
4740
4725
  rescue ::Gapic::Rest::Error => e
4741
4726
  raise ::Google::Cloud::Error.from_error(e)
@@ -4815,7 +4800,6 @@ module Google
4815
4800
 
4816
4801
  @dlp_service_stub.get_file_store_data_profile request, options do |result, operation|
4817
4802
  yield result, operation if block_given?
4818
- return result
4819
4803
  end
4820
4804
  rescue ::Gapic::Rest::Error => e
4821
4805
  raise ::Google::Cloud::Error.from_error(e)
@@ -4895,7 +4879,6 @@ module Google
4895
4879
 
4896
4880
  @dlp_service_stub.delete_file_store_data_profile request, options do |result, operation|
4897
4881
  yield result, operation if block_given?
4898
- return result
4899
4882
  end
4900
4883
  rescue ::Gapic::Rest::Error => e
4901
4884
  raise ::Google::Cloud::Error.from_error(e)
@@ -4975,7 +4958,6 @@ module Google
4975
4958
 
4976
4959
  @dlp_service_stub.get_table_data_profile request, options do |result, operation|
4977
4960
  yield result, operation if block_given?
4978
- return result
4979
4961
  end
4980
4962
  rescue ::Gapic::Rest::Error => e
4981
4963
  raise ::Google::Cloud::Error.from_error(e)
@@ -5055,7 +5037,6 @@ module Google
5055
5037
 
5056
5038
  @dlp_service_stub.get_column_data_profile request, options do |result, operation|
5057
5039
  yield result, operation if block_given?
5058
- return result
5059
5040
  end
5060
5041
  rescue ::Gapic::Rest::Error => e
5061
5042
  raise ::Google::Cloud::Error.from_error(e)
@@ -5135,7 +5116,6 @@ module Google
5135
5116
 
5136
5117
  @dlp_service_stub.delete_table_data_profile request, options do |result, operation|
5137
5118
  yield result, operation if block_given?
5138
- return result
5139
5119
  end
5140
5120
  rescue ::Gapic::Rest::Error => e
5141
5121
  raise ::Google::Cloud::Error.from_error(e)
@@ -5219,7 +5199,6 @@ module Google
5219
5199
 
5220
5200
  @dlp_service_stub.hybrid_inspect_dlp_job request, options do |result, operation|
5221
5201
  yield result, operation if block_given?
5222
- return result
5223
5202
  end
5224
5203
  rescue ::Gapic::Rest::Error => e
5225
5204
  raise ::Google::Cloud::Error.from_error(e)
@@ -5299,7 +5278,6 @@ module Google
5299
5278
 
5300
5279
  @dlp_service_stub.finish_dlp_job request, options do |result, operation|
5301
5280
  yield result, operation if block_given?
5302
- return result
5303
5281
  end
5304
5282
  rescue ::Gapic::Rest::Error => e
5305
5283
  raise ::Google::Cloud::Error.from_error(e)
@@ -5388,7 +5366,6 @@ module Google
5388
5366
 
5389
5367
  @dlp_service_stub.create_connection request, options do |result, operation|
5390
5368
  yield result, operation if block_given?
5391
- return result
5392
5369
  end
5393
5370
  rescue ::Gapic::Rest::Error => e
5394
5371
  raise ::Google::Cloud::Error.from_error(e)
@@ -5468,7 +5445,6 @@ module Google
5468
5445
 
5469
5446
  @dlp_service_stub.get_connection request, options do |result, operation|
5470
5447
  yield result, operation if block_given?
5471
- return result
5472
5448
  end
5473
5449
  rescue ::Gapic::Rest::Error => e
5474
5450
  raise ::Google::Cloud::Error.from_error(e)
@@ -5562,7 +5538,7 @@ module Google
5562
5538
  @dlp_service_stub.list_connections request, options do |result, operation|
5563
5539
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :list_connections, "connections", request, result, options
5564
5540
  yield result, operation if block_given?
5565
- return result
5541
+ throw :response, result
5566
5542
  end
5567
5543
  rescue ::Gapic::Rest::Error => e
5568
5544
  raise ::Google::Cloud::Error.from_error(e)
@@ -5655,7 +5631,7 @@ module Google
5655
5631
  @dlp_service_stub.search_connections request, options do |result, operation|
5656
5632
  result = ::Gapic::Rest::PagedEnumerable.new @dlp_service_stub, :search_connections, "connections", request, result, options
5657
5633
  yield result, operation if block_given?
5658
- return result
5634
+ throw :response, result
5659
5635
  end
5660
5636
  rescue ::Gapic::Rest::Error => e
5661
5637
  raise ::Google::Cloud::Error.from_error(e)
@@ -5735,7 +5711,6 @@ module Google
5735
5711
 
5736
5712
  @dlp_service_stub.delete_connection request, options do |result, operation|
5737
5713
  yield result, operation if block_given?
5738
- return result
5739
5714
  end
5740
5715
  rescue ::Gapic::Rest::Error => e
5741
5716
  raise ::Google::Cloud::Error.from_error(e)
@@ -5819,7 +5794,6 @@ module Google
5819
5794
 
5820
5795
  @dlp_service_stub.update_connection request, options do |result, operation|
5821
5796
  yield result, operation if block_given?
5822
- return result
5823
5797
  end
5824
5798
  rescue ::Gapic::Rest::Error => e
5825
5799
  raise ::Google::Cloud::Error.from_error(e)
@@ -5899,6 +5873,11 @@ module Google
5899
5873
  # default endpoint URL. The default value of nil uses the environment
5900
5874
  # universe (usually the default "googleapis.com" universe).
5901
5875
  # @return [::String,nil]
5876
+ # @!attribute [rw] logger
5877
+ # A custom logger to use for request/response debug logging, or the value
5878
+ # `:default` (the default) to construct a default logger, or `nil` to
5879
+ # explicitly disable logging.
5880
+ # @return [::Logger,:default,nil]
5902
5881
  #
5903
5882
  class Configuration
5904
5883
  extend ::Gapic::Config
@@ -5920,6 +5899,7 @@ module Google
5920
5899
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
5921
5900
  config_attr :quota_project, nil, ::String, nil
5922
5901
  config_attr :universe_domain, nil, ::String, nil
5902
+ config_attr :logger, :default, ::Logger, nil, :default
5923
5903
 
5924
5904
  # @private
5925
5905
  def initialize parent_config = nil