google-cloud-dataplex-v1 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +45 -27
  4. data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +9 -5
  5. data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +40 -27
  6. data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +40 -28
  7. data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +222 -158
  8. data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
  9. data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
  10. data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
  11. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
  12. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +9 -5
  13. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
  14. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +40 -28
  15. data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
  16. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
  17. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +9 -5
  18. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
  19. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +40 -28
  20. data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
  21. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
  22. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +9 -5
  23. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
  24. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +40 -28
  25. data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
  26. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
  27. data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
  28. data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
  29. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  30. data/proto_docs/google/api/client.rb +19 -0
  31. metadata +5 -5
@@ -187,14 +187,26 @@ module Google
187
187
  universe_domain: @config.universe_domain,
188
188
  channel_args: @config.channel_args,
189
189
  interceptors: @config.interceptors,
190
- channel_pool_config: @config.channel_pool
190
+ channel_pool_config: @config.channel_pool,
191
+ logger: @config.logger
191
192
  )
192
193
 
194
+ @content_service_stub.stub_logger&.info do |entry|
195
+ entry.set_system_name
196
+ entry.set_service
197
+ entry.message = "Created client for #{entry.service}"
198
+ entry.set_credentials_fields credentials
199
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
200
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
201
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
202
+ end
203
+
193
204
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
194
205
  config.credentials = credentials
195
206
  config.quota_project = @quota_project_id
196
207
  config.endpoint = @content_service_stub.endpoint
197
208
  config.universe_domain = @content_service_stub.universe_domain
209
+ config.logger = @content_service_stub.logger if config.respond_to? :logger=
198
210
  end
199
211
 
200
212
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -202,6 +214,7 @@ module Google
202
214
  config.quota_project = @quota_project_id
203
215
  config.endpoint = @content_service_stub.endpoint
204
216
  config.universe_domain = @content_service_stub.universe_domain
217
+ config.logger = @content_service_stub.logger if config.respond_to? :logger=
205
218
  end
206
219
  end
207
220
 
@@ -219,6 +232,15 @@ module Google
219
232
  #
220
233
  attr_reader :iam_policy_client
221
234
 
235
+ ##
236
+ # The logger used for request/response debug logging.
237
+ #
238
+ # @return [Logger]
239
+ #
240
+ def logger
241
+ @content_service_stub.logger
242
+ end
243
+
222
244
  # Service calls
223
245
 
224
246
  ##
@@ -307,7 +329,6 @@ module Google
307
329
 
308
330
  @content_service_stub.call_rpc :create_content, request, options: options do |response, operation|
309
331
  yield response, operation if block_given?
310
- return response
311
332
  end
312
333
  rescue ::GRPC::BadStatus => e
313
334
  raise ::Google::Cloud::Error.from_error(e)
@@ -399,7 +420,6 @@ module Google
399
420
 
400
421
  @content_service_stub.call_rpc :update_content, request, options: options do |response, operation|
401
422
  yield response, operation if block_given?
402
- return response
403
423
  end
404
424
  rescue ::GRPC::BadStatus => e
405
425
  raise ::Google::Cloud::Error.from_error(e)
@@ -486,7 +506,6 @@ module Google
486
506
 
487
507
  @content_service_stub.call_rpc :delete_content, request, options: options do |response, operation|
488
508
  yield response, operation if block_given?
489
- return response
490
509
  end
491
510
  rescue ::GRPC::BadStatus => e
492
511
  raise ::Google::Cloud::Error.from_error(e)
@@ -575,7 +594,6 @@ module Google
575
594
 
576
595
  @content_service_stub.call_rpc :get_content, request, options: options do |response, operation|
577
596
  yield response, operation if block_given?
578
- return response
579
597
  end
580
598
  rescue ::GRPC::BadStatus => e
581
599
  raise ::Google::Cloud::Error.from_error(e)
@@ -670,7 +688,6 @@ module Google
670
688
 
671
689
  @content_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
672
690
  yield response, operation if block_given?
673
- return response
674
691
  end
675
692
  rescue ::GRPC::BadStatus => e
676
693
  raise ::Google::Cloud::Error.from_error(e)
@@ -772,7 +789,6 @@ module Google
772
789
 
773
790
  @content_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
774
791
  yield response, operation if block_given?
775
- return response
776
792
  end
777
793
  rescue ::GRPC::BadStatus => e
778
794
  raise ::Google::Cloud::Error.from_error(e)
