google-cloud-dataplex-v1 0.1.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 (40) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +139 -0
  6. data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +3133 -0
  7. data/lib/google/cloud/dataplex/v1/dataplex_service/credentials.rb +47 -0
  8. data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +767 -0
  9. data/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +157 -0
  10. data/lib/google/cloud/dataplex/v1/dataplex_service.rb +54 -0
  11. data/lib/google/cloud/dataplex/v1/logs_pb.rb +135 -0
  12. data/lib/google/cloud/dataplex/v1/metadata_pb.rb +214 -0
  13. data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +729 -0
  14. data/lib/google/cloud/dataplex/v1/metadata_service/credentials.rb +47 -0
  15. data/lib/google/cloud/dataplex/v1/metadata_service/paths.rb +102 -0
  16. data/lib/google/cloud/dataplex/v1/metadata_service.rb +50 -0
  17. data/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +52 -0
  18. data/lib/google/cloud/dataplex/v1/resources_pb.rb +298 -0
  19. data/lib/google/cloud/dataplex/v1/service_pb.rb +218 -0
  20. data/lib/google/cloud/dataplex/v1/service_services_pb.rb +102 -0
  21. data/lib/google/cloud/dataplex/v1/tasks_pb.rb +133 -0
  22. data/lib/google/cloud/dataplex/v1/version.rb +28 -0
  23. data/lib/google/cloud/dataplex/v1.rb +39 -0
  24. data/lib/google-cloud-dataplex-v1.rb +21 -0
  25. data/proto_docs/README.md +4 -0
  26. data/proto_docs/google/api/field_behavior.rb +71 -0
  27. data/proto_docs/google/api/resource.rb +222 -0
  28. data/proto_docs/google/cloud/dataplex/v1/logs.rb +308 -0
  29. data/proto_docs/google/cloud/dataplex/v1/metadata.rb +533 -0
  30. data/proto_docs/google/cloud/dataplex/v1/resources.rb +821 -0
  31. data/proto_docs/google/cloud/dataplex/v1/service.rb +601 -0
  32. data/proto_docs/google/cloud/dataplex/v1/tasks.rb +349 -0
  33. data/proto_docs/google/longrunning/operations.rb +164 -0
  34. data/proto_docs/google/protobuf/any.rb +141 -0
  35. data/proto_docs/google/protobuf/duration.rb +98 -0
  36. data/proto_docs/google/protobuf/empty.rb +36 -0
  37. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  38. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  39. data/proto_docs/google/rpc/status.rb +46 -0
  40. metadata +231 -0
