google-cloud-data_catalog-v1beta1 0.5.1 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 921fa02ed0d10d59183c46a6e1157476f167370178b970339d0d6aaf2a402276
4
- data.tar.gz: 0d213a4c13e02c86ce2d8ab8bc5f726fdb556f8abbc2a9fe8aac53b465ca598b
3
+ metadata.gz: 464125016b359c47eeb474ff2710acbb00ea95cc009433288cb2bde966b7d1c0
4
+ data.tar.gz: eb22d299acca7ff1990eb9012ada180fe80d3a89beaf91cae454f84b05dae7f0
5
5
  SHA512:
6
- metadata.gz: fc069ee703d193e3ad3160dbb0a87e14d350dc63a50eeca4b2ae14d45cbef279a04f8c5a72f650b68d3026005c2fa3326fa6692db620e3d33eb9dc76f751a67e
7
- data.tar.gz: b20d01b1fd2c74a368150fdd974fae5a083a615e6d50e90de9635749abc0084144949a48b027afea396feebfa23680d714aeba9664c3364cfcf8b9dba318992f
6
+ metadata.gz: '03940cb2713a4cc2a86bf880b265f167bff031a24e92af67184e149896695980353a21db455fef409dd44bf57fb9a90d7716bd7acc2bf956c48ac2ba376f2feb'
7
+ data.tar.gz: d5997bb970b8d1c2895b57f5484950f71557984bff2e3f69227a0c5e50346ab2cb4f047e7cd88f032e31d90ca0a652f8d495e1c4b47ae68df48d0b861dcbc6ef
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/data-catalog/docs)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/data_catalog/v1beta1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -164,14 +164,26 @@ module Google
164
164
  universe_domain: @config.universe_domain,
165
165
  channel_args: @config.channel_args,
166
166
  interceptors: @config.interceptors,
167
- channel_pool_config: @config.channel_pool
167
+ channel_pool_config: @config.channel_pool,
168
+ logger: @config.logger
168
169
  )
169
170
 
171
+ @data_catalog_stub.stub_logger&.info do |entry|
172
+ entry.set_system_name
173
+ entry.set_service
174
+ entry.message = "Created client for #{entry.service}"
175
+ entry.set_credentials_fields credentials
176
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
177
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
178
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
179
+ end
180
+
170
181
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
171
182
  config.credentials = credentials
172
183
  config.quota_project = @quota_project_id
173
184
  config.endpoint = @data_catalog_stub.endpoint
174
185
  config.universe_domain = @data_catalog_stub.universe_domain
186
+ config.logger = @data_catalog_stub.logger if config.respond_to? :logger=
175
187
  end
176
188
  end
177
189
 
@@ -182,6 +194,15 @@ module Google
182
194
  #
183
195
  attr_reader :iam_policy_client
184
196
 
197
+ ##
198
+ # The logger used for request/response debug logging.
199
+ #
200
+ # @return [Logger]
201
+ #
202
+ def logger
203
+ @data_catalog_stub.logger
204
+ end
205
+
185
206
  # Service calls
186
207
 
187
208
  ##
@@ -312,7 +333,7 @@ module Google
312
333
  @data_catalog_stub.call_rpc :search_catalog, request, options: options do |response, operation|
313
334
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :search_catalog, request, response, operation, options
314
335
  yield response, operation if block_given?
315
- return response
336
+ throw :response, response
316
337
  end
317
338
  rescue ::GRPC::BadStatus => e
318
339
  raise ::Google::Cloud::Error.from_error(e)
@@ -415,7 +436,6 @@ module Google
415
436
 
416
437
  @data_catalog_stub.call_rpc :create_entry_group, request, options: options do |response, operation|
417
438
  yield response, operation if block_given?
418
- return response
419
439
  end
420
440
  rescue ::GRPC::BadStatus => e
421
441
  raise ::Google::Cloud::Error.from_error(e)
@@ -511,7 +531,6 @@ module Google
511
531
 
512
532
  @data_catalog_stub.call_rpc :update_entry_group, request, options: options do |response, operation|