@@ -873,7 +889,6 @@ module Google
873
889
 
874
890
  @content_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
875
891
  yield response, operation if block_given?
876
- return response
877
892
  end
878
893
  rescue ::GRPC::BadStatus => e
879
894
  raise ::Google::Cloud::Error.from_error(e)
@@ -984,7 +999,7 @@ module Google
984
999
  @content_service_stub.call_rpc :list_content, request, options: options do |response, operation|
985
1000
  response = ::Gapic::PagedEnumerable.new @content_service_stub, :list_content, request, response, operation, options
986
1001
  yield response, operation if block_given?
987
- return response
1002
+ throw :response, response
988
1003
  end
989
1004
  rescue ::GRPC::BadStatus => e
990
1005
  raise ::Google::Cloud::Error.from_error(e)
@@ -1073,6 +1088,11 @@ module Google
1073
1088
  # default endpoint URL. The default value of nil uses the environment
1074
1089
  # universe (usually the default "googleapis.com" universe).
1075
1090
  # @return [::String,nil]
1091
+ # @!attribute [rw] logger
1092
+ # A custom logger to use for request/response debug logging, or the value
1093
+ # `:default` (the default) to construct a default logger, or `nil` to
1094
+ # explicitly disable logging.
1095
+ # @return [::Logger,:default,nil]
1076
1096
  #
1077
1097
  class Configuration
1078
1098
  extend ::Gapic::Config
@@ -1097,6 +1117,7 @@ module Google
1097
1117
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1098
1118
  config_attr :quota_project, nil, ::String, nil
1099
1119
  config_attr :universe_domain, nil, ::String, nil
1120
+ config_attr :logger, :default, ::Logger, nil, :default
1100
1121
 
1101
1122
  # @private
1102
1123
  def initialize parent_config = nil
@@ -180,15 +180,27 @@ module Google
180
180
  endpoint: @config.endpoint,
181
181
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
182
182
  universe_domain: @config.universe_domain,
183
- credentials: credentials
183
+ credentials: credentials,
184
+ logger: @config.logger
184
185
  )
185
186
 
187
+ @content_service_stub.logger(stub: true)&.info do |entry|
188
+ entry.set_system_name
189
+ entry.set_service
190
+ entry.message = "Created client for #{entry.service}"
191
+ entry.set_credentials_fields credentials
192
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
193
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
194
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
195
+ end
196
+
186
197
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
187
198
  config.credentials = credentials
188
199
  config.quota_project = @quota_project_id
189
200
  config.endpoint = @content_service_stub.endpoint
190
201
  config.universe_domain = @content_service_stub.universe_domain
191
202
  config.bindings_override = @config.bindings_override
203
+ config.logger = @content_service_stub.logger if config.respond_to? :logger=
192
204
  end
193
205
 
194
206
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -197,6 +209,7 @@ module Google
197
209
  config.endpoint = @content_service_stub.endpoint
198
210
  config.universe_domain = @content_service_stub.universe_domain
199
211
  config.bindings_override = @config.bindings_override
212
+ config.logger = @content_service_stub.logger if config.respond_to? :logger=
200
213
  end
201
214
  end
202
215
 
@@ -214,6 +227,15 @@ module Google
214
227
  #
215
228
  attr_reader :iam_policy_client
216
229
 
230
+ ##
231
+ # The logger used for request/response debug logging.
232
+ #
233
+ # @return [Logger]
234
+ #
235
+ def logger
236
+ @content_service_stub.logger
237
+ end
238
+
217
239
  # Service calls
218
240
 
219
241
  ##
@@ -295,7 +317,6 @@ module Google
295
317
 
296
318
  @content_service_stub.create_content request, options do |result, operation|
297
319
  yield result, operation if block_given?
298
- return result
299
320
  end
300
321
  rescue ::Gapic::Rest::Error => e
301
322
  raise ::Google::Cloud::Error.from_error(e)
@@ -380,7 +401,6 @@ module Google
380
401
 
381
402
  @content_service_stub.update_content request, options do |result, operation|
382
403
  yield result, operation if block_given?
383
- return result
384
404
  end
385
405
  rescue ::Gapic::Rest::Error => e
386
406
  raise ::Google::Cloud::Error.from_error(e)
@@ -460,7 +480,6 @@ module Google
460
480
 
461
481
  @content_service_stub.delete_content request, options do |result, operation|
462
482
  yield result, operation if block_given?
463
- return result
464
483
  end
