google-cloud-dataplex-v1 0.5.0 → 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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/dataplex/v1/content_service/client.rb +4 -4
  4. data/lib/google/cloud/dataplex/v1/content_service.rb +1 -1
  5. data/lib/google/cloud/dataplex/v1/data_profile_pb.rb +78 -0
  6. data/lib/google/cloud/dataplex/v1/data_quality_pb.rb +108 -0
  7. data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +1171 -0
  8. data/lib/google/cloud/dataplex/v1/data_scan_service/credentials.rb +47 -0
  9. data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +770 -0
  10. data/lib/google/cloud/dataplex/v1/data_scan_service/paths.rb +113 -0
  11. data/lib/google/cloud/dataplex/v1/data_scan_service.rb +48 -0
  12. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +64 -63
  13. data/lib/google/cloud/dataplex/v1/dataplex_service.rb +1 -1
  14. data/lib/google/cloud/dataplex/v1/datascans_pb.rb +169 -0
  15. data/lib/google/cloud/dataplex/v1/datascans_services_pb.rb +58 -0
  16. data/lib/google/cloud/dataplex/v1/logs_pb.rb +53 -0
  17. data/lib/google/cloud/dataplex/v1/metadata_pb.rb +5 -0
  18. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +18 -16
  19. data/lib/google/cloud/dataplex/v1/metadata_service.rb +1 -1
  20. data/lib/google/cloud/dataplex/v1/processing_pb.rb +53 -0
  21. data/lib/google/cloud/dataplex/v1/version.rb +1 -1
  22. data/lib/google/cloud/dataplex/v1.rb +3 -2
  23. data/proto_docs/google/api/client.rb +318 -0
  24. data/proto_docs/google/api/launch_stage.rb +71 -0
  25. data/proto_docs/google/cloud/dataplex/v1/analyze.rb +26 -21
  26. data/proto_docs/google/cloud/dataplex/v1/content.rb +4 -4
  27. data/proto_docs/google/cloud/dataplex/v1/data_profile.rb +232 -0
  28. data/proto_docs/google/cloud/dataplex/v1/data_quality.rb +274 -0
  29. data/proto_docs/google/cloud/dataplex/v1/datascans.rb +418 -0
  30. data/proto_docs/google/cloud/dataplex/v1/logs.rb +135 -2
  31. data/proto_docs/google/cloud/dataplex/v1/metadata.rb +72 -52
  32. data/proto_docs/google/cloud/dataplex/v1/processing.rb +96 -0
  33. data/proto_docs/google/cloud/dataplex/v1/resources.rb +67 -61
  34. data/proto_docs/google/cloud/dataplex/v1/service.rb +67 -65
  35. data/proto_docs/google/cloud/dataplex/v1/tasks.rb +34 -34
  36. data/proto_docs/google/rpc/status.rb +4 -2
  37. metadata +20 -4
