google-cloud-dataplex-v1 1.1.0 → 1.3.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 +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/dataplex/v1/catalog_service/client.rb +52 -28
- data/lib/google/cloud/dataplex/v1/catalog_service/operations.rb +9 -5
- data/lib/google/cloud/dataplex/v1/catalog_service/rest/client.rb +47 -28
- 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 +40 -12
- 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 +39 -12
- 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/datascans_pb.rb +2 -1
- 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
- data/proto_docs/google/cloud/dataplex/v1/catalog.rb +10 -4
- data/proto_docs/google/cloud/dataplex/v1/datascans.rb +12 -6
- metadata +5 -8
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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:
|
91
|
-
body:
|
92
|
-
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
|
-
|
99
|
-
|
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:
|
129
|
-
body:
|
130
|
-
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
|
-
|
137
|
-
|
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:
|
167
|
-
body:
|
168
|
-
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
|
-
|
175
|
-
|
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:
|
205
|
-
body:
|
206
|
-
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
|
-
|
213
|
-
|
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:
|
243
|
-
body:
|
244
|
-
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
|
-
|
251
|
-
|
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:
|
281
|
-
body:
|
282
|
-
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
|
-
|
289
|
-
|
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:
|
319
|
-
body:
|
320
|
-
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
|
-
|
327
|
-
|
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:
|
357
|
-
body:
|
358
|
-
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
|
-
|
365
|
-
|
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
|
-
|
338
|
+
throw :response, response
|
317
339
|
end
|
318
340
|
rescue ::GRPC::BadStatus => e
|
319
341
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -342,7 +364,7 @@ module Google
|
|
342
364
|
#
|
343
365
|
# Only fields specified in `update_mask` are updated.
|
344
366
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
345
|
-
#
|
367
|
+
# Optional. Mask of fields to update.
|
346
368
|
# @param validate_only [::Boolean]
|
347
369
|
# Optional. Only validate the request, but do not perform mutations.
|
348
370
|
# The default is `false`.
|
@@ -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
|
-
|
439
|
+
throw :response, response
|
418
440
|
end
|
419
441
|
rescue ::GRPC::BadStatus => e
|
420
442
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -433,7 +455,7 @@ module Google
|
|
433
455
|
# @param options [::Gapic::CallOptions, ::Hash]
|
434
456
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
435
457
|
#
|
436
|
-
# @overload delete_data_scan(name: nil)
|
458
|
+
# @overload delete_data_scan(name: nil, force: nil)
|
437
459
|
# Pass arguments to `delete_data_scan` via keyword arguments. Note that at
|
438
460
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
439
461
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -443,6 +465,10 @@ module Google
|
|
443
465
|
# `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`
|
444
466
|
# where `project` refers to a *project_id* or *project_number* and
|
445
467
|
# `location_id` refers to a GCP region.
|
468
|
+
# @param force [::Boolean]
|
469
|
+
# Optional. If set to true, any child resources of this data scan will also
|
470
|
+
# be deleted. (Otherwise, the request will only work if the data scan has no
|
471
|
+
# child resources.)
|
446
472
|
#
|
447
473
|
# @yield [response, operation] Access the result along with the RPC operation
|
448
474
|
# @yieldparam response [::Gapic::Operation]
|
@@ -511,7 +537,7 @@ module Google
|
|
511
537
|
@data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation|
|
512
538
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
513
539
|
yield response, operation if block_given?
|
514
|
-
|
540
|
+
throw :response, response
|
515
541
|
end
|
516
542
|
rescue ::GRPC::BadStatus => e
|
517
543
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -602,7 +628,6 @@ module Google
|
|
602
628
|
|
603
629
|
@data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation|
|
604
630
|
yield response, operation if block_given?
|
605
|
-
return response
|
606
631
|
end
|
607
632
|
rescue ::GRPC::BadStatus => e
|
608
633
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -710,7 +735,7 @@ module Google
|
|
710
735
|
@data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation|
|
711
736
|
response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options
|
712
737
|
yield response, operation if block_given?
|
713
|
-
|
738
|
+
throw :response, response
|
714
739
|
end
|
715
740
|
rescue ::GRPC::BadStatus => e
|
716
741
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -801,7 +826,6 @@ module Google
|
|
801
826
|
|
802
827
|
@data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation|
|
803
828
|
yield response, operation if block_given?
|
804
|
-
return response
|
805
829
|
end
|
806
830
|
rescue ::GRPC::BadStatus => e
|
807
831
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -892,7 +916,6 @@ module Google
|
|
892
916
|
|
893
917
|
@data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation|
|
894
918
|
yield response, operation if block_given?
|
895
|
-
return response
|
896
919
|
end
|
897
920
|
rescue ::GRPC::BadStatus => e
|
898
921
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1014,7 +1037,7 @@ module Google
|
|
1014
1037
|
@data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation|
|
1015
1038
|
response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options
|
1016
1039
|
yield response, operation if block_given?
|
1017
|
-
|
1040
|
+
throw :response, response
|
1018
1041
|
end
|
1019
1042
|
rescue ::GRPC::BadStatus => e
|
1020
1043
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1108,7 +1131,6 @@ module Google
|
|
1108
1131
|
|
1109
1132
|
@data_scan_service_stub.call_rpc :generate_data_quality_rules, request, options: options do |response, operation|
|
1110
1133
|
yield response, operation if block_given?
|
1111
|
-
return response
|
1112
1134
|
end
|
1113
1135
|
rescue ::GRPC::BadStatus => e
|
1114
1136
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1197,6 +1219,11 @@ module Google
|
|
1197
1219
|
# default endpoint URL. The default value of nil uses the environment
|
1198
1220
|
# universe (usually the default "googleapis.com" universe).
|
1199
1221
|
# @return [::String,nil]
|
1222
|
+
# @!attribute [rw] logger
|
1223
|
+
# A custom logger to use for request/response debug logging, or the value
|
1224
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1225
|
+
# explicitly disable logging.
|
1226
|
+
# @return [::Logger,:default,nil]
|
1200
1227
|
#
|
1201
1228
|
class Configuration
|
1202
1229
|
extend ::Gapic::Config
|
@@ -1221,6 +1248,7 @@ module Google
|
|
1221
1248
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1222
1249
|
config_attr :quota_project, nil, ::String, nil
|
1223
1250
|
config_attr :universe_domain, nil, ::String, nil
|
1251
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1224
1252
|
|
1225
1253
|
# @private
|
1226
1254
|
def initialize parent_config = nil
|