465
484
  rescue ::Gapic::Rest::Error => e
466
485
  raise ::Google::Cloud::Error.from_error(e)
@@ -542,7 +561,6 @@ module Google
542
561
 
543
562
  @content_service_stub.get_content request, options do |result, operation|
544
563
  yield result, operation if block_given?
545
- return result
546
564
  end
547
565
  rescue ::Gapic::Rest::Error => e
548
566
  raise ::Google::Cloud::Error.from_error(e)
@@ -630,7 +648,6 @@ module Google
630
648
 
631
649
  @content_service_stub.get_iam_policy request, options do |result, operation|
632
650
  yield result, operation if block_given?
633
- return result
634
651
  end
635
652
  rescue ::Gapic::Rest::Error => e
636
653
  raise ::Google::Cloud::Error.from_error(e)
@@ -725,7 +742,6 @@ module Google
725
742
 
726
743
  @content_service_stub.set_iam_policy request, options do |result, operation|
727
744
  yield result, operation if block_given?
728
- return result
729
745
  end
730
746
  rescue ::Gapic::Rest::Error => e
731
747
  raise ::Google::Cloud::Error.from_error(e)
@@ -819,7 +835,6 @@ module Google
819
835
 
820
836
  @content_service_stub.test_iam_permissions request, options do |result, operation|
821
837
  yield result, operation if block_given?
822
- return result
823
838
  end
824
839
  rescue ::Gapic::Rest::Error => e
825
840
  raise ::Google::Cloud::Error.from_error(e)
@@ -923,7 +938,7 @@ module Google
923
938
  @content_service_stub.list_content request, options do |result, operation|
924
939
  result = ::Gapic::Rest::PagedEnumerable.new @content_service_stub, :list_content, "content", request, result, options
925
940
  yield result, operation if block_given?
926
- return result
941
+ throw :response, result
927
942
  end
928
943
  rescue ::Gapic::Rest::Error => e
929
944
  raise ::Google::Cloud::Error.from_error(e)
@@ -1003,6 +1018,11 @@ module Google
1003
1018
  # default endpoint URL. The default value of nil uses the environment
1004
1019
  # universe (usually the default "googleapis.com" universe).
1005
1020
  # @return [::String,nil]
1021
+ # @!attribute [rw] logger
1022
+ # A custom logger to use for request/response debug logging, or the value
1023
+ # `:default` (the default) to construct a default logger, or `nil` to
1024
+ # explicitly disable logging.
1025
+ # @return [::Logger,:default,nil]
1006
1026
  #
1007
1027
  class Configuration
1008
1028
  extend ::Gapic::Config
@@ -1031,6 +1051,7 @@ module Google
1031
1051
  # by the host service.
1032
1052
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1033
1053
  config_attr :bindings_override, {}, ::Hash, nil
1054
+ config_attr :logger, :default, ::Logger, nil, :default
1034
1055
 
1035
1056
  # @private
1036
1057
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the create_content REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "create_content",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "update_content",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "delete_content",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "get_content",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Cloud::Dataplex::V1::Content.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "get_iam_policy",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "set_iam_policy",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "test_iam_permissions",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "list_content",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Cloud::Dataplex::V1::ListContentResponse.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -168,14 +168,26 @@ module Google
168
168
  universe_domain: @config.universe_domain,
169
169
  channel_args: @config.channel_args,
170
170
  interceptors: @config.interceptors,
171
- channel_pool_config: @config.channel_pool
171
+ channel_pool_config: @config.channel_pool,
172
+ logger: @config.logger
172
173
  )
173
174
 
175
+ @data_scan_service_stub.stub_logger&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+
174
185
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
175
186
  config.credentials = credentials
176
187
  config.quota_project = @quota_project_id
177
188
  config.endpoint = @data_scan_service_stub.endpoint
178
189
  config.universe_domain = @data_scan_service_stub.universe_domain
190
+ config.logger = @data_scan_service_stub.logger if config.respond_to? :logger=
179
191
  end
180
192
 
181
193
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -183,6 +195,7 @@ module Google
183
195
  config.quota_project = @quota_project_id
184
196
  config.endpoint = @data_scan_service_stub.endpoint
185
197
  config.universe_domain = @data_scan_service_stub.universe_domain
198
+ config.logger = @data_scan_service_stub.logger if config.respond_to? :logger=
186
199
  end
187
200
  end
188
201
 
@@ -207,6 +220,15 @@ module Google
207
220
  #