513
533
  yield response, operation if block_given?
514
- return response
515
534
  end
516
535
  rescue ::GRPC::BadStatus => e
517
536
  raise ::Google::Cloud::Error.from_error(e)
@@ -600,7 +619,6 @@ module Google
600
619
 
601
620
  @data_catalog_stub.call_rpc :get_entry_group, request, options: options do |response, operation|
602
621
  yield response, operation if block_given?
603
- return response
604
622
  end
605
623
  rescue ::GRPC::BadStatus => e
606
624
  raise ::Google::Cloud::Error.from_error(e)
@@ -693,7 +711,6 @@ module Google
693
711
 
694
712
  @data_catalog_stub.call_rpc :delete_entry_group, request, options: options do |response, operation|
695
713
  yield response, operation if block_given?
696
- return response
697
714
  end
698
715
  rescue ::GRPC::BadStatus => e
699
716
  raise ::Google::Cloud::Error.from_error(e)
@@ -793,7 +810,7 @@ module Google
793
810
  @data_catalog_stub.call_rpc :list_entry_groups, request, options: options do |response, operation|
794
811
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, request, response, operation, options
795
812
  yield response, operation if block_given?
796
- return response
813
+ throw :response, response
797
814
  end
798
815
  rescue ::GRPC::BadStatus => e
799
816
  raise ::Google::Cloud::Error.from_error(e)
@@ -896,7 +913,6 @@ module Google
896
913
 
897
914
  @data_catalog_stub.call_rpc :create_entry, request, options: options do |response, operation|
898
915
  yield response, operation if block_given?
899
- return response
900
916
  end
901
917
  rescue ::GRPC::BadStatus => e
902
918
  raise ::Google::Cloud::Error.from_error(e)
@@ -1011,7 +1027,6 @@ module Google
1011
1027
 
1012
1028
  @data_catalog_stub.call_rpc :update_entry, request, options: options do |response, operation|
1013
1029
  yield response, operation if block_given?
1014
- return response
1015
1030
  end
1016
1031
  rescue ::GRPC::BadStatus => e
1017
1032
  raise ::Google::Cloud::Error.from_error(e)
@@ -1105,7 +1120,6 @@ module Google
1105
1120
 
1106
1121
  @data_catalog_stub.call_rpc :delete_entry, request, options: options do |response, operation|
1107
1122
  yield response, operation if block_given?
1108
- return response
1109
1123
  end
1110
1124
  rescue ::GRPC::BadStatus => e
1111
1125
  raise ::Google::Cloud::Error.from_error(e)
@@ -1193,7 +1207,6 @@ module Google
1193
1207
 
1194
1208
  @data_catalog_stub.call_rpc :get_entry, request, options: options do |response, operation|
1195
1209
  yield response, operation if block_given?
1196
- return response
1197
1210
  end
1198
1211
  rescue ::GRPC::BadStatus => e
1199
1212
  raise ::Google::Cloud::Error.from_error(e)
@@ -1294,7 +1307,6 @@ module Google
1294
1307
 
1295
1308
  @data_catalog_stub.call_rpc :lookup_entry, request, options: options do |response, operation|
1296
1309
  yield response, operation if block_given?
1297
- return response
1298
1310
  end
1299
1311
  rescue ::GRPC::BadStatus => e
1300
1312
  raise ::Google::Cloud::Error.from_error(e)
@@ -1399,7 +1411,7 @@ module Google
1399
1411
  @data_catalog_stub.call_rpc :list_entries, request, options: options do |response, operation|
1400
1412
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entries, request, response, operation, options
1401
1413
  yield response, operation if block_given?
1402
- return response
1414
+ throw :response, response
1403
1415
  end
1404
1416
  rescue ::GRPC::BadStatus => e
1405
1417
  raise ::Google::Cloud::Error.from_error(e)
@@ -1498,7 +1510,6 @@ module Google
1498
1510
 
1499
1511
  @data_catalog_stub.call_rpc :create_tag_template, request, options: options do |response, operation|
1500
1512
  yield response, operation if block_given?
