google-cloud-dataplex-v1 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/dataplex/v1/bindings_override.rb +327 -0
- data/lib/google/cloud/dataplex/v1/content_service/client.rb +4 -6
- data/lib/google/cloud/dataplex/v1/content_service/rest/client.rb +969 -0
- data/lib/google/cloud/dataplex/v1/content_service/rest/service_stub.rb +584 -0
- data/lib/google/cloud/dataplex/v1/content_service/rest.rb +53 -0
- data/lib/google/cloud/dataplex/v1/content_service.rb +6 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/client.rb +20 -24
- data/lib/google/cloud/dataplex/v1/data_scan_service/operations.rb +12 -14
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/client.rb +948 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/operations.rb +793 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest/service_stub.rb +523 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service/rest.rb +56 -0
- data/lib/google/cloud/dataplex/v1/data_scan_service.rb +6 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/client.rb +100 -120
- data/lib/google/cloud/dataplex/v1/dataplex_service/operations.rb +12 -14
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/client.rb +2910 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/operations.rb +793 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest/service_stub.rb +1947 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service/rest.rb +58 -0
- data/lib/google/cloud/dataplex/v1/dataplex_service.rb +6 -0
- data/lib/google/cloud/dataplex/v1/metadata_service/client.rb +8 -12
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/client.rb +1051 -0
- data/lib/google/cloud/dataplex/v1/metadata_service/rest/service_stub.rb +582 -0
- data/lib/google/cloud/dataplex/v1/metadata_service/rest.rb +54 -0
- data/lib/google/cloud/dataplex/v1/metadata_service.rb +6 -0
- data/lib/google/cloud/dataplex/v1/rest.rb +41 -0
- data/lib/google/cloud/dataplex/v1/version.rb +1 -1
- data/lib/google/cloud/dataplex/v1.rb +5 -0
- metadata +27 -11
@@ -0,0 +1,1051 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/dataplex/v1/metadata_pb"
|
21
|
+
require "google/cloud/dataplex/v1/metadata_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module Dataplex
|
28
|
+
module V1
|
29
|
+
module MetadataService
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the MetadataService service.
|
33
|
+
#
|
34
|
+
# Metadata service manages metadata resources such as tables, filesets and
|
35
|
+
# partitions.
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :metadata_service_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the MetadataService Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# @example
|
50
|
+
#
|
51
|
+
# # Modify the configuration for all MetadataService clients
|
52
|
+
# ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config|
|
53
|
+
# config.timeout = 10.0
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# @yield [config] Configure the Client client.
|
57
|
+
# @yieldparam config [Client::Configuration]
|
58
|
+
#
|
59
|
+
# @return [Client::Configuration]
|
60
|
+
#
|
61
|
+
def self.configure
|
62
|
+
@configure ||= begin
|
63
|
+
namespace = ["Google", "Cloud", "Dataplex", "V1"]
|
64
|
+
parent_config = while namespace.any?
|
65
|
+
parent_name = namespace.join "::"
|
66
|
+
parent_const = const_get parent_name
|
67
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
68
|
+
namespace.pop
|
69
|
+
end
|
70
|
+
default_config = Client::Configuration.new parent_config
|
71
|
+
|
72
|
+
default_config.rpcs.create_entity.timeout = 60.0
|
73
|
+
|
74
|
+
default_config.rpcs.update_entity.timeout = 60.0
|
75
|
+
|
76
|
+
default_config.rpcs.delete_entity.timeout = 60.0
|
77
|
+
|
78
|
+
default_config.rpcs.get_entity.timeout = 60.0
|
79
|
+
default_config.rpcs.get_entity.retry_policy = {
|
80
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.list_entities.timeout = 60.0
|
84
|
+
default_config.rpcs.list_entities.retry_policy = {
|
85
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.create_partition.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.delete_partition.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.get_partition.timeout = 60.0
|
93
|
+
default_config.rpcs.get_partition.retry_policy = {
|
94
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
95
|
+
}
|
96
|
+
|
97
|
+
default_config.rpcs.list_partitions.timeout = 60.0
|
98
|
+
default_config.rpcs.list_partitions.retry_policy = {
|
99
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
100
|
+
}
|
101
|
+
|
102
|
+
default_config
|
103
|
+
end
|
104
|
+
yield @configure if block_given?
|
105
|
+
@configure
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Configure the MetadataService Client instance.
|
110
|
+
#
|
111
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
112
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
113
|
+
# should be made on {Client.configure}.
|
114
|
+
#
|
115
|
+
# See {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration}
|
116
|
+
# for a description of the configuration fields.
|
117
|
+
#
|
118
|
+
# @yield [config] Configure the Client client.
|
119
|
+
# @yieldparam config [Client::Configuration]
|
120
|
+
#
|
121
|
+
# @return [Client::Configuration]
|
122
|
+
#
|
123
|
+
def configure
|
124
|
+
yield @config if block_given?
|
125
|
+
@config
|
126
|
+
end
|
127
|
+
|
128
|
+
##
|
129
|
+
# Create a new MetadataService REST client object.
|
130
|
+
#
|
131
|
+
# @example
|
132
|
+
#
|
133
|
+
# # Create a client using the default configuration
|
134
|
+
# client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new
|
135
|
+
#
|
136
|
+
# # Create a client using a custom configuration
|
137
|
+
# client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config|
|
138
|
+
# config.timeout = 10.0
|
139
|
+
# end
|
140
|
+
#
|
141
|
+
# @yield [config] Configure the MetadataService client.
|
142
|
+
# @yieldparam config [Client::Configuration]
|
143
|
+
#
|
144
|
+
def initialize
|
145
|
+
# Create the configuration object
|
146
|
+
@config = Configuration.new Client.configure
|
147
|
+
|
148
|
+
# Yield the configuration if needed
|
149
|
+
yield @config if block_given?
|
150
|
+
|
151
|
+
# Create credentials
|
152
|
+
credentials = @config.credentials
|
153
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
154
|
+
# but only if the default endpoint does not have a region prefix.
|
155
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
156
|
+
!@config.endpoint.split(".").first.include?("-")
|
157
|
+
credentials ||= Credentials.default scope: @config.scope,
|
158
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
159
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
160
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
161
|
+
end
|
162
|
+
|
163
|
+
@quota_project_id = @config.quota_project
|
164
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
165
|
+
|
166
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
167
|
+
config.credentials = credentials
|
168
|
+
config.quota_project = @quota_project_id
|
169
|
+
config.endpoint = @config.endpoint
|
170
|
+
config.bindings_override = @config.bindings_override
|
171
|
+
end
|
172
|
+
|
173
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
174
|
+
config.credentials = credentials
|
175
|
+
config.quota_project = @quota_project_id
|
176
|
+
config.endpoint = @config.endpoint
|
177
|
+
config.bindings_override = @config.bindings_override
|
178
|
+
end
|
179
|
+
|
180
|
+
@metadata_service_stub = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Get the associated client for mix-in of the Locations.
|
185
|
+
#
|
186
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
187
|
+
#
|
188
|
+
attr_reader :location_client
|
189
|
+
|
190
|
+
##
|
191
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
192
|
+
#
|
193
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
194
|
+
#
|
195
|
+
attr_reader :iam_policy_client
|
196
|
+
|
197
|
+
# Service calls
|
198
|
+
|
199
|
+
##
|
200
|
+
# Create a metadata entity.
|
201
|
+
#
|
202
|
+
# @overload create_entity(request, options = nil)
|
203
|
+
# Pass arguments to `create_entity` via a request object, either of type
|
204
|
+
# {::Google::Cloud::Dataplex::V1::CreateEntityRequest} or an equivalent Hash.
|
205
|
+
#
|
206
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::Hash]
|
207
|
+
# A request object representing the call parameters. Required. To specify no
|
208
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
209
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
210
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
211
|
+
#
|
212
|
+
# @overload create_entity(parent: nil, entity: nil, validate_only: nil)
|
213
|
+
# Pass arguments to `create_entity` via keyword arguments. Note that at
|
214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
216
|
+
#
|
217
|
+
# @param parent [::String]
|
218
|
+
# Required. The resource name of the parent zone:
|
219
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
|
220
|
+
# @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash]
|
221
|
+
# Required. Entity resource.
|
222
|
+
# @param validate_only [::Boolean]
|
223
|
+
# Optional. Only validate the request, but do not perform mutations.
|
224
|
+
# The default is false.
|
225
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
226
|
+
# @yieldparam result [::Google::Cloud::Dataplex::V1::Entity]
|
227
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
228
|
+
#
|
229
|
+
# @return [::Google::Cloud::Dataplex::V1::Entity]
|
230
|
+
#
|
231
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
232
|
+
def create_entity request, options = nil
|
233
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
234
|
+
|
235
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreateEntityRequest
|
236
|
+
|
237
|
+
# Converts hash and nil to an options object
|
238
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
239
|
+
|
240
|
+
# Customize the options with defaults
|
241
|
+
call_metadata = @config.rpcs.create_entity.metadata.to_h
|
242
|
+
|
243
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
244
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
245
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
246
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
247
|
+
transports_version_send: [:rest]
|
248
|
+
|
249
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
250
|
+
|
251
|
+
options.apply_defaults timeout: @config.rpcs.create_entity.timeout,
|
252
|
+
metadata: call_metadata,
|
253
|
+
retry_policy: @config.rpcs.create_entity.retry_policy
|
254
|
+
|
255
|
+
options.apply_defaults timeout: @config.timeout,
|
256
|
+
metadata: @config.metadata,
|
257
|
+
retry_policy: @config.retry_policy
|
258
|
+
|
259
|
+
@metadata_service_stub.create_entity request, options do |result, operation|
|
260
|
+
yield result, operation if block_given?
|
261
|
+
return result
|
262
|
+
end
|
263
|
+
rescue ::Gapic::Rest::Error => e
|
264
|
+
raise ::Google::Cloud::Error.from_error(e)
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# Update a metadata entity. Only supports full resource update.
|
269
|
+
#
|
270
|
+
# @overload update_entity(request, options = nil)
|
271
|
+
# Pass arguments to `update_entity` via a request object, either of type
|
272
|
+
# {::Google::Cloud::Dataplex::V1::UpdateEntityRequest} or an equivalent Hash.
|
273
|
+
#
|
274
|
+
# @param request [::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::Hash]
|
275
|
+
# A request object representing the call parameters. Required. To specify no
|
276
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
277
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
278
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
279
|
+
#
|
280
|
+
# @overload update_entity(entity: nil, validate_only: nil)
|
281
|
+
# Pass arguments to `update_entity` via keyword arguments. Note that at
|
282
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
283
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
284
|
+
#
|
285
|
+
# @param entity [::Google::Cloud::Dataplex::V1::Entity, ::Hash]
|
286
|
+
# Required. Update description.
|
287
|
+
# @param validate_only [::Boolean]
|
288
|
+
# Optional. Only validate the request, but do not perform mutations.
|
289
|
+
# The default is false.
|
290
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
291
|
+
# @yieldparam result [::Google::Cloud::Dataplex::V1::Entity]
|
292
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
293
|
+
#
|
294
|
+
# @return [::Google::Cloud::Dataplex::V1::Entity]
|
295
|
+
#
|
296
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
297
|
+
def update_entity request, options = nil
|
298
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
299
|
+
|
300
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::UpdateEntityRequest
|
301
|
+
|
302
|
+
# Converts hash and nil to an options object
|
303
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
304
|
+
|
305
|
+
# Customize the options with defaults
|
306
|
+
call_metadata = @config.rpcs.update_entity.metadata.to_h
|
307
|
+
|
308
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
309
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
310
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
311
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
312
|
+
transports_version_send: [:rest]
|
313
|
+
|
314
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
315
|
+
|
316
|
+
options.apply_defaults timeout: @config.rpcs.update_entity.timeout,
|
317
|
+
metadata: call_metadata,
|
318
|
+
retry_policy: @config.rpcs.update_entity.retry_policy
|
319
|
+
|
320
|
+
options.apply_defaults timeout: @config.timeout,
|
321
|
+
metadata: @config.metadata,
|
322
|
+
retry_policy: @config.retry_policy
|
323
|
+
|
324
|
+
@metadata_service_stub.update_entity request, options do |result, operation|
|
325
|
+
yield result, operation if block_given?
|
326
|
+
return result
|
327
|
+
end
|
328
|
+
rescue ::Gapic::Rest::Error => e
|
329
|
+
raise ::Google::Cloud::Error.from_error(e)
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# Delete a metadata entity.
|
334
|
+
#
|
335
|
+
# @overload delete_entity(request, options = nil)
|
336
|
+
# Pass arguments to `delete_entity` via a request object, either of type
|
337
|
+
# {::Google::Cloud::Dataplex::V1::DeleteEntityRequest} or an equivalent Hash.
|
338
|
+
#
|
339
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::Hash]
|
340
|
+
# A request object representing the call parameters. Required. To specify no
|
341
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
342
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
343
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
344
|
+
#
|
345
|
+
# @overload delete_entity(name: nil, etag: nil)
|
346
|
+
# Pass arguments to `delete_entity` via keyword arguments. Note that at
|
347
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
348
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
349
|
+
#
|
350
|
+
# @param name [::String]
|
351
|
+
# Required. The resource name of the entity:
|
352
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
353
|
+
# @param etag [::String]
|
354
|
+
# Required. The etag associated with the entity, which can be retrieved with
|
355
|
+
# a [GetEntity][] request.
|
356
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
357
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
358
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
359
|
+
#
|
360
|
+
# @return [::Google::Protobuf::Empty]
|
361
|
+
#
|
362
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
363
|
+
def delete_entity request, options = nil
|
364
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
365
|
+
|
366
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeleteEntityRequest
|
367
|
+
|
368
|
+
# Converts hash and nil to an options object
|
369
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
370
|
+
|
371
|
+
# Customize the options with defaults
|
372
|
+
call_metadata = @config.rpcs.delete_entity.metadata.to_h
|
373
|
+
|
374
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
375
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
376
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
377
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
378
|
+
transports_version_send: [:rest]
|
379
|
+
|
380
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
381
|
+
|
382
|
+
options.apply_defaults timeout: @config.rpcs.delete_entity.timeout,
|
383
|
+
metadata: call_metadata,
|
384
|
+
retry_policy: @config.rpcs.delete_entity.retry_policy
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.timeout,
|
387
|
+
metadata: @config.metadata,
|
388
|
+
retry_policy: @config.retry_policy
|
389
|
+
|
390
|
+
@metadata_service_stub.delete_entity request, options do |result, operation|
|
391
|
+
yield result, operation if block_given?
|
392
|
+
return result
|
393
|
+
end
|
394
|
+
rescue ::Gapic::Rest::Error => e
|
395
|
+
raise ::Google::Cloud::Error.from_error(e)
|
396
|
+
end
|
397
|
+
|
398
|
+
##
|
399
|
+
# Get a metadata entity.
|
400
|
+
#
|
401
|
+
# @overload get_entity(request, options = nil)
|
402
|
+
# Pass arguments to `get_entity` via a request object, either of type
|
403
|
+
# {::Google::Cloud::Dataplex::V1::GetEntityRequest} or an equivalent Hash.
|
404
|
+
#
|
405
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash]
|
406
|
+
# A request object representing the call parameters. Required. To specify no
|
407
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
408
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
409
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
410
|
+
#
|
411
|
+
# @overload get_entity(name: nil, view: nil)
|
412
|
+
# Pass arguments to `get_entity` via keyword arguments. Note that at
|
413
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
414
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
415
|
+
#
|
416
|
+
# @param name [::String]
|
417
|
+
# Required. The resource name of the entity:
|
418
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.`
|
419
|
+
# @param view [::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView]
|
420
|
+
# Optional. Used to select the subset of entity information to return.
|
421
|
+
# Defaults to `BASIC`.
|
422
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
423
|
+
# @yieldparam result [::Google::Cloud::Dataplex::V1::Entity]
|
424
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
425
|
+
#
|
426
|
+
# @return [::Google::Cloud::Dataplex::V1::Entity]
|
427
|
+
#
|
428
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
429
|
+
def get_entity request, options = nil
|
430
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
431
|
+
|
432
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetEntityRequest
|
433
|
+
|
434
|
+
# Converts hash and nil to an options object
|
435
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
436
|
+
|
437
|
+
# Customize the options with defaults
|
438
|
+
call_metadata = @config.rpcs.get_entity.metadata.to_h
|
439
|
+
|
440
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
441
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
442
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
443
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
444
|
+
transports_version_send: [:rest]
|
445
|
+
|
446
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
447
|
+
|
448
|
+
options.apply_defaults timeout: @config.rpcs.get_entity.timeout,
|
449
|
+
metadata: call_metadata,
|
450
|
+
retry_policy: @config.rpcs.get_entity.retry_policy
|
451
|
+
|
452
|
+
options.apply_defaults timeout: @config.timeout,
|
453
|
+
metadata: @config.metadata,
|
454
|
+
retry_policy: @config.retry_policy
|
455
|
+
|
456
|
+
@metadata_service_stub.get_entity request, options do |result, operation|
|
457
|
+
yield result, operation if block_given?
|
458
|
+
return result
|
459
|
+
end
|
460
|
+
rescue ::Gapic::Rest::Error => e
|
461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
462
|
+
end
|
463
|
+
|
464
|
+
##
|
465
|
+
# List metadata entities in a zone.
|
466
|
+
#
|
467
|
+
# @overload list_entities(request, options = nil)
|
468
|
+
# Pass arguments to `list_entities` via a request object, either of type
|
469
|
+
# {::Google::Cloud::Dataplex::V1::ListEntitiesRequest} or an equivalent Hash.
|
470
|
+
#
|
471
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::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 list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil)
|
478
|
+
# Pass arguments to `list_entities` 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 parent [::String]
|
483
|
+
# Required. The resource name of the parent zone:
|
484
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
|
485
|
+
# @param view [::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView]
|
486
|
+
# Required. Specify the entity view to make a partial list request.
|
487
|
+
# @param page_size [::Integer]
|
488
|
+
# Optional. Maximum number of entities to return. The service may return
|
489
|
+
# fewer than this value. If unspecified, 100 entities will be returned by
|
490
|
+
# default. The maximum value is 500; larger values will will be truncated to
|
491
|
+
# 500.
|
492
|
+
# @param page_token [::String]
|
493
|
+
# Optional. Page token received from a previous `ListEntities` call. Provide
|
494
|
+
# this to retrieve the subsequent page. When paginating, all other parameters
|
495
|
+
# provided to `ListEntities` must match the call that provided the
|
496
|
+
# page token.
|
497
|
+
# @param filter [::String]
|
498
|
+
# Optional. The following filter parameters can be added to the URL to limit
|
499
|
+
# the entities returned by the API:
|
500
|
+
#
|
501
|
+
# - Entity ID: ?filter="id=entityID"
|
502
|
+
# - Asset ID: ?filter="asset=assetID"
|
503
|
+
# - Data path ?filter="data_path=gs://my-bucket"
|
504
|
+
# - Is HIVE compatible: ?filter="hive_compatible=true"
|
505
|
+
# - Is BigQuery compatible: ?filter="bigquery_compatible=true"
|
506
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
507
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>]
|
508
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
509
|
+
#
|
510
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>]
|
511
|
+
#
|
512
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
513
|
+
def list_entities request, options = nil
|
514
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
515
|
+
|
516
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListEntitiesRequest
|
517
|
+
|
518
|
+
# Converts hash and nil to an options object
|
519
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
520
|
+
|
521
|
+
# Customize the options with defaults
|
522
|
+
call_metadata = @config.rpcs.list_entities.metadata.to_h
|
523
|
+
|
524
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
525
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
526
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
527
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
528
|
+
transports_version_send: [:rest]
|
529
|
+
|
530
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
531
|
+
|
532
|
+
options.apply_defaults timeout: @config.rpcs.list_entities.timeout,
|
533
|
+
metadata: call_metadata,
|
534
|
+
retry_policy: @config.rpcs.list_entities.retry_policy
|
535
|
+
|
536
|
+
options.apply_defaults timeout: @config.timeout,
|
537
|
+
metadata: @config.metadata,
|
538
|
+
retry_policy: @config.retry_policy
|
539
|
+
|
540
|
+
@metadata_service_stub.list_entities request, options do |result, operation|
|
541
|
+
result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_entities, "entities", request, result, options
|
542
|
+
yield result, operation if block_given?
|
543
|
+
return result
|
544
|
+
end
|
545
|
+
rescue ::Gapic::Rest::Error => e
|
546
|
+
raise ::Google::Cloud::Error.from_error(e)
|
547
|
+
end
|
548
|
+
|
549
|
+
##
|
550
|
+
# Create a metadata partition.
|
551
|
+
#
|
552
|
+
# @overload create_partition(request, options = nil)
|
553
|
+
# Pass arguments to `create_partition` via a request object, either of type
|
554
|
+
# {::Google::Cloud::Dataplex::V1::CreatePartitionRequest} or an equivalent Hash.
|
555
|
+
#
|
556
|
+
# @param request [::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::Hash]
|
557
|
+
# A request object representing the call parameters. Required. To specify no
|
558
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
559
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
560
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
561
|
+
#
|
562
|
+
# @overload create_partition(parent: nil, partition: nil, validate_only: nil)
|
563
|
+
# Pass arguments to `create_partition` via keyword arguments. Note that at
|
564
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
565
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
566
|
+
#
|
567
|
+
# @param parent [::String]
|
568
|
+
# Required. The resource name of the parent zone:
|
569
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
570
|
+
# @param partition [::Google::Cloud::Dataplex::V1::Partition, ::Hash]
|
571
|
+
# Required. Partition resource.
|
572
|
+
# @param validate_only [::Boolean]
|
573
|
+
# Optional. Only validate the request, but do not perform mutations.
|
574
|
+
# The default is false.
|
575
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
576
|
+
# @yieldparam result [::Google::Cloud::Dataplex::V1::Partition]
|
577
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
578
|
+
#
|
579
|
+
# @return [::Google::Cloud::Dataplex::V1::Partition]
|
580
|
+
#
|
581
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
582
|
+
def create_partition request, options = nil
|
583
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
584
|
+
|
585
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::CreatePartitionRequest
|
586
|
+
|
587
|
+
# Converts hash and nil to an options object
|
588
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
589
|
+
|
590
|
+
# Customize the options with defaults
|
591
|
+
call_metadata = @config.rpcs.create_partition.metadata.to_h
|
592
|
+
|
593
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
594
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
595
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
596
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
597
|
+
transports_version_send: [:rest]
|
598
|
+
|
599
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
600
|
+
|
601
|
+
options.apply_defaults timeout: @config.rpcs.create_partition.timeout,
|
602
|
+
metadata: call_metadata,
|
603
|
+
retry_policy: @config.rpcs.create_partition.retry_policy
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.timeout,
|
606
|
+
metadata: @config.metadata,
|
607
|
+
retry_policy: @config.retry_policy
|
608
|
+
|
609
|
+
@metadata_service_stub.create_partition request, options do |result, operation|
|
610
|
+
yield result, operation if block_given?
|
611
|
+
return result
|
612
|
+
end
|
613
|
+
rescue ::Gapic::Rest::Error => e
|
614
|
+
raise ::Google::Cloud::Error.from_error(e)
|
615
|
+
end
|
616
|
+
|
617
|
+
##
|
618
|
+
# Delete a metadata partition.
|
619
|
+
#
|
620
|
+
# @overload delete_partition(request, options = nil)
|
621
|
+
# Pass arguments to `delete_partition` via a request object, either of type
|
622
|
+
# {::Google::Cloud::Dataplex::V1::DeletePartitionRequest} or an equivalent Hash.
|
623
|
+
#
|
624
|
+
# @param request [::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::Hash]
|
625
|
+
# A request object representing the call parameters. Required. To specify no
|
626
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
627
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
628
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
629
|
+
#
|
630
|
+
# @overload delete_partition(name: nil, etag: nil)
|
631
|
+
# Pass arguments to `delete_partition` via keyword arguments. Note that at
|
632
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
633
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
634
|
+
#
|
635
|
+
# @param name [::String]
|
636
|
+
# Required. The resource name of the partition.
|
637
|
+
# format:
|
638
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
|
639
|
+
# The \\{partition_value_path} segment consists of an ordered sequence of
|
640
|
+
# partition values separated by "/". All values must be provided.
|
641
|
+
# @param etag [::String]
|
642
|
+
# Optional. The etag associated with the partition.
|
643
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
644
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
645
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
646
|
+
#
|
647
|
+
# @return [::Google::Protobuf::Empty]
|
648
|
+
#
|
649
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
650
|
+
def delete_partition request, options = nil
|
651
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
652
|
+
|
653
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::DeletePartitionRequest
|
654
|
+
|
655
|
+
# Converts hash and nil to an options object
|
656
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
657
|
+
|
658
|
+
# Customize the options with defaults
|
659
|
+
call_metadata = @config.rpcs.delete_partition.metadata.to_h
|
660
|
+
|
661
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
662
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
663
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
664
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
665
|
+
transports_version_send: [:rest]
|
666
|
+
|
667
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
668
|
+
|
669
|
+
options.apply_defaults timeout: @config.rpcs.delete_partition.timeout,
|
670
|
+
metadata: call_metadata,
|
671
|
+
retry_policy: @config.rpcs.delete_partition.retry_policy
|
672
|
+
|
673
|
+
options.apply_defaults timeout: @config.timeout,
|
674
|
+
metadata: @config.metadata,
|
675
|
+
retry_policy: @config.retry_policy
|
676
|
+
|
677
|
+
@metadata_service_stub.delete_partition request, options do |result, operation|
|
678
|
+
yield result, operation if block_given?
|
679
|
+
return result
|
680
|
+
end
|
681
|
+
rescue ::Gapic::Rest::Error => e
|
682
|
+
raise ::Google::Cloud::Error.from_error(e)
|
683
|
+
end
|
684
|
+
|
685
|
+
##
|
686
|
+
# Get a metadata partition of an entity.
|
687
|
+
#
|
688
|
+
# @overload get_partition(request, options = nil)
|
689
|
+
# Pass arguments to `get_partition` via a request object, either of type
|
690
|
+
# {::Google::Cloud::Dataplex::V1::GetPartitionRequest} or an equivalent Hash.
|
691
|
+
#
|
692
|
+
# @param request [::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash]
|
693
|
+
# A request object representing the call parameters. Required. To specify no
|
694
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
695
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
696
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
697
|
+
#
|
698
|
+
# @overload get_partition(name: nil)
|
699
|
+
# Pass arguments to `get_partition` via keyword arguments. Note that at
|
700
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
701
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
702
|
+
#
|
703
|
+
# @param name [::String]
|
704
|
+
# Required. The resource name of the partition:
|
705
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
|
706
|
+
# The \\{partition_value_path} segment consists of an ordered sequence of
|
707
|
+
# partition values separated by "/". All values must be provided.
|
708
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
709
|
+
# @yieldparam result [::Google::Cloud::Dataplex::V1::Partition]
|
710
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
711
|
+
#
|
712
|
+
# @return [::Google::Cloud::Dataplex::V1::Partition]
|
713
|
+
#
|
714
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
715
|
+
def get_partition request, options = nil
|
716
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
717
|
+
|
718
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::GetPartitionRequest
|
719
|
+
|
720
|
+
# Converts hash and nil to an options object
|
721
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
722
|
+
|
723
|
+
# Customize the options with defaults
|
724
|
+
call_metadata = @config.rpcs.get_partition.metadata.to_h
|
725
|
+
|
726
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
727
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
728
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
729
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
730
|
+
transports_version_send: [:rest]
|
731
|
+
|
732
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
733
|
+
|
734
|
+
options.apply_defaults timeout: @config.rpcs.get_partition.timeout,
|
735
|
+
metadata: call_metadata,
|
736
|
+
retry_policy: @config.rpcs.get_partition.retry_policy
|
737
|
+
|
738
|
+
options.apply_defaults timeout: @config.timeout,
|
739
|
+
metadata: @config.metadata,
|
740
|
+
retry_policy: @config.retry_policy
|
741
|
+
|
742
|
+
@metadata_service_stub.get_partition request, options do |result, operation|
|
743
|
+
yield result, operation if block_given?
|
744
|
+
return result
|
745
|
+
end
|
746
|
+
rescue ::Gapic::Rest::Error => e
|
747
|
+
raise ::Google::Cloud::Error.from_error(e)
|
748
|
+
end
|
749
|
+
|
750
|
+
##
|
751
|
+
# List metadata partitions of an entity.
|
752
|
+
#
|
753
|
+
# @overload list_partitions(request, options = nil)
|
754
|
+
# Pass arguments to `list_partitions` via a request object, either of type
|
755
|
+
# {::Google::Cloud::Dataplex::V1::ListPartitionsRequest} or an equivalent Hash.
|
756
|
+
#
|
757
|
+
# @param request [::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::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_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
764
|
+
# Pass arguments to `list_partitions` 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 entity:
|
770
|
+
# `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
|
771
|
+
# @param page_size [::Integer]
|
772
|
+
# Optional. Maximum number of partitions to return. The service may return
|
773
|
+
# fewer than this value. If unspecified, 100 partitions will be returned by
|
774
|
+
# default. The maximum page size is 500; larger values will will be truncated
|
775
|
+
# to 500.
|
776
|
+
# @param page_token [::String]
|
777
|
+
# Optional. Page token received from a previous `ListPartitions` call.
|
778
|
+
# Provide this to retrieve the subsequent page. When paginating, all other
|
779
|
+
# parameters provided to `ListPartitions` must match the call that provided
|
780
|
+
# the page token.
|
781
|
+
# @param filter [::String]
|
782
|
+
# Optional. Filter the partitions returned to the caller using a key value
|
783
|
+
# pair expression. Supported operators and syntax:
|
784
|
+
#
|
785
|
+
# - logic operators: AND, OR
|
786
|
+
# - comparison operators: <, >, >=, <= ,=, !=
|
787
|
+
# - LIKE operators:
|
788
|
+
# - The right hand of a LIKE operator supports "." and
|
789
|
+
# "*" for wildcard searches, for example "value1 LIKE ".*oo.*"
|
790
|
+
# - parenthetical grouping: ( )
|
791
|
+
#
|
792
|
+
# Sample filter expression: `?filter="key1 < value1 OR key2 > value2"
|
793
|
+
#
|
794
|
+
# **Notes:**
|
795
|
+
#
|
796
|
+
# - Keys to the left of operators are case insensitive.
|
797
|
+
# - Partition results are sorted first by creation time, then by
|
798
|
+
# lexicographic order.
|
799
|
+
# - Up to 20 key value filter pairs are allowed, but due to performance
|
800
|
+
# considerations, only the first 10 will be used as a filter.
|
801
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
802
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>]
|
803
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
804
|
+
#
|
805
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>]
|
806
|
+
#
|
807
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
808
|
+
def list_partitions request, options = nil
|
809
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
810
|
+
|
811
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dataplex::V1::ListPartitionsRequest
|
812
|
+
|
813
|
+
# Converts hash and nil to an options object
|
814
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
815
|
+
|
816
|
+
# Customize the options with defaults
|
817
|
+
call_metadata = @config.rpcs.list_partitions.metadata.to_h
|
818
|
+
|
819
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
820
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
821
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
822
|
+
gapic_version: ::Google::Cloud::Dataplex::V1::VERSION,
|
823
|
+
transports_version_send: [:rest]
|
824
|
+
|
825
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
826
|
+
|
827
|
+
options.apply_defaults timeout: @config.rpcs.list_partitions.timeout,
|
828
|
+
metadata: call_metadata,
|
829
|
+
retry_policy: @config.rpcs.list_partitions.retry_policy
|
830
|
+
|
831
|
+
options.apply_defaults timeout: @config.timeout,
|
832
|
+
metadata: @config.metadata,
|
833
|
+
retry_policy: @config.retry_policy
|
834
|
+
|
835
|
+
@metadata_service_stub.list_partitions request, options do |result, operation|
|
836
|
+
result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_partitions, "partitions", request, result, options
|
837
|
+
yield result, operation if block_given?
|
838
|
+
return result
|
839
|
+
end
|
840
|
+
rescue ::Gapic::Rest::Error => e
|
841
|
+
raise ::Google::Cloud::Error.from_error(e)
|
842
|
+
end
|
843
|
+
|
844
|
+
##
|
845
|
+
# Configuration class for the MetadataService REST API.
|
846
|
+
#
|
847
|
+
# This class represents the configuration for MetadataService REST,
|
848
|
+
# providing control over timeouts, retry behavior, logging, transport
|
849
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
850
|
+
# applied individually to specific RPCs. See
|
851
|
+
# {::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client::Configuration::Rpcs}
|
852
|
+
# for a list of RPCs that can be configured independently.
|
853
|
+
#
|
854
|
+
# Configuration can be applied globally to all clients, or to a single client
|
855
|
+
# on construction.
|
856
|
+
#
|
857
|
+
# @example
|
858
|
+
#
|
859
|
+
# # Modify the global config, setting the timeout for
|
860
|
+
# # create_entity to 20 seconds,
|
861
|
+
# # and all remaining timeouts to 10 seconds.
|
862
|
+
# ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.configure do |config|
|
863
|
+
# config.timeout = 10.0
|
864
|
+
# config.rpcs.create_entity.timeout = 20.0
|
865
|
+
# end
|
866
|
+
#
|
867
|
+
# # Apply the above configuration only to a new client.
|
868
|
+
# client = ::Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.new do |config|
|
869
|
+
# config.timeout = 10.0
|
870
|
+
# config.rpcs.create_entity.timeout = 20.0
|
871
|
+
# end
|
872
|
+
#
|
873
|
+
# @!attribute [rw] endpoint
|
874
|
+
# The hostname or hostname:port of the service endpoint.
|
875
|
+
# Defaults to `"dataplex.googleapis.com"`.
|
876
|
+
# @return [::String]
|
877
|
+
# @!attribute [rw] credentials
|
878
|
+
# Credentials to send with calls. You may provide any of the following types:
|
879
|
+
# * (`String`) The path to a service account key file in JSON format
|
880
|
+
# * (`Hash`) A service account key as a Hash
|
881
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
882
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
883
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
884
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
885
|
+
# * (`nil`) indicating no credentials
|
886
|
+
# @return [::Object]
|
887
|
+
# @!attribute [rw] scope
|
888
|
+
# The OAuth scopes
|
889
|
+
# @return [::Array<::String>]
|
890
|
+
# @!attribute [rw] lib_name
|
891
|
+
# The library name as recorded in instrumentation and logging
|
892
|
+
# @return [::String]
|
893
|
+
# @!attribute [rw] lib_version
|
894
|
+
# The library version as recorded in instrumentation and logging
|
895
|
+
# @return [::String]
|
896
|
+
# @!attribute [rw] timeout
|
897
|
+
# The call timeout in seconds.
|
898
|
+
# @return [::Numeric]
|
899
|
+
# @!attribute [rw] metadata
|
900
|
+
# Additional headers to be sent with the call.
|
901
|
+
# @return [::Hash{::Symbol=>::String}]
|
902
|
+
# @!attribute [rw] retry_policy
|
903
|
+
# The retry policy. The value is a hash with the following keys:
|
904
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
905
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
906
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
907
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
908
|
+
# trigger a retry.
|
909
|
+
# @return [::Hash]
|
910
|
+
# @!attribute [rw] quota_project
|
911
|
+
# A separate project against which to charge quota.
|
912
|
+
# @return [::String]
|
913
|
+
#
|
914
|
+
class Configuration
|
915
|
+
extend ::Gapic::Config
|
916
|
+
|
917
|
+
config_attr :endpoint, "dataplex.googleapis.com", ::String
|
918
|
+
config_attr :credentials, nil do |value|
|
919
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
920
|
+
allowed.any? { |klass| klass === value }
|
921
|
+
end
|
922
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
923
|
+
config_attr :lib_name, nil, ::String, nil
|
924
|
+
config_attr :lib_version, nil, ::String, nil
|
925
|
+
config_attr :timeout, nil, ::Numeric, nil
|
926
|
+
config_attr :metadata, nil, ::Hash, nil
|
927
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
928
|
+
config_attr :quota_project, nil, ::String, nil
|
929
|
+
|
930
|
+
# @private
|
931
|
+
# Overrides for http bindings for the RPCs of this service
|
932
|
+
# are only used when this service is used as mixin, and only
|
933
|
+
# by the host service.
|
934
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
935
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
936
|
+
|
937
|
+
# @private
|
938
|
+
def initialize parent_config = nil
|
939
|
+
@parent_config = parent_config unless parent_config.nil?
|
940
|
+
|
941
|
+
yield self if block_given?
|
942
|
+
end
|
943
|
+
|
944
|
+
##
|
945
|
+
# Configurations for individual RPCs
|
946
|
+
# @return [Rpcs]
|
947
|
+
#
|
948
|
+
def rpcs
|
949
|
+
@rpcs ||= begin
|
950
|
+
parent_rpcs = nil
|
951
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
952
|
+
Rpcs.new parent_rpcs
|
953
|
+
end
|
954
|
+
end
|
955
|
+
|
956
|
+
##
|
957
|
+
# Configuration RPC class for the MetadataService API.
|
958
|
+
#
|
959
|
+
# Includes fields providing the configuration for each RPC in this service.
|
960
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
961
|
+
# the following configuration fields:
|
962
|
+
#
|
963
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
964
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
965
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
966
|
+
# include the following keys:
|
967
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
968
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
969
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
970
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
971
|
+
# trigger a retry.
|
972
|
+
#
|
973
|
+
class Rpcs
|
974
|
+
##
|
975
|
+
# RPC-specific configuration for `create_entity`
|
976
|
+
# @return [::Gapic::Config::Method]
|
977
|
+
#
|
978
|
+
attr_reader :create_entity
|
979
|
+
##
|
980
|
+
# RPC-specific configuration for `update_entity`
|
981
|
+
# @return [::Gapic::Config::Method]
|
982
|
+
#
|
983
|
+
attr_reader :update_entity
|
984
|
+
##
|
985
|
+
# RPC-specific configuration for `delete_entity`
|
986
|
+
# @return [::Gapic::Config::Method]
|
987
|
+
#
|
988
|
+
attr_reader :delete_entity
|
989
|
+
##
|
990
|
+
# RPC-specific configuration for `get_entity`
|
991
|
+
# @return [::Gapic::Config::Method]
|
992
|
+
#
|
993
|
+
attr_reader :get_entity
|
994
|
+
##
|
995
|
+
# RPC-specific configuration for `list_entities`
|
996
|
+
# @return [::Gapic::Config::Method]
|
997
|
+
#
|
998
|
+
attr_reader :list_entities
|
999
|
+
##
|
1000
|
+
# RPC-specific configuration for `create_partition`
|
1001
|
+
# @return [::Gapic::Config::Method]
|
1002
|
+
#
|
1003
|
+
attr_reader :create_partition
|
1004
|
+
##
|
1005
|
+
# RPC-specific configuration for `delete_partition`
|
1006
|
+
# @return [::Gapic::Config::Method]
|
1007
|
+
#
|
1008
|
+
attr_reader :delete_partition
|
1009
|
+
##
|
1010
|
+
# RPC-specific configuration for `get_partition`
|
1011
|
+
# @return [::Gapic::Config::Method]
|
1012
|
+
#
|
1013
|
+
attr_reader :get_partition
|
1014
|
+
##
|
1015
|
+
# RPC-specific configuration for `list_partitions`
|
1016
|
+
# @return [::Gapic::Config::Method]
|
1017
|
+
#
|
1018
|
+
attr_reader :list_partitions
|
1019
|
+
|
1020
|
+
# @private
|
1021
|
+
def initialize parent_rpcs = nil
|
1022
|
+
create_entity_config = parent_rpcs.create_entity if parent_rpcs.respond_to? :create_entity
|
1023
|
+
@create_entity = ::Gapic::Config::Method.new create_entity_config
|
1024
|
+
update_entity_config = parent_rpcs.update_entity if parent_rpcs.respond_to? :update_entity
|
1025
|
+
@update_entity = ::Gapic::Config::Method.new update_entity_config
|
1026
|
+
delete_entity_config = parent_rpcs.delete_entity if parent_rpcs.respond_to? :delete_entity
|
1027
|
+
@delete_entity = ::Gapic::Config::Method.new delete_entity_config
|
1028
|
+
get_entity_config = parent_rpcs.get_entity if parent_rpcs.respond_to? :get_entity
|
1029
|
+
@get_entity = ::Gapic::Config::Method.new get_entity_config
|
1030
|
+
list_entities_config = parent_rpcs.list_entities if parent_rpcs.respond_to? :list_entities
|
1031
|
+
@list_entities = ::Gapic::Config::Method.new list_entities_config
|
1032
|
+
create_partition_config = parent_rpcs.create_partition if parent_rpcs.respond_to? :create_partition
|
1033
|
+
@create_partition = ::Gapic::Config::Method.new create_partition_config
|
1034
|
+
delete_partition_config = parent_rpcs.delete_partition if parent_rpcs.respond_to? :delete_partition
|
1035
|
+
@delete_partition = ::Gapic::Config::Method.new delete_partition_config
|
1036
|
+
get_partition_config = parent_rpcs.get_partition if parent_rpcs.respond_to? :get_partition
|
1037
|
+
@get_partition = ::Gapic::Config::Method.new get_partition_config
|
1038
|
+
list_partitions_config = parent_rpcs.list_partitions if parent_rpcs.respond_to? :list_partitions
|
1039
|
+
@list_partitions = ::Gapic::Config::Method.new list_partitions_config
|
1040
|
+
|
1041
|
+
yield self if block_given?
|
1042
|
+
end
|
1043
|
+
end
|
1044
|
+
end
|
1045
|
+
end
|
1046
|
+
end
|
1047
|
+
end
|
1048
|
+
end
|
1049
|
+
end
|
1050
|
+
end
|
1051
|
+
end
|