@@ -0,0 +1,3133 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/service_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Dataplex
25
+ module V1
26
+ module DataplexService
27
+ ##
28
+ # Client for the DataplexService service.
29
+ #
30
+ # Dataplex service provides data lakes as a service. The primary resources
31
+ # offered by this service are Lakes, Zones and Assets which collectively allow
32
+ # a data adminstrator to organize, manage, secure and catalog data across their
33
+ # organization located across cloud projects in a variety of storage systems
34
+ # including Cloud Storage and BigQuery.
35
+ #
36
+ class Client
37
+ include Paths
38
+
39
+ # @private
40
+ attr_reader :dataplex_service_stub
41
+
42
+ ##
43
+ # Configure the DataplexService Client class.
44
+ #
45
+ # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all DataplexService clients
51
+ # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "Dataplex", "V1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.rpcs.create_lake.timeout = 60.0
72
+
73
+ default_config.rpcs.update_lake.timeout = 60.0
74
+
75
+ default_config.rpcs.delete_lake.timeout = 60.0
76
+
77
+ default_config.rpcs.list_lakes.timeout = 60.0
78
+ default_config.rpcs.list_lakes.retry_policy = {
79
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
80
+ }
81
+
82
+ default_config.rpcs.get_lake.timeout = 60.0
83
+ default_config.rpcs.get_lake.retry_policy = {
84
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
85
+ }
86
+
87
+ default_config.rpcs.list_lake_actions.timeout = 60.0
88
+ default_config.rpcs.list_lake_actions.retry_policy = {
89
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
90
+ }
91
+
92
+ default_config.rpcs.create_zone.timeout = 60.0
93
+
94
+ default_config.rpcs.update_zone.timeout = 60.0
95
+
96
+ default_config.rpcs.delete_zone.timeout = 60.0
97
+
98
+ default_config.rpcs.list_zones.timeout = 60.0
99
+ default_config.rpcs.list_zones.retry_policy = {
100
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
101
+ }
102
+
103
+ default_config.rpcs.get_zone.timeout = 60.0
104
+ default_config.rpcs.get_zone.retry_policy = {
105
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
106
+ }
107
+
108
+ default_config.rpcs.list_zone_actions.timeout = 60.0
109
+ default_config.rpcs.list_zone_actions.retry_policy = {
110
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
111
+ }
112
+
113
+ default_config.rpcs.create_asset.timeout = 60.0
114
+
115
+ default_config.rpcs.update_asset.timeout = 60.0
116
+
117
+ default_config.rpcs.delete_asset.timeout = 60.0
118
+
119
+ default_config.rpcs.list_assets.timeout = 60.0
120
+ default_config.rpcs.list_assets.retry_policy = {
121
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
122
+ }
123
+
124
+ default_config.rpcs.get_asset.timeout = 60.0
125
+ default_config.rpcs.get_asset.retry_policy = {
126
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
127
+ }
128
+
129
+ default_config.rpcs.list_asset_actions.timeout = 60.0
130
+ default_config.rpcs.list_asset_actions.retry_policy = {
131
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
132
+ }
133
+
134
+ default_config.rpcs.create_task.timeout = 60.0
135
+
136
+ default_config.rpcs.update_task.timeout = 60.0
137
+
138
+ default_config.rpcs.delete_task.timeout = 60.0
139
+
140
+ default_config.rpcs.list_tasks.timeout = 60.0
141
+ default_config.rpcs.list_tasks.retry_policy = {
142
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
143
+ }
144
+
145
+ default_config.rpcs.get_task.timeout = 60.0
146
+ default_config.rpcs.get_task.retry_policy = {
147
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
148
+ }
149
+
150
+ default_config.rpcs.list_jobs.timeout = 60.0
151
+ default_config.rpcs.list_jobs.retry_policy = {
152
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
153
+ }
154
+
155
+ default_config.rpcs.get_job.timeout = 60.0
156
+ default_config.rpcs.get_job.retry_policy = {
157
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
158
+ }
159
+
160
+ default_config.rpcs.cancel_job.timeout = 60.0
161
+
162
+ default_config
163
+ end
164
+ yield @configure if block_given?
165
+ @configure
166
+ end
167
+
168
+ ##
169
+ # Configure the DataplexService Client instance.
170
+ #
171
+ # The configuration is set to the derived mode, meaning that values can be changed,
172
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
173
+ # should be made on {Client.configure}.
174
+ #
175
+ # See {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration}
176
+ # for a description of the configuration fields.
177
+ #
178
+ # @yield [config] Configure the Client client.
179
+ # @yieldparam config [Client::Configuration]
180
+ #
181
+ # @return [Client::Configuration]
182
+ #
183
+ def configure
184
+ yield @config if block_given?
185
+ @config
186
+ end
187
+
188
+ ##
189
+ # Create a new DataplexService client object.
190
+ #
191
+ # @example
192
+ #
193
+ # # Create a client using the default configuration
194
+ # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new
195
+ #
196
+ # # Create a client using a custom configuration
197
+ # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config|
198
+ # config.timeout = 10.0
199
+ # end
200
+ #
201
+ # @yield [config] Configure the DataplexService client.
202
+ # @yieldparam config [Client::Configuration]
203
+ #
204
+ def initialize
205
+ # These require statements are intentionally placed here to initialize
206
+ # the gRPC module only when it's required.
207
+ # See https://github.com/googleapis/toolkit/issues/446
208
+ require "gapic/grpc"
209
+ require "google/cloud/dataplex/v1/service_services_pb"
210
+
211
+ # Create the configuration object
212
+ @config = Configuration.new Client.configure
213
+
214
+ # Yield the configuration if needed
215
+ yield @config if block_given?
216
+
217
+ # Create credentials
218
+ credentials = @config.credentials
219
+ # Use self-signed JWT if the endpoint is unchanged from default,
220
+ # but only if the default endpoint does not have a region prefix.
221
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
222
+ !@config.endpoint.split(".").first.include?("-")
223
+ credentials ||= Credentials.default scope: @config.scope,
224
+ enable_self_signed_jwt: enable_self_signed_jwt
225
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
226
+ credentials = Credentials.new credentials, scope: @config.scope
227
+ end
228
+ @quota_project_id = @config.quota_project
229
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
230
+
231
+ @operations_client = Operations.new do |config|
232
+ config.credentials = credentials
233
+ config.quota_project = @quota_project_id
234
+ config.endpoint = @config.endpoint
235
+ end
236
+
237
+ @dataplex_service_stub = ::Gapic::ServiceStub.new(
238
+ ::Google::Cloud::Dataplex::V1::DataplexService::Stub,
239
+ credentials: credentials,
240
+ endpoint: @config.endpoint,
241
+ channel_args: @config.channel_args,
242
+ interceptors: @config.interceptors
243
+ )
244
+ end
245
+
246
+ ##
247
+ # Get the associated client for long-running operations.
248
+ #
249
+ # @return [::Google::Cloud::Dataplex::V1::DataplexService::Operations]
250
+ #
251
+ attr_reader :operations_client
252
+
253
+ # Service calls
254
+
255
+ ##
256
+ # Creates a lake resource.
257
+ #
258
+ # @overload create_lake(request, options = nil)
259
+ # Pass arguments to `create_lake` via a request object, either of type
260
+ # {::Google::Cloud::Dataplex::V1::CreateLakeRequest} or an equivalent Hash.
261
+ #
262
+ # @param request [::Google::Cloud::Dataplex::V1::CreateLakeRequest, ::Hash]
263
+ # A request object representing the call parameters. Required. To specify no
264
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
265
+ # @param options [::Gapic::CallOptions, ::Hash]
266
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
267
+ #
268
+ # @overload create_lake(parent: nil, lake_id: nil, lake: nil, validate_only: nil)
269
+ # Pass arguments to `create_lake` via keyword arguments. Note that at
270
+ # least one keyword argument is required. To specify no parameters, or to keep all
271
+ # the default parameter values, pass an empty Hash as a request object (see above).
272
+ #
273
+ # @param parent [::String]
274
+ # Required. The resource name of the lake location, of the form:
275
+ # `projects/{project_number}/locations/{location_id}`
276
+ # where `location_id` refers to a GCP region.
277
+ # @param lake_id [::String]
278
+ # Required. Lake identifier.
279
+ # This ID will be used to generate names such as database and dataset names
280
+ # when publishing metadata to Hive Metastore and BigQuery.
281
+ # * Must contain only lowercase letters, numbers and hyphens.
282
+ # * Must start with a letter.
283
+ # * Must end with a number or a letter.
284
+ # * Must be between 1-63 characters.
285
+ # * Must be unique within the customer project / location.
286
+ # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash]
287
+ # Required. Lake resource
288
+ # @param validate_only [::Boolean]
289
+ # Optional. Only validate the request, but do not perform mutations.
290
+ # The default is false.
291
+ #
292
+ # @yield [response, operation] Access the result along with the RPC operation
293
+ # @yieldparam response [::Gapic::Operation]
294
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
295
+ #
296
+ # @return [::Gapic::Operation]
297
+ #
298
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
299
+ #
300
+ # @example Basic example
301
+ # require "google/cloud/dataplex/v1"
302
+ #
303
+ # # Create a client object. The client can be reused for multiple calls.
304
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
305
+ #
306
+ # # Create a request. To set request fields, pass in keyword arguments.
307
+ # request = Google::Cloud::Dataplex::V1::CreateLakeRequest.new
308
+ #
309
+ # # Call the create_lake method.
310
+ # result = client.create_lake request
311
+ #
312
+ # # The returned object is of type Gapic::Operation. You can use this
313
+ # # object to check the status of an operation, cancel it, or wait
314
+ # # for results. Here is how to block until completion:
315
+ # result.wait_until_done! timeout: 60
316
+ # if result.response?
317
+ # p result.response
318
+ # else
319
+ # puts "Error!"
320
+ # end
321
+ #
322
+ def create_lake request, options = nil
323
+ raise ::ArgumentError, "request must be provided" if request.nil?
324
+
325
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateLakeRequest
326
+
327
+ # Converts hash and nil to an options object
328
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
329
+
330
+ # Customize the options with defaults
331
+ metadata = @config.rpcs.create_lake.metadata.to_h
332
+
333
+ # Set x-goog-api-client and x-goog-user-project headers
334
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
336
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
337
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
338
+
339
+ header_params = {}
340
+ if request.parent
341
+ header_params["parent"] = request.parent
342
+ end
343
+
344
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
345
+ metadata[:"x-goog-request-params"] ||= request_params_header
346
+
347
+ options.apply_defaults timeout: @config.rpcs.create_lake.timeout,
348
+ metadata: metadata,
349
+ retry_policy: @config.rpcs.create_lake.retry_policy
350
+
351
+ options.apply_defaults timeout: @config.timeout,
352
+ metadata: @config.metadata,
353
+ retry_policy: @config.retry_policy
354
+
355
+ @dataplex_service_stub.call_rpc :create_lake, request, options: options do |response, operation|
356
+ response = ::Gapic::Operation.new response, @operations_client, options: options
357
+ yield response, operation if block_given?
358
+ return response
359
+ end
360
+ rescue ::GRPC::BadStatus => e
361
+ raise ::Google::Cloud::Error.from_error(e)
362
+ end
363
+
364
+ ##
365
+ # Updates a lake resource.
366
+ #
367
+ # @overload update_lake(request, options = nil)
368
+ # Pass arguments to `update_lake` via a request object, either of type
369
+ # {::Google::Cloud::Dataplex::V1::UpdateLakeRequest} or an equivalent Hash.
370
+ #
371
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateLakeRequest, ::Hash]
372
+ # A request object representing the call parameters. Required. To specify no
373
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
374
+ # @param options [::Gapic::CallOptions, ::Hash]
375
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
376
+ #
377
+ # @overload update_lake(update_mask: nil, lake: nil, validate_only: nil)
378
+ # Pass arguments to `update_lake` via keyword arguments. Note that at
379
+ # least one keyword argument is required. To specify no parameters, or to keep all
380
+ # the default parameter values, pass an empty Hash as a request object (see above).
381
+ #
382
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
383
+ # Required. Mask of fields to update.
384
+ # @param lake [::Google::Cloud::Dataplex::V1::Lake, ::Hash]
385
+ # Required. Update description.
386
+ # Only fields specified in `update_mask` are updated.
387
+ # @param validate_only [::Boolean]
388
+ # Optional. Only validate the request, but do not perform mutations.
389
+ # The default is false.
390
+ #
391
+ # @yield [response, operation] Access the result along with the RPC operation
392
+ # @yieldparam response [::Gapic::Operation]
393
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
394
+ #
395
+ # @return [::Gapic::Operation]
396
+ #
397
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
398
+ #
399
+ # @example Basic example
400
+ # require "google/cloud/dataplex/v1"
401
+ #
402
+ # # Create a client object. The client can be reused for multiple calls.
403
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
404
+ #
405
+ # # Create a request. To set request fields, pass in keyword arguments.
406
+ # request = Google::Cloud::Dataplex::V1::UpdateLakeRequest.new
407
+ #
408
+ # # Call the update_lake method.
409
+ # result = client.update_lake request
410
+ #
411
+ # # The returned object is of type Gapic::Operation. You can use this
412
+ # # object to check the status of an operation, cancel it, or wait
413
+ # # for results. Here is how to block until completion:
414
+ # result.wait_until_done! timeout: 60
415
+ # if result.response?
416
+ # p result.response
417
+ # else
418
+ # puts "Error!"
419
+ # end
420
+ #
421
+ def update_lake request, options = nil
422
+ raise ::ArgumentError, "request must be provided" if request.nil?
423
+
424
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateLakeRequest
425
+
426
+ # Converts hash and nil to an options object
427
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
428
+
429
+ # Customize the options with defaults
430
+ metadata = @config.rpcs.update_lake.metadata.to_h
431
+
432
+ # Set x-goog-api-client and x-goog-user-project headers
433
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
434
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
435
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
436
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
+
438
+ header_params = {}
439
+ if request.lake&.name
440
+ header_params["lake.name"] = request.lake.name
441
+ end
442
+
443
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
444
+ metadata[:"x-goog-request-params"] ||= request_params_header
445
+
446
+ options.apply_defaults timeout: @config.rpcs.update_lake.timeout,
447
+ metadata: metadata,
448
+ retry_policy: @config.rpcs.update_lake.retry_policy
449
+
450
+ options.apply_defaults timeout: @config.timeout,
451
+ metadata: @config.metadata,
452
+ retry_policy: @config.retry_policy
453
+
454
+ @dataplex_service_stub.call_rpc :update_lake, request, options: options do |response, operation|
455
+ response = ::Gapic::Operation.new response, @operations_client, options: options
456
+ yield response, operation if block_given?
457
+ return response
458
+ end
459
+ rescue ::GRPC::BadStatus => e
460
+ raise ::Google::Cloud::Error.from_error(e)
461
+ end
462
+
463
+ ##
464
+ # Deletes a lake resource. All zones within the lake must be deleted before
465
+ # the lake can be deleted.
466
+ #
467
+ # @overload delete_lake(request, options = nil)
468
+ # Pass arguments to `delete_lake` via a request object, either of type
469
+ # {::Google::Cloud::Dataplex::V1::DeleteLakeRequest} or an equivalent Hash.
470
+ #
471
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteLakeRequest, ::Hash]
472
+ # A request object representing the call parameters. Required. To specify no
473
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
474
+ # @param options [::Gapic::CallOptions, ::Hash]
475
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
476
+ #
477
+ # @overload delete_lake(name: nil)
478
+ # Pass arguments to `delete_lake` via keyword arguments. Note that at
479
+ # least one keyword argument is required. To specify no parameters, or to keep all
480
+ # the default parameter values, pass an empty Hash as a request object (see above).
481
+ #
482
+ # @param name [::String]
483
+ # Required. The resource name of the lake:
484
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
485
+ #
486
+ # @yield [response, operation] Access the result along with the RPC operation
487
+ # @yieldparam response [::Gapic::Operation]
488
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
489
+ #
490
+ # @return [::Gapic::Operation]
491
+ #
492
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
493
+ #
494
+ # @example Basic example
495
+ # require "google/cloud/dataplex/v1"
496
+ #
497
+ # # Create a client object. The client can be reused for multiple calls.
498
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
499
+ #
500
+ # # Create a request. To set request fields, pass in keyword arguments.
501
+ # request = Google::Cloud::Dataplex::V1::DeleteLakeRequest.new
502
+ #
503
+ # # Call the delete_lake method.
504
+ # result = client.delete_lake request
505
+ #
506
+ # # The returned object is of type Gapic::Operation. You can use this
507
+ # # object to check the status of an operation, cancel it, or wait
508
+ # # for results. Here is how to block until completion:
509
+ # result.wait_until_done! timeout: 60
510
+ # if result.response?
511
+ # p result.response
512
+ # else
513
+ # puts "Error!"
514
+ # end
515
+ #
516
+ def delete_lake request, options = nil
517
+ raise ::ArgumentError, "request must be provided" if request.nil?
518
+
519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteLakeRequest
520
+
521
+ # Converts hash and nil to an options object
522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
523
+
524
+ # Customize the options with defaults
525
+ metadata = @config.rpcs.delete_lake.metadata.to_h
526
+
527
+ # Set x-goog-api-client and x-goog-user-project headers
528
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
530
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
531
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
532
+
533
+ header_params = {}
534
+ if request.name
535
+ header_params["name"] = request.name
536
+ end
537
+
538
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
539
+ metadata[:"x-goog-request-params"] ||= request_params_header
540
+
541
+ options.apply_defaults timeout: @config.rpcs.delete_lake.timeout,
542
+ metadata: metadata,
543
+ retry_policy: @config.rpcs.delete_lake.retry_policy
544
+
545
+ options.apply_defaults timeout: @config.timeout,
546
+ metadata: @config.metadata,
547
+ retry_policy: @config.retry_policy
548
+
549
+ @dataplex_service_stub.call_rpc :delete_lake, request, options: options do |response, operation|
550
+ response = ::Gapic::Operation.new response, @operations_client, options: options
551
+ yield response, operation if block_given?
552
+ return response
553
+ end
554
+ rescue ::GRPC::BadStatus => e
555
+ raise ::Google::Cloud::Error.from_error(e)
556
+ end
557
+
558
+ ##
559
+ # Lists lake resources in a project and location.
560
+ #
561
+ # @overload list_lakes(request, options = nil)
562
+ # Pass arguments to `list_lakes` via a request object, either of type
563
+ # {::Google::Cloud::Dataplex::V1::ListLakesRequest} or an equivalent Hash.
564
+ #
565
+ # @param request [::Google::Cloud::Dataplex::V1::ListLakesRequest, ::Hash]
566
+ # A request object representing the call parameters. Required. To specify no
567
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
568
+ # @param options [::Gapic::CallOptions, ::Hash]
569
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
570
+ #
571
+ # @overload list_lakes(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
572
+ # Pass arguments to `list_lakes` via keyword arguments. Note that at
573
+ # least one keyword argument is required. To specify no parameters, or to keep all
574
+ # the default parameter values, pass an empty Hash as a request object (see above).
575
+ #
576
+ # @param parent [::String]
577
+ # Required. The resource name of the lake location, of the form:
578
+ # `projects/{project_number}/locations/{location_id}`
579
+ # where `location_id` refers to a GCP region.
580
+ # @param page_size [::Integer]
581
+ # Optional. Maximum number of Lakes to return. The service may return fewer than this
582
+ # value. If unspecified, at most 10 lakes will be returned. The maximum
583
+ # value is 1000; values above 1000 will be coerced to 1000.
584
+ # @param page_token [::String]
585
+ # Optional. Page token received from a previous `ListLakes` call. Provide this to
586
+ # retrieve the subsequent page. When paginating, all other parameters
587
+ # provided to `ListLakes` must match the call that provided the page token.
588
+ # @param filter [::String]
589
+ # Optional. Filter request.
590
+ # @param order_by [::String]
591
+ # Optional. Order by fields for the result.
592
+ #
593
+ # @yield [response, operation] Access the result along with the RPC operation
594
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>]
595
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
596
+ #
597
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Lake>]
598
+ #
599
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
600
+ #
601
+ # @example Basic example
602
+ # require "google/cloud/dataplex/v1"
603
+ #
604
+ # # Create a client object. The client can be reused for multiple calls.
605
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
606
+ #
607
+ # # Create a request. To set request fields, pass in keyword arguments.
608
+ # request = Google::Cloud::Dataplex::V1::ListLakesRequest.new
609
+ #
610
+ # # Call the list_lakes method.
611
+ # result = client.list_lakes request
612
+ #
613
+ # # The returned object is of type Gapic::PagedEnumerable. You can
614
+ # # iterate over all elements by calling #each, and the enumerable
615
+ # # will lazily make API calls to fetch subsequent pages. Other
616
+ # # methods are also available for managing paging directly.
617
+ # result.each do |response|
618
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Lake.
619
+ # p response
620
+ # end
621
+ #
622
+ def list_lakes request, options = nil
623
+ raise ::ArgumentError, "request must be provided" if request.nil?
624
+
625
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakesRequest
626
+
627
+ # Converts hash and nil to an options object
628
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
629
+
630
+ # Customize the options with defaults
631
+ metadata = @config.rpcs.list_lakes.metadata.to_h
632
+
633
+ # Set x-goog-api-client and x-goog-user-project headers
634
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
635
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
636
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
637
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
638
+
639
+ header_params = {}
640
+ if request.parent
641
+ header_params["parent"] = request.parent
642
+ end
643
+
644
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
645
+ metadata[:"x-goog-request-params"] ||= request_params_header
646
+
647
+ options.apply_defaults timeout: @config.rpcs.list_lakes.timeout,
648
+ metadata: metadata,
649
+ retry_policy: @config.rpcs.list_lakes.retry_policy
650
+
651
+ options.apply_defaults timeout: @config.timeout,
652
+ metadata: @config.metadata,
653
+ retry_policy: @config.retry_policy
654
+
655
+ @dataplex_service_stub.call_rpc :list_lakes, request, options: options do |response, operation|
656
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lakes, request, response, operation, options
657
+ yield response, operation if block_given?
658
+ return response
659
+ end
660
+ rescue ::GRPC::BadStatus => e
661
+ raise ::Google::Cloud::Error.from_error(e)
662
+ end
663
+
664
+ ##
665
+ # Retrieves a lake resource.
666
+ #
667
+ # @overload get_lake(request, options = nil)
668
+ # Pass arguments to `get_lake` via a request object, either of type
669
+ # {::Google::Cloud::Dataplex::V1::GetLakeRequest} or an equivalent Hash.
670
+ #
671
+ # @param request [::Google::Cloud::Dataplex::V1::GetLakeRequest, ::Hash]
672
+ # A request object representing the call parameters. Required. To specify no
673
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
674
+ # @param options [::Gapic::CallOptions, ::Hash]
675
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
676
+ #
677
+ # @overload get_lake(name: nil)
678
+ # Pass arguments to `get_lake` via keyword arguments. Note that at
679
+ # least one keyword argument is required. To specify no parameters, or to keep all
680
+ # the default parameter values, pass an empty Hash as a request object (see above).
681
+ #
682
+ # @param name [::String]
683
+ # Required. The resource name of the lake:
684
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
685
+ #
686
+ # @yield [response, operation] Access the result along with the RPC operation
687
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Lake]
688
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
689
+ #
690
+ # @return [::Google::Cloud::Dataplex::V1::Lake]
691
+ #
692
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
693
+ #
694
+ # @example Basic example
695
+ # require "google/cloud/dataplex/v1"
696
+ #
697
+ # # Create a client object. The client can be reused for multiple calls.
698
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
699
+ #
700
+ # # Create a request. To set request fields, pass in keyword arguments.
701
+ # request = Google::Cloud::Dataplex::V1::GetLakeRequest.new
702
+ #
703
+ # # Call the get_lake method.
704
+ # result = client.get_lake request
705
+ #
706
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Lake.
707
+ # p result
708
+ #
709
+ def get_lake request, options = nil
710
+ raise ::ArgumentError, "request must be provided" if request.nil?
711
+
712
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetLakeRequest
713
+
714
+ # Converts hash and nil to an options object
715
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
716
+
717
+ # Customize the options with defaults
718
+ metadata = @config.rpcs.get_lake.metadata.to_h
719
+
720
+ # Set x-goog-api-client and x-goog-user-project headers
721
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
722
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
723
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
724
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
725
+
726
+ header_params = {}
727
+ if request.name
728
+ header_params["name"] = request.name
729
+ end
730
+
731
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
732
+ metadata[:"x-goog-request-params"] ||= request_params_header
733
+
734
+ options.apply_defaults timeout: @config.rpcs.get_lake.timeout,
735
+ metadata: metadata,
736
+ retry_policy: @config.rpcs.get_lake.retry_policy
737
+
738
+ options.apply_defaults timeout: @config.timeout,
739
+ metadata: @config.metadata,
740
+ retry_policy: @config.retry_policy
741
+
742
+ @dataplex_service_stub.call_rpc :get_lake, request, options: options do |response, operation|
743
+ yield response, operation if block_given?
744
+ return response
745
+ end
746
+ rescue ::GRPC::BadStatus => e
747
+ raise ::Google::Cloud::Error.from_error(e)
748
+ end
749
+
750
+ ##
751
+ # Lists action resources in a lake.
752
+ #
753
+ # @overload list_lake_actions(request, options = nil)
754
+ # Pass arguments to `list_lake_actions` via a request object, either of type
755
+ # {::Google::Cloud::Dataplex::V1::ListLakeActionsRequest} or an equivalent Hash.
756
+ #
757
+ # @param request [::Google::Cloud::Dataplex::V1::ListLakeActionsRequest, ::Hash]
758
+ # A request object representing the call parameters. Required. To specify no
759
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
760
+ # @param options [::Gapic::CallOptions, ::Hash]
761
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
762
+ #
763
+ # @overload list_lake_actions(parent: nil, page_size: nil, page_token: nil)
764
+ # Pass arguments to `list_lake_actions` via keyword arguments. Note that at
765
+ # least one keyword argument is required. To specify no parameters, or to keep all
766
+ # the default parameter values, pass an empty Hash as a request object (see above).
767
+ #
768
+ # @param parent [::String]
769
+ # Required. The resource name of the parent lake:
770
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
771
+ # @param page_size [::Integer]
772
+ # Optional. Maximum number of actions to return. The service may return fewer than this
773
+ # value. If unspecified, at most 10 actions will be returned. The maximum
774
+ # value is 1000; values above 1000 will be coerced to 1000.
775
+ # @param page_token [::String]
776
+ # Optional. Page token received from a previous `ListLakeActions` call. Provide this to
777
+ # retrieve the subsequent page. When paginating, all other parameters
778
+ # provided to `ListLakeActions` must match the call that provided the page
779
+ # token.
780
+ #
781
+ # @yield [response, operation] Access the result along with the RPC operation
782
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
783
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
784
+ #
785
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
786
+ #
787
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
788
+ #
789
+ # @example Basic example
790
+ # require "google/cloud/dataplex/v1"
791
+ #
792
+ # # Create a client object. The client can be reused for multiple calls.
793
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
794
+ #
795
+ # # Create a request. To set request fields, pass in keyword arguments.
796
+ # request = Google::Cloud::Dataplex::V1::ListLakeActionsRequest.new
797
+ #
798
+ # # Call the list_lake_actions method.
799
+ # result = client.list_lake_actions request
800
+ #
801
+ # # The returned object is of type Gapic::PagedEnumerable. You can
802
+ # # iterate over all elements by calling #each, and the enumerable
803
+ # # will lazily make API calls to fetch subsequent pages. Other
804
+ # # methods are also available for managing paging directly.
805
+ # result.each do |response|
806
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
807
+ # p response
808
+ # end
809
+ #
810
+ def list_lake_actions request, options = nil
811
+ raise ::ArgumentError, "request must be provided" if request.nil?
812
+
813
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListLakeActionsRequest
814
+
815
+ # Converts hash and nil to an options object
816
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
817
+
818
+ # Customize the options with defaults
819
+ metadata = @config.rpcs.list_lake_actions.metadata.to_h
820
+
821
+ # Set x-goog-api-client and x-goog-user-project headers
822
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
823
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
824
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
825
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
826
+
827
+ header_params = {}
828
+ if request.parent
829
+ header_params["parent"] = request.parent
830
+ end
831
+
832
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
833
+ metadata[:"x-goog-request-params"] ||= request_params_header
834
+
835
+ options.apply_defaults timeout: @config.rpcs.list_lake_actions.timeout,
836
+ metadata: metadata,
837
+ retry_policy: @config.rpcs.list_lake_actions.retry_policy
838
+
839
+ options.apply_defaults timeout: @config.timeout,
840
+ metadata: @config.metadata,
841
+ retry_policy: @config.retry_policy
842
+
843
+ @dataplex_service_stub.call_rpc :list_lake_actions, request, options: options do |response, operation|
844
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_lake_actions, request, response, operation, options
845
+ yield response, operation if block_given?
846
+ return response
847
+ end
848
+ rescue ::GRPC::BadStatus => e
849
+ raise ::Google::Cloud::Error.from_error(e)
850
+ end
851
+
852
+ ##
853
+ # Creates a zone resource within a lake.
854
+ #
855
+ # @overload create_zone(request, options = nil)
856
+ # Pass arguments to `create_zone` via a request object, either of type
857
+ # {::Google::Cloud::Dataplex::V1::CreateZoneRequest} or an equivalent Hash.
858
+ #
859
+ # @param request [::Google::Cloud::Dataplex::V1::CreateZoneRequest, ::Hash]
860
+ # A request object representing the call parameters. Required. To specify no
861
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
862
+ # @param options [::Gapic::CallOptions, ::Hash]
863
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
864
+ #
865
+ # @overload create_zone(parent: nil, zone_id: nil, zone: nil, validate_only: nil)
866
+ # Pass arguments to `create_zone` via keyword arguments. Note that at
867
+ # least one keyword argument is required. To specify no parameters, or to keep all
868
+ # the default parameter values, pass an empty Hash as a request object (see above).
869
+ #
870
+ # @param parent [::String]
871
+ # Required. The resource name of the parent lake:
872
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
873
+ # @param zone_id [::String]
874
+ # Required. Zone identifier.
875
+ # This ID will be used to generate names such as database and dataset names
876
+ # when publishing metadata to Hive Metastore and BigQuery.
877
+ # * Must contain only lowercase letters, numbers and hyphens.
878
+ # * Must start with a letter.
879
+ # * Must end with a number or a letter.
880
+ # * Must be between 1-63 characters.
881
+ # * Must be unique across all lakes from all locations in a project.
882
+ # * Must not be one of the reserved IDs (i.e. "default", "global-temp")
883
+ # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash]
884
+ # Required. Zone resource.
885
+ # @param validate_only [::Boolean]
886
+ # Optional. Only validate the request, but do not perform mutations.
887
+ # The default is false.
888
+ #
889
+ # @yield [response, operation] Access the result along with the RPC operation
890
+ # @yieldparam response [::Gapic::Operation]
891
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
892
+ #
893
+ # @return [::Gapic::Operation]
894
+ #
895
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
896
+ #
897
+ # @example Basic example
898
+ # require "google/cloud/dataplex/v1"
899
+ #
900
+ # # Create a client object. The client can be reused for multiple calls.
901
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
902
+ #
903
+ # # Create a request. To set request fields, pass in keyword arguments.
904
+ # request = Google::Cloud::Dataplex::V1::CreateZoneRequest.new
905
+ #
906
+ # # Call the create_zone method.
907
+ # result = client.create_zone request
908
+ #
909
+ # # The returned object is of type Gapic::Operation. You can use this
910
+ # # object to check the status of an operation, cancel it, or wait
911
+ # # for results. Here is how to block until completion:
912
+ # result.wait_until_done! timeout: 60
913
+ # if result.response?
914
+ # p result.response
915
+ # else
916
+ # puts "Error!"
917
+ # end
918
+ #
919
+ def create_zone request, options = nil
920
+ raise ::ArgumentError, "request must be provided" if request.nil?
921
+
922
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateZoneRequest
923
+
924
+ # Converts hash and nil to an options object
925
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
926
+
927
+ # Customize the options with defaults
928
+ metadata = @config.rpcs.create_zone.metadata.to_h
929
+
930
+ # Set x-goog-api-client and x-goog-user-project headers
931
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
932
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
933
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
934
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
935
+
936
+ header_params = {}
937
+ if request.parent
938
+ header_params["parent"] = request.parent
939
+ end
940
+
941
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
942
+ metadata[:"x-goog-request-params"] ||= request_params_header
943
+
944
+ options.apply_defaults timeout: @config.rpcs.create_zone.timeout,
945
+ metadata: metadata,
946
+ retry_policy: @config.rpcs.create_zone.retry_policy
947
+
948
+ options.apply_defaults timeout: @config.timeout,
949
+ metadata: @config.metadata,
950
+ retry_policy: @config.retry_policy
951
+
952
+ @dataplex_service_stub.call_rpc :create_zone, request, options: options do |response, operation|
953
+ response = ::Gapic::Operation.new response, @operations_client, options: options
954
+ yield response, operation if block_given?
955
+ return response
956
+ end
957
+ rescue ::GRPC::BadStatus => e
958
+ raise ::Google::Cloud::Error.from_error(e)
959
+ end
960
+
961
+ ##
962
+ # Updates a zone resource.
963
+ #
964
+ # @overload update_zone(request, options = nil)
965
+ # Pass arguments to `update_zone` via a request object, either of type
966
+ # {::Google::Cloud::Dataplex::V1::UpdateZoneRequest} or an equivalent Hash.
967
+ #
968
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateZoneRequest, ::Hash]
969
+ # A request object representing the call parameters. Required. To specify no
970
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
971
+ # @param options [::Gapic::CallOptions, ::Hash]
972
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
973
+ #
974
+ # @overload update_zone(update_mask: nil, zone: nil, validate_only: nil)
975
+ # Pass arguments to `update_zone` via keyword arguments. Note that at
976
+ # least one keyword argument is required. To specify no parameters, or to keep all
977
+ # the default parameter values, pass an empty Hash as a request object (see above).
978
+ #
979
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
980
+ # Required. Mask of fields to update.
981
+ # @param zone [::Google::Cloud::Dataplex::V1::Zone, ::Hash]
982
+ # Required. Update description.
983
+ # Only fields specified in `update_mask` are updated.
984
+ # @param validate_only [::Boolean]
985
+ # Optional. Only validate the request, but do not perform mutations.
986
+ # The default is false.
987
+ #
988
+ # @yield [response, operation] Access the result along with the RPC operation
989
+ # @yieldparam response [::Gapic::Operation]
990
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
991
+ #
992
+ # @return [::Gapic::Operation]
993
+ #
994
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
995
+ #
996
+ # @example Basic example
997
+ # require "google/cloud/dataplex/v1"
998
+ #
999
+ # # Create a client object. The client can be reused for multiple calls.
1000
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1001
+ #
1002
+ # # Create a request. To set request fields, pass in keyword arguments.
1003
+ # request = Google::Cloud::Dataplex::V1::UpdateZoneRequest.new
1004
+ #
1005
+ # # Call the update_zone method.
1006
+ # result = client.update_zone request
1007
+ #
1008
+ # # The returned object is of type Gapic::Operation. You can use this
1009
+ # # object to check the status of an operation, cancel it, or wait
1010
+ # # for results. Here is how to block until completion:
1011
+ # result.wait_until_done! timeout: 60
1012
+ # if result.response?
1013
+ # p result.response
1014
+ # else
1015
+ # puts "Error!"
1016
+ # end
1017
+ #
1018
+ def update_zone request, options = nil
1019
+ raise ::ArgumentError, "request must be provided" if request.nil?
1020
+
1021
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateZoneRequest
1022
+
1023
+ # Converts hash and nil to an options object
1024
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1025
+
1026
+ # Customize the options with defaults
1027
+ metadata = @config.rpcs.update_zone.metadata.to_h
1028
+
1029
+ # Set x-goog-api-client and x-goog-user-project headers
1030
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1031
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1032
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1033
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1034
+
1035
+ header_params = {}
1036
+ if request.zone&.name
1037
+ header_params["zone.name"] = request.zone.name
1038
+ end
1039
+
1040
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1041
+ metadata[:"x-goog-request-params"] ||= request_params_header
1042
+
1043
+ options.apply_defaults timeout: @config.rpcs.update_zone.timeout,
1044
+ metadata: metadata,
1045
+ retry_policy: @config.rpcs.update_zone.retry_policy
1046
+
1047
+ options.apply_defaults timeout: @config.timeout,
1048
+ metadata: @config.metadata,
1049
+ retry_policy: @config.retry_policy
1050
+
1051
+ @dataplex_service_stub.call_rpc :update_zone, request, options: options do |response, operation|
1052
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1053
+ yield response, operation if block_given?
1054
+ return response
1055
+ end
1056
+ rescue ::GRPC::BadStatus => e
1057
+ raise ::Google::Cloud::Error.from_error(e)
1058
+ end
1059
+
1060
+ ##
1061
+ # Deletes a zone resource. All assets within a zone must be deleted before
1062
+ # the zone can be deleted.
1063
+ #
1064
+ # @overload delete_zone(request, options = nil)
1065
+ # Pass arguments to `delete_zone` via a request object, either of type
1066
+ # {::Google::Cloud::Dataplex::V1::DeleteZoneRequest} or an equivalent Hash.
1067
+ #
1068
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteZoneRequest, ::Hash]
1069
+ # A request object representing the call parameters. Required. To specify no
1070
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1071
+ # @param options [::Gapic::CallOptions, ::Hash]
1072
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1073
+ #
1074
+ # @overload delete_zone(name: nil)
1075
+ # Pass arguments to `delete_zone` via keyword arguments. Note that at
1076
+ # least one keyword argument is required. To specify no parameters, or to keep all
1077
+ # the default parameter values, pass an empty Hash as a request object (see above).
1078
+ #
1079
+ # @param name [::String]
1080
+ # Required. The resource name of the zone:
1081
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
1082
+ #
1083
+ # @yield [response, operation] Access the result along with the RPC operation
1084
+ # @yieldparam response [::Gapic::Operation]
1085
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1086
+ #
1087
+ # @return [::Gapic::Operation]
1088
+ #
1089
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1090
+ #
1091
+ # @example Basic example
1092
+ # require "google/cloud/dataplex/v1"
1093
+ #
1094
+ # # Create a client object. The client can be reused for multiple calls.
1095
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1096
+ #
1097
+ # # Create a request. To set request fields, pass in keyword arguments.
1098
+ # request = Google::Cloud::Dataplex::V1::DeleteZoneRequest.new
1099
+ #
1100
+ # # Call the delete_zone method.
1101
+ # result = client.delete_zone request
1102
+ #
1103
+ # # The returned object is of type Gapic::Operation. You can use this
1104
+ # # object to check the status of an operation, cancel it, or wait
1105
+ # # for results. Here is how to block until completion:
1106
+ # result.wait_until_done! timeout: 60
1107
+ # if result.response?
1108
+ # p result.response
1109
+ # else
1110
+ # puts "Error!"
1111
+ # end
1112
+ #
1113
+ def delete_zone request, options = nil
1114
+ raise ::ArgumentError, "request must be provided" if request.nil?
1115
+
1116
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteZoneRequest
1117
+
1118
+ # Converts hash and nil to an options object
1119
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1120
+
1121
+ # Customize the options with defaults
1122
+ metadata = @config.rpcs.delete_zone.metadata.to_h
1123
+
1124
+ # Set x-goog-api-client and x-goog-user-project headers
1125
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1126
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1127
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1128
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1129
+
1130
+ header_params = {}
1131
+ if request.name
1132
+ header_params["name"] = request.name
1133
+ end
1134
+
1135
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1136
+ metadata[:"x-goog-request-params"] ||= request_params_header
1137
+
1138
+ options.apply_defaults timeout: @config.rpcs.delete_zone.timeout,
1139
+ metadata: metadata,
1140
+ retry_policy: @config.rpcs.delete_zone.retry_policy
1141
+
1142
+ options.apply_defaults timeout: @config.timeout,
1143
+ metadata: @config.metadata,
1144
+ retry_policy: @config.retry_policy
1145
+
1146
+ @dataplex_service_stub.call_rpc :delete_zone, request, options: options do |response, operation|
1147
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1148
+ yield response, operation if block_given?
1149
+ return response
1150
+ end
1151
+ rescue ::GRPC::BadStatus => e
1152
+ raise ::Google::Cloud::Error.from_error(e)
1153
+ end
1154
+
1155
+ ##
1156
+ # Lists zone resources in a lake.
1157
+ #
1158
+ # @overload list_zones(request, options = nil)
1159
+ # Pass arguments to `list_zones` via a request object, either of type
1160
+ # {::Google::Cloud::Dataplex::V1::ListZonesRequest} or an equivalent Hash.
1161
+ #
1162
+ # @param request [::Google::Cloud::Dataplex::V1::ListZonesRequest, ::Hash]
1163
+ # A request object representing the call parameters. Required. To specify no
1164
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1165
+ # @param options [::Gapic::CallOptions, ::Hash]
1166
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1167
+ #
1168
+ # @overload list_zones(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1169
+ # Pass arguments to `list_zones` via keyword arguments. Note that at
1170
+ # least one keyword argument is required. To specify no parameters, or to keep all
1171
+ # the default parameter values, pass an empty Hash as a request object (see above).
1172
+ #
1173
+ # @param parent [::String]
1174
+ # Required. The resource name of the parent lake:
1175
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
1176
+ # @param page_size [::Integer]
1177
+ # Optional. Maximum number of zones to return. The service may return fewer than this
1178
+ # value. If unspecified, at most 10 zones will be returned. The maximum
1179
+ # value is 1000; values above 1000 will be coerced to 1000.
1180
+ # @param page_token [::String]
1181
+ # Optional. Page token received from a previous `ListZones` call. Provide this to
1182
+ # retrieve the subsequent page. When paginating, all other parameters
1183
+ # provided to `ListZones` must match the call that provided the page token.
1184
+ # @param filter [::String]
1185
+ # Optional. Filter request.
1186
+ # @param order_by [::String]
1187
+ # Optional. Order by fields for the result.
1188
+ #
1189
+ # @yield [response, operation] Access the result along with the RPC operation
1190
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>]
1191
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1192
+ #
1193
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Zone>]
1194
+ #
1195
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1196
+ #
1197
+ # @example Basic example
1198
+ # require "google/cloud/dataplex/v1"
1199
+ #
1200
+ # # Create a client object. The client can be reused for multiple calls.
1201
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1202
+ #
1203
+ # # Create a request. To set request fields, pass in keyword arguments.
1204
+ # request = Google::Cloud::Dataplex::V1::ListZonesRequest.new
1205
+ #
1206
+ # # Call the list_zones method.
1207
+ # result = client.list_zones request
1208
+ #
1209
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1210
+ # # iterate over all elements by calling #each, and the enumerable
1211
+ # # will lazily make API calls to fetch subsequent pages. Other
1212
+ # # methods are also available for managing paging directly.
1213
+ # result.each do |response|
1214
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Zone.
1215
+ # p response
1216
+ # end
1217
+ #
1218
+ def list_zones request, options = nil
1219
+ raise ::ArgumentError, "request must be provided" if request.nil?
1220
+
1221
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZonesRequest
1222
+
1223
+ # Converts hash and nil to an options object
1224
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1225
+
1226
+ # Customize the options with defaults
1227
+ metadata = @config.rpcs.list_zones.metadata.to_h
1228
+
1229
+ # Set x-goog-api-client and x-goog-user-project headers
1230
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1231
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1232
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1233
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1234
+
1235
+ header_params = {}
1236
+ if request.parent
1237
+ header_params["parent"] = request.parent
1238
+ end
1239
+
1240
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1241
+ metadata[:"x-goog-request-params"] ||= request_params_header
1242
+
1243
+ options.apply_defaults timeout: @config.rpcs.list_zones.timeout,
1244
+ metadata: metadata,
1245
+ retry_policy: @config.rpcs.list_zones.retry_policy
1246
+
1247
+ options.apply_defaults timeout: @config.timeout,
1248
+ metadata: @config.metadata,
1249
+ retry_policy: @config.retry_policy
1250
+
1251
+ @dataplex_service_stub.call_rpc :list_zones, request, options: options do |response, operation|
1252
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zones, request, response, operation, options
1253
+ yield response, operation if block_given?
1254
+ return response
1255
+ end
1256
+ rescue ::GRPC::BadStatus => e
1257
+ raise ::Google::Cloud::Error.from_error(e)
1258
+ end
1259
+
1260
+ ##
1261
+ # Retrieves a zone resource.
1262
+ #
1263
+ # @overload get_zone(request, options = nil)
1264
+ # Pass arguments to `get_zone` via a request object, either of type
1265
+ # {::Google::Cloud::Dataplex::V1::GetZoneRequest} or an equivalent Hash.
1266
+ #
1267
+ # @param request [::Google::Cloud::Dataplex::V1::GetZoneRequest, ::Hash]
1268
+ # A request object representing the call parameters. Required. To specify no
1269
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1270
+ # @param options [::Gapic::CallOptions, ::Hash]
1271
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1272
+ #
1273
+ # @overload get_zone(name: nil)
1274
+ # Pass arguments to `get_zone` via keyword arguments. Note that at
1275
+ # least one keyword argument is required. To specify no parameters, or to keep all
1276
+ # the default parameter values, pass an empty Hash as a request object (see above).
1277
+ #
1278
+ # @param name [::String]
1279
+ # Required. The resource name of the zone:
1280
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
1281
+ #
1282
+ # @yield [response, operation] Access the result along with the RPC operation
1283
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Zone]
1284
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1285
+ #
1286
+ # @return [::Google::Cloud::Dataplex::V1::Zone]
1287
+ #
1288
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1289
+ #
1290
+ # @example Basic example
1291
+ # require "google/cloud/dataplex/v1"
1292
+ #
1293
+ # # Create a client object. The client can be reused for multiple calls.
1294
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1295
+ #
1296
+ # # Create a request. To set request fields, pass in keyword arguments.
1297
+ # request = Google::Cloud::Dataplex::V1::GetZoneRequest.new
1298
+ #
1299
+ # # Call the get_zone method.
1300
+ # result = client.get_zone request
1301
+ #
1302
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Zone.
1303
+ # p result
1304
+ #
1305
+ def get_zone request, options = nil
1306
+ raise ::ArgumentError, "request must be provided" if request.nil?
1307
+
1308
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetZoneRequest
1309
+
1310
+ # Converts hash and nil to an options object
1311
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1312
+
1313
+ # Customize the options with defaults
1314
+ metadata = @config.rpcs.get_zone.metadata.to_h
1315
+
1316
+ # Set x-goog-api-client and x-goog-user-project headers
1317
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1318
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1319
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1320
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1321
+
1322
+ header_params = {}
1323
+ if request.name
1324
+ header_params["name"] = request.name
1325
+ end
1326
+
1327
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1328
+ metadata[:"x-goog-request-params"] ||= request_params_header
1329
+
1330
+ options.apply_defaults timeout: @config.rpcs.get_zone.timeout,
1331
+ metadata: metadata,
1332
+ retry_policy: @config.rpcs.get_zone.retry_policy
1333
+
1334
+ options.apply_defaults timeout: @config.timeout,
1335
+ metadata: @config.metadata,
1336
+ retry_policy: @config.retry_policy
1337
+
1338
+ @dataplex_service_stub.call_rpc :get_zone, request, options: options do |response, operation|
1339
+ yield response, operation if block_given?
1340
+ return response
1341
+ end
1342
+ rescue ::GRPC::BadStatus => e
1343
+ raise ::Google::Cloud::Error.from_error(e)
1344
+ end
1345
+
1346
+ ##
1347
+ # Lists action resources in a zone.
1348
+ #
1349
+ # @overload list_zone_actions(request, options = nil)
1350
+ # Pass arguments to `list_zone_actions` via a request object, either of type
1351
+ # {::Google::Cloud::Dataplex::V1::ListZoneActionsRequest} or an equivalent Hash.
1352
+ #
1353
+ # @param request [::Google::Cloud::Dataplex::V1::ListZoneActionsRequest, ::Hash]
1354
+ # A request object representing the call parameters. Required. To specify no
1355
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1356
+ # @param options [::Gapic::CallOptions, ::Hash]
1357
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1358
+ #
1359
+ # @overload list_zone_actions(parent: nil, page_size: nil, page_token: nil)
1360
+ # Pass arguments to `list_zone_actions` via keyword arguments. Note that at
1361
+ # least one keyword argument is required. To specify no parameters, or to keep all
1362
+ # the default parameter values, pass an empty Hash as a request object (see above).
1363
+ #
1364
+ # @param parent [::String]
1365
+ # Required. The resource name of the parent zone:
1366
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
1367
+ # @param page_size [::Integer]
1368
+ # Optional. Maximum number of actions to return. The service may return fewer than this
1369
+ # value. If unspecified, at most 10 actions will be returned. The maximum
1370
+ # value is 1000; values above 1000 will be coerced to 1000.
1371
+ # @param page_token [::String]
1372
+ # Optional. Page token received from a previous `ListZoneActions` call. Provide this to
1373
+ # retrieve the subsequent page. When paginating, all other parameters
1374
+ # provided to `ListZoneActions` must match the call that provided the page
1375
+ # token.
1376
+ #
1377
+ # @yield [response, operation] Access the result along with the RPC operation
1378
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
1379
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1380
+ #
1381
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
1382
+ #
1383
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1384
+ #
1385
+ # @example Basic example
1386
+ # require "google/cloud/dataplex/v1"
1387
+ #
1388
+ # # Create a client object. The client can be reused for multiple calls.
1389
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1390
+ #
1391
+ # # Create a request. To set request fields, pass in keyword arguments.
1392
+ # request = Google::Cloud::Dataplex::V1::ListZoneActionsRequest.new
1393
+ #
1394
+ # # Call the list_zone_actions method.
1395
+ # result = client.list_zone_actions request
1396
+ #
1397
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1398
+ # # iterate over all elements by calling #each, and the enumerable
1399
+ # # will lazily make API calls to fetch subsequent pages. Other
1400
+ # # methods are also available for managing paging directly.
1401
+ # result.each do |response|
1402
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
1403
+ # p response
1404
+ # end
1405
+ #
1406
+ def list_zone_actions request, options = nil
1407
+ raise ::ArgumentError, "request must be provided" if request.nil?
1408
+
1409
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListZoneActionsRequest
1410
+
1411
+ # Converts hash and nil to an options object
1412
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1413
+
1414
+ # Customize the options with defaults
1415
+ metadata = @config.rpcs.list_zone_actions.metadata.to_h
1416
+
1417
+ # Set x-goog-api-client and x-goog-user-project headers
1418
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1419
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1420
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1421
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1422
+
1423
+ header_params = {}
1424
+ if request.parent
1425
+ header_params["parent"] = request.parent
1426
+ end
1427
+
1428
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1429
+ metadata[:"x-goog-request-params"] ||= request_params_header
1430
+
1431
+ options.apply_defaults timeout: @config.rpcs.list_zone_actions.timeout,
1432
+ metadata: metadata,
1433
+ retry_policy: @config.rpcs.list_zone_actions.retry_policy
1434
+
1435
+ options.apply_defaults timeout: @config.timeout,
1436
+ metadata: @config.metadata,
1437
+ retry_policy: @config.retry_policy
1438
+
1439
+ @dataplex_service_stub.call_rpc :list_zone_actions, request, options: options do |response, operation|
1440
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_zone_actions, request, response, operation, options
1441
+ yield response, operation if block_given?
1442
+ return response
1443
+ end
1444
+ rescue ::GRPC::BadStatus => e
1445
+ raise ::Google::Cloud::Error.from_error(e)
1446
+ end
1447
+
1448
+ ##
1449
+ # Creates an asset resource.
1450
+ #
1451
+ # @overload create_asset(request, options = nil)
1452
+ # Pass arguments to `create_asset` via a request object, either of type
1453
+ # {::Google::Cloud::Dataplex::V1::CreateAssetRequest} or an equivalent Hash.
1454
+ #
1455
+ # @param request [::Google::Cloud::Dataplex::V1::CreateAssetRequest, ::Hash]
1456
+ # A request object representing the call parameters. Required. To specify no
1457
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1458
+ # @param options [::Gapic::CallOptions, ::Hash]
1459
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1460
+ #
1461
+ # @overload create_asset(parent: nil, asset_id: nil, asset: nil, validate_only: nil)
1462
+ # Pass arguments to `create_asset` via keyword arguments. Note that at
1463
+ # least one keyword argument is required. To specify no parameters, or to keep all
1464
+ # the default parameter values, pass an empty Hash as a request object (see above).
1465
+ #
1466
+ # @param parent [::String]
1467
+ # Required. The resource name of the parent zone:
1468
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`
1469
+ # @param asset_id [::String]
1470
+ # Required. Asset identifier.
1471
+ # This ID will be used to generate names such as table names when publishing
1472
+ # metadata to Hive Metastore and BigQuery.
1473
+ # * Must contain only lowercase letters, numbers and hyphens.
1474
+ # * Must start with a letter.
1475
+ # * Must end with a number or a letter.
1476
+ # * Must be between 1-63 characters.
1477
+ # * Must be unique within the zone.
1478
+ # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash]
1479
+ # Required. Asset resource.
1480
+ # @param validate_only [::Boolean]
1481
+ # Optional. Only validate the request, but do not perform mutations.
1482
+ # The default is false.
1483
+ #
1484
+ # @yield [response, operation] Access the result along with the RPC operation
1485
+ # @yieldparam response [::Gapic::Operation]
1486
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1487
+ #
1488
+ # @return [::Gapic::Operation]
1489
+ #
1490
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1491
+ #
1492
+ # @example Basic example
1493
+ # require "google/cloud/dataplex/v1"
1494
+ #
1495
+ # # Create a client object. The client can be reused for multiple calls.
1496
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1497
+ #
1498
+ # # Create a request. To set request fields, pass in keyword arguments.
1499
+ # request = Google::Cloud::Dataplex::V1::CreateAssetRequest.new
1500
+ #
1501
+ # # Call the create_asset method.
1502
+ # result = client.create_asset request
1503
+ #
1504
+ # # The returned object is of type Gapic::Operation. You can use this
1505
+ # # object to check the status of an operation, cancel it, or wait
1506
+ # # for results. Here is how to block until completion:
1507
+ # result.wait_until_done! timeout: 60
1508
+ # if result.response?
1509
+ # p result.response
1510
+ # else
1511
+ # puts "Error!"
1512
+ # end
1513
+ #
1514
+ def create_asset request, options = nil
1515
+ raise ::ArgumentError, "request must be provided" if request.nil?
1516
+
1517
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateAssetRequest
1518
+
1519
+ # Converts hash and nil to an options object
1520
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1521
+
1522
+ # Customize the options with defaults
1523
+ metadata = @config.rpcs.create_asset.metadata.to_h
1524
+
1525
+ # Set x-goog-api-client and x-goog-user-project headers
1526
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1527
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1528
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1529
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1530
+
1531
+ header_params = {}
1532
+ if request.parent
1533
+ header_params["parent"] = request.parent
1534
+ end
1535
+
1536
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1537
+ metadata[:"x-goog-request-params"] ||= request_params_header
1538
+
1539
+ options.apply_defaults timeout: @config.rpcs.create_asset.timeout,
1540
+ metadata: metadata,
1541
+ retry_policy: @config.rpcs.create_asset.retry_policy
1542
+
1543
+ options.apply_defaults timeout: @config.timeout,
1544
+ metadata: @config.metadata,
1545
+ retry_policy: @config.retry_policy
1546
+
1547
+ @dataplex_service_stub.call_rpc :create_asset, request, options: options do |response, operation|
1548
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1549
+ yield response, operation if block_given?
1550
+ return response
1551
+ end
1552
+ rescue ::GRPC::BadStatus => e
1553
+ raise ::Google::Cloud::Error.from_error(e)
1554
+ end
1555
+
1556
+ ##
1557
+ # Updates an asset resource.
1558
+ #
1559
+ # @overload update_asset(request, options = nil)
1560
+ # Pass arguments to `update_asset` via a request object, either of type
1561
+ # {::Google::Cloud::Dataplex::V1::UpdateAssetRequest} or an equivalent Hash.
1562
+ #
1563
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateAssetRequest, ::Hash]
1564
+ # A request object representing the call parameters. Required. To specify no
1565
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1566
+ # @param options [::Gapic::CallOptions, ::Hash]
1567
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1568
+ #
1569
+ # @overload update_asset(update_mask: nil, asset: nil, validate_only: nil)
1570
+ # Pass arguments to `update_asset` via keyword arguments. Note that at
1571
+ # least one keyword argument is required. To specify no parameters, or to keep all
1572
+ # the default parameter values, pass an empty Hash as a request object (see above).
1573
+ #
1574
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1575
+ # Required. Mask of fields to update.
1576
+ # @param asset [::Google::Cloud::Dataplex::V1::Asset, ::Hash]
1577
+ # Required. Update description.
1578
+ # Only fields specified in `update_mask` are updated.
1579
+ # @param validate_only [::Boolean]
1580
+ # Optional. Only validate the request, but do not perform mutations.
1581
+ # The default is false.
1582
+ #
1583
+ # @yield [response, operation] Access the result along with the RPC operation
1584
+ # @yieldparam response [::Gapic::Operation]
1585
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1586
+ #
1587
+ # @return [::Gapic::Operation]
1588
+ #
1589
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1590
+ #
1591
+ # @example Basic example
1592
+ # require "google/cloud/dataplex/v1"
1593
+ #
1594
+ # # Create a client object. The client can be reused for multiple calls.
1595
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1596
+ #
1597
+ # # Create a request. To set request fields, pass in keyword arguments.
1598
+ # request = Google::Cloud::Dataplex::V1::UpdateAssetRequest.new
1599
+ #
1600
+ # # Call the update_asset method.
1601
+ # result = client.update_asset request
1602
+ #
1603
+ # # The returned object is of type Gapic::Operation. You can use this
1604
+ # # object to check the status of an operation, cancel it, or wait
1605
+ # # for results. Here is how to block until completion:
1606
+ # result.wait_until_done! timeout: 60
1607
+ # if result.response?
1608
+ # p result.response
1609
+ # else
1610
+ # puts "Error!"
1611
+ # end
1612
+ #
1613
+ def update_asset request, options = nil
1614
+ raise ::ArgumentError, "request must be provided" if request.nil?
1615
+
1616
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateAssetRequest
1617
+
1618
+ # Converts hash and nil to an options object
1619
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1620
+
1621
+ # Customize the options with defaults
1622
+ metadata = @config.rpcs.update_asset.metadata.to_h
1623
+
1624
+ # Set x-goog-api-client and x-goog-user-project headers
1625
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1626
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1627
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1628
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1629
+
1630
+ header_params = {}
1631
+ if request.asset&.name
1632
+ header_params["asset.name"] = request.asset.name
1633
+ end
1634
+
1635
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1636
+ metadata[:"x-goog-request-params"] ||= request_params_header
1637
+
1638
+ options.apply_defaults timeout: @config.rpcs.update_asset.timeout,
1639
+ metadata: metadata,
1640
+ retry_policy: @config.rpcs.update_asset.retry_policy
1641
+
1642
+ options.apply_defaults timeout: @config.timeout,
1643
+ metadata: @config.metadata,
1644
+ retry_policy: @config.retry_policy
1645
+
1646
+ @dataplex_service_stub.call_rpc :update_asset, request, options: options do |response, operation|
1647
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1648
+ yield response, operation if block_given?
1649
+ return response
1650
+ end
1651
+ rescue ::GRPC::BadStatus => e
1652
+ raise ::Google::Cloud::Error.from_error(e)
1653
+ end
1654
+
1655
+ ##
1656
+ # Deletes an asset resource. The referenced storage resource is detached
1657
+ # (default) or deleted based on the associated Lifecycle policy.
1658
+ #
1659
+ # @overload delete_asset(request, options = nil)
1660
+ # Pass arguments to `delete_asset` via a request object, either of type
1661
+ # {::Google::Cloud::Dataplex::V1::DeleteAssetRequest} or an equivalent Hash.
1662
+ #
1663
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteAssetRequest, ::Hash]
1664
+ # A request object representing the call parameters. Required. To specify no
1665
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1666
+ # @param options [::Gapic::CallOptions, ::Hash]
1667
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1668
+ #
1669
+ # @overload delete_asset(name: nil)
1670
+ # Pass arguments to `delete_asset` via keyword arguments. Note that at
1671
+ # least one keyword argument is required. To specify no parameters, or to keep all
1672
+ # the default parameter values, pass an empty Hash as a request object (see above).
1673
+ #
1674
+ # @param name [::String]
1675
+ # Required. The resource name of the asset:
1676
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
1677
+ #
1678
+ # @yield [response, operation] Access the result along with the RPC operation
1679
+ # @yieldparam response [::Gapic::Operation]
1680
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1681
+ #
1682
+ # @return [::Gapic::Operation]
1683
+ #
1684
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1685
+ #
1686
+ # @example Basic example
1687
+ # require "google/cloud/dataplex/v1"
1688
+ #
1689
+ # # Create a client object. The client can be reused for multiple calls.
1690
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1691
+ #
1692
+ # # Create a request. To set request fields, pass in keyword arguments.
1693
+ # request = Google::Cloud::Dataplex::V1::DeleteAssetRequest.new
1694
+ #
1695
+ # # Call the delete_asset method.
1696
+ # result = client.delete_asset request
1697
+ #
1698
+ # # The returned object is of type Gapic::Operation. You can use this
1699
+ # # object to check the status of an operation, cancel it, or wait
1700
+ # # for results. Here is how to block until completion:
1701
+ # result.wait_until_done! timeout: 60
1702
+ # if result.response?
1703
+ # p result.response
1704
+ # else
1705
+ # puts "Error!"
1706
+ # end
1707
+ #
1708
+ def delete_asset request, options = nil
1709
+ raise ::ArgumentError, "request must be provided" if request.nil?
1710
+
1711
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteAssetRequest
1712
+
1713
+ # Converts hash and nil to an options object
1714
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1715
+
1716
+ # Customize the options with defaults
1717
+ metadata = @config.rpcs.delete_asset.metadata.to_h
1718
+
1719
+ # Set x-goog-api-client and x-goog-user-project headers
1720
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1721
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1722
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1723
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1724
+
1725
+ header_params = {}
1726
+ if request.name
1727
+ header_params["name"] = request.name
1728
+ end
1729
+
1730
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1731
+ metadata[:"x-goog-request-params"] ||= request_params_header
1732
+
1733
+ options.apply_defaults timeout: @config.rpcs.delete_asset.timeout,
1734
+ metadata: metadata,
1735
+ retry_policy: @config.rpcs.delete_asset.retry_policy
1736
+
1737
+ options.apply_defaults timeout: @config.timeout,
1738
+ metadata: @config.metadata,
1739
+ retry_policy: @config.retry_policy
1740
+
1741
+ @dataplex_service_stub.call_rpc :delete_asset, request, options: options do |response, operation|
1742
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1743
+ yield response, operation if block_given?
1744
+ return response
1745
+ end
1746
+ rescue ::GRPC::BadStatus => e
1747
+ raise ::Google::Cloud::Error.from_error(e)
1748
+ end
1749
+
1750
+ ##
1751
+ # Lists asset resources in a zone.
1752
+ #
1753
+ # @overload list_assets(request, options = nil)
1754
+ # Pass arguments to `list_assets` via a request object, either of type
1755
+ # {::Google::Cloud::Dataplex::V1::ListAssetsRequest} or an equivalent Hash.
1756
+ #
1757
+ # @param request [::Google::Cloud::Dataplex::V1::ListAssetsRequest, ::Hash]
1758
+ # A request object representing the call parameters. Required. To specify no
1759
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1760
+ # @param options [::Gapic::CallOptions, ::Hash]
1761
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1762
+ #
1763
+ # @overload list_assets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1764
+ # Pass arguments to `list_assets` via keyword arguments. Note that at
1765
+ # least one keyword argument is required. To specify no parameters, or to keep all
1766
+ # the default parameter values, pass an empty Hash as a request object (see above).
1767
+ #
1768
+ # @param parent [::String]
1769
+ # Required. The resource name of the parent zone:
1770
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
1771
+ # @param page_size [::Integer]
1772
+ # Optional. Maximum number of asset to return. The service may return fewer than
1773
+ # this value. If unspecified, at most 10 assets will be returned. The
1774
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
1775
+ # @param page_token [::String]
1776
+ # Optional. Page token received from a previous `ListAssets` call. Provide this to
1777
+ # retrieve the subsequent page. When paginating, all other parameters
1778
+ # provided to `ListAssets` must match the call that provided the page
1779
+ # token.
1780
+ # @param filter [::String]
1781
+ # Optional. Filter request.
1782
+ # @param order_by [::String]
1783
+ # Optional. Order by fields for the result.
1784
+ #
1785
+ # @yield [response, operation] Access the result along with the RPC operation
1786
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>]
1787
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1788
+ #
1789
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Asset>]
1790
+ #
1791
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1792
+ #
1793
+ # @example Basic example
1794
+ # require "google/cloud/dataplex/v1"
1795
+ #
1796
+ # # Create a client object. The client can be reused for multiple calls.
1797
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1798
+ #
1799
+ # # Create a request. To set request fields, pass in keyword arguments.
1800
+ # request = Google::Cloud::Dataplex::V1::ListAssetsRequest.new
1801
+ #
1802
+ # # Call the list_assets method.
1803
+ # result = client.list_assets request
1804
+ #
1805
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1806
+ # # iterate over all elements by calling #each, and the enumerable
1807
+ # # will lazily make API calls to fetch subsequent pages. Other
1808
+ # # methods are also available for managing paging directly.
1809
+ # result.each do |response|
1810
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Asset.
1811
+ # p response
1812
+ # end
1813
+ #
1814
+ def list_assets request, options = nil
1815
+ raise ::ArgumentError, "request must be provided" if request.nil?
1816
+
1817
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetsRequest
1818
+
1819
+ # Converts hash and nil to an options object
1820
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1821
+
1822
+ # Customize the options with defaults
1823
+ metadata = @config.rpcs.list_assets.metadata.to_h
1824
+
1825
+ # Set x-goog-api-client and x-goog-user-project headers
1826
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1827
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1828
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1829
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1830
+
1831
+ header_params = {}
1832
+ if request.parent
1833
+ header_params["parent"] = request.parent
1834
+ end
1835
+
1836
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1837
+ metadata[:"x-goog-request-params"] ||= request_params_header
1838
+
1839
+ options.apply_defaults timeout: @config.rpcs.list_assets.timeout,
1840
+ metadata: metadata,
1841
+ retry_policy: @config.rpcs.list_assets.retry_policy
1842
+
1843
+ options.apply_defaults timeout: @config.timeout,
1844
+ metadata: @config.metadata,
1845
+ retry_policy: @config.retry_policy
1846
+
1847
+ @dataplex_service_stub.call_rpc :list_assets, request, options: options do |response, operation|
1848
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_assets, request, response, operation, options
1849
+ yield response, operation if block_given?
1850
+ return response
1851
+ end
1852
+ rescue ::GRPC::BadStatus => e
1853
+ raise ::Google::Cloud::Error.from_error(e)
1854
+ end
1855
+
1856
+ ##
1857
+ # Retrieves an asset resource.
1858
+ #
1859
+ # @overload get_asset(request, options = nil)
1860
+ # Pass arguments to `get_asset` via a request object, either of type
1861
+ # {::Google::Cloud::Dataplex::V1::GetAssetRequest} or an equivalent Hash.
1862
+ #
1863
+ # @param request [::Google::Cloud::Dataplex::V1::GetAssetRequest, ::Hash]
1864
+ # A request object representing the call parameters. Required. To specify no
1865
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1866
+ # @param options [::Gapic::CallOptions, ::Hash]
1867
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1868
+ #
1869
+ # @overload get_asset(name: nil)
1870
+ # Pass arguments to `get_asset` via keyword arguments. Note that at
1871
+ # least one keyword argument is required. To specify no parameters, or to keep all
1872
+ # the default parameter values, pass an empty Hash as a request object (see above).
1873
+ #
1874
+ # @param name [::String]
1875
+ # Required. The resource name of the asset:
1876
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
1877
+ #
1878
+ # @yield [response, operation] Access the result along with the RPC operation
1879
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Asset]
1880
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1881
+ #
1882
+ # @return [::Google::Cloud::Dataplex::V1::Asset]
1883
+ #
1884
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1885
+ #
1886
+ # @example Basic example
1887
+ # require "google/cloud/dataplex/v1"
1888
+ #
1889
+ # # Create a client object. The client can be reused for multiple calls.
1890
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1891
+ #
1892
+ # # Create a request. To set request fields, pass in keyword arguments.
1893
+ # request = Google::Cloud::Dataplex::V1::GetAssetRequest.new
1894
+ #
1895
+ # # Call the get_asset method.
1896
+ # result = client.get_asset request
1897
+ #
1898
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Asset.
1899
+ # p result
1900
+ #
1901
+ def get_asset request, options = nil
1902
+ raise ::ArgumentError, "request must be provided" if request.nil?
1903
+
1904
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetAssetRequest
1905
+
1906
+ # Converts hash and nil to an options object
1907
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1908
+
1909
+ # Customize the options with defaults
1910
+ metadata = @config.rpcs.get_asset.metadata.to_h
1911
+
1912
+ # Set x-goog-api-client and x-goog-user-project headers
1913
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1914
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1915
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
1916
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1917
+
1918
+ header_params = {}
1919
+ if request.name
1920
+ header_params["name"] = request.name
1921
+ end
1922
+
1923
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1924
+ metadata[:"x-goog-request-params"] ||= request_params_header
1925
+
1926
+ options.apply_defaults timeout: @config.rpcs.get_asset.timeout,
1927
+ metadata: metadata,
1928
+ retry_policy: @config.rpcs.get_asset.retry_policy
1929
+
1930
+ options.apply_defaults timeout: @config.timeout,
1931
+ metadata: @config.metadata,
1932
+ retry_policy: @config.retry_policy
1933
+
1934
+ @dataplex_service_stub.call_rpc :get_asset, request, options: options do |response, operation|
1935
+ yield response, operation if block_given?
1936
+ return response
1937
+ end
1938
+ rescue ::GRPC::BadStatus => e
1939
+ raise ::Google::Cloud::Error.from_error(e)
1940
+ end
1941
+
1942
+ ##
1943
+ # Lists action resources in an asset.
1944
+ #
1945
+ # @overload list_asset_actions(request, options = nil)
1946
+ # Pass arguments to `list_asset_actions` via a request object, either of type
1947
+ # {::Google::Cloud::Dataplex::V1::ListAssetActionsRequest} or an equivalent Hash.
1948
+ #
1949
+ # @param request [::Google::Cloud::Dataplex::V1::ListAssetActionsRequest, ::Hash]
1950
+ # A request object representing the call parameters. Required. To specify no
1951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1952
+ # @param options [::Gapic::CallOptions, ::Hash]
1953
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1954
+ #
1955
+ # @overload list_asset_actions(parent: nil, page_size: nil, page_token: nil)
1956
+ # Pass arguments to `list_asset_actions` via keyword arguments. Note that at
1957
+ # least one keyword argument is required. To specify no parameters, or to keep all
1958
+ # the default parameter values, pass an empty Hash as a request object (see above).
1959
+ #
1960
+ # @param parent [::String]
1961
+ # Required. The resource name of the parent asset:
1962
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
1963
+ # @param page_size [::Integer]
1964
+ # Optional. Maximum number of actions to return. The service may return fewer than this
1965
+ # value. If unspecified, at most 10 actions will be returned. The maximum
1966
+ # value is 1000; values above 1000 will be coerced to 1000.
1967
+ # @param page_token [::String]
1968
+ # Optional. Page token received from a previous `ListAssetActions` call. Provide this
1969
+ # to retrieve the subsequent page. When paginating, all other parameters
1970
+ # provided to `ListAssetActions` must match the call that provided the page
1971
+ # token.
1972
+ #
1973
+ # @yield [response, operation] Access the result along with the RPC operation
1974
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
1975
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1976
+ #
1977
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Action>]
1978
+ #
1979
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1980
+ #
1981
+ # @example Basic example
1982
+ # require "google/cloud/dataplex/v1"
1983
+ #
1984
+ # # Create a client object. The client can be reused for multiple calls.
1985
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
1986
+ #
1987
+ # # Create a request. To set request fields, pass in keyword arguments.
1988
+ # request = Google::Cloud::Dataplex::V1::ListAssetActionsRequest.new
1989
+ #
1990
+ # # Call the list_asset_actions method.
1991
+ # result = client.list_asset_actions request
1992
+ #
1993
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1994
+ # # iterate over all elements by calling #each, and the enumerable
1995
+ # # will lazily make API calls to fetch subsequent pages. Other
1996
+ # # methods are also available for managing paging directly.
1997
+ # result.each do |response|
1998
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Action.
1999
+ # p response
2000
+ # end
2001
+ #
2002
+ def list_asset_actions request, options = nil
2003
+ raise ::ArgumentError, "request must be provided" if request.nil?
2004
+
2005
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListAssetActionsRequest
2006
+
2007
+ # Converts hash and nil to an options object
2008
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2009
+
2010
+ # Customize the options with defaults
2011
+ metadata = @config.rpcs.list_asset_actions.metadata.to_h
2012
+
2013
+ # Set x-goog-api-client and x-goog-user-project headers
2014
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2015
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2016
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2017
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2018
+
2019
+ header_params = {}
2020
+ if request.parent
2021
+ header_params["parent"] = request.parent
2022
+ end
2023
+
2024
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2025
+ metadata[:"x-goog-request-params"] ||= request_params_header
2026
+
2027
+ options.apply_defaults timeout: @config.rpcs.list_asset_actions.timeout,
2028
+ metadata: metadata,
2029
+ retry_policy: @config.rpcs.list_asset_actions.retry_policy
2030
+
2031
+ options.apply_defaults timeout: @config.timeout,
2032
+ metadata: @config.metadata,
2033
+ retry_policy: @config.retry_policy
2034
+
2035
+ @dataplex_service_stub.call_rpc :list_asset_actions, request, options: options do |response, operation|
2036
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_asset_actions, request, response, operation, options
2037
+ yield response, operation if block_given?
2038
+ return response
2039
+ end
2040
+ rescue ::GRPC::BadStatus => e
2041
+ raise ::Google::Cloud::Error.from_error(e)
2042
+ end
2043
+
2044
+ ##
2045
+ # Creates a task resource within a lake.
2046
+ #
2047
+ # @overload create_task(request, options = nil)
2048
+ # Pass arguments to `create_task` via a request object, either of type
2049
+ # {::Google::Cloud::Dataplex::V1::CreateTaskRequest} or an equivalent Hash.
2050
+ #
2051
+ # @param request [::Google::Cloud::Dataplex::V1::CreateTaskRequest, ::Hash]
2052
+ # A request object representing the call parameters. Required. To specify no
2053
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2054
+ # @param options [::Gapic::CallOptions, ::Hash]
2055
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2056
+ #
2057
+ # @overload create_task(parent: nil, task_id: nil, task: nil, validate_only: nil)
2058
+ # Pass arguments to `create_task` via keyword arguments. Note that at
2059
+ # least one keyword argument is required. To specify no parameters, or to keep all
2060
+ # the default parameter values, pass an empty Hash as a request object (see above).
2061
+ #
2062
+ # @param parent [::String]
2063
+ # Required. The resource name of the parent lake:
2064
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
2065
+ # @param task_id [::String]
2066
+ # Required. Task identifier.
2067
+ # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash]
2068
+ # Required. Task resource.
2069
+ # @param validate_only [::Boolean]
2070
+ # Optional. Only validate the request, but do not perform mutations.
2071
+ # The default is false.
2072
+ #
2073
+ # @yield [response, operation] Access the result along with the RPC operation
2074
+ # @yieldparam response [::Gapic::Operation]
2075
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2076
+ #
2077
+ # @return [::Gapic::Operation]
2078
+ #
2079
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2080
+ #
2081
+ # @example Basic example
2082
+ # require "google/cloud/dataplex/v1"
2083
+ #
2084
+ # # Create a client object. The client can be reused for multiple calls.
2085
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2086
+ #
2087
+ # # Create a request. To set request fields, pass in keyword arguments.
2088
+ # request = Google::Cloud::Dataplex::V1::CreateTaskRequest.new
2089
+ #
2090
+ # # Call the create_task method.
2091
+ # result = client.create_task request
2092
+ #
2093
+ # # The returned object is of type Gapic::Operation. You can use this
2094
+ # # object to check the status of an operation, cancel it, or wait
2095
+ # # for results. Here is how to block until completion:
2096
+ # result.wait_until_done! timeout: 60
2097
+ # if result.response?
2098
+ # p result.response
2099
+ # else
2100
+ # puts "Error!"
2101
+ # end
2102
+ #
2103
+ def create_task request, options = nil
2104
+ raise ::ArgumentError, "request must be provided" if request.nil?
2105
+
2106
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateTaskRequest
2107
+
2108
+ # Converts hash and nil to an options object
2109
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2110
+
2111
+ # Customize the options with defaults
2112
+ metadata = @config.rpcs.create_task.metadata.to_h
2113
+
2114
+ # Set x-goog-api-client and x-goog-user-project headers
2115
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2116
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2117
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2118
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2119
+
2120
+ header_params = {}
2121
+ if request.parent
2122
+ header_params["parent"] = request.parent
2123
+ end
2124
+
2125
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2126
+ metadata[:"x-goog-request-params"] ||= request_params_header
2127
+
2128
+ options.apply_defaults timeout: @config.rpcs.create_task.timeout,
2129
+ metadata: metadata,
2130
+ retry_policy: @config.rpcs.create_task.retry_policy
2131
+
2132
+ options.apply_defaults timeout: @config.timeout,
2133
+ metadata: @config.metadata,
2134
+ retry_policy: @config.retry_policy
2135
+
2136
+ @dataplex_service_stub.call_rpc :create_task, request, options: options do |response, operation|
2137
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2138
+ yield response, operation if block_given?
2139
+ return response
2140
+ end
2141
+ rescue ::GRPC::BadStatus => e
2142
+ raise ::Google::Cloud::Error.from_error(e)
2143
+ end
2144
+
2145
+ ##
2146
+ # Update the task resource.
2147
+ #
2148
+ # @overload update_task(request, options = nil)
2149
+ # Pass arguments to `update_task` via a request object, either of type
2150
+ # {::Google::Cloud::Dataplex::V1::UpdateTaskRequest} or an equivalent Hash.
2151
+ #
2152
+ # @param request [::Google::Cloud::Dataplex::V1::UpdateTaskRequest, ::Hash]
2153
+ # A request object representing the call parameters. Required. To specify no
2154
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2155
+ # @param options [::Gapic::CallOptions, ::Hash]
2156
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2157
+ #
2158
+ # @overload update_task(update_mask: nil, task: nil, validate_only: nil)
2159
+ # Pass arguments to `update_task` via keyword arguments. Note that at
2160
+ # least one keyword argument is required. To specify no parameters, or to keep all
2161
+ # the default parameter values, pass an empty Hash as a request object (see above).
2162
+ #
2163
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2164
+ # Required. Mask of fields to update.
2165
+ # @param task [::Google::Cloud::Dataplex::V1::Task, ::Hash]
2166
+ # Required. Update description.
2167
+ # Only fields specified in `update_mask` are updated.
2168
+ # @param validate_only [::Boolean]
2169
+ # Optional. Only validate the request, but do not perform mutations.
2170
+ # The default is false.
2171
+ #
2172
+ # @yield [response, operation] Access the result along with the RPC operation
2173
+ # @yieldparam response [::Gapic::Operation]
2174
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2175
+ #
2176
+ # @return [::Gapic::Operation]
2177
+ #
2178
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2179
+ #
2180
+ # @example Basic example
2181
+ # require "google/cloud/dataplex/v1"
2182
+ #
2183
+ # # Create a client object. The client can be reused for multiple calls.
2184
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2185
+ #
2186
+ # # Create a request. To set request fields, pass in keyword arguments.
2187
+ # request = Google::Cloud::Dataplex::V1::UpdateTaskRequest.new
2188
+ #
2189
+ # # Call the update_task method.
2190
+ # result = client.update_task request
2191
+ #
2192
+ # # The returned object is of type Gapic::Operation. You can use this
2193
+ # # object to check the status of an operation, cancel it, or wait
2194
+ # # for results. Here is how to block until completion:
2195
+ # result.wait_until_done! timeout: 60
2196
+ # if result.response?
2197
+ # p result.response
2198
+ # else
2199
+ # puts "Error!"
2200
+ # end
2201
+ #
2202
+ def update_task request, options = nil
2203
+ raise ::ArgumentError, "request must be provided" if request.nil?
2204
+
2205
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateTaskRequest
2206
+
2207
+ # Converts hash and nil to an options object
2208
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2209
+
2210
+ # Customize the options with defaults
2211
+ metadata = @config.rpcs.update_task.metadata.to_h
2212
+
2213
+ # Set x-goog-api-client and x-goog-user-project headers
2214
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2215
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2216
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2217
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2218
+
2219
+ header_params = {}
2220
+ if request.task&.name
2221
+ header_params["task.name"] = request.task.name
2222
+ end
2223
+
2224
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2225
+ metadata[:"x-goog-request-params"] ||= request_params_header
2226
+
2227
+ options.apply_defaults timeout: @config.rpcs.update_task.timeout,
2228
+ metadata: metadata,
2229
+ retry_policy: @config.rpcs.update_task.retry_policy
2230
+
2231
+ options.apply_defaults timeout: @config.timeout,
2232
+ metadata: @config.metadata,
2233
+ retry_policy: @config.retry_policy
2234
+
2235
+ @dataplex_service_stub.call_rpc :update_task, request, options: options do |response, operation|
2236
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2237
+ yield response, operation if block_given?
2238
+ return response
2239
+ end
2240
+ rescue ::GRPC::BadStatus => e
2241
+ raise ::Google::Cloud::Error.from_error(e)
2242
+ end
2243
+
2244
+ ##
2245
+ # Delete the task resource.
2246
+ #
2247
+ # @overload delete_task(request, options = nil)
2248
+ # Pass arguments to `delete_task` via a request object, either of type
2249
+ # {::Google::Cloud::Dataplex::V1::DeleteTaskRequest} or an equivalent Hash.
2250
+ #
2251
+ # @param request [::Google::Cloud::Dataplex::V1::DeleteTaskRequest, ::Hash]
2252
+ # A request object representing the call parameters. Required. To specify no
2253
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2254
+ # @param options [::Gapic::CallOptions, ::Hash]
2255
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2256
+ #
2257
+ # @overload delete_task(name: nil)
2258
+ # Pass arguments to `delete_task` via keyword arguments. Note that at
2259
+ # least one keyword argument is required. To specify no parameters, or to keep all
2260
+ # the default parameter values, pass an empty Hash as a request object (see above).
2261
+ #
2262
+ # @param name [::String]
2263
+ # Required. The resource name of the task:
2264
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.
2265
+ #
2266
+ # @yield [response, operation] Access the result along with the RPC operation
2267
+ # @yieldparam response [::Gapic::Operation]
2268
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2269
+ #
2270
+ # @return [::Gapic::Operation]
2271
+ #
2272
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2273
+ #
2274
+ # @example Basic example
2275
+ # require "google/cloud/dataplex/v1"
2276
+ #
2277
+ # # Create a client object. The client can be reused for multiple calls.
2278
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2279
+ #
2280
+ # # Create a request. To set request fields, pass in keyword arguments.
2281
+ # request = Google::Cloud::Dataplex::V1::DeleteTaskRequest.new
2282
+ #
2283
+ # # Call the delete_task method.
2284
+ # result = client.delete_task request
2285
+ #
2286
+ # # The returned object is of type Gapic::Operation. You can use this
2287
+ # # object to check the status of an operation, cancel it, or wait
2288
+ # # for results. Here is how to block until completion:
2289
+ # result.wait_until_done! timeout: 60
2290
+ # if result.response?
2291
+ # p result.response
2292
+ # else
2293
+ # puts "Error!"
2294
+ # end
2295
+ #
2296
+ def delete_task request, options = nil
2297
+ raise ::ArgumentError, "request must be provided" if request.nil?
2298
+
2299
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteTaskRequest
2300
+
2301
+ # Converts hash and nil to an options object
2302
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2303
+
2304
+ # Customize the options with defaults
2305
+ metadata = @config.rpcs.delete_task.metadata.to_h
2306
+
2307
+ # Set x-goog-api-client and x-goog-user-project headers
2308
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2309
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2310
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2311
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2312
+
2313
+ header_params = {}
2314
+ if request.name
2315
+ header_params["name"] = request.name
2316
+ end
2317
+
2318
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2319
+ metadata[:"x-goog-request-params"] ||= request_params_header
2320
+
2321
+ options.apply_defaults timeout: @config.rpcs.delete_task.timeout,
2322
+ metadata: metadata,
2323
+ retry_policy: @config.rpcs.delete_task.retry_policy
2324
+
2325
+ options.apply_defaults timeout: @config.timeout,
2326
+ metadata: @config.metadata,
2327
+ retry_policy: @config.retry_policy
2328
+
2329
+ @dataplex_service_stub.call_rpc :delete_task, request, options: options do |response, operation|
2330
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2331
+ yield response, operation if block_given?
2332
+ return response
2333
+ end
2334
+ rescue ::GRPC::BadStatus => e
2335
+ raise ::Google::Cloud::Error.from_error(e)
2336
+ end
2337
+
2338
+ ##
2339
+ # Lists tasks under the given lake.
2340
+ #
2341
+ # @overload list_tasks(request, options = nil)
2342
+ # Pass arguments to `list_tasks` via a request object, either of type
2343
+ # {::Google::Cloud::Dataplex::V1::ListTasksRequest} or an equivalent Hash.
2344
+ #
2345
+ # @param request [::Google::Cloud::Dataplex::V1::ListTasksRequest, ::Hash]
2346
+ # A request object representing the call parameters. Required. To specify no
2347
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2348
+ # @param options [::Gapic::CallOptions, ::Hash]
2349
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2350
+ #
2351
+ # @overload list_tasks(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2352
+ # Pass arguments to `list_tasks` via keyword arguments. Note that at
2353
+ # least one keyword argument is required. To specify no parameters, or to keep all
2354
+ # the default parameter values, pass an empty Hash as a request object (see above).
2355
+ #
2356
+ # @param parent [::String]
2357
+ # Required. The resource name of the parent lake:
2358
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
2359
+ # @param page_size [::Integer]
2360
+ # Optional. Maximum number of tasks to return. The service may return fewer than this
2361
+ # value. If unspecified, at most 10 tasks will be returned. The maximum
2362
+ # value is 1000; values above 1000 will be coerced to 1000.
2363
+ # @param page_token [::String]
2364
+ # Optional. Page token received from a previous `ListZones` call. Provide this to
2365
+ # retrieve the subsequent page. When paginating, all other parameters
2366
+ # provided to `ListZones` must match the call that provided the page token.
2367
+ # @param filter [::String]
2368
+ # Optional. Filter request.
2369
+ # @param order_by [::String]
2370
+ # Optional. Order by fields for the result.
2371
+ #
2372
+ # @yield [response, operation] Access the result along with the RPC operation
2373
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>]
2374
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2375
+ #
2376
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Task>]
2377
+ #
2378
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2379
+ #
2380
+ # @example Basic example
2381
+ # require "google/cloud/dataplex/v1"
2382
+ #
2383
+ # # Create a client object. The client can be reused for multiple calls.
2384
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2385
+ #
2386
+ # # Create a request. To set request fields, pass in keyword arguments.
2387
+ # request = Google::Cloud::Dataplex::V1::ListTasksRequest.new
2388
+ #
2389
+ # # Call the list_tasks method.
2390
+ # result = client.list_tasks request
2391
+ #
2392
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2393
+ # # iterate over all elements by calling #each, and the enumerable
2394
+ # # will lazily make API calls to fetch subsequent pages. Other
2395
+ # # methods are also available for managing paging directly.
2396
+ # result.each do |response|
2397
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Task.
2398
+ # p response
2399
+ # end
2400
+ #
2401
+ def list_tasks request, options = nil
2402
+ raise ::ArgumentError, "request must be provided" if request.nil?
2403
+
2404
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListTasksRequest
2405
+
2406
+ # Converts hash and nil to an options object
2407
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2408
+
2409
+ # Customize the options with defaults
2410
+ metadata = @config.rpcs.list_tasks.metadata.to_h
2411
+
2412
+ # Set x-goog-api-client and x-goog-user-project headers
2413
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2414
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2415
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2416
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2417
+
2418
+ header_params = {}
2419
+ if request.parent
2420
+ header_params["parent"] = request.parent
2421
+ end
2422
+
2423
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2424
+ metadata[:"x-goog-request-params"] ||= request_params_header
2425
+
2426
+ options.apply_defaults timeout: @config.rpcs.list_tasks.timeout,
2427
+ metadata: metadata,
2428
+ retry_policy: @config.rpcs.list_tasks.retry_policy
2429
+
2430
+ options.apply_defaults timeout: @config.timeout,
2431
+ metadata: @config.metadata,
2432
+ retry_policy: @config.retry_policy
2433
+
2434
+ @dataplex_service_stub.call_rpc :list_tasks, request, options: options do |response, operation|
2435
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_tasks, request, response, operation, options
2436
+ yield response, operation if block_given?
2437
+ return response
2438
+ end
2439
+ rescue ::GRPC::BadStatus => e
2440
+ raise ::Google::Cloud::Error.from_error(e)
2441
+ end
2442
+
2443
+ ##
2444
+ # Get task resource.
2445
+ #
2446
+ # @overload get_task(request, options = nil)
2447
+ # Pass arguments to `get_task` via a request object, either of type
2448
+ # {::Google::Cloud::Dataplex::V1::GetTaskRequest} or an equivalent Hash.
2449
+ #
2450
+ # @param request [::Google::Cloud::Dataplex::V1::GetTaskRequest, ::Hash]
2451
+ # A request object representing the call parameters. Required. To specify no
2452
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2453
+ # @param options [::Gapic::CallOptions, ::Hash]
2454
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2455
+ #
2456
+ # @overload get_task(name: nil)
2457
+ # Pass arguments to `get_task` via keyword arguments. Note that at
2458
+ # least one keyword argument is required. To specify no parameters, or to keep all
2459
+ # the default parameter values, pass an empty Hash as a request object (see above).
2460
+ #
2461
+ # @param name [::String]
2462
+ # Required. The resource name of the task:
2463
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`
2464
+ #
2465
+ # @yield [response, operation] Access the result along with the RPC operation
2466
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Task]
2467
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2468
+ #
2469
+ # @return [::Google::Cloud::Dataplex::V1::Task]
2470
+ #
2471
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2472
+ #
2473
+ # @example Basic example
2474
+ # require "google/cloud/dataplex/v1"
2475
+ #
2476
+ # # Create a client object. The client can be reused for multiple calls.
2477
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2478
+ #
2479
+ # # Create a request. To set request fields, pass in keyword arguments.
2480
+ # request = Google::Cloud::Dataplex::V1::GetTaskRequest.new
2481
+ #
2482
+ # # Call the get_task method.
2483
+ # result = client.get_task request
2484
+ #
2485
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Task.
2486
+ # p result
2487
+ #
2488
+ def get_task request, options = nil
2489
+ raise ::ArgumentError, "request must be provided" if request.nil?
2490
+
2491
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetTaskRequest
2492
+
2493
+ # Converts hash and nil to an options object
2494
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2495
+
2496
+ # Customize the options with defaults
2497
+ metadata = @config.rpcs.get_task.metadata.to_h
2498
+
2499
+ # Set x-goog-api-client and x-goog-user-project headers
2500
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2501
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2502
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2503
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2504
+
2505
+ header_params = {}
2506
+ if request.name
2507
+ header_params["name"] = request.name
2508
+ end
2509
+
2510
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2511
+ metadata[:"x-goog-request-params"] ||= request_params_header
2512
+
2513
+ options.apply_defaults timeout: @config.rpcs.get_task.timeout,
2514
+ metadata: metadata,
2515
+ retry_policy: @config.rpcs.get_task.retry_policy
2516
+
2517
+ options.apply_defaults timeout: @config.timeout,
2518
+ metadata: @config.metadata,
2519
+ retry_policy: @config.retry_policy
2520
+
2521
+ @dataplex_service_stub.call_rpc :get_task, request, options: options do |response, operation|
2522
+ yield response, operation if block_given?
2523
+ return response
2524
+ end
2525
+ rescue ::GRPC::BadStatus => e
2526
+ raise ::Google::Cloud::Error.from_error(e)
2527
+ end
2528
+
2529
+ ##
2530
+ # Lists Jobs under the given task.
2531
+ #
2532
+ # @overload list_jobs(request, options = nil)
2533
+ # Pass arguments to `list_jobs` via a request object, either of type
2534
+ # {::Google::Cloud::Dataplex::V1::ListJobsRequest} or an equivalent Hash.
2535
+ #
2536
+ # @param request [::Google::Cloud::Dataplex::V1::ListJobsRequest, ::Hash]
2537
+ # A request object representing the call parameters. Required. To specify no
2538
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2539
+ # @param options [::Gapic::CallOptions, ::Hash]
2540
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2541
+ #
2542
+ # @overload list_jobs(parent: nil, page_size: nil, page_token: nil)
2543
+ # Pass arguments to `list_jobs` via keyword arguments. Note that at
2544
+ # least one keyword argument is required. To specify no parameters, or to keep all
2545
+ # the default parameter values, pass an empty Hash as a request object (see above).
2546
+ #
2547
+ # @param parent [::String]
2548
+ # Required. The resource name of the parent environment:
2549
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
2550
+ # @param page_size [::Integer]
2551
+ # Optional. Maximum number of jobs to return. The service may return fewer than
2552
+ # this value. If unspecified, at most 10 jobs will be returned. The
2553
+ # maximum value is 1000; values above 1000 will be coerced to 1000.
2554
+ # @param page_token [::String]
2555
+ # Optional. Page token received from a previous `ListJobs` call. Provide this to
2556
+ # retrieve the subsequent page. When paginating, all other parameters
2557
+ # provided to `ListJobs` must match the call that provided the page
2558
+ # token.
2559
+ #
2560
+ # @yield [response, operation] Access the result along with the RPC operation
2561
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>]
2562
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2563
+ #
2564
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Job>]
2565
+ #
2566
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2567
+ #
2568
+ # @example Basic example
2569
+ # require "google/cloud/dataplex/v1"
2570
+ #
2571
+ # # Create a client object. The client can be reused for multiple calls.
2572
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2573
+ #
2574
+ # # Create a request. To set request fields, pass in keyword arguments.
2575
+ # request = Google::Cloud::Dataplex::V1::ListJobsRequest.new
2576
+ #
2577
+ # # Call the list_jobs method.
2578
+ # result = client.list_jobs request
2579
+ #
2580
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2581
+ # # iterate over all elements by calling #each, and the enumerable
2582
+ # # will lazily make API calls to fetch subsequent pages. Other
2583
+ # # methods are also available for managing paging directly.
2584
+ # result.each do |response|
2585
+ # # Each element is of type ::Google::Cloud::Dataplex::V1::Job.
2586
+ # p response
2587
+ # end
2588
+ #
2589
+ def list_jobs request, options = nil
2590
+ raise ::ArgumentError, "request must be provided" if request.nil?
2591
+
2592
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListJobsRequest
2593
+
2594
+ # Converts hash and nil to an options object
2595
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2596
+
2597
+ # Customize the options with defaults
2598
+ metadata = @config.rpcs.list_jobs.metadata.to_h
2599
+
2600
+ # Set x-goog-api-client and x-goog-user-project headers
2601
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2602
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2603
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2604
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2605
+
2606
+ header_params = {}
2607
+ if request.parent
2608
+ header_params["parent"] = request.parent
2609
+ end
2610
+
2611
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2612
+ metadata[:"x-goog-request-params"] ||= request_params_header
2613
+
2614
+ options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
2615
+ metadata: metadata,
2616
+ retry_policy: @config.rpcs.list_jobs.retry_policy
2617
+
2618
+ options.apply_defaults timeout: @config.timeout,
2619
+ metadata: @config.metadata,
2620
+ retry_policy: @config.retry_policy
2621
+
2622
+ @dataplex_service_stub.call_rpc :list_jobs, request, options: options do |response, operation|
2623
+ response = ::Gapic::PagedEnumerable.new @dataplex_service_stub, :list_jobs, request, response, operation, options
2624
+ yield response, operation if block_given?
2625
+ return response
2626
+ end
2627
+ rescue ::GRPC::BadStatus => e
2628
+ raise ::Google::Cloud::Error.from_error(e)
2629
+ end
2630
+
2631
+ ##
2632
+ # Get job resource.
2633
+ #
2634
+ # @overload get_job(request, options = nil)
2635
+ # Pass arguments to `get_job` via a request object, either of type
2636
+ # {::Google::Cloud::Dataplex::V1::GetJobRequest} or an equivalent Hash.
2637
+ #
2638
+ # @param request [::Google::Cloud::Dataplex::V1::GetJobRequest, ::Hash]
2639
+ # A request object representing the call parameters. Required. To specify no
2640
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2641
+ # @param options [::Gapic::CallOptions, ::Hash]
2642
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2643
+ #
2644
+ # @overload get_job(name: nil)
2645
+ # Pass arguments to `get_job` via keyword arguments. Note that at
2646
+ # least one keyword argument is required. To specify no parameters, or to keep all
2647
+ # the default parameter values, pass an empty Hash as a request object (see above).
2648
+ #
2649
+ # @param name [::String]
2650
+ # Required. The resource name of the job:
2651
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
2652
+ #
2653
+ # @yield [response, operation] Access the result along with the RPC operation
2654
+ # @yieldparam response [::Google::Cloud::Dataplex::V1::Job]
2655
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2656
+ #
2657
+ # @return [::Google::Cloud::Dataplex::V1::Job]
2658
+ #
2659
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2660
+ #
2661
+ # @example Basic example
2662
+ # require "google/cloud/dataplex/v1"
2663
+ #
2664
+ # # Create a client object. The client can be reused for multiple calls.
2665
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2666
+ #
2667
+ # # Create a request. To set request fields, pass in keyword arguments.
2668
+ # request = Google::Cloud::Dataplex::V1::GetJobRequest.new
2669
+ #
2670
+ # # Call the get_job method.
2671
+ # result = client.get_job request
2672
+ #
2673
+ # # The returned object is of type Google::Cloud::Dataplex::V1::Job.
2674
+ # p result
2675
+ #
2676
+ def get_job request, options = nil
2677
+ raise ::ArgumentError, "request must be provided" if request.nil?
2678
+
2679
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetJobRequest
2680
+
2681
+ # Converts hash and nil to an options object
2682
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2683
+
2684
+ # Customize the options with defaults
2685
+ metadata = @config.rpcs.get_job.metadata.to_h
2686
+
2687
+ # Set x-goog-api-client and x-goog-user-project headers
2688
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2689
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2690
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2691
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2692
+
2693
+ header_params = {}
2694
+ if request.name
2695
+ header_params["name"] = request.name
2696
+ end
2697
+
2698
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2699
+ metadata[:"x-goog-request-params"] ||= request_params_header
2700
+
2701
+ options.apply_defaults timeout: @config.rpcs.get_job.timeout,
2702
+ metadata: metadata,
2703
+ retry_policy: @config.rpcs.get_job.retry_policy
2704
+
2705
+ options.apply_defaults timeout: @config.timeout,
2706
+ metadata: @config.metadata,
2707
+ retry_policy: @config.retry_policy
2708
+
2709
+ @dataplex_service_stub.call_rpc :get_job, request, options: options do |response, operation|
2710
+ yield response, operation if block_given?
2711
+ return response
2712
+ end
2713
+ rescue ::GRPC::BadStatus => e
2714
+ raise ::Google::Cloud::Error.from_error(e)
2715
+ end
2716
+
2717
+ ##
2718
+ # Cancel jobs running for the task resource.
2719
+ #
2720
+ # @overload cancel_job(request, options = nil)
2721
+ # Pass arguments to `cancel_job` via a request object, either of type
2722
+ # {::Google::Cloud::Dataplex::V1::CancelJobRequest} or an equivalent Hash.
2723
+ #
2724
+ # @param request [::Google::Cloud::Dataplex::V1::CancelJobRequest, ::Hash]
2725
+ # A request object representing the call parameters. Required. To specify no
2726
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2727
+ # @param options [::Gapic::CallOptions, ::Hash]
2728
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2729
+ #
2730
+ # @overload cancel_job(name: nil)
2731
+ # Pass arguments to `cancel_job` via keyword arguments. Note that at
2732
+ # least one keyword argument is required. To specify no parameters, or to keep all
2733
+ # the default parameter values, pass an empty Hash as a request object (see above).
2734
+ #
2735
+ # @param name [::String]
2736
+ # Required. The resource name of the job:
2737
+ # `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.
2738
+ #
2739
+ # @yield [response, operation] Access the result along with the RPC operation
2740
+ # @yieldparam response [::Google::Protobuf::Empty]
2741
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2742
+ #
2743
+ # @return [::Google::Protobuf::Empty]
2744
+ #
2745
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2746
+ #
2747
+ # @example Basic example
2748
+ # require "google/cloud/dataplex/v1"
2749
+ #
2750
+ # # Create a client object. The client can be reused for multiple calls.
2751
+ # client = Google::Cloud::Dataplex::V1::DataplexService::Client.new
2752
+ #
2753
+ # # Create a request. To set request fields, pass in keyword arguments.
2754
+ # request = Google::Cloud::Dataplex::V1::CancelJobRequest.new
2755
+ #
2756
+ # # Call the cancel_job method.
2757
+ # result = client.cancel_job request
2758
+ #
2759
+ # # The returned object is of type Google::Protobuf::Empty.
2760
+ # p result
2761
+ #
2762
+ def cancel_job request, options = nil
2763
+ raise ::ArgumentError, "request must be provided" if request.nil?
2764
+
2765
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CancelJobRequest
2766
+
2767
+ # Converts hash and nil to an options object
2768
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2769
+
2770
+ # Customize the options with defaults
2771
+ metadata = @config.rpcs.cancel_job.metadata.to_h
2772
+
2773
+ # Set x-goog-api-client and x-goog-user-project headers
2774
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2775
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2776
+ gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
2777
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2778
+
2779
+ header_params = {}
2780
+ if request.name
2781
+ header_params["name"] = request.name
2782
+ end
2783
+
2784
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2785
+ metadata[:"x-goog-request-params"] ||= request_params_header
2786
+
2787
+ options.apply_defaults timeout: @config.rpcs.cancel_job.timeout,
2788
+ metadata: metadata,
2789
+ retry_policy: @config.rpcs.cancel_job.retry_policy
2790
+
2791
+ options.apply_defaults timeout: @config.timeout,
2792
+ metadata: @config.metadata,
2793
+ retry_policy: @config.retry_policy
2794
+
2795
+ @dataplex_service_stub.call_rpc :cancel_job, request, options: options do |response, operation|
2796
+ yield response, operation if block_given?
2797
+ return response
2798
+ end
2799
+ rescue ::GRPC::BadStatus => e
2800
+ raise ::Google::Cloud::Error.from_error(e)
2801
+ end
2802
+
2803
+ ##
2804
+ # Configuration class for the DataplexService API.
2805
+ #
2806
+ # This class represents the configuration for DataplexService,
2807
+ # providing control over timeouts, retry behavior, logging, transport
2808
+ # parameters, and other low-level controls. Certain parameters can also be
2809
+ # applied individually to specific RPCs. See
2810
+ # {::Google::Cloud::Dataplex::V1::DataplexService::Client::Configuration::Rpcs}
2811
+ # for a list of RPCs that can be configured independently.
2812
+ #
2813
+ # Configuration can be applied globally to all clients, or to a single client
2814
+ # on construction.
2815
+ #
2816
+ # @example
2817
+ #
2818
+ # # Modify the global config, setting the timeout for
2819
+ # # create_lake to 20 seconds,
2820
+ # # and all remaining timeouts to 10 seconds.
2821
+ # ::Google::Cloud::Dataplex::V1::DataplexService::Client.configure do |config|
2822
+ # config.timeout = 10.0
2823
+ # config.rpcs.create_lake.timeout = 20.0
2824
+ # end
2825
+ #
2826
+ # # Apply the above configuration only to a new client.
2827
+ # client = ::Google::Cloud::Dataplex::V1::DataplexService::Client.new do |config|
2828
+ # config.timeout = 10.0
2829
+ # config.rpcs.create_lake.timeout = 20.0
2830
+ # end
2831
+ #
2832
+ # @!attribute [rw] endpoint
2833
+ # The hostname or hostname:port of the service endpoint.
2834
+ # Defaults to `"dataplex.googleapis.com"`.
2835
+ # @return [::String]
2836
+ # @!attribute [rw] credentials
2837
+ # Credentials to send with calls. You may provide any of the following types:
2838
+ # * (`String`) The path to a service account key file in JSON format
2839
+ # * (`Hash`) A service account key as a Hash
2840
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2841
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
2842
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2843
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
2844
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2845
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2846
+ # * (`nil`) indicating no credentials
2847
+ # @return [::Object]
2848
+ # @!attribute [rw] scope
2849
+ # The OAuth scopes
2850
+ # @return [::Array<::String>]
2851
+ # @!attribute [rw] lib_name
2852
+ # The library name as recorded in instrumentation and logging
2853
+ # @return [::String]
2854
+ # @!attribute [rw] lib_version
2855
+ # The library version as recorded in instrumentation and logging
2856
+ # @return [::String]
2857
+ # @!attribute [rw] channel_args
2858
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
2859
+ # `GRPC::Core::Channel` object is provided as the credential.
2860
+ # @return [::Hash]
2861
+ # @!attribute [rw] interceptors
2862
+ # An array of interceptors that are run before calls are executed.
2863
+ # @return [::Array<::GRPC::ClientInterceptor>]
2864
+ # @!attribute [rw] timeout
2865
+ # The call timeout in seconds.
2866
+ # @return [::Numeric]
2867
+ # @!attribute [rw] metadata
2868
+ # Additional gRPC headers to be sent with the call.
2869
+ # @return [::Hash{::Symbol=>::String}]
2870
+ # @!attribute [rw] retry_policy
2871
+ # The retry policy. The value is a hash with the following keys:
2872
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2873
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2874
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2875
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2876
+ # trigger a retry.
2877
+ # @return [::Hash]
2878
+ # @!attribute [rw] quota_project
2879
+ # A separate project against which to charge quota.
2880
+ # @return [::String]
2881
+ #
2882
+ class Configuration
2883
+ extend ::Gapic::Config
2884
+
2885
+ config_attr :endpoint, "dataplex.googleapis.com", ::String
2886
+ config_attr :credentials, nil do |value|
2887
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2888
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2889
+ allowed.any? { |klass| klass === value }
2890
+ end
2891
+ config_attr :scope, nil, ::String, ::Array, nil
2892
+ config_attr :lib_name, nil, ::String, nil
2893
+ config_attr :lib_version, nil, ::String, nil
2894
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
2895
+ config_attr :interceptors, nil, ::Array, nil
2896
+ config_attr :timeout, nil, ::Numeric, nil
2897
+ config_attr :metadata, nil, ::Hash, nil
2898
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2899
+ config_attr :quota_project, nil, ::String, nil
2900
+
2901
+ # @private
2902
+ def initialize parent_config = nil
2903
+ @parent_config = parent_config unless parent_config.nil?
2904
+
2905
+ yield self if block_given?
2906
+ end
2907
+
2908
+ ##
2909
+ # Configurations for individual RPCs
2910
+ # @return [Rpcs]
2911
+ #
2912
+ def rpcs
2913
+ @rpcs ||= begin
2914
+ parent_rpcs = nil
2915
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2916
+ Rpcs.new parent_rpcs
2917
+ end
2918
+ end
2919
+
2920
+ ##
2921
+ # Configuration RPC class for the DataplexService API.
2922
+ #
2923
+ # Includes fields providing the configuration for each RPC in this service.
2924
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2925
+ # the following configuration fields:
2926
+ #
2927
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2928
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2929
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2930
+ # include the following keys:
2931
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2932
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2933
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2934
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2935
+ # trigger a retry.
2936
+ #
2937
+ class Rpcs
2938
+ ##
2939
+ # RPC-specific configuration for `create_lake`
2940
+ # @return [::Gapic::Config::Method]
2941
+ #
2942
+ attr_reader :create_lake
2943
+ ##
2944
+ # RPC-specific configuration for `update_lake`
2945
+ # @return [::Gapic::Config::Method]
2946
+ #
2947
+ attr_reader :update_lake
2948
+ ##
2949
+ # RPC-specific configuration for `delete_lake`
2950
+ # @return [::Gapic::Config::Method]
2951
+ #
2952
+ attr_reader :delete_lake
2953
+ ##
2954
+ # RPC-specific configuration for `list_lakes`
2955
+ # @return [::Gapic::Config::Method]
2956
+ #
2957
+ attr_reader :list_lakes
2958
+ ##
2959
+ # RPC-specific configuration for `get_lake`
2960
+ # @return [::Gapic::Config::Method]
2961
+ #
2962
+ attr_reader :get_lake
2963
+ ##
2964
+ # RPC-specific configuration for `list_lake_actions`
2965
+ # @return [::Gapic::Config::Method]
2966
+ #
2967
+ attr_reader :list_lake_actions
2968
+ ##
2969
+ # RPC-specific configuration for `create_zone`
2970
+ # @return [::Gapic::Config::Method]
2971
+ #
2972
+ attr_reader :create_zone
2973
+ ##
2974
+ # RPC-specific configuration for `update_zone`
2975
+ # @return [::Gapic::Config::Method]
2976
+ #
2977
+ attr_reader :update_zone
2978
+ ##
2979
+ # RPC-specific configuration for `delete_zone`
2980
+ # @return [::Gapic::Config::Method]
2981
+ #
2982
+ attr_reader :delete_zone
2983
+ ##
2984
+ # RPC-specific configuration for `list_zones`
2985
+ # @return [::Gapic::Config::Method]
2986
+ #
2987
+ attr_reader :list_zones
2988
+ ##
2989
+ # RPC-specific configuration for `get_zone`
2990
+ # @return [::Gapic::Config::Method]
2991
+ #
2992
+ attr_reader :get_zone
2993
+ ##
2994
+ # RPC-specific configuration for `list_zone_actions`
2995
+ # @return [::Gapic::Config::Method]
2996
+ #
2997
+ attr_reader :list_zone_actions
2998
+ ##
2999
+ # RPC-specific configuration for `create_asset`
3000
+ # @return [::Gapic::Config::Method]
3001
+ #
3002
+ attr_reader :create_asset
3003
+ ##
3004
+ # RPC-specific configuration for `update_asset`
3005
+ # @return [::Gapic::Config::Method]
3006
+ #
3007
+ attr_reader :update_asset
3008
+ ##
3009
+ # RPC-specific configuration for `delete_asset`
3010
+ # @return [::Gapic::Config::Method]
3011
+ #
3012
+ attr_reader :delete_asset
3013
+ ##
3014
+ # RPC-specific configuration for `list_assets`
3015
+ # @return [::Gapic::Config::Method]
3016
+ #
3017
+ attr_reader :list_assets
3018
+ ##
3019
+ # RPC-specific configuration for `get_asset`
3020
+ # @return [::Gapic::Config::Method]
3021
+ #
3022
+ attr_reader :get_asset
3023
+ ##
3024
+ # RPC-specific configuration for `list_asset_actions`
3025
+ # @return [::Gapic::Config::Method]
3026
+ #
3027
+ attr_reader :list_asset_actions
3028
+ ##
3029
+ # RPC-specific configuration for `create_task`
3030
+ # @return [::Gapic::Config::Method]
3031
+ #
3032
+ attr_reader :create_task
3033
+ ##
3034
+ # RPC-specific configuration for `update_task`
3035
+ # @return [::Gapic::Config::Method]
3036
+ #
3037
+ attr_reader :update_task
3038
+ ##
3039
+ # RPC-specific configuration for `delete_task`
3040
+ # @return [::Gapic::Config::Method]
3041
+ #
3042
+ attr_reader :delete_task
3043
+ ##
3044
+ # RPC-specific configuration for `list_tasks`
3045
+ # @return [::Gapic::Config::Method]
3046
+ #
3047
+ attr_reader :list_tasks
3048
+ ##
3049
+ # RPC-specific configuration for `get_task`
3050
+ # @return [::Gapic::Config::Method]
3051
+ #
3052
+ attr_reader :get_task
3053
+ ##
3054
+ # RPC-specific configuration for `list_jobs`
3055
+ # @return [::Gapic::Config::Method]
3056
+ #
3057
+ attr_reader :list_jobs
3058
+ ##
3059
+ # RPC-specific configuration for `get_job`
3060
+ # @return [::Gapic::Config::Method]
3061
+ #
3062
+ attr_reader :get_job
3063
+ ##
3064
+ # RPC-specific configuration for `cancel_job`
3065
+ # @return [::Gapic::Config::Method]
3066
+ #
3067
+ attr_reader :cancel_job
3068
+
3069
+ # @private
3070
+ def initialize parent_rpcs = nil
3071
+ create_lake_config = parent_rpcs.create_lake if parent_rpcs.respond_to? :create_lake
3072
+ @create_lake = ::Gapic::Config::Method.new create_lake_config
3073
+ update_lake_config = parent_rpcs.update_lake if parent_rpcs.respond_to? :update_lake
3074
+ @update_lake = ::Gapic::Config::Method.new update_lake_config
3075
+ delete_lake_config = parent_rpcs.delete_lake if parent_rpcs.respond_to? :delete_lake
3076
+ @delete_lake = ::Gapic::Config::Method.new delete_lake_config
3077
+ list_lakes_config = parent_rpcs.list_lakes if parent_rpcs.respond_to? :list_lakes
3078
+ @list_lakes = ::Gapic::Config::Method.new list_lakes_config
3079
+ get_lake_config = parent_rpcs.get_lake if parent_rpcs.respond_to? :get_lake
3080
+ @get_lake = ::Gapic::Config::Method.new get_lake_config
3081
+ list_lake_actions_config = parent_rpcs.list_lake_actions if parent_rpcs.respond_to? :list_lake_actions
3082
+ @list_lake_actions = ::Gapic::Config::Method.new list_lake_actions_config
3083
+ create_zone_config = parent_rpcs.create_zone if parent_rpcs.respond_to? :create_zone
3084
+ @create_zone = ::Gapic::Config::Method.new create_zone_config
3085
+ update_zone_config = parent_rpcs.update_zone if parent_rpcs.respond_to? :update_zone
3086
+ @update_zone = ::Gapic::Config::Method.new update_zone_config
3087
+ delete_zone_config = parent_rpcs.delete_zone if parent_rpcs.respond_to? :delete_zone
3088
+ @delete_zone = ::Gapic::Config::Method.new delete_zone_config
3089
+ list_zones_config = parent_rpcs.list_zones if parent_rpcs.respond_to? :list_zones
3090
+ @list_zones = ::Gapic::Config::Method.new list_zones_config
3091
+ get_zone_config = parent_rpcs.get_zone if parent_rpcs.respond_to? :get_zone
3092
+ @get_zone = ::Gapic::Config::Method.new get_zone_config
3093
+ list_zone_actions_config = parent_rpcs.list_zone_actions if parent_rpcs.respond_to? :list_zone_actions
3094
+ @list_zone_actions = ::Gapic::Config::Method.new list_zone_actions_config
3095
+ create_asset_config = parent_rpcs.create_asset if parent_rpcs.respond_to? :create_asset
3096
+ @create_asset = ::Gapic::Config::Method.new create_asset_config
3097
+ update_asset_config = parent_rpcs.update_asset if parent_rpcs.respond_to? :update_asset
3098
+ @update_asset = ::Gapic::Config::Method.new update_asset_config
3099
+ delete_asset_config = parent_rpcs.delete_asset if parent_rpcs.respond_to? :delete_asset
3100
+ @delete_asset = ::Gapic::Config::Method.new delete_asset_config
3101
+ list_assets_config = parent_rpcs.list_assets if parent_rpcs.respond_to? :list_assets
3102
+ @list_assets = ::Gapic::Config::Method.new list_assets_config
3103
+ get_asset_config = parent_rpcs.get_asset if parent_rpcs.respond_to? :get_asset
3104
+ @get_asset = ::Gapic::Config::Method.new get_asset_config
3105
+ list_asset_actions_config = parent_rpcs.list_asset_actions if parent_rpcs.respond_to? :list_asset_actions
3106
+ @list_asset_actions = ::Gapic::Config::Method.new list_asset_actions_config
3107
+ create_task_config = parent_rpcs.create_task if parent_rpcs.respond_to? :create_task
3108
+ @create_task = ::Gapic::Config::Method.new create_task_config
3109
+ update_task_config = parent_rpcs.update_task if parent_rpcs.respond_to? :update_task
3110
+ @update_task = ::Gapic::Config::Method.new update_task_config
3111
+ delete_task_config = parent_rpcs.delete_task if parent_rpcs.respond_to? :delete_task
3112
+ @delete_task = ::Gapic::Config::Method.new delete_task_config
3113
+ list_tasks_config = parent_rpcs.list_tasks if parent_rpcs.respond_to? :list_tasks
3114
+ @list_tasks = ::Gapic::Config::Method.new list_tasks_config
3115
+ get_task_config = parent_rpcs.get_task if parent_rpcs.respond_to? :get_task
3116
+ @get_task = ::Gapic::Config::Method.new get_task_config
3117
+ list_jobs_config = parent_rpcs.list_jobs if parent_rpcs.respond_to? :list_jobs
3118
+ @list_jobs = ::Gapic::Config::Method.new list_jobs_config
3119
+ get_job_config = parent_rpcs.get_job if parent_rpcs.respond_to? :get_job
3120
+ @get_job = ::Gapic::Config::Method.new get_job_config
3121
+ cancel_job_config = parent_rpcs.cancel_job if parent_rpcs.respond_to? :cancel_job
3122
+ @cancel_job = ::Gapic::Config::Method.new cancel_job_config
3123
+
3124
+ yield self if block_given?
3125
+ end
3126
+ end
3127
+ end
3128
+ end
3129
+ end
3130
+ end
3131
+ end
3132
+ end
3133
+ end