1501
- return response
1502
1513
  end
1503
1514
  rescue ::GRPC::BadStatus => e
1504
1515
  raise ::Google::Cloud::Error.from_error(e)
@@ -1586,7 +1597,6 @@ module Google
1586
1597
 
1587
1598
  @data_catalog_stub.call_rpc :get_tag_template, request, options: options do |response, operation|
1588
1599
  yield response, operation if block_given?
1589
- return response
1590
1600
  end
1591
1601
  rescue ::GRPC::BadStatus => e
1592
1602
  raise ::Google::Cloud::Error.from_error(e)
@@ -1685,7 +1695,6 @@ module Google
1685
1695
 
1686
1696
  @data_catalog_stub.call_rpc :update_tag_template, request, options: options do |response, operation|
1687
1697
  yield response, operation if block_given?
1688
- return response
1689
1698
  end
1690
1699
  rescue ::GRPC::BadStatus => e
1691
1700
  raise ::Google::Cloud::Error.from_error(e)
@@ -1781,7 +1790,6 @@ module Google
1781
1790
 
1782
1791
  @data_catalog_stub.call_rpc :delete_tag_template, request, options: options do |response, operation|
1783
1792
  yield response, operation if block_given?
1784
- return response
1785
1793
  end
1786
1794
  rescue ::GRPC::BadStatus => e
1787
1795
  raise ::Google::Cloud::Error.from_error(e)
@@ -1884,7 +1892,6 @@ module Google
1884
1892
 
1885
1893
  @data_catalog_stub.call_rpc :create_tag_template_field, request, options: options do |response, operation|
1886
1894
  yield response, operation if block_given?
1887
- return response
1888
1895
  end
1889
1896
  rescue ::GRPC::BadStatus => e
1890
1897
  raise ::Google::Cloud::Error.from_error(e)
@@ -1995,7 +2002,6 @@ module Google
1995
2002
 
1996
2003
  @data_catalog_stub.call_rpc :update_tag_template_field, request, options: options do |response, operation|
1997
2004
  yield response, operation if block_given?
1998
- return response
1999
2005
  end
2000
2006
  rescue ::GRPC::BadStatus => e
2001
2007
  raise ::Google::Cloud::Error.from_error(e)
@@ -2090,7 +2096,6 @@ module Google
2090
2096
 
2091
2097
  @data_catalog_stub.call_rpc :rename_tag_template_field, request, options: options do |response, operation|
2092
2098
  yield response, operation if block_given?
2093
- return response
2094
2099
  end
2095
2100
  rescue ::GRPC::BadStatus => e
2096
2101
  raise ::Google::Cloud::Error.from_error(e)
@@ -2183,7 +2188,6 @@ module Google
2183
2188
 
2184
2189
  @data_catalog_stub.call_rpc :rename_tag_template_field_enum_value, request, options: options do |response, operation|
2185
2190
  yield response, operation if block_given?
2186
- return response
2187
2191
  end
2188
2192
  rescue ::GRPC::BadStatus => e
2189
2193
  raise ::Google::Cloud::Error.from_error(e)
@@ -2279,7 +2283,6 @@ module Google
2279
2283
 
2280
2284
  @data_catalog_stub.call_rpc :delete_tag_template_field, request, options: options do |response, operation|
2281
2285
  yield response, operation if block_given?
2282
- return response
2283
2286
  end
2284
2287
  rescue ::GRPC::BadStatus => e
2285
2288
  raise ::Google::Cloud::Error.from_error(e)
@@ -2379,7 +2382,6 @@ module Google
2379
2382
 
2380
2383
  @data_catalog_stub.call_rpc :create_tag, request, options: options do |response, operation|
2381
2384
  yield response, operation if block_given?
2382
- return response
2383
2385
  end
2384
2386
  rescue ::GRPC::BadStatus => e
2385
2387
  raise ::Google::Cloud::Error.from_error(e)
@@ -2474,7 +2476,6 @@ module Google
2474
2476
 
2475
2477
  @data_catalog_stub.call_rpc :update_tag, request, options: options do |response, operation|