208
221
  attr_reader :iam_policy_client
209
222
 
223
+ ##
224
+ # The logger used for request/response debug logging.
225
+ #
226
+ # @return [Logger]
227
+ #
228
+ def logger
229
+ @data_scan_service_stub.logger
230
+ end
231
+
210
232
  # Service calls
211
233
 
212
234
  ##
@@ -313,7 +335,7 @@ module Google
313
335
  @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation|
314
336
  response = ::Gapic::Operation.new response, @operations_client, options: options
315
337
  yield response, operation if block_given?
316
- return response
338
+ throw :response, response
317
339
  end
318
340
  rescue ::GRPC::BadStatus => e
319
341
  raise ::Google::Cloud::Error.from_error(e)
@@ -414,7 +436,7 @@ module Google
414
436
  @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation|
415
437
  response = ::Gapic::Operation.new response, @operations_client, options: options
416
438
  yield response, operation if block_given?
417
- return response
439
+ throw :response, response
418
440
  end
419
441
  rescue ::GRPC::BadStatus => e
420
442
  raise ::Google::Cloud::Error.from_error(e)
@@ -511,7 +533,7 @@ module Google
511
533
  @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation|
512
534
  response = ::Gapic::Operation.new response, @operations_client, options: options
513
535
  yield response, operation if block_given?
514
- return response
536
+ throw :response, response
515
537
  end
516
538
  rescue ::GRPC::BadStatus => e
517
539
  raise ::Google::Cloud::Error.from_error(e)
@@ -602,7 +624,6 @@ module Google
602
624
 
603
625
  @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation|
604
626
  yield response, operation if block_given?
605
- return response
606
627
  end
607
628
  rescue ::GRPC::BadStatus => e
608
629
  raise ::Google::Cloud::Error.from_error(e)
@@ -710,7 +731,7 @@ module Google
710
731
  @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation|
711
732
  response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options
712
733
  yield response, operation if block_given?
713
- return response
734
+ throw :response, response
714
735
  end
715
736
  rescue ::GRPC::BadStatus => e
716
737
  raise ::Google::Cloud::Error.from_error(e)
@@ -801,7 +822,6 @@ module Google
801
822
 
802
823
  @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation|
803
824
  yield response, operation if block_given?
804
- return response
805
825
  end
806
826
  rescue ::GRPC::BadStatus => e
807
827
  raise ::Google::Cloud::Error.from_error(e)
@@ -892,7 +912,6 @@ module Google
892
912
 
893
913
  @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation|
894
914
  yield response, operation if block_given?
895
- return response
896
915
  end
897
916
  rescue ::GRPC::BadStatus => e
898
917
  raise ::Google::Cloud::Error.from_error(e)
@@ -1014,7 +1033,7 @@ module Google
1014
1033
  @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation|
1015
1034
  response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options
1016
1035
  yield response, operation if block_given?
1017
- return response
1036
+ throw :response, response
1018
1037
  end
1019
1038
  rescue ::GRPC::BadStatus => e
1020
1039
  raise ::Google::Cloud::Error.from_error(e)
@@ -1108,7 +1127,6 @@ module Google
1108
1127
 
1109
1128
  @data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation|
1110
1129
  yield response, operation if block_given?
1111
- return response
1112
1130
  end
1113
1131
  rescue ::GRPC::BadStatus => e
1114
1132
  raise ::Google::Cloud::Error.from_error(e)
@@ -1197,6 +1215,11 @@ module Google
1197
1215
  # default endpoint URL. The default value of nil uses the environment
1198
1216
  # universe (usually the default "googleapis.com" universe).
1199
1217
  # @return [::String,nil]
1218
+ # @!attribute [rw] logger
1219
+ # A custom logger to use for request/response debug logging, or the value
1220
+ # `:default` (the default) to construct a default logger, or `nil` to
1221
+ # explicitly disable logging.
1222
+ # @return [::Logger,:default,nil]
1200
1223
  #
1201
1224
  class Configuration
1202
1225
  extend ::Gapic::Config
@@ -1221,6 +1244,7 @@ module Google
1221
1244
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1222
1245
  config_attr :quota_project, nil, ::String, nil
1223
1246
  config_attr :universe_domain, nil, ::String, nil
1247
+ config_attr :logger, :default, ::Logger, nil, :default
1224
1248
 
1225
1249
  # @private
1226
1250
  def initialize parent_config = nil