google-cloud-dataplex-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -6
- data/README.md +13 -8
- data/lib/google/cloud/dataplex/v1/analyze_pb.rb +117 -0
- data/lib/google/cloud/dataplex/v1/content_pb.rb +65 -0
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +798 -0
- data/lib/google/cloud/dataplex/v1/content_service/credentials.rb +47 -0
- data/lib/google/cloud/dataplex/v1/content_service/paths.rb +73 -0
- data/lib/google/cloud/dataplex/v1/content_service.rb +49 -0
- data/lib/google/cloud/dataplex/v1/content_services_pb.rb +53 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +637 -1
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +3 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/paths.rb +21 -0
- data/lib/google/cloud/dataplex/v1/logs_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/metadata_pb.rb +29 -2
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +531 -10
- data/lib/google/cloud/dataplex/v1/metadata_services_pb.rb +10 -0
- data/lib/google/cloud/dataplex/v1/resources_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/service_pb.rb +48 -1
- data/lib/google/cloud/dataplex/v1/service_services_pb.rb +13 -0
- data/lib/google/cloud/dataplex/v1/tasks_pb.rb +2 -2
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/lib/google/cloud/dataplex/v1.rb +4 -1
- data/proto_docs/google/cloud/dataplex/v1/analyze.rb +281 -0
- data/proto_docs/google/cloud/dataplex/v1/content.rb +142 -0
- data/proto_docs/google/cloud/dataplex/v1/metadata.rb +182 -36
- data/proto_docs/google/cloud/dataplex/v1/resources.rb +0 -7
- data/proto_docs/google/cloud/dataplex/v1/service.rb +137 -1
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +21 -12
@@ -65,6 +65,12 @@ module Google
|
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
67
67
|
|
68
|
+
default_config.rpcs.create_entity.timeout = 60.0
|
69
|
+
|
70
|
+
default_config.rpcs.update_entity.timeout = 60.0
|
71
|
+
|
72
|
+
default_config.rpcs.delete_entity.timeout = 60.0
|
73
|
+
|
68
74
|
default_config.rpcs.get_entity.timeout = 60.0
|
69
75
|
default_config.rpcs.get_entity.retry_policy = {
|
70
76
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
@@ -75,6 +81,10 @@ module Google
|
|
75
81
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
76
82
|
}
|
77
83
|
|
84
|
+
default_config.rpcs.create_partition.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.delete_partition.timeout = 60.0
|
87
|
+
|
78
88
|
default_config.rpcs.get_partition.timeout = 60.0
|
79
89
|
default_config.rpcs.get_partition.retry_policy = {
|
80
90
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
@@ -165,6 +175,273 @@ module Google
|
|
165
175
|
|
166
176
|
# Service calls
|
167
177
|
|
178
|
+
##
|
179
|
+
# Create a metadata entity.
|
180
|
+
#
|
181
|
+
# @overload create_entity(request, options = nil)
|
182
|
+
# Pass arguments to `create_entity` via a request object, either of type
|
183
|
+
# {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash.
|
184
|
+
#
|
185
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash]
|
186
|
+
# A request object representing the call parameters. Required. To specify no
|
187
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
188
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
189
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
190
|
+
#
|
191
|
+
# @overload create_entity(parent: nil, entity: nil, validate_only: nil)
|
192
|
+
# Pass arguments to `create_entity` via keyword arguments. Note that at
|
193
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
194
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
195
|
+
#
|
196
|
+
# @param parent [::String]
|
197
|
+
# Required. The resource name of the parent zone:
|
198
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
|
199
|
+
# @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash]
|
200
|
+
# Required. Entity resource.
|
201
|
+
# @param validate_only [::Boolean]
|
202
|
+
# Optional. Only validate the request, but do not perform mutations.
|
203
|
+
# The default is false.
|
204
|
+
#
|
205
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
206
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::Entity]
|
207
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
208
|
+
#
|
209
|
+
# @return [::Google::Cloud::Dataplex::V1::Entity]
|
210
|
+
#
|
211
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
212
|
+
#
|
213
|
+
# @example Basic example
|
214
|
+
# require "google/cloud/dataplex/v1"
|
215
|
+
#
|
216
|
+
# # Create a client object. The client can be reused for multiple calls.
|
217
|
+
# client = Google::Cloud::Dataplex::V1::MetadataService::Client.new
|
218
|
+
#
|
219
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
220
|
+
# request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new
|
221
|
+
#
|
222
|
+
# # Call the create_entity method.
|
223
|
+
# result = client.create_entity request
|
224
|
+
#
|
225
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::Entity.
|
226
|
+
# p result
|
227
|
+
#
|
228
|
+
def create_entity request, options = nil
|
229
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
230
|
+
|
231
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest
|
232
|
+
|
233
|
+
# Converts hash and nil to an options object
|
234
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
235
|
+
|
236
|
+
# Customize the options with defaults
|
237
|
+
metadata = @config.rpcs.create_entity.metadata.to_h
|
238
|
+
|
239
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
240
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
241
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
242
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
243
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
244
|
+
|
245
|
+
header_params = {}
|
246
|
+
if request.parent
|
247
|
+
header_params["parent"] = request.parent
|
248
|
+
end
|
249
|
+
|
250
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
251
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
252
|
+
|
253
|
+
options.apply_defaults timeout: @config.rpcs.create_entity.timeout,
|
254
|
+
metadata: metadata,
|
255
|
+
retry_policy: @config.rpcs.create_entity.retry_policy
|
256
|
+
|
257
|
+
options.apply_defaults timeout: @config.timeout,
|
258
|
+
metadata: @config.metadata,
|
259
|
+
retry_policy: @config.retry_policy
|
260
|
+
|
261
|
+
@metadata_service_stub.call_rpc :create_entity, request, options: options do |response, operation|
|
262
|
+
yield response, operation if block_given?
|
263
|
+
return response
|
264
|
+
end
|
265
|
+
rescue ::GRPC::BadStatus => e
|
266
|
+
raise ::Google::Cloud::Error.from_error(e)
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# Update a metadata entity. Only supports full resource update.
|
271
|
+
#
|
272
|
+
# @overload update_entity(request, options = nil)
|
273
|
+
# Pass arguments to `update_entity` via a request object, either of type
|
274
|
+
# {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash.
|
275
|
+
#
|
276
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash]
|
277
|
+
# A request object representing the call parameters. Required. To specify no
|
278
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
279
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
280
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
281
|
+
#
|
282
|
+
# @overload update_entity(entity: nil, validate_only: nil)
|
283
|
+
# Pass arguments to `update_entity` via keyword arguments. Note that at
|
284
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
285
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
286
|
+
#
|
287
|
+
# @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash]
|
288
|
+
# Required. Update description.
|
289
|
+
# @param validate_only [::Boolean]
|
290
|
+
# Optional. Only validate the request, but do not perform mutations.
|
291
|
+
# The default is false.
|
292
|
+
#
|
293
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
294
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::Entity]
|
295
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
296
|
+
#
|
297
|
+
# @return [::Google::Cloud::Dataplex::V1::Entity]
|
298
|
+
#
|
299
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
300
|
+
#
|
301
|
+
# @example Basic example
|
302
|
+
# require "google/cloud/dataplex/v1"
|
303
|
+
#
|
304
|
+
# # Create a client object. The client can be reused for multiple calls.
|
305
|
+
# client = Google::Cloud::Dataplex::V1::MetadataService::Client.new
|
306
|
+
#
|
307
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
308
|
+
# request = Google::Cloud::Dataplex::V1::UpdateEntityRequest.new
|
309
|
+
#
|
310
|
+
# # Call the update_entity method.
|
311
|
+
# result = client.update_entity request
|
312
|
+
#
|
313
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::Entity.
|
314
|
+
# p result
|
315
|
+
#
|
316
|
+
def update_entity request, options = nil
|
317
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
318
|
+
|
319
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest
|
320
|
+
|
321
|
+
# Converts hash and nil to an options object
|
322
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
323
|
+
|
324
|
+
# Customize the options with defaults
|
325
|
+
metadata = @config.rpcs.update_entity.metadata.to_h
|
326
|
+
|
327
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
328
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
329
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
330
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
331
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
332
|
+
|
333
|
+
header_params = {}
|
334
|
+
if request.entity&.name
|
335
|
+
header_params["entity.name"] = request.entity.name
|
336
|
+
end
|
337
|
+
|
338
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
339
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
340
|
+
|
341
|
+
options.apply_defaults timeout: @config.rpcs.update_entity.timeout,
|
342
|
+
metadata: metadata,
|
343
|
+
retry_policy: @config.rpcs.update_entity.retry_policy
|
344
|
+
|
345
|
+
options.apply_defaults timeout: @config.timeout,
|
346
|
+
metadata: @config.metadata,
|
347
|
+
retry_policy: @config.retry_policy
|
348
|
+
|
349
|
+
@metadata_service_stub.call_rpc :update_entity, request, options: options do |response, operation|
|
350
|
+
yield response, operation if block_given?
|
351
|
+
return response
|
352
|
+
end
|
353
|
+
rescue ::GRPC::BadStatus => e
|
354
|
+
raise ::Google::Cloud::Error.from_error(e)
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# Delete a metadata entity.
|
359
|
+
#
|
360
|
+
# @overload delete_entity(request, options = nil)
|
361
|
+
# Pass arguments to `delete_entity` via a request object, either of type
|
362
|
+
# {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash.
|
363
|
+
#
|
364
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash]
|
365
|
+
# A request object representing the call parameters. Required. To specify no
|
366
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
367
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
368
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
369
|
+
#
|
370
|
+
# @overload delete_entity(name: nil, etag: nil)
|
371
|
+
# Pass arguments to `delete_entity` via keyword arguments. Note that at
|
372
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
373
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
374
|
+
#
|
375
|
+
# @param name [::String]
|
376
|
+
# Required. The resource name of the entity:
|
377
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
378
|
+
# @param etag [::String]
|
379
|
+
# Required. The etag associated with the partition if it was previously retrieved.
|
380
|
+
#
|
381
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
382
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
383
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
384
|
+
#
|
385
|
+
# @return [::Google::Protobuf::Empty]
|
386
|
+
#
|
387
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
388
|
+
#
|
389
|
+
# @example Basic example
|
390
|
+
# require "google/cloud/dataplex/v1"
|
391
|
+
#
|
392
|
+
# # Create a client object. The client can be reused for multiple calls.
|
393
|
+
# client = Google::Cloud::Dataplex::V1::MetadataService::Client.new
|
394
|
+
#
|
395
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
396
|
+
# request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new
|
397
|
+
#
|
398
|
+
# # Call the delete_entity method.
|
399
|
+
# result = client.delete_entity request
|
400
|
+
#
|
401
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
402
|
+
# p result
|
403
|
+
#
|
404
|
+
def delete_entity request, options = nil
|
405
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
406
|
+
|
407
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest
|
408
|
+
|
409
|
+
# Converts hash and nil to an options object
|
410
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
|
+
|
412
|
+
# Customize the options with defaults
|
413
|
+
metadata = @config.rpcs.delete_entity.metadata.to_h
|
414
|
+
|
415
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
416
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
417
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
418
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
419
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
420
|
+
|
421
|
+
header_params = {}
|
422
|
+
if request.name
|
423
|
+
header_params["name"] = request.name
|
424
|
+
end
|
425
|
+
|
426
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
427
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
428
|
+
|
429
|
+
options.apply_defaults timeout: @config.rpcs.delete_entity.timeout,
|
430
|
+
metadata: metadata,
|
431
|
+
retry_policy: @config.rpcs.delete_entity.retry_policy
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
435
|
+
retry_policy: @config.retry_policy
|
436
|
+
|
437
|
+
@metadata_service_stub.call_rpc :delete_entity, request, options: options do |response, operation|
|
438
|
+
yield response, operation if block_given?
|
439
|
+
return response
|
440
|
+
end
|
441
|
+
rescue ::GRPC::BadStatus => e
|
442
|
+
raise ::Google::Cloud::Error.from_error(e)
|
443
|
+
end
|
444
|
+
|
168
445
|
##
|
169
446
|
# Get a metadata entity.
|
170
447
|
#
|
@@ -279,15 +556,22 @@ module Google
|
|
279
556
|
# Required. Specify the entity view to make a partial list request.
|
280
557
|
# @param page_size [::Integer]
|
281
558
|
# Optional. Maximum number of entities to return. The service may return fewer than
|
282
|
-
# this value. If unspecified,
|
283
|
-
# maximum value is
|
559
|
+
# this value. If unspecified, 100 entities will be returned by default. The
|
560
|
+
# maximum value is 500; larger values will will be truncated to 500.
|
284
561
|
# @param page_token [::String]
|
285
562
|
# Optional. Page token received from a previous `ListEntities` call. Provide
|
286
563
|
# this to retrieve the subsequent page. When paginating, all other parameters
|
287
564
|
# provided to `ListEntities` must match the call that provided the
|
288
565
|
# page token.
|
289
566
|
# @param filter [::String]
|
290
|
-
# Optional.
|
567
|
+
# Optional. The following filter parameters can be added to the URL to limit the
|
568
|
+
# entities returned by the API:
|
569
|
+
#
|
570
|
+
# - Entity ID: ?filter="id=entityID"
|
571
|
+
# - Asset ID: ?filter="asset=assetID"
|
572
|
+
# - Data path ?filter="data_path=gs://my-bucket"
|
573
|
+
# - Is HIVE compatible: ?filter=”hive_compatible=true”
|
574
|
+
# - Is BigQuery compatible: ?filter=”bigquery_compatible=true”
|
291
575
|
#
|
292
576
|
# @yield [response, operation] Access the result along with the RPC operation
|
293
577
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>]
|
@@ -360,6 +644,188 @@ module Google
|
|
360
644
|
raise ::Google::Cloud::Error.from_error(e)
|
361
645
|
end
|
362
646
|
|
647
|
+
##
|
648
|
+
# Create a metadata partition.
|
649
|
+
#
|
650
|
+
# @overload create_partition(request, options = nil)
|
651
|
+
# Pass arguments to `create_partition` via a request object, either of type
|
652
|
+
# {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash.
|
653
|
+
#
|
654
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash]
|
655
|
+
# A request object representing the call parameters. Required. To specify no
|
656
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
657
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
658
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
659
|
+
#
|
660
|
+
# @overload create_partition(parent: nil, partition: nil, validate_only: nil)
|
661
|
+
# Pass arguments to `create_partition` via keyword arguments. Note that at
|
662
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
663
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
664
|
+
#
|
665
|
+
# @param parent [::String]
|
666
|
+
# Required. The resource name of the parent zone:
|
667
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
668
|
+
# @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash]
|
669
|
+
# Required. Partition resource.
|
670
|
+
# @param validate_only [::Boolean]
|
671
|
+
# Optional. Only validate the request, but do not perform mutations.
|
672
|
+
# The default is false.
|
673
|
+
#
|
674
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
675
|
+
# @yieldparam response [::Google::Cloud::Dataplex::V1::Partition]
|
676
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
677
|
+
#
|
678
|
+
# @return [::Google::Cloud::Dataplex::V1::Partition]
|
679
|
+
#
|
680
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
681
|
+
#
|
682
|
+
# @example Basic example
|
683
|
+
# require "google/cloud/dataplex/v1"
|
684
|
+
#
|
685
|
+
# # Create a client object. The client can be reused for multiple calls.
|
686
|
+
# client = Google::Cloud::Dataplex::V1::MetadataService::Client.new
|
687
|
+
#
|
688
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
689
|
+
# request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new
|
690
|
+
#
|
691
|
+
# # Call the create_partition method.
|
692
|
+
# result = client.create_partition request
|
693
|
+
#
|
694
|
+
# # The returned object is of type Google::Cloud::Dataplex::V1::Partition.
|
695
|
+
# p result
|
696
|
+
#
|
697
|
+
def create_partition request, options = nil
|
698
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
699
|
+
|
700
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest
|
701
|
+
|
702
|
+
# Converts hash and nil to an options object
|
703
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
704
|
+
|
705
|
+
# Customize the options with defaults
|
706
|
+
metadata = @config.rpcs.create_partition.metadata.to_h
|
707
|
+
|
708
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
709
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
710
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
711
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
712
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
713
|
+
|
714
|
+
header_params = {}
|
715
|
+
if request.parent
|
716
|
+
header_params["parent"] = request.parent
|
717
|
+
end
|
718
|
+
|
719
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
720
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
721
|
+
|
722
|
+
options.apply_defaults timeout: @config.rpcs.create_partition.timeout,
|
723
|
+
metadata: metadata,
|
724
|
+
retry_policy: @config.rpcs.create_partition.retry_policy
|
725
|
+
|
726
|
+
options.apply_defaults timeout: @config.timeout,
|
727
|
+
metadata: @config.metadata,
|
728
|
+
retry_policy: @config.retry_policy
|
729
|
+
|
730
|
+
@metadata_service_stub.call_rpc :create_partition, request, options: options do |response, operation|
|
731
|
+
yield response, operation if block_given?
|
732
|
+
return response
|
733
|
+
end
|
734
|
+
rescue ::GRPC::BadStatus => e
|
735
|
+
raise ::Google::Cloud::Error.from_error(e)
|
736
|
+
end
|
737
|
+
|
738
|
+
##
|
739
|
+
# Delete a metadata partition.
|
740
|
+
#
|
741
|
+
# @overload delete_partition(request, options = nil)
|
742
|
+
# Pass arguments to `delete_partition` via a request object, either of type
|
743
|
+
# {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash.
|
744
|
+
#
|
745
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash]
|
746
|
+
# A request object representing the call parameters. Required. To specify no
|
747
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
748
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
749
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
750
|
+
#
|
751
|
+
# @overload delete_partition(name: nil, etag: nil)
|
752
|
+
# Pass arguments to `delete_partition` via keyword arguments. Note that at
|
753
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
754
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
755
|
+
#
|
756
|
+
# @param name [::String]
|
757
|
+
# Required. The resource name of the partition.
|
758
|
+
# format:
|
759
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
|
760
|
+
# The \\{partition_value_path} segment consists of an ordered sequence of
|
761
|
+
# partition values separated by "/". All values must be provided.
|
762
|
+
# @param etag [::String]
|
763
|
+
# Optional. The etag associated with the partition if it was previously retrieved.
|
764
|
+
#
|
765
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
766
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
767
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
768
|
+
#
|
769
|
+
# @return [::Google::Protobuf::Empty]
|
770
|
+
#
|
771
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
772
|
+
#
|
773
|
+
# @example Basic example
|
774
|
+
# require "google/cloud/dataplex/v1"
|
775
|
+
#
|
776
|
+
# # Create a client object. The client can be reused for multiple calls.
|
777
|
+
# client = Google::Cloud::Dataplex::V1::MetadataService::Client.new
|
778
|
+
#
|
779
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
780
|
+
# request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new
|
781
|
+
#
|
782
|
+
# # Call the delete_partition method.
|
783
|
+
# result = client.delete_partition request
|
784
|
+
#
|
785
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
786
|
+
# p result
|
787
|
+
#
|
788
|
+
def delete_partition request, options = nil
|
789
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
790
|
+
|
791
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest
|
792
|
+
|
793
|
+
# Converts hash and nil to an options object
|
794
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
795
|
+
|
796
|
+
# Customize the options with defaults
|
797
|
+
metadata = @config.rpcs.delete_partition.metadata.to_h
|
798
|
+
|
799
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
800
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
801
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
802
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION
|
803
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
804
|
+
|
805
|
+
header_params = {}
|
806
|
+
if request.name
|
807
|
+
header_params["name"] = request.name
|
808
|
+
end
|
809
|
+
|
810
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
811
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
812
|
+
|
813
|
+
options.apply_defaults timeout: @config.rpcs.delete_partition.timeout,
|
814
|
+
metadata: metadata,
|
815
|
+
retry_policy: @config.rpcs.delete_partition.retry_policy
|
816
|
+
|
817
|
+
options.apply_defaults timeout: @config.timeout,
|
818
|
+
metadata: @config.metadata,
|
819
|
+
retry_policy: @config.retry_policy
|
820
|
+
|
821
|
+
@metadata_service_stub.call_rpc :delete_partition, request, options: options do |response, operation|
|
822
|
+
yield response, operation if block_given?
|
823
|
+
return response
|
824
|
+
end
|
825
|
+
rescue ::GRPC::BadStatus => e
|
826
|
+
raise ::Google::Cloud::Error.from_error(e)
|
827
|
+
end
|
828
|
+
|
363
829
|
##
|
364
830
|
# Get a metadata partition of an entity.
|
365
831
|
#
|
@@ -380,7 +846,9 @@ module Google
|
|
380
846
|
#
|
381
847
|
# @param name [::String]
|
382
848
|
# Required. The resource name of the partition:
|
383
|
-
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{
|
849
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
|
850
|
+
# The \\{partition_value_path} segment consists of an ordered sequence of
|
851
|
+
# partition values separated by "/". All values must be provided.
|
384
852
|
#
|
385
853
|
# @yield [response, operation] Access the result along with the RPC operation
|
386
854
|
# @yieldparam response [::Google::Cloud::Dataplex::V1::Partition]
|
@@ -469,15 +937,33 @@ module Google
|
|
469
937
|
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
470
938
|
# @param page_size [::Integer]
|
471
939
|
# Optional. Maximum number of partitions to return. The service may return fewer than
|
472
|
-
# this value. If unspecified,
|
473
|
-
# maximum
|
940
|
+
# this value. If unspecified, 100 partitions will be returned by default. The
|
941
|
+
# maximum page size is 500; larger values will will be truncated to 500.
|
474
942
|
# @param page_token [::String]
|
475
943
|
# Optional. Page token received from a previous `ListPartitions` call. Provide
|
476
944
|
# this to retrieve the subsequent page. When paginating, all other parameters
|
477
945
|
# provided to `ListPartitions` must match the call that provided the
|
478
946
|
# page token.
|
479
947
|
# @param filter [::String]
|
480
|
-
# Optional. Filter
|
948
|
+
# Optional. Filter the partitions returned to the caller using a key vslue pair
|
949
|
+
# expression. The filter expression supports:
|
950
|
+
#
|
951
|
+
# - logical operators: AND, OR
|
952
|
+
# - comparison operators: <, >, >=, <= ,=, !=
|
953
|
+
# - LIKE operators:
|
954
|
+
# - The right hand of a LIKE operator supports “.” and
|
955
|
+
# “*” for wildcard searches, for example "value1 LIKE ".*oo.*"
|
956
|
+
# - parenthetical grouping: ( )
|
957
|
+
#
|
958
|
+
# Sample filter expression: `?filter="key1 < value1 OR key2 > value2"
|
959
|
+
#
|
960
|
+
# **Notes:**
|
961
|
+
#
|
962
|
+
# - Keys to the left of operators are case insensitive.
|
963
|
+
# - Partition results are sorted first by creation time, then by
|
964
|
+
# lexicographic order.
|
965
|
+
# - Up to 20 key value filter pairs are allowed, but due to performance
|
966
|
+
# considerations, only the first 10 will be used as a filter.
|
481
967
|
#
|
482
968
|
# @yield [response, operation] Access the result along with the RPC operation
|
483
969
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>]
|
@@ -566,17 +1052,17 @@ module Google
|
|
566
1052
|
# @example
|
567
1053
|
#
|
568
1054
|
# # Modify the global config, setting the timeout for
|
569
|
-
# #
|
1055
|
+
# # create_entity to 20 seconds,
|
570
1056
|
# # and all remaining timeouts to 10 seconds.
|
571
1057
|
# ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config|
|
572
1058
|
# config.timeout = 10.0
|
573
|
-
# config.rpcs.
|
1059
|
+
# config.rpcs.create_entity.timeout = 20.0
|
574
1060
|
# end
|
575
1061
|
#
|
576
1062
|
# # Apply the above configuration only to a new client.
|
577
1063
|
# client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config|
|
578
1064
|
# config.timeout = 10.0
|
579
|
-
# config.rpcs.
|
1065
|
+
# config.rpcs.create_entity.timeout = 20.0
|
580
1066
|
# end
|
581
1067
|
#
|
582
1068
|
# @!attribute [rw] endpoint
|
@@ -685,6 +1171,21 @@ module Google
|
|
685
1171
|
# trigger a retry.
|
686
1172
|
#
|
687
1173
|
class Rpcs
|
1174
|
+
##
|
1175
|
+
# RPC-specific configuration for `create_entity`
|
1176
|
+
# @return [::Gapic::Config::Method]
|
1177
|
+
#
|
1178
|
+
attr_reader :create_entity
|
1179
|
+
##
|
1180
|
+
# RPC-specific configuration for `update_entity`
|
1181
|
+
# @return [::Gapic::Config::Method]
|
1182
|
+
#
|
1183
|
+
attr_reader :update_entity
|
1184
|
+
##
|
1185
|
+
# RPC-specific configuration for `delete_entity`
|
1186
|
+
# @return [::Gapic::Config::Method]
|
1187
|
+
#
|
1188
|
+
attr_reader :delete_entity
|
688
1189
|
##
|
689
1190
|
# RPC-specific configuration for `get_entity`
|
690
1191
|
# @return [::Gapic::Config::Method]
|
@@ -696,6 +1197,16 @@ module Google
|
|
696
1197
|
#
|
697
1198
|
attr_reader :list_entities
|
698
1199
|
##
|
1200
|
+
# RPC-specific configuration for `create_partition`
|
1201
|
+
# @return [::Gapic::Config::Method]
|
1202
|
+
#
|
1203
|
+
attr_reader :create_partition
|
1204
|
+
##
|
1205
|
+
# RPC-specific configuration for `delete_partition`
|
1206
|
+
# @return [::Gapic::Config::Method]
|
1207
|
+
#
|
1208
|
+
attr_reader :delete_partition
|
1209
|
+
##
|
699
1210
|
# RPC-specific configuration for `get_partition`
|
700
1211
|
# @return [::Gapic::Config::Method]
|
701
1212
|
#
|
@@ -708,10 +1219,20 @@ module Google
|
|
708
1219
|
|
709
1220
|
# @private
|
710
1221
|
def initialize parent_rpcs = nil
|
1222
|
+
create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity
|
1223
|
+
@create_entity = ::Gapic::Config::Method.new create_entity_config
|
1224
|
+
update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity
|
1225
|
+
@update_entity = ::Gapic::Config::Method.new update_entity_config
|
1226
|
+
delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity
|
1227
|
+
@delete_entity = ::Gapic::Config::Method.new delete_entity_config
|
711
1228
|
get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity
|
712
1229
|
@get_entity = ::Gapic::Config::Method.new get_entity_config
|
713
1230
|
list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities
|
714
1231
|
@list_entities = ::Gapic::Config::Method.new list_entities_config
|
1232
|
+
create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition
|
1233
|
+
@create_partition = ::Gapic::Config::Method.new create_partition_config
|
1234
|
+
delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition
|
1235
|
+
@delete_partition = ::Gapic::Config::Method.new delete_partition_config
|
715
1236
|
get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition
|
716
1237
|
@get_partition = ::Gapic::Config::Method.new get_partition_config
|
717
1238
|
list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions
|
@@ -34,10 +34,20 @@ module Google
|
|
34
34
|
self.unmarshal_class_method = :decode
|
35
35
|
self.service_name = 'google.cloud.dataplex.v1.MetadataService'
|
36
36
|
|
37
|
+
# Create a metadata entity.
|
38
|
+
rpc :CreateEntity, ::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity
|
39
|
+
# Update a metadata entity. Only supports full resource update.
|
40
|
+
rpc :UpdateEntity, ::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Google::Cloud::Dataplex::V1::Entity
|
41
|
+
# Delete a metadata entity.
|
42
|
+
rpc :DeleteEntity, ::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Google::Protobuf::Empty
|
37
43
|
# Get a metadata entity.
|
38
44
|
rpc :GetEntity, ::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Google::Cloud::Dataplex::V1::Entity
|
39
45
|
# List metadata entities in a zone.
|
40
46
|
rpc :ListEntities, ::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Google::Cloud::Dataplex::V1::ListEntitiesResponse
|
47
|
+
# Create a metadata partition.
|
48
|
+
rpc :CreatePartition, ::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Google::Cloud::Dataplex::V1::Partition
|
49
|
+
# Delete a metadata partition.
|
50
|
+
rpc :DeletePartition, ::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Google::Protobuf::Empty
|
41
51
|
# Get a metadata partition of an entity.
|
42
52
|
rpc :GetPartition, ::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Google::Cloud::Dataplex::V1::Partition
|
43
53
|
# List metadata partitions of an entity.
|