2476
2478
  yield response, operation if block_given?
2477
- return response
2478
2479
  end
2479
2480
  rescue ::GRPC::BadStatus => e
2480
2481
  raise ::Google::Cloud::Error.from_error(e)
@@ -2562,7 +2563,6 @@ module Google
2562
2563
 
2563
2564
  @data_catalog_stub.call_rpc :delete_tag, request, options: options do |response, operation|
2564
2565
  yield response, operation if block_given?
2565
- return response
2566
2566
  end
2567
2567
  rescue ::GRPC::BadStatus => e
2568
2568
  raise ::Google::Cloud::Error.from_error(e)
@@ -2667,7 +2667,7 @@ module Google
2667
2667
  @data_catalog_stub.call_rpc :list_tags, request, options: options do |response, operation|
2668
2668
  response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_tags, request, response, operation, options
2669
2669
  yield response, operation if block_given?
2670
- return response
2670
+ throw :response, response
2671
2671
  end
2672
2672
  rescue ::GRPC::BadStatus => e
2673
2673
  raise ::Google::Cloud::Error.from_error(e)
@@ -2778,7 +2778,6 @@ module Google
2778
2778
 
2779
2779
  @data_catalog_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
2780
2780
  yield response, operation if block_given?
2781
- return response
2782
2781
  end
2783
2782
  rescue ::GRPC::BadStatus => e
2784
2783
  raise ::Google::Cloud::Error.from_error(e)
@@ -2883,7 +2882,6 @@ module Google
2883
2882
 
2884
2883
  @data_catalog_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
2885
2884
  yield response, operation if block_given?
2886
- return response
2887
2885
  end
2888
2886
  rescue ::GRPC::BadStatus => e
2889
2887
  raise ::Google::Cloud::Error.from_error(e)
@@ -2987,7 +2985,6 @@ module Google
2987
2985
 
2988
2986
  @data_catalog_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
2989
2987
  yield response, operation if block_given?
2990
- return response
2991
2988
  end
2992
2989
  rescue ::GRPC::BadStatus => e
2993
2990
  raise ::Google::Cloud::Error.from_error(e)
@@ -3076,6 +3073,11 @@ module Google
3076
3073
  # default endpoint URL. The default value of nil uses the environment
3077
3074
  # universe (usually the default "googleapis.com" universe).
3078
3075
  # @return [::String,nil]
3076
+ # @!attribute [rw] logger
3077
+ # A custom logger to use for request/response debug logging, or the value
3078
+ # `:default` (the default) to construct a default logger, or `nil` to
3079
+ # explicitly disable logging.
3080
+ # @return [::Logger,:default,nil]
3079
3081
  #
3080
3082
  class Configuration
3081
3083
  extend ::Gapic::Config
@@ -3100,6 +3102,7 @@ module Google
3100
3102
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3101
3103
  config_attr :quota_project, nil, ::String, nil
3102
3104
  config_attr :universe_domain, nil, ::String, nil
3105
+ config_attr :logger, :default, ::Logger, nil, :default
3103
3106
 
3104
3107
  # @private
3105
3108
  def initialize parent_config = nil
@@ -157,14 +157,26 @@ module Google
157
157
  endpoint: @config.endpoint,
158
158
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
159
  universe_domain: @config.universe_domain,
160
- credentials: credentials
160
+ credentials: credentials,
161
+ logger: @config.logger
161
162
  )
162
163
 
164
+ @data_catalog_stub.logger(stub: true)&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
173
+
163
174
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
164
175
  config.credentials = credentials
165
176
  config.quota_project = @quota_project_id
166
177
  config.endpoint = @data_catalog_stub.endpoint
167
178
  config.universe_domain = @data_catalog_stub.universe_domain
179
+ config.logger = @data_catalog_stub.logger if config.respond_to? :logger=
168
180
  end
169
181
  end
170
182
 
@@ -175,6 +187,15 @@ module Google
175
187
  #
176
188
  attr_reader :iam_policy_client
177
189
 
