google-cloud-data_catalog-lineage-v1 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1001 @@
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/datacatalog/lineage/v1/lineage_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module DataCatalog
24
+ module Lineage
25
+ module V1
26
+ module Lineage
27
+ module Rest
28
+ ##
29
+ # REST service stub for the Lineage service.
30
+ # Service stub contains baseline method implementations
31
+ # including transcoding, making the REST call, and deserialing the response.
32
+ #
33
+ class ServiceStub
34
+ def initialize endpoint:, credentials:
35
+ # These require statements are intentionally placed here to initialize
36
+ # the REST modules only when it's required.
37
+ require "gapic/rest"
38
+
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
40
+ numeric_enums: true,
41
+ raise_faraday_errors: false
42
+ end
43
+
44
+ ##
45
+ # Baseline implementation for the create_process REST call
46
+ #
47
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest]
48
+ # A request object representing the call parameters. Required.
49
+ # @param options [::Gapic::CallOptions]
50
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
51
+ #
52
+ # @yield [result, operation] Access the result along with the TransportOperation object
53
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Process]
54
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
55
+ #
56
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
57
+ # A result object deserialized from the server's reply
58
+ def create_process request_pb, options = nil
59
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
60
+
61
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_process_request request_pb
62
+ query_string_params = if query_string_params.any?
63
+ query_string_params.to_h { |p| p.split("=", 2) }
64
+ else
65
+ {}
66
+ end
67
+
68
+ response = @client_stub.make_http_request(
69
+ verb,
70
+ uri: uri,
71
+ body: body || "",
72
+ params: query_string_params,
73
+ options: options
74
+ )
75
+ operation = ::Gapic::Rest::TransportOperation.new response
76
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Process.decode_json response.body, ignore_unknown_fields: true
77
+
78
+ yield result, operation if block_given?
79
+ result
80
+ end
81
+
82
+ ##
83
+ # Baseline implementation for the update_process REST call
84
+ #
85
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest]
86
+ # A request object representing the call parameters. Required.
87
+ # @param options [::Gapic::CallOptions]
88
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
89
+ #
90
+ # @yield [result, operation] Access the result along with the TransportOperation object
91
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Process]
92
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
93
+ #
94
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
95
+ # A result object deserialized from the server's reply
96
+ def update_process request_pb, options = nil
97
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
98
+
99
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_process_request request_pb
100
+ query_string_params = if query_string_params.any?
101
+ query_string_params.to_h { |p| p.split("=", 2) }
102
+ else
103
+ {}
104
+ end
105
+
106
+ response = @client_stub.make_http_request(
107
+ verb,
108
+ uri: uri,
109
+ body: body || "",
110
+ params: query_string_params,
111
+ options: options
112
+ )
113
+ operation = ::Gapic::Rest::TransportOperation.new response
114
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Process.decode_json response.body, ignore_unknown_fields: true
115
+
116
+ yield result, operation if block_given?
117
+ result
118
+ end
119
+
120
+ ##
121
+ # Baseline implementation for the get_process REST call
122
+ #
123
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest]
124
+ # A request object representing the call parameters. Required.
125
+ # @param options [::Gapic::CallOptions]
126
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
127
+ #
128
+ # @yield [result, operation] Access the result along with the TransportOperation object
129
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Process]
130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
131
+ #
132
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Process]
133
+ # A result object deserialized from the server's reply
134
+ def get_process request_pb, options = nil
135
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
136
+
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_process_request request_pb
138
+ query_string_params = if query_string_params.any?
139
+ query_string_params.to_h { |p| p.split("=", 2) }
140
+ else
141
+ {}
142
+ end
143
+
144
+ response = @client_stub.make_http_request(
145
+ verb,
146
+ uri: uri,
147
+ body: body || "",
148
+ params: query_string_params,
149
+ options: options
150
+ )
151
+ operation = ::Gapic::Rest::TransportOperation.new response
152
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Process.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, operation if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # Baseline implementation for the list_processes REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @param options [::Gapic::CallOptions]
164
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
165
+ #
166
+ # @yield [result, operation] Access the result along with the TransportOperation object
167
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesResponse]
168
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
169
+ #
170
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesResponse]
171
+ # A result object deserialized from the server's reply
172
+ def list_processes request_pb, options = nil
173
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
174
+
175
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_processes_request request_pb
176
+ query_string_params = if query_string_params.any?
177
+ query_string_params.to_h { |p| p.split("=", 2) }
178
+ else
179
+ {}
180
+ end
181
+
182
+ response = @client_stub.make_http_request(
183
+ verb,
184
+ uri: uri,
185
+ body: body || "",
186
+ params: query_string_params,
187
+ options: options
188
+ )
189
+ operation = ::Gapic::Rest::TransportOperation.new response
190
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesResponse.decode_json response.body, ignore_unknown_fields: true
191
+
192
+ yield result, operation if block_given?
193
+ result
194
+ end
195
+
196
+ ##
197
+ # Baseline implementation for the delete_process REST call
198
+ #
199
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest]
200
+ # A request object representing the call parameters. Required.
201
+ # @param options [::Gapic::CallOptions]
202
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
203
+ #
204
+ # @yield [result, operation] Access the result along with the TransportOperation object
205
+ # @yieldparam result [::Google::Longrunning::Operation]
206
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
207
+ #
208
+ # @return [::Google::Longrunning::Operation]
209
+ # A result object deserialized from the server's reply
210
+ def delete_process request_pb, options = nil
211
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
212
+
213
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_process_request request_pb
214
+ query_string_params = if query_string_params.any?
215
+ query_string_params.to_h { |p| p.split("=", 2) }
216
+ else
217
+ {}
218
+ end
219
+
220
+ response = @client_stub.make_http_request(
221
+ verb,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ options: options
226
+ )
227
+ operation = ::Gapic::Rest::TransportOperation.new response
228
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
229
+
230
+ yield result, operation if block_given?
231
+ result
232
+ end
233
+
234
+ ##
235
+ # Baseline implementation for the create_run REST call
236
+ #
237
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest]
238
+ # A request object representing the call parameters. Required.
239
+ # @param options [::Gapic::CallOptions]
240
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
241
+ #
242
+ # @yield [result, operation] Access the result along with the TransportOperation object
243
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Run]
244
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
245
+ #
246
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
247
+ # A result object deserialized from the server's reply
248
+ def create_run request_pb, options = nil
249
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
250
+
251
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_run_request request_pb
252
+ query_string_params = if query_string_params.any?
253
+ query_string_params.to_h { |p| p.split("=", 2) }
254
+ else
255
+ {}
256
+ end
257
+
258
+ response = @client_stub.make_http_request(
259
+ verb,
260
+ uri: uri,
261
+ body: body || "",
262
+ params: query_string_params,
263
+ options: options
264
+ )
265
+ operation = ::Gapic::Rest::TransportOperation.new response
266
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Run.decode_json response.body, ignore_unknown_fields: true
267
+
268
+ yield result, operation if block_given?
269
+ result
270
+ end
271
+
272
+ ##
273
+ # Baseline implementation for the update_run REST call
274
+ #
275
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest]
276
+ # A request object representing the call parameters. Required.
277
+ # @param options [::Gapic::CallOptions]
278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
279
+ #
280
+ # @yield [result, operation] Access the result along with the TransportOperation object
281
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Run]
282
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
283
+ #
284
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
285
+ # A result object deserialized from the server's reply
286
+ def update_run request_pb, options = nil
287
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
288
+
289
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_run_request request_pb
290
+ query_string_params = if query_string_params.any?
291
+ query_string_params.to_h { |p| p.split("=", 2) }
292
+ else
293
+ {}
294
+ end
295
+
296
+ response = @client_stub.make_http_request(
297
+ verb,
298
+ uri: uri,
299
+ body: body || "",
300
+ params: query_string_params,
301
+ options: options
302
+ )
303
+ operation = ::Gapic::Rest::TransportOperation.new response
304
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Run.decode_json response.body, ignore_unknown_fields: true
305
+
306
+ yield result, operation if block_given?
307
+ result
308
+ end
309
+
310
+ ##
311
+ # Baseline implementation for the get_run REST call
312
+ #
313
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest]
314
+ # A request object representing the call parameters. Required.
315
+ # @param options [::Gapic::CallOptions]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @yield [result, operation] Access the result along with the TransportOperation object
319
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::Run]
320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
321
+ #
322
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::Run]
323
+ # A result object deserialized from the server's reply
324
+ def get_run request_pb, options = nil
325
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
326
+
327
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_run_request request_pb
328
+ query_string_params = if query_string_params.any?
329
+ query_string_params.to_h { |p| p.split("=", 2) }
330
+ else
331
+ {}
332
+ end
333
+
334
+ response = @client_stub.make_http_request(
335
+ verb,
336
+ uri: uri,
337
+ body: body || "",
338
+ params: query_string_params,
339
+ options: options
340
+ )
341
+ operation = ::Gapic::Rest::TransportOperation.new response
342
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::Run.decode_json response.body, ignore_unknown_fields: true
343
+
344
+ yield result, operation if block_given?
345
+ result
346
+ end
347
+
348
+ ##
349
+ # Baseline implementation for the list_runs REST call
350
+ #
351
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest]
352
+ # A request object representing the call parameters. Required.
353
+ # @param options [::Gapic::CallOptions]
354
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
355
+ #
356
+ # @yield [result, operation] Access the result along with the TransportOperation object
357
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::ListRunsResponse]
358
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
359
+ #
360
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::ListRunsResponse]
361
+ # A result object deserialized from the server's reply
362
+ def list_runs request_pb, options = nil
363
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
364
+
365
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_runs_request request_pb
366
+ query_string_params = if query_string_params.any?
367
+ query_string_params.to_h { |p| p.split("=", 2) }
368
+ else
369
+ {}
370
+ end
371
+
372
+ response = @client_stub.make_http_request(
373
+ verb,
374
+ uri: uri,
375
+ body: body || "",
376
+ params: query_string_params,
377
+ options: options
378
+ )
379
+ operation = ::Gapic::Rest::TransportOperation.new response
380
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::ListRunsResponse.decode_json response.body, ignore_unknown_fields: true
381
+
382
+ yield result, operation if block_given?
383
+ result
384
+ end
385
+
386
+ ##
387
+ # Baseline implementation for the delete_run REST call
388
+ #
389
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest]
390
+ # A request object representing the call parameters. Required.
391
+ # @param options [::Gapic::CallOptions]
392
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
393
+ #
394
+ # @yield [result, operation] Access the result along with the TransportOperation object
395
+ # @yieldparam result [::Google::Longrunning::Operation]
396
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
397
+ #
398
+ # @return [::Google::Longrunning::Operation]
399
+ # A result object deserialized from the server's reply
400
+ def delete_run request_pb, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
402
+
403
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_run_request request_pb
404
+ query_string_params = if query_string_params.any?
405
+ query_string_params.to_h { |p| p.split("=", 2) }
406
+ else
407
+ {}
408
+ end
409
+
410
+ response = @client_stub.make_http_request(
411
+ verb,
412
+ uri: uri,
413
+ body: body || "",
414
+ params: query_string_params,
415
+ options: options
416
+ )
417
+ operation = ::Gapic::Rest::TransportOperation.new response
418
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
419
+
420
+ yield result, operation if block_given?
421
+ result
422
+ end
423
+
424
+ ##
425
+ # Baseline implementation for the create_lineage_event REST call
426
+ #
427
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest]
428
+ # A request object representing the call parameters. Required.
429
+ # @param options [::Gapic::CallOptions]
430
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
431
+ #
432
+ # @yield [result, operation] Access the result along with the TransportOperation object
433
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
434
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
435
+ #
436
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
437
+ # A result object deserialized from the server's reply
438
+ def create_lineage_event request_pb, options = nil
439
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
440
+
441
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_lineage_event_request request_pb
442
+ query_string_params = if query_string_params.any?
443
+ query_string_params.to_h { |p| p.split("=", 2) }
444
+ else
445
+ {}
446
+ end
447
+
448
+ response = @client_stub.make_http_request(
449
+ verb,
450
+ uri: uri,
451
+ body: body || "",
452
+ params: query_string_params,
453
+ options: options
454
+ )
455
+ operation = ::Gapic::Rest::TransportOperation.new response
456
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent.decode_json response.body, ignore_unknown_fields: true
457
+
458
+ yield result, operation if block_given?
459
+ result
460
+ end
461
+
462
+ ##
463
+ # Baseline implementation for the get_lineage_event REST call
464
+ #
465
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest]
466
+ # A request object representing the call parameters. Required.
467
+ # @param options [::Gapic::CallOptions]
468
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
469
+ #
470
+ # @yield [result, operation] Access the result along with the TransportOperation object
471
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
472
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
473
+ #
474
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent]
475
+ # A result object deserialized from the server's reply
476
+ def get_lineage_event request_pb, options = nil
477
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
478
+
479
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_lineage_event_request request_pb
480
+ query_string_params = if query_string_params.any?
481
+ query_string_params.to_h { |p| p.split("=", 2) }
482
+ else
483
+ {}
484
+ end
485
+
486
+ response = @client_stub.make_http_request(
487
+ verb,
488
+ uri: uri,
489
+ body: body || "",
490
+ params: query_string_params,
491
+ options: options
492
+ )
493
+ operation = ::Gapic::Rest::TransportOperation.new response
494
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::LineageEvent.decode_json response.body, ignore_unknown_fields: true
495
+
496
+ yield result, operation if block_given?
497
+ result
498
+ end
499
+
500
+ ##
501
+ # Baseline implementation for the list_lineage_events REST call
502
+ #
503
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest]
504
+ # A request object representing the call parameters. Required.
505
+ # @param options [::Gapic::CallOptions]
506
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
507
+ #
508
+ # @yield [result, operation] Access the result along with the TransportOperation object
509
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsResponse]
510
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
511
+ #
512
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsResponse]
513
+ # A result object deserialized from the server's reply
514
+ def list_lineage_events request_pb, options = nil
515
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
516
+
517
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_lineage_events_request request_pb
518
+ query_string_params = if query_string_params.any?
519
+ query_string_params.to_h { |p| p.split("=", 2) }
520
+ else
521
+ {}
522
+ end
523
+
524
+ response = @client_stub.make_http_request(
525
+ verb,
526
+ uri: uri,
527
+ body: body || "",
528
+ params: query_string_params,
529
+ options: options
530
+ )
531
+ operation = ::Gapic::Rest::TransportOperation.new response
532
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsResponse.decode_json response.body, ignore_unknown_fields: true
533
+
534
+ yield result, operation if block_given?
535
+ result
536
+ end
537
+
538
+ ##
539
+ # Baseline implementation for the delete_lineage_event REST call
540
+ #
541
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest]
542
+ # A request object representing the call parameters. Required.
543
+ # @param options [::Gapic::CallOptions]
544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
545
+ #
546
+ # @yield [result, operation] Access the result along with the TransportOperation object
547
+ # @yieldparam result [::Google::Protobuf::Empty]
548
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
549
+ #
550
+ # @return [::Google::Protobuf::Empty]
551
+ # A result object deserialized from the server's reply
552
+ def delete_lineage_event request_pb, options = nil
553
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
554
+
555
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_lineage_event_request request_pb
556
+ query_string_params = if query_string_params.any?
557
+ query_string_params.to_h { |p| p.split("=", 2) }
558
+ else
559
+ {}
560
+ end
561
+
562
+ response = @client_stub.make_http_request(
563
+ verb,
564
+ uri: uri,
565
+ body: body || "",
566
+ params: query_string_params,
567
+ options: options
568
+ )
569
+ operation = ::Gapic::Rest::TransportOperation.new response
570
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
571
+
572
+ yield result, operation if block_given?
573
+ result
574
+ end
575
+
576
+ ##
577
+ # Baseline implementation for the search_links REST call
578
+ #
579
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest]
580
+ # A request object representing the call parameters. Required.
581
+ # @param options [::Gapic::CallOptions]
582
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
583
+ #
584
+ # @yield [result, operation] Access the result along with the TransportOperation object
585
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksResponse]
586
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
587
+ #
588
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksResponse]
589
+ # A result object deserialized from the server's reply
590
+ def search_links request_pb, options = nil
591
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
592
+
593
+ verb, uri, query_string_params, body = ServiceStub.transcode_search_links_request request_pb
594
+ query_string_params = if query_string_params.any?
595
+ query_string_params.to_h { |p| p.split("=", 2) }
596
+ else
597
+ {}
598
+ end
599
+
600
+ response = @client_stub.make_http_request(
601
+ verb,
602
+ uri: uri,
603
+ body: body || "",
604
+ params: query_string_params,
605
+ options: options
606
+ )
607
+ operation = ::Gapic::Rest::TransportOperation.new response
608
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksResponse.decode_json response.body, ignore_unknown_fields: true
609
+
610
+ yield result, operation if block_given?
611
+ result
612
+ end
613
+
614
+ ##
615
+ # Baseline implementation for the batch_search_link_processes REST call
616
+ #
617
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest]
618
+ # A request object representing the call parameters. Required.
619
+ # @param options [::Gapic::CallOptions]
620
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
621
+ #
622
+ # @yield [result, operation] Access the result along with the TransportOperation object
623
+ # @yieldparam result [::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesResponse]
624
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
625
+ #
626
+ # @return [::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesResponse]
627
+ # A result object deserialized from the server's reply
628
+ def batch_search_link_processes request_pb, options = nil
629
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
630
+
631
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_search_link_processes_request request_pb
632
+ query_string_params = if query_string_params.any?
633
+ query_string_params.to_h { |p| p.split("=", 2) }
634
+ else
635
+ {}
636
+ end
637
+
638
+ response = @client_stub.make_http_request(
639
+ verb,
640
+ uri: uri,
641
+ body: body || "",
642
+ params: query_string_params,
643
+ options: options
644
+ )
645
+ operation = ::Gapic::Rest::TransportOperation.new response
646
+ result = ::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesResponse.decode_json response.body, ignore_unknown_fields: true
647
+
648
+ yield result, operation if block_given?
649
+ result
650
+ end
651
+
652
+ ##
653
+ # @private
654
+ #
655
+ # GRPC transcoding helper method for the create_process REST call
656
+ #
657
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateProcessRequest]
658
+ # A request object representing the call parameters. Required.
659
+ # @return [Array(String, [String, nil], Hash{String => String})]
660
+ # Uri, Body, Query string parameters
661
+ def self.transcode_create_process_request request_pb
662
+ transcoder = Gapic::Rest::GrpcTranscoder.new
663
+ .with_bindings(
664
+ uri_method: :post,
665
+ uri_template: "/v1/{parent}/processes",
666
+ body: "process",
667
+ matches: [
668
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
669
+ ]
670
+ )
671
+ transcoder.transcode request_pb
672
+ end
673
+
674
+ ##
675
+ # @private
676
+ #
677
+ # GRPC transcoding helper method for the update_process REST call
678
+ #
679
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::UpdateProcessRequest]
680
+ # A request object representing the call parameters. Required.
681
+ # @return [Array(String, [String, nil], Hash{String => String})]
682
+ # Uri, Body, Query string parameters
683
+ def self.transcode_update_process_request request_pb
684
+ transcoder = Gapic::Rest::GrpcTranscoder.new
685
+ .with_bindings(
686
+ uri_method: :patch,
687
+ uri_template: "/v1/{process.name}",
688
+ body: "process",
689
+ matches: [
690
+ ["process.name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/?$}, false]
691
+ ]
692
+ )
693
+ transcoder.transcode request_pb
694
+ end
695
+
696
+ ##
697
+ # @private
698
+ #
699
+ # GRPC transcoding helper method for the get_process REST call
700
+ #
701
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetProcessRequest]
702
+ # A request object representing the call parameters. Required.
703
+ # @return [Array(String, [String, nil], Hash{String => String})]
704
+ # Uri, Body, Query string parameters
705
+ def self.transcode_get_process_request request_pb
706
+ transcoder = Gapic::Rest::GrpcTranscoder.new
707
+ .with_bindings(
708
+ uri_method: :get,
709
+ uri_template: "/v1/{name}",
710
+ matches: [
711
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/?$}, false]
712
+ ]
713
+ )
714
+ transcoder.transcode request_pb
715
+ end
716
+
717
+ ##
718
+ # @private
719
+ #
720
+ # GRPC transcoding helper method for the list_processes REST call
721
+ #
722
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListProcessesRequest]
723
+ # A request object representing the call parameters. Required.
724
+ # @return [Array(String, [String, nil], Hash{String => String})]
725
+ # Uri, Body, Query string parameters
726
+ def self.transcode_list_processes_request request_pb
727
+ transcoder = Gapic::Rest::GrpcTranscoder.new
728
+ .with_bindings(
729
+ uri_method: :get,
730
+ uri_template: "/v1/{parent}/processes",
731
+ matches: [
732
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
733
+ ]
734
+ )
735
+ transcoder.transcode request_pb
736
+ end
737
+
738
+ ##
739
+ # @private
740
+ #
741
+ # GRPC transcoding helper method for the delete_process REST call
742
+ #
743
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteProcessRequest]
744
+ # A request object representing the call parameters. Required.
745
+ # @return [Array(String, [String, nil], Hash{String => String})]
746
+ # Uri, Body, Query string parameters
747
+ def self.transcode_delete_process_request request_pb
748
+ transcoder = Gapic::Rest::GrpcTranscoder.new
749
+ .with_bindings(
750
+ uri_method: :delete,
751
+ uri_template: "/v1/{name}",
752
+ matches: [
753
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/?$}, false]
754
+ ]
755
+ )
756
+ transcoder.transcode request_pb
757
+ end
758
+
759
+ ##
760
+ # @private
761
+ #
762
+ # GRPC transcoding helper method for the create_run REST call
763
+ #
764
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateRunRequest]
765
+ # A request object representing the call parameters. Required.
766
+ # @return [Array(String, [String, nil], Hash{String => String})]
767
+ # Uri, Body, Query string parameters
768
+ def self.transcode_create_run_request request_pb
769
+ transcoder = Gapic::Rest::GrpcTranscoder.new
770
+ .with_bindings(
771
+ uri_method: :post,
772
+ uri_template: "/v1/{parent}/runs",
773
+ body: "run",
774
+ matches: [
775
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/?$}, false]
776
+ ]
777
+ )
778
+ transcoder.transcode request_pb
779
+ end
780
+
781
+ ##
782
+ # @private
783
+ #
784
+ # GRPC transcoding helper method for the update_run REST call
785
+ #
786
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::UpdateRunRequest]
787
+ # A request object representing the call parameters. Required.
788
+ # @return [Array(String, [String, nil], Hash{String => String})]
789
+ # Uri, Body, Query string parameters
790
+ def self.transcode_update_run_request request_pb
791
+ transcoder = Gapic::Rest::GrpcTranscoder.new
792
+ .with_bindings(
793
+ uri_method: :patch,
794
+ uri_template: "/v1/{run.name}",
795
+ body: "run",
796
+ matches: [
797
+ ["run.name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/?$}, false]
798
+ ]
799
+ )
800
+ transcoder.transcode request_pb
801
+ end
802
+
803
+ ##
804
+ # @private
805
+ #
806
+ # GRPC transcoding helper method for the get_run REST call
807
+ #
808
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetRunRequest]
809
+ # A request object representing the call parameters. Required.
810
+ # @return [Array(String, [String, nil], Hash{String => String})]
811
+ # Uri, Body, Query string parameters
812
+ def self.transcode_get_run_request request_pb
813
+ transcoder = Gapic::Rest::GrpcTranscoder.new
814
+ .with_bindings(
815
+ uri_method: :get,
816
+ uri_template: "/v1/{name}",
817
+ matches: [
818
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/?$}, false]
819
+ ]
820
+ )
821
+ transcoder.transcode request_pb
822
+ end
823
+
824
+ ##
825
+ # @private
826
+ #
827
+ # GRPC transcoding helper method for the list_runs REST call
828
+ #
829
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListRunsRequest]
830
+ # A request object representing the call parameters. Required.
831
+ # @return [Array(String, [String, nil], Hash{String => String})]
832
+ # Uri, Body, Query string parameters
833
+ def self.transcode_list_runs_request request_pb
834
+ transcoder = Gapic::Rest::GrpcTranscoder.new
835
+ .with_bindings(
836
+ uri_method: :get,
837
+ uri_template: "/v1/{parent}/runs",
838
+ matches: [
839
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/?$}, false]
840
+ ]
841
+ )
842
+ transcoder.transcode request_pb
843
+ end
844
+
845
+ ##
846
+ # @private
847
+ #
848
+ # GRPC transcoding helper method for the delete_run REST call
849
+ #
850
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteRunRequest]
851
+ # A request object representing the call parameters. Required.
852
+ # @return [Array(String, [String, nil], Hash{String => String})]
853
+ # Uri, Body, Query string parameters
854
+ def self.transcode_delete_run_request request_pb
855
+ transcoder = Gapic::Rest::GrpcTranscoder.new
856
+ .with_bindings(
857
+ uri_method: :delete,
858
+ uri_template: "/v1/{name}",
859
+ matches: [
860
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/?$}, false]
861
+ ]
862
+ )
863
+ transcoder.transcode request_pb
864
+ end
865
+
866
+ ##
867
+ # @private
868
+ #
869
+ # GRPC transcoding helper method for the create_lineage_event REST call
870
+ #
871
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::CreateLineageEventRequest]
872
+ # A request object representing the call parameters. Required.
873
+ # @return [Array(String, [String, nil], Hash{String => String})]
874
+ # Uri, Body, Query string parameters
875
+ def self.transcode_create_lineage_event_request request_pb
876
+ transcoder = Gapic::Rest::GrpcTranscoder.new
877
+ .with_bindings(
878
+ uri_method: :post,
879
+ uri_template: "/v1/{parent}/lineageEvents",
880
+ body: "lineage_event",
881
+ matches: [
882
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/?$}, false]
883
+ ]
884
+ )
885
+ transcoder.transcode request_pb
886
+ end
887
+
888
+ ##
889
+ # @private
890
+ #
891
+ # GRPC transcoding helper method for the get_lineage_event REST call
892
+ #
893
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::GetLineageEventRequest]
894
+ # A request object representing the call parameters. Required.
895
+ # @return [Array(String, [String, nil], Hash{String => String})]
896
+ # Uri, Body, Query string parameters
897
+ def self.transcode_get_lineage_event_request request_pb
898
+ transcoder = Gapic::Rest::GrpcTranscoder.new
899
+ .with_bindings(
900
+ uri_method: :get,
901
+ uri_template: "/v1/{name}",
902
+ matches: [
903
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/lineageEvents/[^/]+/?$}, false]
904
+ ]
905
+ )
906
+ transcoder.transcode request_pb
907
+ end
908
+
909
+ ##
910
+ # @private
911
+ #
912
+ # GRPC transcoding helper method for the list_lineage_events REST call
913
+ #
914
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::ListLineageEventsRequest]
915
+ # A request object representing the call parameters. Required.
916
+ # @return [Array(String, [String, nil], Hash{String => String})]
917
+ # Uri, Body, Query string parameters
918
+ def self.transcode_list_lineage_events_request request_pb
919
+ transcoder = Gapic::Rest::GrpcTranscoder.new
920
+ .with_bindings(
921
+ uri_method: :get,
922
+ uri_template: "/v1/{parent}/lineageEvents",
923
+ matches: [
924
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/?$}, false]
925
+ ]
926
+ )
927
+ transcoder.transcode request_pb
928
+ end
929
+
930
+ ##
931
+ # @private
932
+ #
933
+ # GRPC transcoding helper method for the delete_lineage_event REST call
934
+ #
935
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::DeleteLineageEventRequest]
936
+ # A request object representing the call parameters. Required.
937
+ # @return [Array(String, [String, nil], Hash{String => String})]
938
+ # Uri, Body, Query string parameters
939
+ def self.transcode_delete_lineage_event_request request_pb
940
+ transcoder = Gapic::Rest::GrpcTranscoder.new
941
+ .with_bindings(
942
+ uri_method: :delete,
943
+ uri_template: "/v1/{name}",
944
+ matches: [
945
+ ["name", %r{^projects/[^/]+/locations/[^/]+/processes/[^/]+/runs/[^/]+/lineageEvents/[^/]+/?$}, false]
946
+ ]
947
+ )
948
+ transcoder.transcode request_pb
949
+ end
950
+
951
+ ##
952
+ # @private
953
+ #
954
+ # GRPC transcoding helper method for the search_links REST call
955
+ #
956
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::SearchLinksRequest]
957
+ # A request object representing the call parameters. Required.
958
+ # @return [Array(String, [String, nil], Hash{String => String})]
959
+ # Uri, Body, Query string parameters
960
+ def self.transcode_search_links_request request_pb
961
+ transcoder = Gapic::Rest::GrpcTranscoder.new
962
+ .with_bindings(
963
+ uri_method: :post,
964
+ uri_template: "/v1/{parent}:searchLinks",
965
+ body: "*",
966
+ matches: [
967
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
968
+ ]
969
+ )
970
+ transcoder.transcode request_pb
971
+ end
972
+
973
+ ##
974
+ # @private
975
+ #
976
+ # GRPC transcoding helper method for the batch_search_link_processes REST call
977
+ #
978
+ # @param request_pb [::Google::Cloud::DataCatalog::Lineage::V1::BatchSearchLinkProcessesRequest]
979
+ # A request object representing the call parameters. Required.
980
+ # @return [Array(String, [String, nil], Hash{String => String})]
981
+ # Uri, Body, Query string parameters
982
+ def self.transcode_batch_search_link_processes_request request_pb
983
+ transcoder = Gapic::Rest::GrpcTranscoder.new
984
+ .with_bindings(
985
+ uri_method: :post,
986
+ uri_template: "/v1/{parent}:batchSearchLinkProcesses",
987
+ body: "*",
988
+ matches: [
989
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
990
+ ]
991
+ )
992
+ transcoder.transcode request_pb
993
+ end
994
+ end
995
+ end
996
+ end
997
+ end
998
+ end
999
+ end
1000
+ end
1001
+ end