@@ -0,0 +1,1171 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/dataplex/v1/datascans_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Dataplex
27
+ module V1
28
+ module DataScanService
29
+ ##
30
+ # Client for the DataScanService service.
31
+ #
32
+ class Client
33
+ include Paths
34
+
35
+ # @private
36
+ attr_reader :data_scan_service_stub
37
+
38
+ ##
39
+ # Configure the DataScanService Client class.
40
+ #
41
+ # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration}
42
+ # for a description of the configuration fields.
43
+ #
44
+ # @example
45
+ #
46
+ # # Modify the configuration for all DataScanService clients
47
+ # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
50
+ #
51
+ # @yield [config] Configure the Client client.
52
+ # @yieldparam config [Client::Configuration]
53
+ #
54
+ # @return [Client::Configuration]
55
+ #
56
+ def self.configure
57
+ @configure ||= begin
58
+ namespace = ["Google", "Cloud", "Dataplex", "V1"]
59
+ parent_config = while namespace.any?
60
+ parent_name = namespace.join "::"
61
+ parent_const = const_get parent_name
62
+ break parent_const.configure if parent_const.respond_to? :configure
63
+ namespace.pop
64
+ end
65
+ default_config = Client::Configuration.new parent_config
66
+
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # Configure the DataScanService Client instance.
75
+ #
76
+ # The configuration is set to the derived mode, meaning that values can be changed,
77
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
78
+ # should be made on {Client.configure}.
79
+ #
80
+ # See {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration}
81
+ # for a description of the configuration fields.
82
+ #
83
+ # @yield [config] Configure the Client client.
84
+ # @yieldparam config [Client::Configuration]
85
+ #
86
+ # @return [Client::Configuration]
87
+ #
88
+ def configure
89
+ yield @config if block_given?
90
+ @config
91
+ end
92
+
93
+ ##
94
+ # Create a new DataScanService client object.
95
+ #
96
+ # @example
97
+ #
98
+ # # Create a client using the default configuration
99
+ # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new
100
+ #
101
+ # # Create a client using a custom configuration
102
+ # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config|
103
+ # config.timeout = 10.0
104
+ # end
105
+ #
106
+ # @yield [config] Configure the DataScanService client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ def initialize
110
+ # These require statements are intentionally placed here to initialize
111
+ # the gRPC module only when it's required.
112
+ # See https://github.com/googleapis/toolkit/issues/446
113
+ require "gapic/grpc"
114
+ require "google/cloud/dataplex/v1/datascans_services_pb"
115
+
116
+ # Create the configuration object
117
+ @config = Configuration.new Client.configure
118
+
119
+ # Yield the configuration if needed
120
+ yield @config if block_given?
121
+
122
+ # Create credentials
123
+ credentials = @config.credentials
124
+ # Use self-signed JWT if the endpoint is unchanged from default,
125
+ # but only if the default endpoint does not have a region prefix.
126
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
127
+ !@config.endpoint.split(".").first.include?("-")
128
+ credentials ||= Credentials.default scope: @config.scope,
129
+ enable_self_signed_jwt: enable_self_signed_jwt
130
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
131
+ credentials = Credentials.new credentials, scope: @config.scope
132
+ end
133
+ @quota_project_id = @config.quota_project
134
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
135
+
136
+ @operations_client = Operations.new do |config|
137
+ config.credentials = credentials
138
+ config.quota_project = @quota_project_id
139
+ config.endpoint = @config.endpoint
140
+ end
141
+
142
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
148
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
149
+ config.credentials = credentials
150
+ config.quota_project = @quota_project_id
151
+ config.endpoint = @config.endpoint
152
+ end
153
+
154
+ @data_scan_service_stub = ::Gapic::ServiceStub.new(
155
+ ::Google::Cloud::Dataplex::V1::DataScanService::Stub,
156
+ credentials: credentials,
157
+ endpoint: @config.endpoint,
158
+ channel_args: @config.channel_args,
159
+ interceptors: @config.interceptors
160
+ )
161
+ end
162
+
163
+ ##
164
+ # Get the associated client for long-running operations.
165
+ #
166
+ # @return [::Google::Cloud::Dataplex::V1::DataScanService::Operations]
167
+ #
168
+ attr_reader :operations_client
169
+
170
+ ##
171
+ # Get the associated client for mix-in of the Locations.
172
+ #
173
+ # @return [Google::Cloud::Location::Locations::Client]
174
+ #
175
+ attr_reader :location_client
176
+
177
+ ##
178
+ # Get the associated client for mix-in of the IAMPolicy.
179
+ #
180
+ # @return [Google::Iam::V1::IAMPolicy::Client]
181
+ #
182
+ attr_reader :iam_policy_client
183
+
184
+ # Service calls
185
+
186
+ ##
187
+ # Creates a dataScan resource.
188
+ #
189
+ # @overload create_data_scan(request, options = nil)
190
+ # Pass arguments to `create_data_scan` via a request object, either of type
191
+ # {::Google::Cloud::Dataplex::V1::CreateDataScanRequest} or an equivalent Hash.
192
+ #
193
+ # @param request [::Google::Cloud::Dataplex::V1::CreateDataScanRequest, ::Hash]
194
+ # A request object representing the call parameters. Required. To specify no
195
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
196
+ # @param options [::Gapic::CallOptions, ::Hash]
197
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
198
+ #
199
+ # @overload create_data_scan(parent: nil, data_scan: nil, data_scan_id: nil)
200
+ # Pass arguments to `create_data_scan` via keyword arguments. Note that at
201
+ # least one keyword argument is required. To specify no parameters, or to keep all
202
+ # the default parameter values, pass an empty Hash as a request object (see above).
203
+ #
204
+ # @param parent [::String]
205
+ # Required. The resource name of the parent location:
206
+ # projects/\\{project}/locations/\\{location_id}
207
+ # where `{project}` refers to a project_id or project_number and
208
+ # `location_id` refers to a GCP region.
209
+ # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash]
210
+ # Required. DataScan resource.
211
+ # @param data_scan_id [::String]
212
+ # Required. DataScan identifier.
213
+ # * Must contain only lowercase letters, numbers and hyphens.
214
+ # * Must start with a letter.
215
+ # * Must end with a number or a letter.
216
+ # * Must be between 1-63 characters.
217
+ # * Must be unique within the customer project / location.
218
+ #
219
+ # @yield [response, operation] Access the result along with the RPC operation
220
+ # @yieldparam response [::Gapic::Operation]
221
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
222
+ #
223
+ # @return [::Gapic::Operation]
224
+ #
225
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
226
+ #
227
+ # @example Basic example
228
+ # require "google/cloud/dataplex/v1"
229
+ #
230
+ # # Create a client object. The client can be reused for multiple calls.
231
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
232
+ #
233
+ # # Create a request. To set request fields, pass in keyword arguments.
234
+ # request = Google::Cloud::Dataplex::V1::CreateDataScanRequest.new
235
+ #
236
+ # # Call the create_data_scan method.
237
+ # result = client.create_data_scan request
238
+ #
239
+ # # The returned object is of type Gapic::Operation. You can use this
240
+ # # object to check the status of an operation, cancel it, or wait
241
+ # # for results. Here is how to block until completion:
242
+ # result.wait_until_done! timeout: 60
243
+ # if result.response?
244
+ # p result.response
245
+ # else
246
+ # puts "Error!"
247
+ # end
248
+ #
249
+ def create_data_scan request, options = nil
250
+ raise ::ArgumentError, "request must be provided" if request.nil?
251
+
252
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateDataScanRequest
253
+
254
+ # Converts hash and nil to an options object
255
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
256
+
257
+ # Customize the options with defaults
258
+ metadata = @config.rpcs.create_data_scan.metadata.to_h
259
+
260
+ # Set x-goog-api-client and x-goog-user-project headers
261
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
262
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
263
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
264
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
265
+
266
+ header_params = {}
267
+ if request.parent
268
+ header_params["parent"] = request.parent
269
+ end
270
+
271
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
272
+ metadata[:"x-goog-request-params"] ||= request_params_header
273
+
274
+ options.apply_defaults timeout: @config.rpcs.create_data_scan.timeout,
275
+ metadata: metadata,
276
+ retry_policy: @config.rpcs.create_data_scan.retry_policy
277
+
278
+ options.apply_defaults timeout: @config.timeout,
279
+ metadata: @config.metadata,
280
+ retry_policy: @config.retry_policy
281
+
282
+ @data_scan_service_stub.call_rpc :create_data_scan, request, options: options do |response, operation|
283
+ response = ::Gapic::Operation.new response, @operations_client, options: options
284
+ yield response, operation if block_given?
285
+ return response
286
+ end
287
+ rescue ::GRPC::BadStatus => e
288
+ raise ::Google::Cloud::Error.from_error(e)
289
+ end
290
+
291
+ ##
292
+ # Update the dataScan resource.
293
+ #
294
+ # @overload update_data_scan(request, options = nil)
295
+ # Pass arguments to `update_data_scan` via a request object, either of type
296
+ # {::Google::Cloud::Dataplex::V1::UpdateDataScanRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateDataScanRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
303
+ #
304
+ # @overload update_data_scan(data_scan: nil, update_mask: nil)
305
+ # Pass arguments to `update_data_scan` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param data_scan [::Google::Cloud::Dataplex::V1::DataScan, ::Hash]
310
+ # Required. Update description.
311
+ # Only fields specified in `update_mask` are updated.
312
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
313
+ # Required. Mask of fields to update.
314
+ #
315
+ # @yield [response, operation] Access the result along with the RPC operation
316
+ # @yieldparam response [::Gapic::Operation]
317
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
318
+ #
319
+ # @return [::Gapic::Operation]
320
+ #
321
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
322
+ #
323
+ # @example Basic example
324
+ # require "google/cloud/dataplex/v1"
325
+ #
326
+ # # Create a client object. The client can be reused for multiple calls.
327
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
328
+ #
329
+ # # Create a request. To set request fields, pass in keyword arguments.
330
+ # request = Google::Cloud::Dataplex::V1::UpdateDataScanRequest.new
331
+ #
332
+ # # Call the update_data_scan method.
333
+ # result = client.update_data_scan request
334
+ #
335
+ # # The returned object is of type Gapic::Operation. You can use this
336
+ # # object to check the status of an operation, cancel it, or wait
337
+ # # for results. Here is how to block until completion:
338
+ # result.wait_until_done! timeout: 60
339
+ # if result.response?
340
+ # p result.response
341
+ # else
342
+ # puts "Error!"
343
+ # end
344
+ #
345
+ def update_data_scan request, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request.nil?
347
+
348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateDataScanRequest
349
+
350
+ # Converts hash and nil to an options object
351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+
353
+ # Customize the options with defaults
354
+ metadata = @config.rpcs.update_data_scan.metadata.to_h
355
+
356
+ # Set x-goog-api-client and x-goog-user-project headers
357
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
359
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
360
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
+
362
+ header_params = {}
363
+ if request.data_scan&.name
364
+ header_params["data_scan.name"] = request.data_scan.name
365
+ end
366
+
367
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
368
+ metadata[:"x-goog-request-params"] ||= request_params_header
369
+
370
+ options.apply_defaults timeout: @config.rpcs.update_data_scan.timeout,
371
+ metadata: metadata,
372
+ retry_policy: @config.rpcs.update_data_scan.retry_policy
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
376
+ retry_policy: @config.retry_policy
377
+
378
+ @data_scan_service_stub.call_rpc :update_data_scan, request, options: options do |response, operation|
379
+ response = ::Gapic::Operation.new response, @operations_client, options: options
380
+ yield response, operation if block_given?
381
+ return response
382
+ end
383
+ rescue ::GRPC::BadStatus => e
384
+ raise ::Google::Cloud::Error.from_error(e)
385
+ end
386
+
387
+ ##
388
+ # Delete the dataScan resource.
389
+ #
390
+ # @overload delete_data_scan(request, options = nil)
391
+ # Pass arguments to `delete_data_scan` via a request object, either of type
392
+ # {::Google::Cloud::Dataplex::V1::DeleteDataScanRequest} or an equivalent Hash.
393
+ #
394
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteDataScanRequest, ::Hash]
395
+ # A request object representing the call parameters. Required. To specify no
396
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
397
+ # @param options [::Gapic::CallOptions, ::Hash]
398
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
399
+ #
400
+ # @overload delete_data_scan(name: nil)
401
+ # Pass arguments to `delete_data_scan` via keyword arguments. Note that at
402
+ # least one keyword argument is required. To specify no parameters, or to keep all
403
+ # the default parameter values, pass an empty Hash as a request object (see above).
404
+ #
405
+ # @param name [::String]
406
+ # Required. The resource name of the dataScan:
407
+ # projects/\\{project}/locations/\\{location_id}/dataScans/\\{data_scan_id}
408
+ # where `{project}` refers to a project_id or project_number and
409
+ # `location_id` refers to a GCP region.
410
+ #
411
+ # @yield [response, operation] Access the result along with the RPC operation
412
+ # @yieldparam response [::Gapic::Operation]
413
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
414
+ #
415
+ # @return [::Gapic::Operation]
416
+ #
417
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
418
+ #
419
+ # @example Basic example
420
+ # require "google/cloud/dataplex/v1"
421
+ #
422
+ # # Create a client object. The client can be reused for multiple calls.
423
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
424
+ #
425
+ # # Create a request. To set request fields, pass in keyword arguments.
426
+ # request = Google::Cloud::Dataplex::V1::DeleteDataScanRequest.new
427
+ #
428
+ # # Call the delete_data_scan method.
429
+ # result = client.delete_data_scan request
430
+ #
431
+ # # The returned object is of type Gapic::Operation. You can use this
432
+ # # object to check the status of an operation, cancel it, or wait
433
+ # # for results. Here is how to block until completion:
434
+ # result.wait_until_done! timeout: 60
435
+ # if result.response?
436
+ # p result.response
437
+ # else
438
+ # puts "Error!"
439
+ # end
440
+ #
441
+ def delete_data_scan request, options = nil
442
+ raise ::ArgumentError, "request must be provided" if request.nil?
443
+
444
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteDataScanRequest
445
+
446
+ # Converts hash and nil to an options object
447
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
448
+
449
+ # Customize the options with defaults
450
+ metadata = @config.rpcs.delete_data_scan.metadata.to_h
451
+
452
+ # Set x-goog-api-client and x-goog-user-project headers
453
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
455
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
456
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
+
458
+ header_params = {}
459
+ if request.name
460
+ header_params["name"] = request.name
461
+ end
462
+
463
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
464
+ metadata[:"x-goog-request-params"] ||= request_params_header
465
+
466
+ options.apply_defaults timeout: @config.rpcs.delete_data_scan.timeout,
467
+ metadata: metadata,
468
+ retry_policy: @config.rpcs.delete_data_scan.retry_policy
469
+
470
+ options.apply_defaults timeout: @config.timeout,
471
+ metadata: @config.metadata,
472
+ retry_policy: @config.retry_policy
473
+
474
+ @data_scan_service_stub.call_rpc :delete_data_scan, request, options: options do |response, operation|
475
+ response = ::Gapic::Operation.new response, @operations_client, options: options
476
+ yield response, operation if block_given?
477
+ return response
478
+ end
479
+ rescue ::GRPC::BadStatus => e
480
+ raise ::Google::Cloud::Error.from_error(e)
481
+ end
482
+
483
+ ##
484
+ # Get dataScan resource.
485
+ #
486
+ # @overload get_data_scan(request, options = nil)
487
+ # Pass arguments to `get_data_scan` via a request object, either of type
488
+ # {::Google::Cloud::Dataplex::V1::GetDataScanRequest} or an equivalent Hash.
489
+ #
490
+ # @param request [::Google::Cloud::Dataplex::V1::GetDataScanRequest, ::Hash]
491
+ # A request object representing the call parameters. Required. To specify no
492
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
493
+ # @param options [::Gapic::CallOptions, ::Hash]
494
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
495
+ #
496
+ # @overload get_data_scan(name: nil, view: nil)
497
+ # Pass arguments to `get_data_scan` via keyword arguments. Note that at
498
+ # least one keyword argument is required. To specify no parameters, or to keep all
499
+ # the default parameter values, pass an empty Hash as a request object (see above).
500
+ #
501
+ # @param name [::String]
502
+ # Required. The resource name of the dataScan:
503
+ # projects/\\{project}/locations/\\{location_id}/dataScans/\\{data_scan_id}
504
+ # where `{project}` refers to a project_id or project_number and
505
+ # `location_id` refers to a GCP region.
506
+ # @param view [::Google::Cloud::Dataplex::V1::GetDataScanRequest::DataScanView]
507
+ # Optional. Used to select the subset of DataScan information to return.
508
+ # Defaults to `BASIC`.
509
+ #
510
+ # @yield [response, operation] Access the result along with the RPC operation
511
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScan]
512
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
513
+ #
514
+ # @return [::Google::Cloud::Dataplex::V1::DataScan]
515
+ #
516
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
517
+ #
518
+ # @example Basic example
519
+ # require "google/cloud/dataplex/v1"
520
+ #
521
+ # # Create a client object. The client can be reused for multiple calls.
522
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
523
+ #
524
+ # # Create a request. To set request fields, pass in keyword arguments.
525
+ # request = Google::Cloud::Dataplex::V1::GetDataScanRequest.new
526
+ #
527
+ # # Call the get_data_scan method.
528
+ # result = client.get_data_scan request
529
+ #
530
+ # # The returned object is of type Google::Cloud::Dataplex::V1::DataScan.
531
+ # p result
532
+ #
533
+ def get_data_scan request, options = nil
534
+ raise ::ArgumentError, "request must be provided" if request.nil?
535
+
536
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanRequest
537
+
538
+ # Converts hash and nil to an options object
539
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
540
+
541
+ # Customize the options with defaults
542
+ metadata = @config.rpcs.get_data_scan.metadata.to_h
543
+
544
+ # Set x-goog-api-client and x-goog-user-project headers
545
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
546
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
547
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
548
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
549
+
550
+ header_params = {}
551
+ if request.name
552
+ header_params["name"] = request.name
553
+ end
554
+
555
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
556
+ metadata[:"x-goog-request-params"] ||= request_params_header
557
+
558
+ options.apply_defaults timeout: @config.rpcs.get_data_scan.timeout,
559
+ metadata: metadata,
560
+ retry_policy: @config.rpcs.get_data_scan.retry_policy
561
+
562
+ options.apply_defaults timeout: @config.timeout,
563
+ metadata: @config.metadata,
564
+ retry_policy: @config.retry_policy
565
+
566
+ @data_scan_service_stub.call_rpc :get_data_scan, request, options: options do |response, operation|
567
+ yield response, operation if block_given?
568
+ return response
569
+ end
570
+ rescue ::GRPC::BadStatus => e
571
+ raise ::Google::Cloud::Error.from_error(e)
572
+ end
573
+
574
+ ##
575
+ # Lists dataScans.
576
+ #
577
+ # @overload list_data_scans(request, options = nil)
578
+ # Pass arguments to `list_data_scans` via a request object, either of type
579
+ # {::Google::Cloud::Dataplex::V1::ListDataScansRequest} or an equivalent Hash.
580
+ #
581
+ # @param request [::Google::Cloud::Dataplex::V1::ListDataScansRequest, ::Hash]
582
+ # A request object representing the call parameters. Required. To specify no
583
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
584
+ # @param options [::Gapic::CallOptions, ::Hash]
585
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
586
+ #
587
+ # @overload list_data_scans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
588
+ # Pass arguments to `list_data_scans` via keyword arguments. Note that at
589
+ # least one keyword argument is required. To specify no parameters, or to keep all
590
+ # the default parameter values, pass an empty Hash as a request object (see above).
591
+ #
592
+ # @param parent [::String]
593
+ # Required. projects/\\{project}/locations/\\{location_id}
594
+ # where `{project}` refers to a project_id or project_number and
595
+ # `location_id` refers to a GCP region.
596
+ # @param page_size [::Integer]
597
+ # Optional. Maximum number of dataScans to return. The service may return
598
+ # fewer than this value. If unspecified, at most 10 scans will be returned.
599
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
600
+ # @param page_token [::String]
601
+ # Optional. Page token received from a previous `ListDataScans` call. Provide
602
+ # this to retrieve the subsequent page. When paginating, all other parameters
603
+ # provided to `ListDataScans` must match the call that provided the
604
+ # page token.
605
+ # @param filter [::String]
606
+ # Optional. Filter request.
607
+ # @param order_by [::String]
608
+ # Optional. Order by fields (name or create_time) for the result.
609
+ # If not specified, the ordering is undefined.
610
+ #
611
+ # @yield [response, operation] Access the result along with the RPC operation
612
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>]
613
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
614
+ #
615
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScan>]
616
+ #
617
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
618
+ #
619
+ # @example Basic example
620
+ # require "google/cloud/dataplex/v1"
621
+ #
622
+ # # Create a client object. The client can be reused for multiple calls.
623
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
624
+ #
625
+ # # Create a request. To set request fields, pass in keyword arguments.
626
+ # request = Google::Cloud::Dataplex::V1::ListDataScansRequest.new
627
+ #
628
+ # # Call the list_data_scans method.
629
+ # result = client.list_data_scans request
630
+ #
631
+ # # The returned object is of type Gapic::PagedEnumerable. You can
632
+ # # iterate over all elements by calling #each, and the enumerable
633
+ # # will lazily make API calls to fetch subsequent pages. Other
634
+ # # methods are also available for managing paging directly.
635
+ # result.each do |response|
636
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScan.
637
+ # p response
638
+ # end
639
+ #
640
+ def list_data_scans request, options = nil
641
+ raise ::ArgumentError, "request must be provided" if request.nil?
642
+
643
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScansRequest
644
+
645
+ # Converts hash and nil to an options object
646
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
647
+
648
+ # Customize the options with defaults
649
+ metadata = @config.rpcs.list_data_scans.metadata.to_h
650
+
651
+ # Set x-goog-api-client and x-goog-user-project headers
652
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
653
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
654
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
655
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
+
657
+ header_params = {}
658
+ if request.parent
659
+ header_params["parent"] = request.parent
660
+ end
661
+
662
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
663
+ metadata[:"x-goog-request-params"] ||= request_params_header
664
+
665
+ options.apply_defaults timeout: @config.rpcs.list_data_scans.timeout,
666
+ metadata: metadata,
667
+ retry_policy: @config.rpcs.list_data_scans.retry_policy
668
+
669
+ options.apply_defaults timeout: @config.timeout,
670
+ metadata: @config.metadata,
671
+ retry_policy: @config.retry_policy
672
+
673
+ @data_scan_service_stub.call_rpc :list_data_scans, request, options: options do |response, operation|
674
+ response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scans, request, response, operation, options
675
+ yield response, operation if block_given?
676
+ return response
677
+ end
678
+ rescue ::GRPC::BadStatus => e
679
+ raise ::Google::Cloud::Error.from_error(e)
680
+ end
681
+
682
+ ##
683
+ # Run an on demand execution of a DataScan.
684
+ #
685
+ # @overload run_data_scan(request, options = nil)
686
+ # Pass arguments to `run_data_scan` via a request object, either of type
687
+ # {::Google::Cloud::Dataplex::V1::RunDataScanRequest} or an equivalent Hash.
688
+ #
689
+ # @param request [::Google::Cloud::Dataplex::V1::RunDataScanRequest, ::Hash]
690
+ # A request object representing the call parameters. Required. To specify no
691
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
692
+ # @param options [::Gapic::CallOptions, ::Hash]
693
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
694
+ #
695
+ # @overload run_data_scan(name: nil)
696
+ # Pass arguments to `run_data_scan` via keyword arguments. Note that at
697
+ # least one keyword argument is required. To specify no parameters, or to keep all
698
+ # the default parameter values, pass an empty Hash as a request object (see above).
699
+ #
700
+ # @param name [::String]
701
+ # Required. The resource name of the DataScan:
702
+ # projects/\\{project}/locations/\\{location_id}/dataScans/\\{data_scan_id}.
703
+ # where `{project}` refers to a project_id or project_number and
704
+ # `location_id` refers to a GCP region.
705
+ # Only on-demand DataScans are allowed.
706
+ #
707
+ # @yield [response, operation] Access the result along with the RPC operation
708
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::RunDataScanResponse]
709
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
710
+ #
711
+ # @return [::Google::Cloud::Dataplex::V1::RunDataScanResponse]
712
+ #
713
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
714
+ #
715
+ # @example Basic example
716
+ # require "google/cloud/dataplex/v1"
717
+ #
718
+ # # Create a client object. The client can be reused for multiple calls.
719
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
720
+ #
721
+ # # Create a request. To set request fields, pass in keyword arguments.
722
+ # request = Google::Cloud::Dataplex::V1::RunDataScanRequest.new
723
+ #
724
+ # # Call the run_data_scan method.
725
+ # result = client.run_data_scan request
726
+ #
727
+ # # The returned object is of type Google::Cloud::Dataplex::V1::RunDataScanResponse.
728
+ # p result
729
+ #
730
+ def run_data_scan request, options = nil
731
+ raise ::ArgumentError, "request must be provided" if request.nil?
732
+
733
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::RunDataScanRequest
734
+
735
+ # Converts hash and nil to an options object
736
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
737
+
738
+ # Customize the options with defaults
739
+ metadata = @config.rpcs.run_data_scan.metadata.to_h
740
+
741
+ # Set x-goog-api-client and x-goog-user-project headers
742
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
743
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
744
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
745
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
746
+
747
+ header_params = {}
748
+ if request.name
749
+ header_params["name"] = request.name
750
+ end
751
+
752
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
753
+ metadata[:"x-goog-request-params"] ||= request_params_header
754
+
755
+ options.apply_defaults timeout: @config.rpcs.run_data_scan.timeout,
756
+ metadata: metadata,
757
+ retry_policy: @config.rpcs.run_data_scan.retry_policy
758
+
759
+ options.apply_defaults timeout: @config.timeout,
760
+ metadata: @config.metadata,
761
+ retry_policy: @config.retry_policy
762
+
763
+ @data_scan_service_stub.call_rpc :run_data_scan, request, options: options do |response, operation|
764
+ yield response, operation if block_given?
765
+ return response
766
+ end
767
+ rescue ::GRPC::BadStatus => e
768
+ raise ::Google::Cloud::Error.from_error(e)
769
+ end
770
+
771
+ ##
772
+ # Get DataScanJob resource.
773
+ #
774
+ # @overload get_data_scan_job(request, options = nil)
775
+ # Pass arguments to `get_data_scan_job` via a request object, either of type
776
+ # {::Google::Cloud::Dataplex::V1::GetDataScanJobRequest} or an equivalent Hash.
777
+ #
778
+ # @param request [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest, ::Hash]
779
+ # A request object representing the call parameters. Required. To specify no
780
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
781
+ # @param options [::Gapic::CallOptions, ::Hash]
782
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
783
+ #
784
+ # @overload get_data_scan_job(name: nil, view: nil)
785
+ # Pass arguments to `get_data_scan_job` via keyword arguments. Note that at
786
+ # least one keyword argument is required. To specify no parameters, or to keep all
787
+ # the default parameter values, pass an empty Hash as a request object (see above).
788
+ #
789
+ # @param name [::String]
790
+ # Required. The resource name of the DataScanJob:
791
+ # projects/\\{project}/locations/\\{location_id}/dataScans/\\{data_scan_id}/dataScanJobs/\\{data_scan_job_id}
792
+ # where `{project}` refers to a project_id or project_number and
793
+ # `location_id` refers to a GCP region.
794
+ # @param view [::Google::Cloud::Dataplex::V1::GetDataScanJobRequest::DataScanJobView]
795
+ # Optional. Used to select the subset of DataScan information to return.
796
+ # Defaults to `BASIC`.
797
+ #
798
+ # @yield [response, operation] Access the result along with the RPC operation
799
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::DataScanJob]
800
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
801
+ #
802
+ # @return [::Google::Cloud::Dataplex::V1::DataScanJob]
803
+ #
804
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
805
+ #
806
+ # @example Basic example
807
+ # require "google/cloud/dataplex/v1"
808
+ #
809
+ # # Create a client object. The client can be reused for multiple calls.
810
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
811
+ #
812
+ # # Create a request. To set request fields, pass in keyword arguments.
813
+ # request = Google::Cloud::Dataplex::V1::GetDataScanJobRequest.new
814
+ #
815
+ # # Call the get_data_scan_job method.
816
+ # result = client.get_data_scan_job request
817
+ #
818
+ # # The returned object is of type Google::Cloud::Dataplex::V1::DataScanJob.
819
+ # p result
820
+ #
821
+ def get_data_scan_job request, options = nil
822
+ raise ::ArgumentError, "request must be provided" if request.nil?
823
+
824
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetDataScanJobRequest
825
+
826
+ # Converts hash and nil to an options object
827
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
828
+
829
+ # Customize the options with defaults
830
+ metadata = @config.rpcs.get_data_scan_job.metadata.to_h
831
+
832
+ # Set x-goog-api-client and x-goog-user-project headers
833
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
834
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
835
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
836
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
837
+
838
+ header_params = {}
839
+ if request.name
840
+ header_params["name"] = request.name
841
+ end
842
+
843
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
844
+ metadata[:"x-goog-request-params"] ||= request_params_header
845
+
846
+ options.apply_defaults timeout: @config.rpcs.get_data_scan_job.timeout,
847
+ metadata: metadata,
848
+ retry_policy: @config.rpcs.get_data_scan_job.retry_policy
849
+
850
+ options.apply_defaults timeout: @config.timeout,
851
+ metadata: @config.metadata,
852
+ retry_policy: @config.retry_policy
853
+
854
+ @data_scan_service_stub.call_rpc :get_data_scan_job, request, options: options do |response, operation|
855
+ yield response, operation if block_given?
856
+ return response
857
+ end
858
+ rescue ::GRPC::BadStatus => e
859
+ raise ::Google::Cloud::Error.from_error(e)
860
+ end
861
+
862
+ ##
863
+ # Lists DataScanJobs under the given dataScan.
864
+ #
865
+ # @overload list_data_scan_jobs(request, options = nil)
866
+ # Pass arguments to `list_data_scan_jobs` via a request object, either of type
867
+ # {::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest} or an equivalent Hash.
868
+ #
869
+ # @param request [::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest, ::Hash]
870
+ # A request object representing the call parameters. Required. To specify no
871
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
872
+ # @param options [::Gapic::CallOptions, ::Hash]
873
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
874
+ #
875
+ # @overload list_data_scan_jobs(parent: nil, page_size: nil, page_token: nil)
876
+ # Pass arguments to `list_data_scan_jobs` via keyword arguments. Note that at
877
+ # least one keyword argument is required. To specify no parameters, or to keep all
878
+ # the default parameter values, pass an empty Hash as a request object (see above).
879
+ #
880
+ # @param parent [::String]
881
+ # Required. The resource name of the parent environment:
882
+ # projects/\\{project}/locations/\\{location_id}/dataScans/\\{data_scan_id}
883
+ # where `{project}` refers to a project_id or project_number and
884
+ # `location_id` refers to a GCP region.
885
+ # @param page_size [::Integer]
886
+ # Optional. Maximum number of DataScanJobs to return. The service may return
887
+ # fewer than this value. If unspecified, at most 10 DataScanJobs will be
888
+ # returned. The maximum value is 1000; values above 1000 will be coerced to
889
+ # 1000.
890
+ # @param page_token [::String]
891
+ # Optional. Page token received from a previous `ListDataScanJobs` call.
892
+ # Provide this to retrieve the subsequent page. When paginating, all other
893
+ # parameters provided to `ListDataScanJobs` must match the call that provided
894
+ # the page token.
895
+ #
896
+ # @yield [response, operation] Access the result along with the RPC operation
897
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>]
898
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
899
+ #
900
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::DataScanJob>]
901
+ #
902
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
903
+ #
904
+ # @example Basic example
905
+ # require "google/cloud/dataplex/v1"
906
+ #
907
+ # # Create a client object. The client can be reused for multiple calls.
908
+ # client = Google::Cloud::Dataplex::V1::DataScanService::Client.new
909
+ #
910
+ # # Create a request. To set request fields, pass in keyword arguments.
911
+ # request = Google::Cloud::Dataplex::V1::ListDataScanJobsRequest.new
912
+ #
913
+ # # Call the list_data_scan_jobs method.
914
+ # result = client.list_data_scan_jobs request
915
+ #
916
+ # # The returned object is of type Gapic::PagedEnumerable. You can
917
+ # # iterate over all elements by calling #each, and the enumerable
918
+ # # will lazily make API calls to fetch subsequent pages. Other
919
+ # # methods are also available for managing paging directly.
920
+ # result.each do |response|
921
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::DataScanJob.
922
+ # p response
923
+ # end
924
+ #
925
+ def list_data_scan_jobs request, options = nil
926
+ raise ::ArgumentError, "request must be provided" if request.nil?
927
+
928
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListDataScanJobsRequest
929
+
930
+ # Converts hash and nil to an options object
931
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
932
+
933
+ # Customize the options with defaults
934
+ metadata = @config.rpcs.list_data_scan_jobs.metadata.to_h
935
+
936
+ # Set x-goog-api-client and x-goog-user-project headers
937
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
938
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
939
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
940
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
941
+
942
+ header_params = {}
943
+ if request.parent
944
+ header_params["parent"] = request.parent
945
+ end
946
+
947
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
948
+ metadata[:"x-goog-request-params"] ||= request_params_header
949
+
950
+ options.apply_defaults timeout: @config.rpcs.list_data_scan_jobs.timeout,
951
+ metadata: metadata,
952
+ retry_policy: @config.rpcs.list_data_scan_jobs.retry_policy
953
+
954
+ options.apply_defaults timeout: @config.timeout,
955
+ metadata: @config.metadata,
956
+ retry_policy: @config.retry_policy
957
+
958
+ @data_scan_service_stub.call_rpc :list_data_scan_jobs, request, options: options do |response, operation|
959
+ response = ::Gapic::PagedEnumerable.new @data_scan_service_stub, :list_data_scan_jobs, request, response, operation, options
960
+ yield response, operation if block_given?
961
+ return response
962
+ end
963
+ rescue ::GRPC::BadStatus => e
964
+ raise ::Google::Cloud::Error.from_error(e)
965
+ end
966
+
967
+ ##
968
+ # Configuration class for the DataScanService API.
969
+ #
970
+ # This class represents the configuration for DataScanService,
971
+ # providing control over timeouts, retry behavior, logging, transport
972
+ # parameters, and other low-level controls. Certain parameters can also be
973
+ # applied individually to specific RPCs. See
974
+ # {::Google::Cloud::Dataplex::V1::DataScanService::Client::Configuration::Rpcs}
975
+ # for a list of RPCs that can be configured independently.
976
+ #
977
+ # Configuration can be applied globally to all clients, or to a single client
978
+ # on construction.
979
+ #
980
+ # @example
981
+ #
982
+ # # Modify the global config, setting the timeout for
983
+ # # create_data_scan to 20 seconds,
984
+ # # and all remaining timeouts to 10 seconds.
985
+ # ::Google::Cloud::Dataplex::V1::DataScanService::Client.configure do |config|
986
+ # config.timeout = 10.0
987
+ # config.rpcs.create_data_scan.timeout = 20.0
988
+ # end
989
+ #
990
+ # # Apply the above configuration only to a new client.
991
+ # client = ::Google::Cloud::Dataplex::V1::DataScanService::Client.new do |config|
992
+ # config.timeout = 10.0
993
+ # config.rpcs.create_data_scan.timeout = 20.0
994
+ # end
995
+ #
996
+ # @!attribute [rw] endpoint
997
+ # The hostname or hostname:port of the service endpoint.
998
+ # Defaults to `"dataplex.googleapis.com"`.
999
+ # @return [::String]
1000
+ # @!attribute [rw] credentials
1001
+ # Credentials to send with calls. You may provide any of the following types:
1002
+ # * (`String`) The path to a service account key file in JSON format
1003
+ # * (`Hash`) A service account key as a Hash
1004
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1005
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1006
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1007
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1008
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1009
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1010
+ # * (`nil`) indicating no credentials
1011
+ # @return [::Object]
1012
+ # @!attribute [rw] scope
1013
+ # The OAuth scopes
1014
+ # @return [::Array<::String>]
1015
+ # @!attribute [rw] lib_name
1016
+ # The library name as recorded in instrumentation and logging
1017
+ # @return [::String]
1018
+ # @!attribute [rw] lib_version
1019
+ # The library version as recorded in instrumentation and logging
1020
+ # @return [::String]
1021
+ # @!attribute [rw] channel_args
1022
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
1023
+ # `GRPC::Core::Channel` object is provided as the credential.
1024
+ # @return [::Hash]
1025
+ # @!attribute [rw] interceptors
1026
+ # An array of interceptors that are run before calls are executed.
1027
+ # @return [::Array<::GRPC::ClientInterceptor>]
1028
+ # @!attribute [rw] timeout
1029
+ # The call timeout in seconds.
1030
+ # @return [::Numeric]
1031
+ # @!attribute [rw] metadata
1032
+ # Additional gRPC headers to be sent with the call.
1033
+ # @return [::Hash{::Symbol=>::String}]
1034
+ # @!attribute [rw] retry_policy
1035
+ # The retry policy. The value is a hash with the following keys:
1036
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1037
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1038
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1039
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1040
+ # trigger a retry.
1041
+ # @return [::Hash]
1042
+ # @!attribute [rw] quota_project
1043
+ # A separate project against which to charge quota.
1044
+ # @return [::String]
1045
+ #
1046
+ class Configuration
1047
+ extend ::Gapic::Config
1048
+
1049
+ config_attr :endpoint, "dataplex.googleapis.com", ::String
1050
+ config_attr :credentials, nil do |value|
1051
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1052
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1053
+ allowed.any? { |klass| klass === value }
1054
+ end
1055
+ config_attr :scope, nil, ::String, ::Array, nil
1056
+ config_attr :lib_name, nil, ::String, nil
1057
+ config_attr :lib_version, nil, ::String, nil
1058
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
1059
+ config_attr :interceptors, nil, ::Array, nil
1060
+ config_attr :timeout, nil, ::Numeric, nil
1061
+ config_attr :metadata, nil, ::Hash, nil
1062
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1063
+ config_attr :quota_project, nil, ::String, nil
1064
+
1065
+ # @private
1066
+ def initialize parent_config = nil
1067
+ @parent_config = parent_config unless parent_config.nil?
1068
+
1069
+ yield self if block_given?
1070
+ end
1071
+
1072
+ ##
1073
+ # Configurations for individual RPCs
1074
+ # @return [Rpcs]
1075
+ #
1076
+ def rpcs
1077
+ @rpcs ||= begin
1078
+ parent_rpcs = nil
1079
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1080
+ Rpcs.new parent_rpcs
1081
+ end
1082
+ end
1083
+
1084
+ ##
1085
+ # Configuration RPC class for the DataScanService API.
1086
+ #
1087
+ # Includes fields providing the configuration for each RPC in this service.
1088
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1089
+ # the following configuration fields:
1090
+ #
1091
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1092
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
1093
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1094
+ # include the following keys:
1095
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1096
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1097
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1098
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1099
+ # trigger a retry.
1100
+ #
1101
+ class Rpcs
1102
+ ##
1103
+ # RPC-specific configuration for `create_data_scan`
1104
+ # @return [::Gapic::Config::Method]
1105
+ #
1106
+ attr_reader :create_data_scan
1107
+ ##
1108
+ # RPC-specific configuration for `update_data_scan`
1109
+ # @return [::Gapic::Config::Method]
1110
+ #
1111
+ attr_reader :update_data_scan
1112
+ ##
1113
+ # RPC-specific configuration for `delete_data_scan`
1114
+ # @return [::Gapic::Config::Method]
1115
+ #
1116
+ attr_reader :delete_data_scan
1117
+ ##
1118
+ # RPC-specific configuration for `get_data_scan`
1119
+ # @return [::Gapic::Config::Method]
1120
+ #
1121
+ attr_reader :get_data_scan
1122
+ ##
1123
+ # RPC-specific configuration for `list_data_scans`
1124
+ # @return [::Gapic::Config::Method]
1125
+ #
1126
+ attr_reader :list_data_scans
1127
+ ##
1128
+ # RPC-specific configuration for `run_data_scan`
1129
+ # @return [::Gapic::Config::Method]
1130
+ #
1131
+ attr_reader :run_data_scan
1132
+ ##
1133
+ # RPC-specific configuration for `get_data_scan_job`
1134
+ # @return [::Gapic::Config::Method]
1135
+ #
1136
+ attr_reader :get_data_scan_job
1137
+ ##
1138
+ # RPC-specific configuration for `list_data_scan_jobs`
1139
+ # @return [::Gapic::Config::Method]
1140
+ #
1141
+ attr_reader :list_data_scan_jobs
1142
+
1143
+ # @private
1144
+ def initialize parent_rpcs = nil
1145
+ create_data_scan_config = parent_rpcs.create_data_scan if parent_rpcs.respond_to? :create_data_scan
1146
+ @create_data_scan = ::Gapic::Config::Method.new create_data_scan_config
1147
+ update_data_scan_config = parent_rpcs.update_data_scan if parent_rpcs.respond_to? :update_data_scan
1148
+ @update_data_scan = ::Gapic::Config::Method.new update_data_scan_config
1149
+ delete_data_scan_config = parent_rpcs.delete_data_scan if parent_rpcs.respond_to? :delete_data_scan
1150
+ @delete_data_scan = ::Gapic::Config::Method.new delete_data_scan_config
1151
+ get_data_scan_config = parent_rpcs.get_data_scan if parent_rpcs.respond_to? :get_data_scan
1152
+ @get_data_scan = ::Gapic::Config::Method.new get_data_scan_config
1153
+ list_data_scans_config = parent_rpcs.list_data_scans if parent_rpcs.respond_to? :list_data_scans
1154
+ @list_data_scans = ::Gapic::Config::Method.new list_data_scans_config
1155
+ run_data_scan_config = parent_rpcs.run_data_scan if parent_rpcs.respond_to? :run_data_scan
1156
+ @run_data_scan = ::Gapic::Config::Method.new run_data_scan_config
1157
+ get_data_scan_job_config = parent_rpcs.get_data_scan_job if parent_rpcs.respond_to? :get_data_scan_job
1158
+ @get_data_scan_job = ::Gapic::Config::Method.new get_data_scan_job_config
1159
+ list_data_scan_jobs_config = parent_rpcs.list_data_scan_jobs if parent_rpcs.respond_to? :list_data_scan_jobs
1160
+ @list_data_scan_jobs = ::Gapic::Config::Method.new list_data_scan_jobs_config
1161
+
1162
+ yield self if block_given?
1163
+ end
1164
+ end
1165
+ end
1166
+ end
1167
+ end
1168
+ end
1169
+ end
1170
+ end
1171
+ end