190
+ ##
191
+ # The logger used for request/response debug logging.
192
+ #
193
+ # @return [Logger]
194
+ #
195
+ def logger
196
+ @data_catalog_stub.logger
197
+ end
198
+
178
199
  # Service calls
179
200
 
180
201
  ##
@@ -305,7 +326,6 @@ module Google
305
326
 
306
327
  @data_catalog_stub.search_catalog request, options do |result, operation|
307
328
  yield result, operation if block_given?
308
- return result
309
329
  end
310
330
  rescue ::Gapic::Rest::Error => e
311
331
  raise ::Google::Cloud::Error.from_error(e)
@@ -401,7 +421,6 @@ module Google
401
421
 
402
422
  @data_catalog_stub.create_entry_group request, options do |result, operation|
403
423
  yield result, operation if block_given?
404
- return result
405
424
  end
406
425
  rescue ::Gapic::Rest::Error => e
407
426
  raise ::Google::Cloud::Error.from_error(e)
@@ -490,7 +509,6 @@ module Google
490
509
 
491
510
  @data_catalog_stub.update_entry_group request, options do |result, operation|
492
511
  yield result, operation if block_given?
493
- return result
494
512
  end
495
513
  rescue ::Gapic::Rest::Error => e
496
514
  raise ::Google::Cloud::Error.from_error(e)
@@ -572,7 +590,6 @@ module Google
572
590
 
573
591
  @data_catalog_stub.get_entry_group request, options do |result, operation|
574
592
  yield result, operation if block_given?
575
- return result
576
593
  end
577
594
  rescue ::Gapic::Rest::Error => e
578
595
  raise ::Google::Cloud::Error.from_error(e)
@@ -658,7 +675,6 @@ module Google
658
675
 
659
676
  @data_catalog_stub.delete_entry_group request, options do |result, operation|
660
677
  yield result, operation if block_given?
661
- return result
662
678
  end
663
679
  rescue ::Gapic::Rest::Error => e
664
680
  raise ::Google::Cloud::Error.from_error(e)
@@ -751,7 +767,7 @@ module Google
751
767
  @data_catalog_stub.list_entry_groups request, options do |result, operation|
752
768
  result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, "entry_groups", request, result, options
753
769
  yield result, operation if block_given?
754
- return result
770
+ throw :response, result
755
771
  end
756
772
  rescue ::Gapic::Rest::Error => e
757
773
  raise ::Google::Cloud::Error.from_error(e)
@@ -847,7 +863,6 @@ module Google
847
863
 
848
864
  @data_catalog_stub.create_entry request, options do |result, operation|
849
865
  yield result, operation if block_given?
850
- return result
851
866
  end
852
867
  rescue ::Gapic::Rest::Error => e
853
868
  raise ::Google::Cloud::Error.from_error(e)
@@ -955,7 +970,6 @@ module Google
955
970
 
956
971
  @data_catalog_stub.update_entry request, options do |result, operation|
957
972
  yield result, operation if block_given?
958
- return result
959
973
  end
960
974
  rescue ::Gapic::Rest::Error => e
961
975
  raise ::Google::Cloud::Error.from_error(e)
@@ -1042,7 +1056,6 @@ module Google
1042
1056
 
1043
1057
  @data_catalog_stub.delete_entry request, options do |result, operation|
1044
1058
  yield result, operation if block_given?
1045
- return result
1046
1059
  end
1047
1060
  rescue ::Gapic::Rest::Error => e
1048
1061
  raise ::Google::Cloud::Error.from_error(e)
@@ -1123,7 +1136,6 @@ module Google
1123
1136
 
1124
1137
  @data_catalog_stub.get_entry request, options do |result, operation|
1125
1138
  yield result, operation if block_given?
1126
- return result
1127
1139
  end
1128
1140
  rescue ::Gapic::Rest::Error => e
1129
1141
  raise ::Google::Cloud::Error.from_error(e)
@@ -1225,7 +1237,6 @@ module Google
1225
1237
 
1226
1238
  @data_catalog_stub.lookup_entry request, options do |result, operation|
