google-cloud-data_catalog-lineage-v1 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb +1981 -0
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/credentials.rb +49 -0
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/operations.rb +772 -0
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/paths.rb +115 -0
- data/lib/google/cloud/data_catalog/lineage/v1/lineage.rb +55 -0
- data/lib/google/cloud/data_catalog/lineage/v1/version.rb +7 -2
- data/lib/google/cloud/data_catalog/lineage/v1.rb +42 -0
- data/lib/google/cloud/datacatalog/lineage/v1/lineage_pb.rb +241 -0
- data/lib/google/cloud/datacatalog/lineage/v1/lineage_services_pb.rb +104 -0
- data/lib/google-cloud-data_catalog-lineage-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/datacatalog/lineage/v1/lineage.rb +707 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- metadata +187 -12
@@ -0,0 +1,1981 @@
|
|
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/datacatalog/lineage/v1/lineage_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DataCatalog
|
25
|
+
module Lineage
|
26
|
+
module V1
|
27
|
+
module Lineage
|
28
|
+
##
|
29
|
+
# Client for the Lineage service.
|
30
|
+
#
|
31
|
+
# Lineage is used to track data flows between assets over time. You can
|
32
|
+
# create {::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent LineageEvents}
|
33
|
+
# to record lineage between multiple sources and a single target, for
|
34
|
+
# example, when table data is based on data from multiple tables.
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
include Paths
|
38
|
+
|
39
|
+
# @private
|
40
|
+
attr_reader :lineage_stub
|
41
|
+
|
42
|
+
##
|
43
|
+
# Configure the Lineage Client class.
|
44
|
+
#
|
45
|
+
# See {::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client::Configuration}
|
46
|
+
# for a description of the configuration fields.
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
#
|
50
|
+
# # Modify the configuration for all Lineage clients
|
51
|
+
# ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::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", "DataCatalog", "Lineage", "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.timeout = 60.0
|
72
|
+
default_config.retry_policy = {
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
74
|
+
}
|
75
|
+
|
76
|
+
default_config
|
77
|
+
end
|
78
|
+
yield @configure if block_given?
|
79
|
+
@configure
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# Configure the Lineage Client instance.
|
84
|
+
#
|
85
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
86
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
87
|
+
# should be made on {Client.configure}.
|
88
|
+
#
|
89
|
+
# See {::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client::Configuration}
|
90
|
+
# for a description of the configuration fields.
|
91
|
+
#
|
92
|
+
# @yield [config] Configure the Client client.
|
93
|
+
# @yieldparam config [Client::Configuration]
|
94
|
+
#
|
95
|
+
# @return [Client::Configuration]
|
96
|
+
#
|
97
|
+
def configure
|
98
|
+
yield @config if block_given?
|
99
|
+
@config
|
100
|
+
end
|
101
|
+
|
102
|
+
##
|
103
|
+
# Create a new Lineage client object.
|
104
|
+
#
|
105
|
+
# @example
|
106
|
+
#
|
107
|
+
# # Create a client using the default configuration
|
108
|
+
# client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
109
|
+
#
|
110
|
+
# # Create a client using a custom configuration
|
111
|
+
# client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new do |config|
|
112
|
+
# config.timeout = 10.0
|
113
|
+
# end
|
114
|
+
#
|
115
|
+
# @yield [config] Configure the Lineage client.
|
116
|
+
# @yieldparam config [Client::Configuration]
|
117
|
+
#
|
118
|
+
def initialize
|
119
|
+
# These require statements are intentionally placed here to initialize
|
120
|
+
# the gRPC module only when it's required.
|
121
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
122
|
+
require "gapic/grpc"
|
123
|
+
require "google/cloud/datacatalog/lineage/v1/lineage_services_pb"
|
124
|
+
|
125
|
+
# Create the configuration object
|
126
|
+
@config = Configuration.new Client.configure
|
127
|
+
|
128
|
+
# Yield the configuration if needed
|
129
|
+
yield @config if block_given?
|
130
|
+
|
131
|
+
# Create credentials
|
132
|
+
credentials = @config.credentials
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
134
|
+
# but only if the default endpoint does not have a region prefix.
|
135
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
136
|
+
!@config.endpoint.split(".").first.include?("-")
|
137
|
+
credentials ||= Credentials.default scope: @config.scope,
|
138
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
139
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
140
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
141
|
+
end
|
142
|
+
@quota_project_id = @config.quota_project
|
143
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
144
|
+
|
145
|
+
@operations_client = Operations.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.quota_project = @quota_project_id
|
148
|
+
config.endpoint = @config.endpoint
|
149
|
+
end
|
150
|
+
|
151
|
+
@lineage_stub = ::Gapic::ServiceStub.new(
|
152
|
+
::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Stub,
|
153
|
+
credentials: credentials,
|
154
|
+
endpoint: @config.endpoint,
|
155
|
+
channel_args: @config.channel_args,
|
156
|
+
interceptors: @config.interceptors
|
157
|
+
)
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Get the associated client for long-running operations.
|
162
|
+
#
|
163
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Operations]
|
164
|
+
#
|
165
|
+
attr_reader :operations_client
|
166
|
+
|
167
|
+
# Service calls
|
168
|
+
|
169
|
+
##
|
170
|
+
# Creates a new process.
|
171
|
+
#
|
172
|
+
# @overload create_process(request, options = nil)
|
173
|
+
# Pass arguments to `create_process` via a request object, either of type
|
174
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest} or an equivalent Hash.
|
175
|
+
#
|
176
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest, ::Hash]
|
177
|
+
# A request object representing the call parameters. Required. To specify no
|
178
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
179
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
180
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
181
|
+
#
|
182
|
+
# @overload create_process(parent: nil, process: nil, request_id: nil)
|
183
|
+
# Pass arguments to `create_process` via keyword arguments. Note that at
|
184
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
185
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
186
|
+
#
|
187
|
+
# @param parent [::String]
|
188
|
+
# Required. The name of the project and its location that should own the
|
189
|
+
# process.
|
190
|
+
# @param process [::Google::Cloud::DataCatalog::Lineage::V1::Process, ::Hash]
|
191
|
+
# Required. The process to create.
|
192
|
+
# @param request_id [::String]
|
193
|
+
# A unique identifier for this request. Restricted to 36 ASCII characters.
|
194
|
+
# A random UUID is recommended. This request is idempotent only if a
|
195
|
+
# `request_id` is provided.
|
196
|
+
#
|
197
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
198
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
199
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
200
|
+
#
|
201
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
202
|
+
#
|
203
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
204
|
+
#
|
205
|
+
# @example Basic example
|
206
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
207
|
+
#
|
208
|
+
# # Create a client object. The client can be reused for multiple calls.
|
209
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
210
|
+
#
|
211
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
212
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest.new
|
213
|
+
#
|
214
|
+
# # Call the create_process method.
|
215
|
+
# result = client.create_process request
|
216
|
+
#
|
217
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Process.
|
218
|
+
# p result
|
219
|
+
#
|
220
|
+
def create_process request, options = nil
|
221
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
222
|
+
|
223
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest
|
224
|
+
|
225
|
+
# Converts hash and nil to an options object
|
226
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
227
|
+
|
228
|
+
# Customize the options with defaults
|
229
|
+
metadata = @config.rpcs.create_process.metadata.to_h
|
230
|
+
|
231
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
232
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
233
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
234
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
235
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
236
|
+
|
237
|
+
header_params = {}
|
238
|
+
if request.parent
|
239
|
+
header_params["parent"] = request.parent
|
240
|
+
end
|
241
|
+
|
242
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
243
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.rpcs.create_process.timeout,
|
246
|
+
metadata: metadata,
|
247
|
+
retry_policy: @config.rpcs.create_process.retry_policy
|
248
|
+
|
249
|
+
options.apply_defaults timeout: @config.timeout,
|
250
|
+
metadata: @config.metadata,
|
251
|
+
retry_policy: @config.retry_policy
|
252
|
+
|
253
|
+
@lineage_stub.call_rpc :create_process, request, options: options do |response, operation|
|
254
|
+
yield response, operation if block_given?
|
255
|
+
return response
|
256
|
+
end
|
257
|
+
rescue ::GRPC::BadStatus => e
|
258
|
+
raise ::Google::Cloud::Error.from_error(e)
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# Updates a process.
|
263
|
+
#
|
264
|
+
# @overload update_process(request, options = nil)
|
265
|
+
# Pass arguments to `update_process` via a request object, either of type
|
266
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest} or an equivalent Hash.
|
267
|
+
#
|
268
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest, ::Hash]
|
269
|
+
# A request object representing the call parameters. Required. To specify no
|
270
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
271
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
272
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
273
|
+
#
|
274
|
+
# @overload update_process(process: nil, update_mask: nil, allow_missing: nil)
|
275
|
+
# Pass arguments to `update_process` via keyword arguments. Note that at
|
276
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
277
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
278
|
+
#
|
279
|
+
# @param process [::Google::Cloud::DataCatalog::Lineage::V1::Process, ::Hash]
|
280
|
+
# Required. The lineage process to update.
|
281
|
+
#
|
282
|
+
# The process's `name` field is used to identify the process to update.
|
283
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
284
|
+
# The list of fields to update. Currently not used. The whole message is
|
285
|
+
# updated.
|
286
|
+
# @param allow_missing [::Boolean]
|
287
|
+
# If set to true and the process is not found, the request inserts it.
|
288
|
+
#
|
289
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
290
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
291
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
292
|
+
#
|
293
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
294
|
+
#
|
295
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
296
|
+
#
|
297
|
+
# @example Basic example
|
298
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
299
|
+
#
|
300
|
+
# # Create a client object. The client can be reused for multiple calls.
|
301
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
302
|
+
#
|
303
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
304
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest.new
|
305
|
+
#
|
306
|
+
# # Call the update_process method.
|
307
|
+
# result = client.update_process request
|
308
|
+
#
|
309
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Process.
|
310
|
+
# p result
|
311
|
+
#
|
312
|
+
def update_process request, options = nil
|
313
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
314
|
+
|
315
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest
|
316
|
+
|
317
|
+
# Converts hash and nil to an options object
|
318
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
319
|
+
|
320
|
+
# Customize the options with defaults
|
321
|
+
metadata = @config.rpcs.update_process.metadata.to_h
|
322
|
+
|
323
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
324
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
325
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
326
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
327
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
328
|
+
|
329
|
+
header_params = {}
|
330
|
+
if request.process&.name
|
331
|
+
header_params["process.name"] = request.process.name
|
332
|
+
end
|
333
|
+
|
334
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
335
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
336
|
+
|
337
|
+
options.apply_defaults timeout: @config.rpcs.update_process.timeout,
|
338
|
+
metadata: metadata,
|
339
|
+
retry_policy: @config.rpcs.update_process.retry_policy
|
340
|
+
|
341
|
+
options.apply_defaults timeout: @config.timeout,
|
342
|
+
metadata: @config.metadata,
|
343
|
+
retry_policy: @config.retry_policy
|
344
|
+
|
345
|
+
@lineage_stub.call_rpc :update_process, request, options: options do |response, operation|
|
346
|
+
yield response, operation if block_given?
|
347
|
+
return response
|
348
|
+
end
|
349
|
+
rescue ::GRPC::BadStatus => e
|
350
|
+
raise ::Google::Cloud::Error.from_error(e)
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# Gets the details of the specified process.
|
355
|
+
#
|
356
|
+
# @overload get_process(request, options = nil)
|
357
|
+
# Pass arguments to `get_process` via a request object, either of type
|
358
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest} or an equivalent Hash.
|
359
|
+
#
|
360
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest, ::Hash]
|
361
|
+
# A request object representing the call parameters. Required. To specify no
|
362
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
363
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
364
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
365
|
+
#
|
366
|
+
# @overload get_process(name: nil)
|
367
|
+
# Pass arguments to `get_process` via keyword arguments. Note that at
|
368
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
369
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
370
|
+
#
|
371
|
+
# @param name [::String]
|
372
|
+
# Required. The name of the process to get.
|
373
|
+
#
|
374
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
375
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
376
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
377
|
+
#
|
378
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
|
379
|
+
#
|
380
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
381
|
+
#
|
382
|
+
# @example Basic example
|
383
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
384
|
+
#
|
385
|
+
# # Create a client object. The client can be reused for multiple calls.
|
386
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
387
|
+
#
|
388
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
389
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest.new
|
390
|
+
#
|
391
|
+
# # Call the get_process method.
|
392
|
+
# result = client.get_process request
|
393
|
+
#
|
394
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Process.
|
395
|
+
# p result
|
396
|
+
#
|
397
|
+
def get_process request, options = nil
|
398
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
399
|
+
|
400
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest
|
401
|
+
|
402
|
+
# Converts hash and nil to an options object
|
403
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
404
|
+
|
405
|
+
# Customize the options with defaults
|
406
|
+
metadata = @config.rpcs.get_process.metadata.to_h
|
407
|
+
|
408
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
409
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
410
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
411
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
412
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
413
|
+
|
414
|
+
header_params = {}
|
415
|
+
if request.name
|
416
|
+
header_params["name"] = request.name
|
417
|
+
end
|
418
|
+
|
419
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
420
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
421
|
+
|
422
|
+
options.apply_defaults timeout: @config.rpcs.get_process.timeout,
|
423
|
+
metadata: metadata,
|
424
|
+
retry_policy: @config.rpcs.get_process.retry_policy
|
425
|
+
|
426
|
+
options.apply_defaults timeout: @config.timeout,
|
427
|
+
metadata: @config.metadata,
|
428
|
+
retry_policy: @config.retry_policy
|
429
|
+
|
430
|
+
@lineage_stub.call_rpc :get_process, request, options: options do |response, operation|
|
431
|
+
yield response, operation if block_given?
|
432
|
+
return response
|
433
|
+
end
|
434
|
+
rescue ::GRPC::BadStatus => e
|
435
|
+
raise ::Google::Cloud::Error.from_error(e)
|
436
|
+
end
|
437
|
+
|
438
|
+
##
|
439
|
+
# List processes in the given project and location. List order is descending
|
440
|
+
# by insertion time.
|
441
|
+
#
|
442
|
+
# @overload list_processes(request, options = nil)
|
443
|
+
# Pass arguments to `list_processes` via a request object, either of type
|
444
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest} or an equivalent Hash.
|
445
|
+
#
|
446
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest, ::Hash]
|
447
|
+
# A request object representing the call parameters. Required. To specify no
|
448
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
449
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
450
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
451
|
+
#
|
452
|
+
# @overload list_processes(parent: nil, page_size: nil, page_token: nil)
|
453
|
+
# Pass arguments to `list_processes` via keyword arguments. Note that at
|
454
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
455
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
456
|
+
#
|
457
|
+
# @param parent [::String]
|
458
|
+
# Required. The name of the project and its location that owns this
|
459
|
+
# collection of processes.
|
460
|
+
# @param page_size [::Integer]
|
461
|
+
# The maximum number of processes to return. The service may return
|
462
|
+
# fewer than this value. If unspecified, at most 50 processes are
|
463
|
+
# returned. The maximum value is 100; values greater than 100 are cut to
|
464
|
+
# 100.
|
465
|
+
# @param page_token [::String]
|
466
|
+
# The page token received from a previous `ListProcesses` call. Specify
|
467
|
+
# it to get the next page.
|
468
|
+
#
|
469
|
+
# When paginating, all other parameters specified in this call must
|
470
|
+
# match the parameters of the call that provided the page token.
|
471
|
+
#
|
472
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
473
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Process>]
|
474
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
475
|
+
#
|
476
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Process>]
|
477
|
+
#
|
478
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
479
|
+
#
|
480
|
+
# @example Basic example
|
481
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
482
|
+
#
|
483
|
+
# # Create a client object. The client can be reused for multiple calls.
|
484
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
485
|
+
#
|
486
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
487
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest.new
|
488
|
+
#
|
489
|
+
# # Call the list_processes method.
|
490
|
+
# result = client.list_processes request
|
491
|
+
#
|
492
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
493
|
+
# # iterate over all elements by calling #each, and the enumerable
|
494
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
495
|
+
# # methods are also available for managing paging directly.
|
496
|
+
# result.each do |response|
|
497
|
+
# # Each element is of type ::Google::Cloud::DataCatalog::Lineage::V1::Process.
|
498
|
+
# p response
|
499
|
+
# end
|
500
|
+
#
|
501
|
+
def list_processes request, options = nil
|
502
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
503
|
+
|
504
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest
|
505
|
+
|
506
|
+
# Converts hash and nil to an options object
|
507
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
508
|
+
|
509
|
+
# Customize the options with defaults
|
510
|
+
metadata = @config.rpcs.list_processes.metadata.to_h
|
511
|
+
|
512
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
513
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
514
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
515
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
516
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
517
|
+
|
518
|
+
header_params = {}
|
519
|
+
if request.parent
|
520
|
+
header_params["parent"] = request.parent
|
521
|
+
end
|
522
|
+
|
523
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
524
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
525
|
+
|
526
|
+
options.apply_defaults timeout: @config.rpcs.list_processes.timeout,
|
527
|
+
metadata: metadata,
|
528
|
+
retry_policy: @config.rpcs.list_processes.retry_policy
|
529
|
+
|
530
|
+
options.apply_defaults timeout: @config.timeout,
|
531
|
+
metadata: @config.metadata,
|
532
|
+
retry_policy: @config.retry_policy
|
533
|
+
|
534
|
+
@lineage_stub.call_rpc :list_processes, request, options: options do |response, operation|
|
535
|
+
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_processes, request, response, operation, options
|
536
|
+
yield response, operation if block_given?
|
537
|
+
return response
|
538
|
+
end
|
539
|
+
rescue ::GRPC::BadStatus => e
|
540
|
+
raise ::Google::Cloud::Error.from_error(e)
|
541
|
+
end
|
542
|
+
|
543
|
+
##
|
544
|
+
# Deletes the process with the specified name.
|
545
|
+
#
|
546
|
+
# @overload delete_process(request, options = nil)
|
547
|
+
# Pass arguments to `delete_process` via a request object, either of type
|
548
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest} or an equivalent Hash.
|
549
|
+
#
|
550
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest, ::Hash]
|
551
|
+
# A request object representing the call parameters. Required. To specify no
|
552
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
553
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
554
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
555
|
+
#
|
556
|
+
# @overload delete_process(name: nil, allow_missing: nil)
|
557
|
+
# Pass arguments to `delete_process` via keyword arguments. Note that at
|
558
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
559
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
560
|
+
#
|
561
|
+
# @param name [::String]
|
562
|
+
# Required. The name of the process to delete.
|
563
|
+
# @param allow_missing [::Boolean]
|
564
|
+
# If set to true and the process is not found, the request
|
565
|
+
# succeeds but the server doesn't perform any actions.
|
566
|
+
#
|
567
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
568
|
+
# @yieldparam response [::Gapic::Operation]
|
569
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
570
|
+
#
|
571
|
+
# @return [::Gapic::Operation]
|
572
|
+
#
|
573
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
574
|
+
#
|
575
|
+
# @example Basic example
|
576
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
577
|
+
#
|
578
|
+
# # Create a client object. The client can be reused for multiple calls.
|
579
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
580
|
+
#
|
581
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
582
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest.new
|
583
|
+
#
|
584
|
+
# # Call the delete_process method.
|
585
|
+
# result = client.delete_process request
|
586
|
+
#
|
587
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
588
|
+
# # object to check the status of an operation, cancel it, or wait
|
589
|
+
# # for results. Here is how to block until completion:
|
590
|
+
# result.wait_until_done! timeout: 60
|
591
|
+
# if result.response?
|
592
|
+
# p result.response
|
593
|
+
# else
|
594
|
+
# puts "Error!"
|
595
|
+
# end
|
596
|
+
#
|
597
|
+
def delete_process request, options = nil
|
598
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
599
|
+
|
600
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest
|
601
|
+
|
602
|
+
# Converts hash and nil to an options object
|
603
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
604
|
+
|
605
|
+
# Customize the options with defaults
|
606
|
+
metadata = @config.rpcs.delete_process.metadata.to_h
|
607
|
+
|
608
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
609
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
610
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
611
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
612
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
613
|
+
|
614
|
+
header_params = {}
|
615
|
+
if request.name
|
616
|
+
header_params["name"] = request.name
|
617
|
+
end
|
618
|
+
|
619
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
620
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
621
|
+
|
622
|
+
options.apply_defaults timeout: @config.rpcs.delete_process.timeout,
|
623
|
+
metadata: metadata,
|
624
|
+
retry_policy: @config.rpcs.delete_process.retry_policy
|
625
|
+
|
626
|
+
options.apply_defaults timeout: @config.timeout,
|
627
|
+
metadata: @config.metadata,
|
628
|
+
retry_policy: @config.retry_policy
|
629
|
+
|
630
|
+
@lineage_stub.call_rpc :delete_process, request, options: options do |response, operation|
|
631
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
632
|
+
yield response, operation if block_given?
|
633
|
+
return response
|
634
|
+
end
|
635
|
+
rescue ::GRPC::BadStatus => e
|
636
|
+
raise ::Google::Cloud::Error.from_error(e)
|
637
|
+
end
|
638
|
+
|
639
|
+
##
|
640
|
+
# Creates a new run.
|
641
|
+
#
|
642
|
+
# @overload create_run(request, options = nil)
|
643
|
+
# Pass arguments to `create_run` via a request object, either of type
|
644
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest} or an equivalent Hash.
|
645
|
+
#
|
646
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest, ::Hash]
|
647
|
+
# A request object representing the call parameters. Required. To specify no
|
648
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
649
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
650
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
651
|
+
#
|
652
|
+
# @overload create_run(parent: nil, run: nil, request_id: nil)
|
653
|
+
# Pass arguments to `create_run` via keyword arguments. Note that at
|
654
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
655
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
656
|
+
#
|
657
|
+
# @param parent [::String]
|
658
|
+
# Required. The name of the process that should own the run.
|
659
|
+
# @param run [::Google::Cloud::DataCatalog::Lineage::V1::Run, ::Hash]
|
660
|
+
# Required. The run to create.
|
661
|
+
# @param request_id [::String]
|
662
|
+
# A unique identifier for this request. Restricted to 36 ASCII characters.
|
663
|
+
# A random UUID is recommended. This request is idempotent only if a
|
664
|
+
# `request_id` is provided.
|
665
|
+
#
|
666
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
667
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
668
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
669
|
+
#
|
670
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
671
|
+
#
|
672
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
673
|
+
#
|
674
|
+
# @example Basic example
|
675
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
676
|
+
#
|
677
|
+
# # Create a client object. The client can be reused for multiple calls.
|
678
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
679
|
+
#
|
680
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
681
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest.new
|
682
|
+
#
|
683
|
+
# # Call the create_run method.
|
684
|
+
# result = client.create_run request
|
685
|
+
#
|
686
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Run.
|
687
|
+
# p result
|
688
|
+
#
|
689
|
+
def create_run request, options = nil
|
690
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
691
|
+
|
692
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest
|
693
|
+
|
694
|
+
# Converts hash and nil to an options object
|
695
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
696
|
+
|
697
|
+
# Customize the options with defaults
|
698
|
+
metadata = @config.rpcs.create_run.metadata.to_h
|
699
|
+
|
700
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
701
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
702
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
703
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
704
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
705
|
+
|
706
|
+
header_params = {}
|
707
|
+
if request.parent
|
708
|
+
header_params["parent"] = request.parent
|
709
|
+
end
|
710
|
+
|
711
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
712
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
713
|
+
|
714
|
+
options.apply_defaults timeout: @config.rpcs.create_run.timeout,
|
715
|
+
metadata: metadata,
|
716
|
+
retry_policy: @config.rpcs.create_run.retry_policy
|
717
|
+
|
718
|
+
options.apply_defaults timeout: @config.timeout,
|
719
|
+
metadata: @config.metadata,
|
720
|
+
retry_policy: @config.retry_policy
|
721
|
+
|
722
|
+
@lineage_stub.call_rpc :create_run, request, options: options do |response, operation|
|
723
|
+
yield response, operation if block_given?
|
724
|
+
return response
|
725
|
+
end
|
726
|
+
rescue ::GRPC::BadStatus => e
|
727
|
+
raise ::Google::Cloud::Error.from_error(e)
|
728
|
+
end
|
729
|
+
|
730
|
+
##
|
731
|
+
# Updates a run.
|
732
|
+
#
|
733
|
+
# @overload update_run(request, options = nil)
|
734
|
+
# Pass arguments to `update_run` via a request object, either of type
|
735
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest} or an equivalent Hash.
|
736
|
+
#
|
737
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest, ::Hash]
|
738
|
+
# A request object representing the call parameters. Required. To specify no
|
739
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
740
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
741
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
742
|
+
#
|
743
|
+
# @overload update_run(run: nil, update_mask: nil)
|
744
|
+
# Pass arguments to `update_run` via keyword arguments. Note that at
|
745
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
746
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
747
|
+
#
|
748
|
+
# @param run [::Google::Cloud::DataCatalog::Lineage::V1::Run, ::Hash]
|
749
|
+
# Required. The lineage run to update.
|
750
|
+
#
|
751
|
+
# The run's `name` field is used to identify the run to update.
|
752
|
+
#
|
753
|
+
# Format:
|
754
|
+
# `projects/{project}/locations/{location}/processes/{process}/runs/{run}`.
|
755
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
756
|
+
# The list of fields to update. Currently not used. The whole message is
|
757
|
+
# updated.
|
758
|
+
#
|
759
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
760
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
761
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
762
|
+
#
|
763
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
764
|
+
#
|
765
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
766
|
+
#
|
767
|
+
# @example Basic example
|
768
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
769
|
+
#
|
770
|
+
# # Create a client object. The client can be reused for multiple calls.
|
771
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
772
|
+
#
|
773
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
774
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest.new
|
775
|
+
#
|
776
|
+
# # Call the update_run method.
|
777
|
+
# result = client.update_run request
|
778
|
+
#
|
779
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Run.
|
780
|
+
# p result
|
781
|
+
#
|
782
|
+
def update_run request, options = nil
|
783
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
784
|
+
|
785
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest
|
786
|
+
|
787
|
+
# Converts hash and nil to an options object
|
788
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
789
|
+
|
790
|
+
# Customize the options with defaults
|
791
|
+
metadata = @config.rpcs.update_run.metadata.to_h
|
792
|
+
|
793
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
794
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
795
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
796
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
797
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
798
|
+
|
799
|
+
header_params = {}
|
800
|
+
if request.run&.name
|
801
|
+
header_params["run.name"] = request.run.name
|
802
|
+
end
|
803
|
+
|
804
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
805
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
806
|
+
|
807
|
+
options.apply_defaults timeout: @config.rpcs.update_run.timeout,
|
808
|
+
metadata: metadata,
|
809
|
+
retry_policy: @config.rpcs.update_run.retry_policy
|
810
|
+
|
811
|
+
options.apply_defaults timeout: @config.timeout,
|
812
|
+
metadata: @config.metadata,
|
813
|
+
retry_policy: @config.retry_policy
|
814
|
+
|
815
|
+
@lineage_stub.call_rpc :update_run, request, options: options do |response, operation|
|
816
|
+
yield response, operation if block_given?
|
817
|
+
return response
|
818
|
+
end
|
819
|
+
rescue ::GRPC::BadStatus => e
|
820
|
+
raise ::Google::Cloud::Error.from_error(e)
|
821
|
+
end
|
822
|
+
|
823
|
+
##
|
824
|
+
# Gets the details of the specified run.
|
825
|
+
#
|
826
|
+
# @overload get_run(request, options = nil)
|
827
|
+
# Pass arguments to `get_run` via a request object, either of type
|
828
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest} or an equivalent Hash.
|
829
|
+
#
|
830
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest, ::Hash]
|
831
|
+
# A request object representing the call parameters. Required. To specify no
|
832
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
833
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
834
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
835
|
+
#
|
836
|
+
# @overload get_run(name: nil)
|
837
|
+
# Pass arguments to `get_run` via keyword arguments. Note that at
|
838
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
839
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
840
|
+
#
|
841
|
+
# @param name [::String]
|
842
|
+
# Required. The name of the run to get.
|
843
|
+
#
|
844
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
845
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
846
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
847
|
+
#
|
848
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
|
849
|
+
#
|
850
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
851
|
+
#
|
852
|
+
# @example Basic example
|
853
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
854
|
+
#
|
855
|
+
# # Create a client object. The client can be reused for multiple calls.
|
856
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
857
|
+
#
|
858
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
859
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest.new
|
860
|
+
#
|
861
|
+
# # Call the get_run method.
|
862
|
+
# result = client.get_run request
|
863
|
+
#
|
864
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::Run.
|
865
|
+
# p result
|
866
|
+
#
|
867
|
+
def get_run request, options = nil
|
868
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
869
|
+
|
870
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest
|
871
|
+
|
872
|
+
# Converts hash and nil to an options object
|
873
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
874
|
+
|
875
|
+
# Customize the options with defaults
|
876
|
+
metadata = @config.rpcs.get_run.metadata.to_h
|
877
|
+
|
878
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
879
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
880
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
881
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
882
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
883
|
+
|
884
|
+
header_params = {}
|
885
|
+
if request.name
|
886
|
+
header_params["name"] = request.name
|
887
|
+
end
|
888
|
+
|
889
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
890
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
891
|
+
|
892
|
+
options.apply_defaults timeout: @config.rpcs.get_run.timeout,
|
893
|
+
metadata: metadata,
|
894
|
+
retry_policy: @config.rpcs.get_run.retry_policy
|
895
|
+
|
896
|
+
options.apply_defaults timeout: @config.timeout,
|
897
|
+
metadata: @config.metadata,
|
898
|
+
retry_policy: @config.retry_policy
|
899
|
+
|
900
|
+
@lineage_stub.call_rpc :get_run, request, options: options do |response, operation|
|
901
|
+
yield response, operation if block_given?
|
902
|
+
return response
|
903
|
+
end
|
904
|
+
rescue ::GRPC::BadStatus => e
|
905
|
+
raise ::Google::Cloud::Error.from_error(e)
|
906
|
+
end
|
907
|
+
|
908
|
+
##
|
909
|
+
# Lists runs in the given project and location. List order is descending by
|
910
|
+
# `start_time`.
|
911
|
+
#
|
912
|
+
# @overload list_runs(request, options = nil)
|
913
|
+
# Pass arguments to `list_runs` via a request object, either of type
|
914
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest} or an equivalent Hash.
|
915
|
+
#
|
916
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest, ::Hash]
|
917
|
+
# A request object representing the call parameters. Required. To specify no
|
918
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
919
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
920
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
921
|
+
#
|
922
|
+
# @overload list_runs(parent: nil, page_size: nil, page_token: nil)
|
923
|
+
# Pass arguments to `list_runs` via keyword arguments. Note that at
|
924
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
925
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
926
|
+
#
|
927
|
+
# @param parent [::String]
|
928
|
+
# Required. The name of process that owns this collection of runs.
|
929
|
+
# @param page_size [::Integer]
|
930
|
+
# The maximum number of runs to return. The service may return
|
931
|
+
# fewer than this value. If unspecified, at most 50 runs are
|
932
|
+
# returned. The maximum value is 100; values greater than 100 are cut to
|
933
|
+
# 100.
|
934
|
+
# @param page_token [::String]
|
935
|
+
# The page token received from a previous `ListRuns` call. Specify
|
936
|
+
# it to get the next page.
|
937
|
+
#
|
938
|
+
# When paginating, all other parameters specified in this call must
|
939
|
+
# match the parameters of the call that provided the page token.
|
940
|
+
#
|
941
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
942
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Run>]
|
943
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
944
|
+
#
|
945
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Run>]
|
946
|
+
#
|
947
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
948
|
+
#
|
949
|
+
# @example Basic example
|
950
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
951
|
+
#
|
952
|
+
# # Create a client object. The client can be reused for multiple calls.
|
953
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
954
|
+
#
|
955
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
956
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest.new
|
957
|
+
#
|
958
|
+
# # Call the list_runs method.
|
959
|
+
# result = client.list_runs request
|
960
|
+
#
|
961
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
962
|
+
# # iterate over all elements by calling #each, and the enumerable
|
963
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
964
|
+
# # methods are also available for managing paging directly.
|
965
|
+
# result.each do |response|
|
966
|
+
# # Each element is of type ::Google::Cloud::DataCatalog::Lineage::V1::Run.
|
967
|
+
# p response
|
968
|
+
# end
|
969
|
+
#
|
970
|
+
def list_runs request, options = nil
|
971
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
972
|
+
|
973
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest
|
974
|
+
|
975
|
+
# Converts hash and nil to an options object
|
976
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
977
|
+
|
978
|
+
# Customize the options with defaults
|
979
|
+
metadata = @config.rpcs.list_runs.metadata.to_h
|
980
|
+
|
981
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
982
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
983
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
984
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
985
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
986
|
+
|
987
|
+
header_params = {}
|
988
|
+
if request.parent
|
989
|
+
header_params["parent"] = request.parent
|
990
|
+
end
|
991
|
+
|
992
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
993
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
994
|
+
|
995
|
+
options.apply_defaults timeout: @config.rpcs.list_runs.timeout,
|
996
|
+
metadata: metadata,
|
997
|
+
retry_policy: @config.rpcs.list_runs.retry_policy
|
998
|
+
|
999
|
+
options.apply_defaults timeout: @config.timeout,
|
1000
|
+
metadata: @config.metadata,
|
1001
|
+
retry_policy: @config.retry_policy
|
1002
|
+
|
1003
|
+
@lineage_stub.call_rpc :list_runs, request, options: options do |response, operation|
|
1004
|
+
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_runs, request, response, operation, options
|
1005
|
+
yield response, operation if block_given?
|
1006
|
+
return response
|
1007
|
+
end
|
1008
|
+
rescue ::GRPC::BadStatus => e
|
1009
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
##
|
1013
|
+
# Deletes the run with the specified name.
|
1014
|
+
#
|
1015
|
+
# @overload delete_run(request, options = nil)
|
1016
|
+
# Pass arguments to `delete_run` via a request object, either of type
|
1017
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest} or an equivalent Hash.
|
1018
|
+
#
|
1019
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest, ::Hash]
|
1020
|
+
# A request object representing the call parameters. Required. To specify no
|
1021
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1022
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1023
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1024
|
+
#
|
1025
|
+
# @overload delete_run(name: nil, allow_missing: nil)
|
1026
|
+
# Pass arguments to `delete_run` via keyword arguments. Note that at
|
1027
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1028
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1029
|
+
#
|
1030
|
+
# @param name [::String]
|
1031
|
+
# Required. The name of the run to delete.
|
1032
|
+
# @param allow_missing [::Boolean]
|
1033
|
+
# If set to true and the run is not found, the request
|
1034
|
+
# succeeds but the server doesn't perform any actions.
|
1035
|
+
#
|
1036
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1037
|
+
# @yieldparam response [::Gapic::Operation]
|
1038
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1039
|
+
#
|
1040
|
+
# @return [::Gapic::Operation]
|
1041
|
+
#
|
1042
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1043
|
+
#
|
1044
|
+
# @example Basic example
|
1045
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1046
|
+
#
|
1047
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1048
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1049
|
+
#
|
1050
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1051
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest.new
|
1052
|
+
#
|
1053
|
+
# # Call the delete_run method.
|
1054
|
+
# result = client.delete_run request
|
1055
|
+
#
|
1056
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1057
|
+
# # object to check the status of an operation, cancel it, or wait
|
1058
|
+
# # for results. Here is how to block until completion:
|
1059
|
+
# result.wait_until_done! timeout: 60
|
1060
|
+
# if result.response?
|
1061
|
+
# p result.response
|
1062
|
+
# else
|
1063
|
+
# puts "Error!"
|
1064
|
+
# end
|
1065
|
+
#
|
1066
|
+
def delete_run request, options = nil
|
1067
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1068
|
+
|
1069
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest
|
1070
|
+
|
1071
|
+
# Converts hash and nil to an options object
|
1072
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1073
|
+
|
1074
|
+
# Customize the options with defaults
|
1075
|
+
metadata = @config.rpcs.delete_run.metadata.to_h
|
1076
|
+
|
1077
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1078
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1079
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1080
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1081
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1082
|
+
|
1083
|
+
header_params = {}
|
1084
|
+
if request.name
|
1085
|
+
header_params["name"] = request.name
|
1086
|
+
end
|
1087
|
+
|
1088
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1089
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1090
|
+
|
1091
|
+
options.apply_defaults timeout: @config.rpcs.delete_run.timeout,
|
1092
|
+
metadata: metadata,
|
1093
|
+
retry_policy: @config.rpcs.delete_run.retry_policy
|
1094
|
+
|
1095
|
+
options.apply_defaults timeout: @config.timeout,
|
1096
|
+
metadata: @config.metadata,
|
1097
|
+
retry_policy: @config.retry_policy
|
1098
|
+
|
1099
|
+
@lineage_stub.call_rpc :delete_run, request, options: options do |response, operation|
|
1100
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1101
|
+
yield response, operation if block_given?
|
1102
|
+
return response
|
1103
|
+
end
|
1104
|
+
rescue ::GRPC::BadStatus => e
|
1105
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
##
|
1109
|
+
# Creates a new lineage event.
|
1110
|
+
#
|
1111
|
+
# @overload create_lineage_event(request, options = nil)
|
1112
|
+
# Pass arguments to `create_lineage_event` via a request object, either of type
|
1113
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest} or an equivalent Hash.
|
1114
|
+
#
|
1115
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest, ::Hash]
|
1116
|
+
# A request object representing the call parameters. Required. To specify no
|
1117
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1118
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1119
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1120
|
+
#
|
1121
|
+
# @overload create_lineage_event(parent: nil, lineage_event: nil, request_id: nil)
|
1122
|
+
# Pass arguments to `create_lineage_event` via keyword arguments. Note that at
|
1123
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1124
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1125
|
+
#
|
1126
|
+
# @param parent [::String]
|
1127
|
+
# Required. The name of the run that should own the lineage event.
|
1128
|
+
# @param lineage_event [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent, ::Hash]
|
1129
|
+
# Required. The lineage event to create.
|
1130
|
+
# @param request_id [::String]
|
1131
|
+
# A unique identifier for this request. Restricted to 36 ASCII characters.
|
1132
|
+
# A random UUID is recommended. This request is idempotent only if a
|
1133
|
+
# `request_id` is provided.
|
1134
|
+
#
|
1135
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1136
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
|
1137
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1138
|
+
#
|
1139
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
|
1140
|
+
#
|
1141
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1142
|
+
#
|
1143
|
+
# @example Basic example
|
1144
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1145
|
+
#
|
1146
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1147
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1148
|
+
#
|
1149
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1150
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest.new
|
1151
|
+
#
|
1152
|
+
# # Call the create_lineage_event method.
|
1153
|
+
# result = client.create_lineage_event request
|
1154
|
+
#
|
1155
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::LineageEvent.
|
1156
|
+
# p result
|
1157
|
+
#
|
1158
|
+
def create_lineage_event request, options = nil
|
1159
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1160
|
+
|
1161
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest
|
1162
|
+
|
1163
|
+
# Converts hash and nil to an options object
|
1164
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1165
|
+
|
1166
|
+
# Customize the options with defaults
|
1167
|
+
metadata = @config.rpcs.create_lineage_event.metadata.to_h
|
1168
|
+
|
1169
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1170
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1171
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1172
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1173
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1174
|
+
|
1175
|
+
header_params = {}
|
1176
|
+
if request.parent
|
1177
|
+
header_params["parent"] = request.parent
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1181
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1182
|
+
|
1183
|
+
options.apply_defaults timeout: @config.rpcs.create_lineage_event.timeout,
|
1184
|
+
metadata: metadata,
|
1185
|
+
retry_policy: @config.rpcs.create_lineage_event.retry_policy
|
1186
|
+
|
1187
|
+
options.apply_defaults timeout: @config.timeout,
|
1188
|
+
metadata: @config.metadata,
|
1189
|
+
retry_policy: @config.retry_policy
|
1190
|
+
|
1191
|
+
@lineage_stub.call_rpc :create_lineage_event, request, options: options do |response, operation|
|
1192
|
+
yield response, operation if block_given?
|
1193
|
+
return response
|
1194
|
+
end
|
1195
|
+
rescue ::GRPC::BadStatus => e
|
1196
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
##
|
1200
|
+
# Gets details of a specified lineage event.
|
1201
|
+
#
|
1202
|
+
# @overload get_lineage_event(request, options = nil)
|
1203
|
+
# Pass arguments to `get_lineage_event` via a request object, either of type
|
1204
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest} or an equivalent Hash.
|
1205
|
+
#
|
1206
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest, ::Hash]
|
1207
|
+
# A request object representing the call parameters. Required. To specify no
|
1208
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1209
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1210
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1211
|
+
#
|
1212
|
+
# @overload get_lineage_event(name: nil)
|
1213
|
+
# Pass arguments to `get_lineage_event` via keyword arguments. Note that at
|
1214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1216
|
+
#
|
1217
|
+
# @param name [::String]
|
1218
|
+
# Required. The name of the lineage event to get.
|
1219
|
+
#
|
1220
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1221
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
|
1222
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1223
|
+
#
|
1224
|
+
# @return [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
|
1225
|
+
#
|
1226
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1227
|
+
#
|
1228
|
+
# @example Basic example
|
1229
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1230
|
+
#
|
1231
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1232
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1233
|
+
#
|
1234
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1235
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest.new
|
1236
|
+
#
|
1237
|
+
# # Call the get_lineage_event method.
|
1238
|
+
# result = client.get_lineage_event request
|
1239
|
+
#
|
1240
|
+
# # The returned object is of type Google::Cloud::DataCatalog::Lineage::V1::LineageEvent.
|
1241
|
+
# p result
|
1242
|
+
#
|
1243
|
+
def get_lineage_event request, options = nil
|
1244
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1245
|
+
|
1246
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest
|
1247
|
+
|
1248
|
+
# Converts hash and nil to an options object
|
1249
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1250
|
+
|
1251
|
+
# Customize the options with defaults
|
1252
|
+
metadata = @config.rpcs.get_lineage_event.metadata.to_h
|
1253
|
+
|
1254
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1255
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1256
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1257
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1258
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1259
|
+
|
1260
|
+
header_params = {}
|
1261
|
+
if request.name
|
1262
|
+
header_params["name"] = request.name
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1266
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1267
|
+
|
1268
|
+
options.apply_defaults timeout: @config.rpcs.get_lineage_event.timeout,
|
1269
|
+
metadata: metadata,
|
1270
|
+
retry_policy: @config.rpcs.get_lineage_event.retry_policy
|
1271
|
+
|
1272
|
+
options.apply_defaults timeout: @config.timeout,
|
1273
|
+
metadata: @config.metadata,
|
1274
|
+
retry_policy: @config.retry_policy
|
1275
|
+
|
1276
|
+
@lineage_stub.call_rpc :get_lineage_event, request, options: options do |response, operation|
|
1277
|
+
yield response, operation if block_given?
|
1278
|
+
return response
|
1279
|
+
end
|
1280
|
+
rescue ::GRPC::BadStatus => e
|
1281
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1282
|
+
end
|
1283
|
+
|
1284
|
+
##
|
1285
|
+
# Lists lineage events in the given project and location. The list order is
|
1286
|
+
# not defined.
|
1287
|
+
#
|
1288
|
+
# @overload list_lineage_events(request, options = nil)
|
1289
|
+
# Pass arguments to `list_lineage_events` via a request object, either of type
|
1290
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest} or an equivalent Hash.
|
1291
|
+
#
|
1292
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest, ::Hash]
|
1293
|
+
# A request object representing the call parameters. Required. To specify no
|
1294
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1295
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1296
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1297
|
+
#
|
1298
|
+
# @overload list_lineage_events(parent: nil, page_size: nil, page_token: nil)
|
1299
|
+
# Pass arguments to `list_lineage_events` via keyword arguments. Note that at
|
1300
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1301
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1302
|
+
#
|
1303
|
+
# @param parent [::String]
|
1304
|
+
# Required. The name of the run that owns the collection of lineage events to
|
1305
|
+
# get.
|
1306
|
+
# @param page_size [::Integer]
|
1307
|
+
# The maximum number of lineage events to return.
|
1308
|
+
#
|
1309
|
+
# The service may return fewer events than this value.
|
1310
|
+
# If unspecified, at most 50 events are returned. The maximum value is 100;
|
1311
|
+
# values greater than 100 are cut to 100.
|
1312
|
+
# @param page_token [::String]
|
1313
|
+
# The page token received from a previous `ListLineageEvents` call. Specify
|
1314
|
+
# it to get the next page.
|
1315
|
+
#
|
1316
|
+
# When paginating, all other parameters specified in this call must
|
1317
|
+
# match the parameters of the call that provided the page token.
|
1318
|
+
#
|
1319
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1320
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent>]
|
1321
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1322
|
+
#
|
1323
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent>]
|
1324
|
+
#
|
1325
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1326
|
+
#
|
1327
|
+
# @example Basic example
|
1328
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1329
|
+
#
|
1330
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1331
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1332
|
+
#
|
1333
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1334
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest.new
|
1335
|
+
#
|
1336
|
+
# # Call the list_lineage_events method.
|
1337
|
+
# result = client.list_lineage_events request
|
1338
|
+
#
|
1339
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1340
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1341
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1342
|
+
# # methods are also available for managing paging directly.
|
1343
|
+
# result.each do |response|
|
1344
|
+
# # Each element is of type ::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent.
|
1345
|
+
# p response
|
1346
|
+
# end
|
1347
|
+
#
|
1348
|
+
def list_lineage_events request, options = nil
|
1349
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1350
|
+
|
1351
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest
|
1352
|
+
|
1353
|
+
# Converts hash and nil to an options object
|
1354
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1355
|
+
|
1356
|
+
# Customize the options with defaults
|
1357
|
+
metadata = @config.rpcs.list_lineage_events.metadata.to_h
|
1358
|
+
|
1359
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1360
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1361
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1362
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1363
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1364
|
+
|
1365
|
+
header_params = {}
|
1366
|
+
if request.parent
|
1367
|
+
header_params["parent"] = request.parent
|
1368
|
+
end
|
1369
|
+
|
1370
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1371
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1372
|
+
|
1373
|
+
options.apply_defaults timeout: @config.rpcs.list_lineage_events.timeout,
|
1374
|
+
metadata: metadata,
|
1375
|
+
retry_policy: @config.rpcs.list_lineage_events.retry_policy
|
1376
|
+
|
1377
|
+
options.apply_defaults timeout: @config.timeout,
|
1378
|
+
metadata: @config.metadata,
|
1379
|
+
retry_policy: @config.retry_policy
|
1380
|
+
|
1381
|
+
@lineage_stub.call_rpc :list_lineage_events, request, options: options do |response, operation|
|
1382
|
+
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_lineage_events, request, response, operation, options
|
1383
|
+
yield response, operation if block_given?
|
1384
|
+
return response
|
1385
|
+
end
|
1386
|
+
rescue ::GRPC::BadStatus => e
|
1387
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1388
|
+
end
|
1389
|
+
|
1390
|
+
##
|
1391
|
+
# Deletes the lineage event with the specified name.
|
1392
|
+
#
|
1393
|
+
# @overload delete_lineage_event(request, options = nil)
|
1394
|
+
# Pass arguments to `delete_lineage_event` via a request object, either of type
|
1395
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest} or an equivalent Hash.
|
1396
|
+
#
|
1397
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest, ::Hash]
|
1398
|
+
# A request object representing the call parameters. Required. To specify no
|
1399
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1400
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1401
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1402
|
+
#
|
1403
|
+
# @overload delete_lineage_event(name: nil, allow_missing: nil)
|
1404
|
+
# Pass arguments to `delete_lineage_event` via keyword arguments. Note that at
|
1405
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1406
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1407
|
+
#
|
1408
|
+
# @param name [::String]
|
1409
|
+
# Required. The name of the lineage event to delete.
|
1410
|
+
# @param allow_missing [::Boolean]
|
1411
|
+
# If set to true and the lineage event is not found, the request
|
1412
|
+
# succeeds but the server doesn't perform any actions.
|
1413
|
+
#
|
1414
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1415
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
1416
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1417
|
+
#
|
1418
|
+
# @return [::Google::Protobuf::Empty]
|
1419
|
+
#
|
1420
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1421
|
+
#
|
1422
|
+
# @example Basic example
|
1423
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1424
|
+
#
|
1425
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1426
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1427
|
+
#
|
1428
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1429
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest.new
|
1430
|
+
#
|
1431
|
+
# # Call the delete_lineage_event method.
|
1432
|
+
# result = client.delete_lineage_event request
|
1433
|
+
#
|
1434
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
1435
|
+
# p result
|
1436
|
+
#
|
1437
|
+
def delete_lineage_event request, options = nil
|
1438
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1439
|
+
|
1440
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest
|
1441
|
+
|
1442
|
+
# Converts hash and nil to an options object
|
1443
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1444
|
+
|
1445
|
+
# Customize the options with defaults
|
1446
|
+
metadata = @config.rpcs.delete_lineage_event.metadata.to_h
|
1447
|
+
|
1448
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1449
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1450
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1451
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1452
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1453
|
+
|
1454
|
+
header_params = {}
|
1455
|
+
if request.name
|
1456
|
+
header_params["name"] = request.name
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1460
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1461
|
+
|
1462
|
+
options.apply_defaults timeout: @config.rpcs.delete_lineage_event.timeout,
|
1463
|
+
metadata: metadata,
|
1464
|
+
retry_policy: @config.rpcs.delete_lineage_event.retry_policy
|
1465
|
+
|
1466
|
+
options.apply_defaults timeout: @config.timeout,
|
1467
|
+
metadata: @config.metadata,
|
1468
|
+
retry_policy: @config.retry_policy
|
1469
|
+
|
1470
|
+
@lineage_stub.call_rpc :delete_lineage_event, request, options: options do |response, operation|
|
1471
|
+
yield response, operation if block_given?
|
1472
|
+
return response
|
1473
|
+
end
|
1474
|
+
rescue ::GRPC::BadStatus => e
|
1475
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1476
|
+
end
|
1477
|
+
|
1478
|
+
##
|
1479
|
+
# Retrieve a list of links connected to a specific asset.
|
1480
|
+
# Links represent the data flow between **source** (upstream)
|
1481
|
+
# and **target** (downstream) assets in transformation pipelines.
|
1482
|
+
# Links are stored in the same project as the Lineage Events that create
|
1483
|
+
# them.
|
1484
|
+
#
|
1485
|
+
# You can retrieve links in every project where you have the
|
1486
|
+
# `datalineage.events.get` permission. The project provided in the URL
|
1487
|
+
# is used for Billing and Quota.
|
1488
|
+
#
|
1489
|
+
# @overload search_links(request, options = nil)
|
1490
|
+
# Pass arguments to `search_links` via a request object, either of type
|
1491
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest} or an equivalent Hash.
|
1492
|
+
#
|
1493
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest, ::Hash]
|
1494
|
+
# A request object representing the call parameters. Required. To specify no
|
1495
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1496
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1497
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1498
|
+
#
|
1499
|
+
# @overload search_links(parent: nil, source: nil, target: nil, page_size: nil, page_token: nil)
|
1500
|
+
# Pass arguments to `search_links` via keyword arguments. Note that at
|
1501
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1502
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1503
|
+
#
|
1504
|
+
# @param parent [::String]
|
1505
|
+
# Required. The project and location you want search in.
|
1506
|
+
# @param source [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1507
|
+
# Optional. Send asset information in the **source** field to retrieve all
|
1508
|
+
# links that lead from the specified asset to downstream assets.
|
1509
|
+
# @param target [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1510
|
+
# Optional. Send asset information in the **target** field to retrieve all
|
1511
|
+
# links that lead from upstream assets to the specified asset.
|
1512
|
+
# @param page_size [::Integer]
|
1513
|
+
# Optional. The maximum number of links to return in a single page of the
|
1514
|
+
# response. A page may contain fewer links than this value. If unspecified,
|
1515
|
+
# at most 10 links are returned.
|
1516
|
+
#
|
1517
|
+
# Maximum value is 100; values greater than 100 are reduced to 100.
|
1518
|
+
# @param page_token [::String]
|
1519
|
+
# Optional. The page token received from a previous `SearchLinksRequest`
|
1520
|
+
# call. Use it to get the next page.
|
1521
|
+
#
|
1522
|
+
# When requesting subsequent pages of a response, remember that
|
1523
|
+
# all parameters must match the values you provided
|
1524
|
+
# in the original request.
|
1525
|
+
#
|
1526
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1527
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Link>]
|
1528
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1529
|
+
#
|
1530
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::Link>]
|
1531
|
+
#
|
1532
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1533
|
+
#
|
1534
|
+
# @example Basic example
|
1535
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1536
|
+
#
|
1537
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1538
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1539
|
+
#
|
1540
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1541
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest.new
|
1542
|
+
#
|
1543
|
+
# # Call the search_links method.
|
1544
|
+
# result = client.search_links request
|
1545
|
+
#
|
1546
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1547
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1548
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1549
|
+
# # methods are also available for managing paging directly.
|
1550
|
+
# result.each do |response|
|
1551
|
+
# # Each element is of type ::Google::Cloud::DataCatalog::Lineage::V1::Link.
|
1552
|
+
# p response
|
1553
|
+
# end
|
1554
|
+
#
|
1555
|
+
def search_links request, options = nil
|
1556
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1557
|
+
|
1558
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest
|
1559
|
+
|
1560
|
+
# Converts hash and nil to an options object
|
1561
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1562
|
+
|
1563
|
+
# Customize the options with defaults
|
1564
|
+
metadata = @config.rpcs.search_links.metadata.to_h
|
1565
|
+
|
1566
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1567
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1568
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1569
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1570
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1571
|
+
|
1572
|
+
header_params = {}
|
1573
|
+
if request.parent
|
1574
|
+
header_params["parent"] = request.parent
|
1575
|
+
end
|
1576
|
+
|
1577
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1578
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1579
|
+
|
1580
|
+
options.apply_defaults timeout: @config.rpcs.search_links.timeout,
|
1581
|
+
metadata: metadata,
|
1582
|
+
retry_policy: @config.rpcs.search_links.retry_policy
|
1583
|
+
|
1584
|
+
options.apply_defaults timeout: @config.timeout,
|
1585
|
+
metadata: @config.metadata,
|
1586
|
+
retry_policy: @config.retry_policy
|
1587
|
+
|
1588
|
+
@lineage_stub.call_rpc :search_links, request, options: options do |response, operation|
|
1589
|
+
response = ::Gapic::PagedEnumerable.new @lineage_stub, :search_links, request, response, operation, options
|
1590
|
+
yield response, operation if block_given?
|
1591
|
+
return response
|
1592
|
+
end
|
1593
|
+
rescue ::GRPC::BadStatus => e
|
1594
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
##
|
1598
|
+
# Retrieve information about LineageProcesses associated with specific
|
1599
|
+
# links. LineageProcesses are transformation pipelines that result in data
|
1600
|
+
# flowing from **source** to **target** assets. Links between assets
|
1601
|
+
# represent this operation.
|
1602
|
+
#
|
1603
|
+
# If you have specific link names, you can use this method to
|
1604
|
+
# verify which LineageProcesses contribute to creating those links.
|
1605
|
+
# See the
|
1606
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client#search_links SearchLinks}
|
1607
|
+
# method for more information on how to retrieve link name.
|
1608
|
+
#
|
1609
|
+
# You can retrieve the LineageProcess information in every project where you
|
1610
|
+
# have the `datalineage.events.get` permission. The project provided in the
|
1611
|
+
# URL is used for Billing and Quota.
|
1612
|
+
#
|
1613
|
+
# @overload batch_search_link_processes(request, options = nil)
|
1614
|
+
# Pass arguments to `batch_search_link_processes` via a request object, either of type
|
1615
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest} or an equivalent Hash.
|
1616
|
+
#
|
1617
|
+
# @param request [::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest, ::Hash]
|
1618
|
+
# A request object representing the call parameters. Required. To specify no
|
1619
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1620
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1621
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1622
|
+
#
|
1623
|
+
# @overload batch_search_link_processes(parent: nil, links: nil, page_size: nil, page_token: nil)
|
1624
|
+
# Pass arguments to `batch_search_link_processes` via keyword arguments. Note that at
|
1625
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1626
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1627
|
+
#
|
1628
|
+
# @param parent [::String]
|
1629
|
+
# Required. The project and location where you want to search.
|
1630
|
+
# @param links [::Array<::String>]
|
1631
|
+
# Required. An array of links to check for their associated LineageProcesses.
|
1632
|
+
#
|
1633
|
+
# The maximum number of items in this array is 100.
|
1634
|
+
# If the request contains more than 100 links, it returns the
|
1635
|
+
# `INVALID_ARGUMENT` error.
|
1636
|
+
#
|
1637
|
+
# Format: `projects/{project}/locations/{location}/links/{link}`.
|
1638
|
+
# @param page_size [::Integer]
|
1639
|
+
# The maximum number of processes to return in a single page of the response.
|
1640
|
+
# A page may contain fewer results than this value.
|
1641
|
+
# @param page_token [::String]
|
1642
|
+
# The page token received from a previous `BatchSearchLinkProcesses` call.
|
1643
|
+
# Use it to get the next page.
|
1644
|
+
#
|
1645
|
+
# When requesting subsequent pages of a response, remember that
|
1646
|
+
# all parameters must match the values you provided
|
1647
|
+
# in the original request.
|
1648
|
+
#
|
1649
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1650
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::ProcessLinks>]
|
1651
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1652
|
+
#
|
1653
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::Lineage::V1::ProcessLinks>]
|
1654
|
+
#
|
1655
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1656
|
+
#
|
1657
|
+
# @example Basic example
|
1658
|
+
# require "google/cloud/data_catalog/lineage/v1"
|
1659
|
+
#
|
1660
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1661
|
+
# client = Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new
|
1662
|
+
#
|
1663
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1664
|
+
# request = Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest.new
|
1665
|
+
#
|
1666
|
+
# # Call the batch_search_link_processes method.
|
1667
|
+
# result = client.batch_search_link_processes request
|
1668
|
+
#
|
1669
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1670
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1671
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1672
|
+
# # methods are also available for managing paging directly.
|
1673
|
+
# result.each do |response|
|
1674
|
+
# # Each element is of type ::Google::Cloud::DataCatalog::Lineage::V1::ProcessLinks.
|
1675
|
+
# p response
|
1676
|
+
# end
|
1677
|
+
#
|
1678
|
+
def batch_search_link_processes request, options = nil
|
1679
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1680
|
+
|
1681
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest
|
1682
|
+
|
1683
|
+
# Converts hash and nil to an options object
|
1684
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1685
|
+
|
1686
|
+
# Customize the options with defaults
|
1687
|
+
metadata = @config.rpcs.batch_search_link_processes.metadata.to_h
|
1688
|
+
|
1689
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1690
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1691
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1692
|
+
gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
|
1693
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1694
|
+
|
1695
|
+
header_params = {}
|
1696
|
+
if request.parent
|
1697
|
+
header_params["parent"] = request.parent
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1701
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1702
|
+
|
1703
|
+
options.apply_defaults timeout: @config.rpcs.batch_search_link_processes.timeout,
|
1704
|
+
metadata: metadata,
|
1705
|
+
retry_policy: @config.rpcs.batch_search_link_processes.retry_policy
|
1706
|
+
|
1707
|
+
options.apply_defaults timeout: @config.timeout,
|
1708
|
+
metadata: @config.metadata,
|
1709
|
+
retry_policy: @config.retry_policy
|
1710
|
+
|
1711
|
+
@lineage_stub.call_rpc :batch_search_link_processes, request, options: options do |response, operation|
|
1712
|
+
response = ::Gapic::PagedEnumerable.new @lineage_stub, :batch_search_link_processes, request, response, operation, options
|
1713
|
+
yield response, operation if block_given?
|
1714
|
+
return response
|
1715
|
+
end
|
1716
|
+
rescue ::GRPC::BadStatus => e
|
1717
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
##
|
1721
|
+
# Configuration class for the Lineage API.
|
1722
|
+
#
|
1723
|
+
# This class represents the configuration for Lineage,
|
1724
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1725
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1726
|
+
# applied individually to specific RPCs. See
|
1727
|
+
# {::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client::Configuration::Rpcs}
|
1728
|
+
# for a list of RPCs that can be configured independently.
|
1729
|
+
#
|
1730
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1731
|
+
# on construction.
|
1732
|
+
#
|
1733
|
+
# @example
|
1734
|
+
#
|
1735
|
+
# # Modify the global config, setting the timeout for
|
1736
|
+
# # create_process to 20 seconds,
|
1737
|
+
# # and all remaining timeouts to 10 seconds.
|
1738
|
+
# ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.configure do |config|
|
1739
|
+
# config.timeout = 10.0
|
1740
|
+
# config.rpcs.create_process.timeout = 20.0
|
1741
|
+
# end
|
1742
|
+
#
|
1743
|
+
# # Apply the above configuration only to a new client.
|
1744
|
+
# client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new do |config|
|
1745
|
+
# config.timeout = 10.0
|
1746
|
+
# config.rpcs.create_process.timeout = 20.0
|
1747
|
+
# end
|
1748
|
+
#
|
1749
|
+
# @!attribute [rw] endpoint
|
1750
|
+
# The hostname or hostname:port of the service endpoint.
|
1751
|
+
# Defaults to `"datalineage.googleapis.com"`.
|
1752
|
+
# @return [::String]
|
1753
|
+
# @!attribute [rw] credentials
|
1754
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1755
|
+
# * (`String`) The path to a service account key file in JSON format
|
1756
|
+
# * (`Hash`) A service account key as a Hash
|
1757
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1758
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1759
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1760
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1761
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1762
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1763
|
+
# * (`nil`) indicating no credentials
|
1764
|
+
# @return [::Object]
|
1765
|
+
# @!attribute [rw] scope
|
1766
|
+
# The OAuth scopes
|
1767
|
+
# @return [::Array<::String>]
|
1768
|
+
# @!attribute [rw] lib_name
|
1769
|
+
# The library name as recorded in instrumentation and logging
|
1770
|
+
# @return [::String]
|
1771
|
+
# @!attribute [rw] lib_version
|
1772
|
+
# The library version as recorded in instrumentation and logging
|
1773
|
+
# @return [::String]
|
1774
|
+
# @!attribute [rw] channel_args
|
1775
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1776
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1777
|
+
# @return [::Hash]
|
1778
|
+
# @!attribute [rw] interceptors
|
1779
|
+
# An array of interceptors that are run before calls are executed.
|
1780
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1781
|
+
# @!attribute [rw] timeout
|
1782
|
+
# The call timeout in seconds.
|
1783
|
+
# @return [::Numeric]
|
1784
|
+
# @!attribute [rw] metadata
|
1785
|
+
# Additional gRPC headers to be sent with the call.
|
1786
|
+
# @return [::Hash{::Symbol=>::String}]
|
1787
|
+
# @!attribute [rw] retry_policy
|
1788
|
+
# The retry policy. The value is a hash with the following keys:
|
1789
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1790
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1791
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1792
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1793
|
+
# trigger a retry.
|
1794
|
+
# @return [::Hash]
|
1795
|
+
# @!attribute [rw] quota_project
|
1796
|
+
# A separate project against which to charge quota.
|
1797
|
+
# @return [::String]
|
1798
|
+
#
|
1799
|
+
class Configuration
|
1800
|
+
extend ::Gapic::Config
|
1801
|
+
|
1802
|
+
config_attr :endpoint, "datalineage.googleapis.com", ::String
|
1803
|
+
config_attr :credentials, nil do |value|
|
1804
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1805
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1806
|
+
allowed.any? { |klass| klass === value }
|
1807
|
+
end
|
1808
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1809
|
+
config_attr :lib_name, nil, ::String, nil
|
1810
|
+
config_attr :lib_version, nil, ::String, nil
|
1811
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1812
|
+
config_attr :interceptors, nil, ::Array, nil
|
1813
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1814
|
+
config_attr :metadata, nil, ::Hash, nil
|
1815
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1816
|
+
config_attr :quota_project, nil, ::String, nil
|
1817
|
+
|
1818
|
+
# @private
|
1819
|
+
def initialize parent_config = nil
|
1820
|
+
@parent_config = parent_config unless parent_config.nil?
|
1821
|
+
|
1822
|
+
yield self if block_given?
|
1823
|
+
end
|
1824
|
+
|
1825
|
+
##
|
1826
|
+
# Configurations for individual RPCs
|
1827
|
+
# @return [Rpcs]
|
1828
|
+
#
|
1829
|
+
def rpcs
|
1830
|
+
@rpcs ||= begin
|
1831
|
+
parent_rpcs = nil
|
1832
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1833
|
+
Rpcs.new parent_rpcs
|
1834
|
+
end
|
1835
|
+
end
|
1836
|
+
|
1837
|
+
##
|
1838
|
+
# Configuration RPC class for the Lineage API.
|
1839
|
+
#
|
1840
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1841
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1842
|
+
# the following configuration fields:
|
1843
|
+
#
|
1844
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1845
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1846
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1847
|
+
# include the following keys:
|
1848
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1849
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1850
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1851
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1852
|
+
# trigger a retry.
|
1853
|
+
#
|
1854
|
+
class Rpcs
|
1855
|
+
##
|
1856
|
+
# RPC-specific configuration for `create_process`
|
1857
|
+
# @return [::Gapic::Config::Method]
|
1858
|
+
#
|
1859
|
+
attr_reader :create_process
|
1860
|
+
##
|
1861
|
+
# RPC-specific configuration for `update_process`
|
1862
|
+
# @return [::Gapic::Config::Method]
|
1863
|
+
#
|
1864
|
+
attr_reader :update_process
|
1865
|
+
##
|
1866
|
+
# RPC-specific configuration for `get_process`
|
1867
|
+
# @return [::Gapic::Config::Method]
|
1868
|
+
#
|
1869
|
+
attr_reader :get_process
|
1870
|
+
##
|
1871
|
+
# RPC-specific configuration for `list_processes`
|
1872
|
+
# @return [::Gapic::Config::Method]
|
1873
|
+
#
|
1874
|
+
attr_reader :list_processes
|
1875
|
+
##
|
1876
|
+
# RPC-specific configuration for `delete_process`
|
1877
|
+
# @return [::Gapic::Config::Method]
|
1878
|
+
#
|
1879
|
+
attr_reader :delete_process
|
1880
|
+
##
|
1881
|
+
# RPC-specific configuration for `create_run`
|
1882
|
+
# @return [::Gapic::Config::Method]
|
1883
|
+
#
|
1884
|
+
attr_reader :create_run
|
1885
|
+
##
|
1886
|
+
# RPC-specific configuration for `update_run`
|
1887
|
+
# @return [::Gapic::Config::Method]
|
1888
|
+
#
|
1889
|
+
attr_reader :update_run
|
1890
|
+
##
|
1891
|
+
# RPC-specific configuration for `get_run`
|
1892
|
+
# @return [::Gapic::Config::Method]
|
1893
|
+
#
|
1894
|
+
attr_reader :get_run
|
1895
|
+
##
|
1896
|
+
# RPC-specific configuration for `list_runs`
|
1897
|
+
# @return [::Gapic::Config::Method]
|
1898
|
+
#
|
1899
|
+
attr_reader :list_runs
|
1900
|
+
##
|
1901
|
+
# RPC-specific configuration for `delete_run`
|
1902
|
+
# @return [::Gapic::Config::Method]
|
1903
|
+
#
|
1904
|
+
attr_reader :delete_run
|
1905
|
+
##
|
1906
|
+
# RPC-specific configuration for `create_lineage_event`
|
1907
|
+
# @return [::Gapic::Config::Method]
|
1908
|
+
#
|
1909
|
+
attr_reader :create_lineage_event
|
1910
|
+
##
|
1911
|
+
# RPC-specific configuration for `get_lineage_event`
|
1912
|
+
# @return [::Gapic::Config::Method]
|
1913
|
+
#
|
1914
|
+
attr_reader :get_lineage_event
|
1915
|
+
##
|
1916
|
+
# RPC-specific configuration for `list_lineage_events`
|
1917
|
+
# @return [::Gapic::Config::Method]
|
1918
|
+
#
|
1919
|
+
attr_reader :list_lineage_events
|
1920
|
+
##
|
1921
|
+
# RPC-specific configuration for `delete_lineage_event`
|
1922
|
+
# @return [::Gapic::Config::Method]
|
1923
|
+
#
|
1924
|
+
attr_reader :delete_lineage_event
|
1925
|
+
##
|
1926
|
+
# RPC-specific configuration for `search_links`
|
1927
|
+
# @return [::Gapic::Config::Method]
|
1928
|
+
#
|
1929
|
+
attr_reader :search_links
|
1930
|
+
##
|
1931
|
+
# RPC-specific configuration for `batch_search_link_processes`
|
1932
|
+
# @return [::Gapic::Config::Method]
|
1933
|
+
#
|
1934
|
+
attr_reader :batch_search_link_processes
|
1935
|
+
|
1936
|
+
# @private
|
1937
|
+
def initialize parent_rpcs = nil
|
1938
|
+
create_process_config = parent_rpcs.create_process if parent_rpcs.respond_to? :create_process
|
1939
|
+
@create_process = ::Gapic::Config::Method.new create_process_config
|
1940
|
+
update_process_config = parent_rpcs.update_process if parent_rpcs.respond_to? :update_process
|
1941
|
+
@update_process = ::Gapic::Config::Method.new update_process_config
|
1942
|
+
get_process_config = parent_rpcs.get_process if parent_rpcs.respond_to? :get_process
|
1943
|
+
@get_process = ::Gapic::Config::Method.new get_process_config
|
1944
|
+
list_processes_config = parent_rpcs.list_processes if parent_rpcs.respond_to? :list_processes
|
1945
|
+
@list_processes = ::Gapic::Config::Method.new list_processes_config
|
1946
|
+
delete_process_config = parent_rpcs.delete_process if parent_rpcs.respond_to? :delete_process
|
1947
|
+
@delete_process = ::Gapic::Config::Method.new delete_process_config
|
1948
|
+
create_run_config = parent_rpcs.create_run if parent_rpcs.respond_to? :create_run
|
1949
|
+
@create_run = ::Gapic::Config::Method.new create_run_config
|
1950
|
+
update_run_config = parent_rpcs.update_run if parent_rpcs.respond_to? :update_run
|
1951
|
+
@update_run = ::Gapic::Config::Method.new update_run_config
|
1952
|
+
get_run_config = parent_rpcs.get_run if parent_rpcs.respond_to? :get_run
|
1953
|
+
@get_run = ::Gapic::Config::Method.new get_run_config
|
1954
|
+
list_runs_config = parent_rpcs.list_runs if parent_rpcs.respond_to? :list_runs
|
1955
|
+
@list_runs = ::Gapic::Config::Method.new list_runs_config
|
1956
|
+
delete_run_config = parent_rpcs.delete_run if parent_rpcs.respond_to? :delete_run
|
1957
|
+
@delete_run = ::Gapic::Config::Method.new delete_run_config
|
1958
|
+
create_lineage_event_config = parent_rpcs.create_lineage_event if parent_rpcs.respond_to? :create_lineage_event
|
1959
|
+
@create_lineage_event = ::Gapic::Config::Method.new create_lineage_event_config
|
1960
|
+
get_lineage_event_config = parent_rpcs.get_lineage_event if parent_rpcs.respond_to? :get_lineage_event
|
1961
|
+
@get_lineage_event = ::Gapic::Config::Method.new get_lineage_event_config
|
1962
|
+
list_lineage_events_config = parent_rpcs.list_lineage_events if parent_rpcs.respond_to? :list_lineage_events
|
1963
|
+
@list_lineage_events = ::Gapic::Config::Method.new list_lineage_events_config
|
1964
|
+
delete_lineage_event_config = parent_rpcs.delete_lineage_event if parent_rpcs.respond_to? :delete_lineage_event
|
1965
|
+
@delete_lineage_event = ::Gapic::Config::Method.new delete_lineage_event_config
|
1966
|
+
search_links_config = parent_rpcs.search_links if parent_rpcs.respond_to? :search_links
|
1967
|
+
@search_links = ::Gapic::Config::Method.new search_links_config
|
1968
|
+
batch_search_link_processes_config = parent_rpcs.batch_search_link_processes if parent_rpcs.respond_to? :batch_search_link_processes
|
1969
|
+
@batch_search_link_processes = ::Gapic::Config::Method.new batch_search_link_processes_config
|
1970
|
+
|
1971
|
+
yield self if block_given?
|
1972
|
+
end
|
1973
|
+
end
|
1974
|
+
end
|
1975
|
+
end
|
1976
|
+
end
|
1977
|
+
end
|
1978
|
+
end
|
1979
|
+
end
|
1980
|
+
end
|
1981
|
+
end
|