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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +45 -27
- data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +40 -27
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/service_stub.rb +222 -158
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +30 -9
- data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +34 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +33 -10
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/client.rb +41 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/client.rb +38 -16
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/data_taxonomy_service/rest/service_stub.rb +134 -92
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +54 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +52 -34
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +40 -28
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +278 -200
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +31 -10
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- metadata +5 -5
@@ -167,14 +167,26 @@ module Google
|
|
167
167
|
universe_domain: @config.universe_domain,
|
168
168
|
channel_args: @config.channel_args,
|
169
169
|
interceptors: @config.interceptors,
|
170
|
-
channel_pool_config: @config.channel_pool
|
170
|
+
channel_pool_config: @config.channel_pool,
|
171
|
+
logger: @config.logger
|
171
172
|
)
|
172
173
|
|
174
|
+
@data_taxonomy_service_stub.stub_logger&.info do |entry|
|
175
|
+
entry.set_system_name
|
176
|
+
entry.set_service
|
177
|
+
entry.message = "Created client for #{entry.service}"
|
178
|
+
entry.set_credentials_fields credentials
|
179
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
180
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
181
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
182
|
+
end
|
183
|
+
|
173
184
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
174
185
|
config.credentials = credentials
|
175
186
|
config.quota_project = @quota_project_id
|
176
187
|
config.endpoint = @data_taxonomy_service_stub.endpoint
|
177
188
|
config.universe_domain = @data_taxonomy_service_stub.universe_domain
|
189
|
+
config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger=
|
178
190
|
end
|
179
191
|
|
180
192
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -182,6 +194,7 @@ module Google
|
|
182
194
|
config.quota_project = @quota_project_id
|
183
195
|
config.endpoint = @data_taxonomy_service_stub.endpoint
|
184
196
|
config.universe_domain = @data_taxonomy_service_stub.universe_domain
|
197
|
+
config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger=
|
185
198
|
end
|
186
199
|
end
|
187
200
|
|
@@ -206,6 +219,15 @@ module Google
|
|
206
219
|
#
|
207
220
|
attr_reader :iam_policy_client
|
208
221
|
|
222
|
+
##
|
223
|
+
# The logger used for request/response debug logging.
|
224
|
+
#
|
225
|
+
# @return [Logger]
|
226
|
+
#
|
227
|
+
def logger
|
228
|
+
@data_taxonomy_service_stub.logger
|
229
|
+
end
|
230
|
+
|
209
231
|
# Service calls
|
210
232
|
|
211
233
|
##
|
@@ -310,7 +332,7 @@ module Google
|
|
310
332
|
@data_taxonomy_service_stub.call_rpc :create_data_taxonomy, request, options: options do |response, operation|
|
311
333
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
312
334
|
yield response, operation if block_given?
|
313
|
-
|
335
|
+
throw :response, response
|
314
336
|
end
|
315
337
|
rescue ::GRPC::BadStatus => e
|
316
338
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -409,7 +431,7 @@ module Google
|
|
409
431
|
@data_taxonomy_service_stub.call_rpc :update_data_taxonomy, request, options: options do |response, operation|
|
410
432
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
411
433
|
yield response, operation if block_given?
|
412
|
-
|
434
|
+
throw :response, response
|
413
435
|
end
|
414
436
|
rescue ::GRPC::BadStatus => e
|
415
437
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -508,7 +530,7 @@ module Google
|
|
508
530
|
@data_taxonomy_service_stub.call_rpc :delete_data_taxonomy, request, options: options do |response, operation|
|
509
531
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
510
532
|
yield response, operation if block_given?
|
511
|
-
|
533
|
+
throw :response, response
|
512
534
|
end
|
513
535
|
rescue ::GRPC::BadStatus => e
|
514
536
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -615,7 +637,7 @@ module Google
|
|
615
637
|
@data_taxonomy_service_stub.call_rpc :list_data_taxonomies, request, options: options do |response, operation|
|
616
638
|
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_taxonomies, request, response, operation, options
|
617
639
|
yield response, operation if block_given?
|
618
|
-
|
640
|
+
throw :response, response
|
619
641
|
end
|
620
642
|
rescue ::GRPC::BadStatus => e
|
621
643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -702,7 +724,6 @@ module Google
|
|
702
724
|
|
703
725
|
@data_taxonomy_service_stub.call_rpc :get_data_taxonomy, request, options: options do |response, operation|
|
704
726
|
yield response, operation if block_given?
|
705
|
-
return response
|
706
727
|
end
|
707
728
|
rescue ::GRPC::BadStatus => e
|
708
729
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -809,7 +830,7 @@ module Google
|
|
809
830
|
@data_taxonomy_service_stub.call_rpc :create_data_attribute_binding, request, options: options do |response, operation|
|
810
831
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
811
832
|
yield response, operation if block_given?
|
812
|
-
|
833
|
+
throw :response, response
|
813
834
|
end
|
814
835
|
rescue ::GRPC::BadStatus => e
|
815
836
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -908,7 +929,7 @@ module Google
|
|
908
929
|
@data_taxonomy_service_stub.call_rpc :update_data_attribute_binding, request, options: options do |response, operation|
|
909
930
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
910
931
|
yield response, operation if block_given?
|
911
|
-
|
932
|
+
throw :response, response
|
912
933
|
end
|
913
934
|
rescue ::GRPC::BadStatus => e
|
914
935
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1010,7 +1031,7 @@ module Google
|
|
1010
1031
|
@data_taxonomy_service_stub.call_rpc :delete_data_attribute_binding, request, options: options do |response, operation|
|
1011
1032
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1012
1033
|
yield response, operation if block_given?
|
1013
|
-
|
1034
|
+
throw :response, response
|
1014
1035
|
end
|
1015
1036
|
rescue ::GRPC::BadStatus => e
|
1016
1037
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1120,7 +1141,7 @@ module Google
|
|
1120
1141
|
@data_taxonomy_service_stub.call_rpc :list_data_attribute_bindings, request, options: options do |response, operation|
|
1121
1142
|
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attribute_bindings, request, response, operation, options
|
1122
1143
|
yield response, operation if block_given?
|
1123
|
-
|
1144
|
+
throw :response, response
|
1124
1145
|
end
|
1125
1146
|
rescue ::GRPC::BadStatus => e
|
1126
1147
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1207,7 +1228,6 @@ module Google
|
|
1207
1228
|
|
1208
1229
|
@data_taxonomy_service_stub.call_rpc :get_data_attribute_binding, request, options: options do |response, operation|
|
1209
1230
|
yield response, operation if block_given?
|
1210
|
-
return response
|
1211
1231
|
end
|
1212
1232
|
rescue ::GRPC::BadStatus => e
|
1213
1233
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1314,7 +1334,7 @@ module Google
|
|
1314
1334
|
@data_taxonomy_service_stub.call_rpc :create_data_attribute, request, options: options do |response, operation|
|
1315
1335
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1316
1336
|
yield response, operation if block_given?
|
1317
|
-
|
1337
|
+
throw :response, response
|
1318
1338
|
end
|
1319
1339
|
rescue ::GRPC::BadStatus => e
|
1320
1340
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1413,7 +1433,7 @@ module Google
|
|
1413
1433
|
@data_taxonomy_service_stub.call_rpc :update_data_attribute, request, options: options do |response, operation|
|
1414
1434
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1415
1435
|
yield response, operation if block_given?
|
1416
|
-
|
1436
|
+
throw :response, response
|
1417
1437
|
end
|
1418
1438
|
rescue ::GRPC::BadStatus => e
|
1419
1439
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1511,7 +1531,7 @@ module Google
|
|
1511
1531
|
@data_taxonomy_service_stub.call_rpc :delete_data_attribute, request, options: options do |response, operation|
|
1512
1532
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1513
1533
|
yield response, operation if block_given?
|
1514
|
-
|
1534
|
+
throw :response, response
|
1515
1535
|
end
|
1516
1536
|
rescue ::GRPC::BadStatus => e
|
1517
1537
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1617,7 +1637,7 @@ module Google
|
|
1617
1637
|
@data_taxonomy_service_stub.call_rpc :list_data_attributes, request, options: options do |response, operation|
|
1618
1638
|
response = ::Gapic::PagedEnumerable.new @data_taxonomy_service_stub, :list_data_attributes, request, response, operation, options
|
1619
1639
|
yield response, operation if block_given?
|
1620
|
-
|
1640
|
+
throw :response, response
|
1621
1641
|
end
|
1622
1642
|
rescue ::GRPC::BadStatus => e
|
1623
1643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1704,7 +1724,6 @@ module Google
|
|
1704
1724
|
|
1705
1725
|
@data_taxonomy_service_stub.call_rpc :get_data_attribute, request, options: options do |response, operation|
|
1706
1726
|
yield response, operation if block_given?
|
1707
|
-
return response
|
1708
1727
|
end
|
1709
1728
|
rescue ::GRPC::BadStatus => e
|
1710
1729
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1793,6 +1812,11 @@ module Google
|
|
1793
1812
|
# default endpoint URL. The default value of nil uses the environment
|
1794
1813
|
# universe (usually the default "googleapis.com" universe).
|
1795
1814
|
# @return [::String,nil]
|
1815
|
+
# @!attribute [rw] logger
|
1816
|
+
# A custom logger to use for request/response debug logging, or the value
|
1817
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1818
|
+
# explicitly disable logging.
|
1819
|
+
# @return [::Logger,:default,nil]
|
1796
1820
|
#
|
1797
1821
|
class Configuration
|
1798
1822
|
extend ::Gapic::Config
|
@@ -1817,6 +1841,7 @@ module Google
|
|
1817
1841
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1818
1842
|
config_attr :quota_project, nil, ::String, nil
|
1819
1843
|
config_attr :universe_domain, nil, ::String, nil
|
1844
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1820
1845
|
|
1821
1846
|
# @private
|
1822
1847
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +590,7 @@ module Google
|
|
592
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
593
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
594
592
|
yield response, operation if block_given?
|
595
|
-
|
593
|
+
throw :response, response
|
596
594
|
end
|
597
595
|
rescue ::GRPC::BadStatus => e
|
598
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -681,6 +679,11 @@ module Google
|
|
681
679
|
# default endpoint URL. The default value of nil uses the environment
|
682
680
|
# universe (usually the default "googleapis.com" universe).
|
683
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
684
687
|
#
|
685
688
|
class Configuration
|
686
689
|
extend ::Gapic::Config
|
@@ -705,6 +708,7 @@ module Google
|
|
705
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
709
|
config_attr :quota_project, nil, ::String, nil
|
707
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
708
712
|
|
709
713
|
# @private
|
710
714
|
def initialize parent_config = nil
|
@@ -160,15 +160,27 @@ module Google
|
|
160
160
|
endpoint: @config.endpoint,
|
161
161
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
162
162
|
universe_domain: @config.universe_domain,
|
163
|
-
credentials: credentials
|
163
|
+
credentials: credentials,
|
164
|
+
logger: @config.logger
|
164
165
|
)
|
165
166
|
|
167
|
+
@data_taxonomy_service_stub.logger(stub: true)&.info do |entry|
|
168
|
+
entry.set_system_name
|
169
|
+
entry.set_service
|
170
|
+
entry.message = "Created client for #{entry.service}"
|
171
|
+
entry.set_credentials_fields credentials
|
172
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
173
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
174
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
175
|
+
end
|
176
|
+
|
166
177
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
167
178
|
config.credentials = credentials
|
168
179
|
config.quota_project = @quota_project_id
|
169
180
|
config.endpoint = @data_taxonomy_service_stub.endpoint
|
170
181
|
config.universe_domain = @data_taxonomy_service_stub.universe_domain
|
171
182
|
config.bindings_override = @config.bindings_override
|
183
|
+
config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger=
|
172
184
|
end
|
173
185
|
|
174
186
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -177,6 +189,7 @@ module Google
|
|
177
189
|
config.endpoint = @data_taxonomy_service_stub.endpoint
|
178
190
|
config.universe_domain = @data_taxonomy_service_stub.universe_domain
|
179
191
|
config.bindings_override = @config.bindings_override
|
192
|
+
config.logger = @data_taxonomy_service_stub.logger if config.respond_to? :logger=
|
180
193
|
end
|
181
194
|
end
|
182
195
|
|
@@ -201,6 +214,15 @@ module Google
|
|
201
214
|
#
|
202
215
|
attr_reader :iam_policy_client
|
203
216
|
|
217
|
+
##
|
218
|
+
# The logger used for request/response debug logging.
|
219
|
+
#
|
220
|
+
# @return [Logger]
|
221
|
+
#
|
222
|
+
def logger
|
223
|
+
@data_taxonomy_service_stub.logger
|
224
|
+
end
|
225
|
+
|
204
226
|
# Service calls
|
205
227
|
|
206
228
|
##
|
@@ -298,7 +320,7 @@ module Google
|
|
298
320
|
@data_taxonomy_service_stub.create_data_taxonomy request, options do |result, operation|
|
299
321
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
300
322
|
yield result, operation if block_given?
|
301
|
-
|
323
|
+
throw :response, result
|
302
324
|
end
|
303
325
|
rescue ::Gapic::Rest::Error => e
|
304
326
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -390,7 +412,7 @@ module Google
|
|
390
412
|
@data_taxonomy_service_stub.update_data_taxonomy request, options do |result, operation|
|
391
413
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
392
414
|
yield result, operation if block_given?
|
393
|
-
|
415
|
+
throw :response, result
|
394
416
|
end
|
395
417
|
rescue ::Gapic::Rest::Error => e
|
396
418
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -482,7 +504,7 @@ module Google
|
|
482
504
|
@data_taxonomy_service_stub.delete_data_taxonomy request, options do |result, operation|
|
483
505
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
484
506
|
yield result, operation if block_given?
|
485
|
-
|
507
|
+
throw :response, result
|
486
508
|
end
|
487
509
|
rescue ::Gapic::Rest::Error => e
|
488
510
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -581,7 +603,6 @@ module Google
|
|
581
603
|
|
582
604
|
@data_taxonomy_service_stub.list_data_taxonomies request, options do |result, operation|
|
583
605
|
yield result, operation if block_given?
|
584
|
-
return result
|
585
606
|
end
|
586
607
|
rescue ::Gapic::Rest::Error => e
|
587
608
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -661,7 +682,6 @@ module Google
|
|
661
682
|
|
662
683
|
@data_taxonomy_service_stub.get_data_taxonomy request, options do |result, operation|
|
663
684
|
yield result, operation if block_given?
|
664
|
-
return result
|
665
685
|
end
|
666
686
|
rescue ::Gapic::Rest::Error => e
|
667
687
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -761,7 +781,7 @@ module Google
|
|
761
781
|
@data_taxonomy_service_stub.create_data_attribute_binding request, options do |result, operation|
|
762
782
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
763
783
|
yield result, operation if block_given?
|
764
|
-
|
784
|
+
throw :response, result
|
765
785
|
end
|
766
786
|
rescue ::Gapic::Rest::Error => e
|
767
787
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -853,7 +873,7 @@ module Google
|
|
853
873
|
@data_taxonomy_service_stub.update_data_attribute_binding request, options do |result, operation|
|
854
874
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
855
875
|
yield result, operation if block_given?
|
856
|
-
|
876
|
+
throw :response, result
|
857
877
|
end
|
858
878
|
rescue ::Gapic::Rest::Error => e
|
859
879
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -948,7 +968,7 @@ module Google
|
|
948
968
|
@data_taxonomy_service_stub.delete_data_attribute_binding request, options do |result, operation|
|
949
969
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
950
970
|
yield result, operation if block_given?
|
951
|
-
|
971
|
+
throw :response, result
|
952
972
|
end
|
953
973
|
rescue ::Gapic::Rest::Error => e
|
954
974
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1050,7 +1070,6 @@ module Google
|
|
1050
1070
|
|
1051
1071
|
@data_taxonomy_service_stub.list_data_attribute_bindings request, options do |result, operation|
|
1052
1072
|
yield result, operation if block_given?
|
1053
|
-
return result
|
1054
1073
|
end
|
1055
1074
|
rescue ::Gapic::Rest::Error => e
|
1056
1075
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1130,7 +1149,6 @@ module Google
|
|
1130
1149
|
|
1131
1150
|
@data_taxonomy_service_stub.get_data_attribute_binding request, options do |result, operation|
|
1132
1151
|
yield result, operation if block_given?
|
1133
|
-
return result
|
1134
1152
|
end
|
1135
1153
|
rescue ::Gapic::Rest::Error => e
|
1136
1154
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1230,7 +1248,7 @@ module Google
|
|
1230
1248
|
@data_taxonomy_service_stub.create_data_attribute request, options do |result, operation|
|
1231
1249
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1232
1250
|
yield result, operation if block_given?
|
1233
|
-
|
1251
|
+
throw :response, result
|
1234
1252
|
end
|
1235
1253
|
rescue ::Gapic::Rest::Error => e
|
1236
1254
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1322,7 +1340,7 @@ module Google
|
|
1322
1340
|
@data_taxonomy_service_stub.update_data_attribute request, options do |result, operation|
|
1323
1341
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1324
1342
|
yield result, operation if block_given?
|
1325
|
-
|
1343
|
+
throw :response, result
|
1326
1344
|
end
|
1327
1345
|
rescue ::Gapic::Rest::Error => e
|
1328
1346
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1413,7 +1431,7 @@ module Google
|
|
1413
1431
|
@data_taxonomy_service_stub.delete_data_attribute request, options do |result, operation|
|
1414
1432
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1415
1433
|
yield result, operation if block_given?
|
1416
|
-
|
1434
|
+
throw :response, result
|
1417
1435
|
end
|
1418
1436
|
rescue ::Gapic::Rest::Error => e
|
1419
1437
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1511,7 +1529,6 @@ module Google
|
|
1511
1529
|
|
1512
1530
|
@data_taxonomy_service_stub.list_data_attributes request, options do |result, operation|
|
1513
1531
|
yield result, operation if block_given?
|
1514
|
-
return result
|
1515
1532
|
end
|
1516
1533
|
rescue ::Gapic::Rest::Error => e
|
1517
1534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1591,7 +1608,6 @@ module Google
|
|
1591
1608
|
|
1592
1609
|
@data_taxonomy_service_stub.get_data_attribute request, options do |result, operation|
|
1593
1610
|
yield result, operation if block_given?
|
1594
|
-
return result
|
1595
1611
|
end
|
1596
1612
|
rescue ::Gapic::Rest::Error => e
|
1597
1613
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1671,6 +1687,11 @@ module Google
|
|
1671
1687
|
# default endpoint URL. The default value of nil uses the environment
|
1672
1688
|
# universe (usually the default "googleapis.com" universe).
|
1673
1689
|
# @return [::String,nil]
|
1690
|
+
# @!attribute [rw] logger
|
1691
|
+
# A custom logger to use for request/response debug logging, or the value
|
1692
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1693
|
+
# explicitly disable logging.
|
1694
|
+
# @return [::Logger,:default,nil]
|
1674
1695
|
#
|
1675
1696
|
class Configuration
|
1676
1697
|
extend ::Gapic::Config
|
@@ -1699,6 +1720,7 @@ module Google
|
|
1699
1720
|
# by the host service.
|
1700
1721
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1701
1722
|
config_attr :bindings_override, {}, ::Hash, nil
|
1723
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1702
1724
|
|
1703
1725
|
# @private
|
1704
1726
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -536,6 +534,11 @@ module Google
|
|
536
534
|
# default endpoint URL. The default value of nil uses the environment
|
537
535
|
# universe (usually the default "googleapis.com" universe).
|
538
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
539
542
|
#
|
540
543
|
class Configuration
|
541
544
|
extend ::Gapic::Config
|
@@ -557,6 +560,7 @@ module Google
|
|
557
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
561
|
config_attr :quota_project, nil, ::String, nil
|
559
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
564
|
|
561
565
|
# @private
|
562
566
|
def initialize parent_config = nil
|
@@ -676,16 +680,18 @@ module Google
|
|
676
680
|
|
677
681
|
response = @client_stub.make_http_request(
|
678
682
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
682
687
|
options: options
|
683
688
|
)
|
684
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
689
695
|
end
|
690
696
|
|
691
697
|
##
|
@@ -714,16 +720,18 @@ module Google
|
|
714
720
|
|
715
721
|
response = @client_stub.make_http_request(
|
716
722
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
720
727
|
options: options
|
721
728
|
)
|
722
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
727
735
|
end
|
728
736
|
|
729
737
|
##
|
@@ -752,16 +760,18 @@ module Google
|
|
752
760
|
|
753
761
|
response = @client_stub.make_http_request(
|
754
762
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
758
767
|
options: options
|
759
768
|
)
|
760
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
765
775
|
end
|
766
776
|
|
767
777
|
##
|
@@ -790,16 +800,18 @@ module Google
|
|
790
800
|
|
791
801
|
response = @client_stub.make_http_request(
|
792
802
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
796
807
|
options: options
|
797
808
|
)
|
798
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
803
815
|
end
|
804
816
|
|
805
817
|
##
|