1227
1239
  yield result, operation if block_given?
1228
- return result
1229
1240
  end
1230
1241
  rescue ::Gapic::Rest::Error => e
1231
1242
  raise ::Google::Cloud::Error.from_error(e)
@@ -1323,7 +1334,7 @@ module Google
1323
1334
  @data_catalog_stub.list_entries request, options do |result, operation|
1324
1335
  result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_entries, "entries", request, result, options
1325
1336
  yield result, operation if block_given?
1326
- return result
1337
+ throw :response, result
1327
1338
  end
1328
1339
  rescue ::Gapic::Rest::Error => e
1329
1340
  raise ::Google::Cloud::Error.from_error(e)
@@ -1415,7 +1426,6 @@ module Google
1415
1426
 
1416
1427
  @data_catalog_stub.create_tag_template request, options do |result, operation|
1417
1428
  yield result, operation if block_given?
1418
- return result
1419
1429
  end
1420
1430
  rescue ::Gapic::Rest::Error => e
1421
1431
  raise ::Google::Cloud::Error.from_error(e)
@@ -1496,7 +1506,6 @@ module Google
1496
1506
 
1497
1507
  @data_catalog_stub.get_tag_template request, options do |result, operation|
1498
1508
  yield result, operation if block_given?
1499
- return result
1500
1509
  end
1501
1510
  rescue ::Gapic::Rest::Error => e
1502
1511
  raise ::Google::Cloud::Error.from_error(e)
@@ -1588,7 +1597,6 @@ module Google
1588
1597
 
1589
1598
  @data_catalog_stub.update_tag_template request, options do |result, operation|
1590
1599
  yield result, operation if block_given?
1591
- return result
1592
1600
  end
1593
1601
  rescue ::Gapic::Rest::Error => e
1594
1602
  raise ::Google::Cloud::Error.from_error(e)
@@ -1677,7 +1685,6 @@ module Google
1677
1685
 
1678
1686
  @data_catalog_stub.delete_tag_template request, options do |result, operation|
1679
1687
  yield result, operation if block_given?
1680
- return result
1681
1688
  end
1682
1689
  rescue ::Gapic::Rest::Error => e
1683
1690
  raise ::Google::Cloud::Error.from_error(e)
@@ -1773,7 +1780,6 @@ module Google
1773
1780
 
1774
1781
  @data_catalog_stub.create_tag_template_field request, options do |result, operation|
1775
1782
  yield result, operation if block_given?
1776
- return result
1777
1783
  end
1778
1784
  rescue ::Gapic::Rest::Error => e
1779
1785
  raise ::Google::Cloud::Error.from_error(e)
@@ -1877,7 +1883,6 @@ module Google
1877
1883
 
1878
1884
  @data_catalog_stub.update_tag_template_field request, options do |result, operation|
1879
1885
  yield result, operation if block_given?
1880
- return result
1881
1886
  end
1882
1887
  rescue ::Gapic::Rest::Error => e
1883
1888
  raise ::Google::Cloud::Error.from_error(e)
@@ -1965,7 +1970,6 @@ module Google
1965
1970
 
1966
1971
  @data_catalog_stub.rename_tag_template_field request, options do |result, operation|
1967
1972
  yield result, operation if block_given?
1968
- return result
1969
1973
  end
1970
1974
  rescue ::Gapic::Rest::Error => e
1971
1975
  raise ::Google::Cloud::Error.from_error(e)
@@ -2051,7 +2055,6 @@ module Google
2051
2055
 
2052
2056
  @data_catalog_stub.rename_tag_template_field_enum_value request, options do |result, operation|
2053
2057
  yield result, operation if block_given?
2054
- return result
2055
2058
  end
2056
2059
  rescue ::Gapic::Rest::Error => e
2057
2060
  raise ::Google::Cloud::Error.from_error(e)
@@ -2140,7 +2143,6 @@ module Google
2140
2143
 
2141
2144
  @data_catalog_stub.delete_tag_template_field request, options do |result, operation|
2142
2145
  yield result, operation if block_given?
2143
- return result
2144
2146
  end
2145
2147
  rescue ::Gapic::Rest::Error => e
2146
2148
  raise ::Google::Cloud::Error.from_error(e)
@@ -2233,7 +2235,6 @@ module Google
2233
2235
 
2234
2236
  @data_catalog_stub.create_tag request, options do |result, operation|
2235
2237
  yield result, operation if block_given?
2236
- return result
2237
2238
  end
2238
2239
  rescue ::Gapic::Rest::Error => e
2239
2240
  raise ::Google::Cloud::Error.from_error(e)
@@ -2321,7 +2322,6 @@ module Google
2321
2322
 
2322
2323
  @data_catalog_stub.update_tag request, options do |result, operation|
2323
2324
  yield result, operation if block_given?
2324
- return result
2325
2325
  end
2326
2326
  rescue ::Gapic::Rest::Error => e
2327
2327
  raise ::Google::Cloud::Error.from_error(e)
@@ -2402,7 +2402,6 @@ module Google
2402
2402
 
2403
2403
  @data_catalog_stub.delete_tag request, options do |result, operation|
2404
2404
  yield result, operation if block_given?
2405
- return result
2406
2405
  end
2407
2406
  rescue ::Gapic::Rest::Error => e
2408
2407
  raise ::Google::Cloud::Error.from_error(e)
@@ -2500,7 +2499,7 @@ module Google
2500
2499
  @data_catalog_stub.list_tags request, options do |result, operation|
2501
2500
  result = ::Gapic::Rest::PagedEnumerable.new @data_catalog_stub, :list_tags, "tags", request, result, options
2502
2501
  yield result, operation if block_given?
2503
- return result
2502
+ throw :response, result
2504
2503
  end
2505
2504
  rescue ::Gapic::Rest::Error => e
2506
2505
  raise ::Google::Cloud::Error.from_error(e)
@@ -2604,7 +2603,6 @@ module Google
2604
2603
 
2605
2604
  @data_catalog_stub.set_iam_policy request, options do |result, operation|
2606
2605
  yield result, operation if block_given?
2607
- return result
2608
2606
  end
2609
2607
  rescue ::Gapic::Rest::Error => e
2610
2608
  raise ::Google::Cloud::Error.from_error(e)
@@ -2702,7 +2700,6 @@ module Google
2702
2700
 
2703
2701
  @data_catalog_stub.get_iam_policy request, options do |result, operation|
2704
2702
  yield result, operation if block_given?
2705
- return result
2706
2703
  end
2707
2704
  rescue ::Gapic::Rest::Error => e
2708
2705
  raise ::Google::Cloud::Error.from_error(e)
@@ -2799,7 +2796,6 @@ module Google
2799
2796
 
2800
2797
  @data_catalog_stub.test_iam_permissions request, options do |result, operation|
2801
2798
  yield result, operation if block_given?
2802
- return result
2803
2799
  end
2804
2800
  rescue ::Gapic::Rest::Error => e
2805
2801
  raise ::Google::Cloud::Error.from_error(e)
@@ -2879,6 +2875,11 @@ module Google
2879
2875
  # default endpoint URL. The default value of nil uses the environment
2880
2876
  # universe (usually the default "googleapis.com" universe).
2881
2877
  # @return [::String,nil]
2878
+ # @!attribute [rw] logger
2879
+ # A custom logger to use for request/response debug logging, or the value
2880
+ # `:default` (the default) to construct a default logger, or `nil` to
2881
+ # explicitly disable logging.
2882
+ # @return [::Logger,:default,nil]
2882
2883
  #
2883
2884
  class Configuration
2884
2885
  extend ::Gapic::Config
@@ -2900,6 +2901,7 @@ module Google
2900
2901
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2901
2902
  config_attr :quota_project, nil, ::String, nil
2902
2903
  config_attr :universe_domain, nil, ::String, nil
2904
+ config_attr :logger, :default, ::Logger, nil, :default
2903
2905
 
2904
2906
  # @private
2905
2907
  def initialize parent_config = nil