google-cloud-data_catalog-lineage-v1 0.7.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/client.rb +45 -18
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/operations.rb +19 -15
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/client.rb +45 -18
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/operations.rb +50 -38
- data/lib/google/cloud/data_catalog/lineage/v1/lineage/rest/service_stub.rb +150 -104
- data/lib/google/cloud/data_catalog/lineage/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/datacatalog/lineage/v1/lineage.rb +4 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/protobuf/struct.rb +12 -0
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebb0a2156a42269f3000e79b57fc04829d308be23642ad5ed85afe37414f8d1e
|
4
|
+
data.tar.gz: c2f11f4c11a7048c6b450e536e13496edf29b4392b8364003f290e9cf1a46e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27f10f070c83660f2b5985cbe3992945cbb5e8e6590894d2a2d937e546063de7170e176e8c18a4af559198e3647e10f834a3c9a54d7ca25d4b60b794756f3ba4
|
7
|
+
data.tar.gz: d2e37544194d594f7a6fd7ae3f37e3d7e603b8f2d8a35e3b4f6eb0c75d803ad93e0a54fc0130b3eb05e1ff8a1dfe2f974c9f672cbf767960d5dc0e627f7b2366
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/data-catalog/docs/reference/data-lineage/rpc)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/data_catalog/lineage/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::DataCatalog::Lineage::V1::Lineage::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -173,8 +173,19 @@ module Google
|
|
173
173
|
universe_domain: @config.universe_domain,
|
174
174
|
channel_args: @config.channel_args,
|
175
175
|
interceptors: @config.interceptors,
|
176
|
-
channel_pool_config: @config.channel_pool
|
176
|
+
channel_pool_config: @config.channel_pool,
|
177
|
+
logger: @config.logger
|
177
178
|
)
|
179
|
+
|
180
|
+
@lineage_stub.stub_logger&.info do |entry|
|
181
|
+
entry.set_system_name
|
182
|
+
entry.set_service
|
183
|
+
entry.message = "Created client for #{entry.service}"
|
184
|
+
entry.set_credentials_fields credentials
|
185
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
186
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
187
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
188
|
+
end
|
178
189
|
end
|
179
190
|
|
180
191
|
##
|
@@ -184,6 +195,15 @@ module Google
|
|
184
195
|
#
|
185
196
|
attr_reader :operations_client
|
186
197
|
|
198
|
+
##
|
199
|
+
# The logger used for request/response debug logging.
|
200
|
+
#
|
201
|
+
# @return [Logger]
|
202
|
+
#
|
203
|
+
def logger
|
204
|
+
@lineage_stub.logger
|
205
|
+
end
|
206
|
+
|
187
207
|
# Service calls
|
188
208
|
|
189
209
|
##
|
@@ -277,7 +297,6 @@ module Google
|
|
277
297
|
|
278
298
|
@lineage_stub.call_rpc :process_open_lineage_run_event, request, options: options do |response, operation|
|
279
299
|
yield response, operation if block_given?
|
280
|
-
return response
|
281
300
|
end
|
282
301
|
rescue ::GRPC::BadStatus => e
|
283
302
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -370,7 +389,6 @@ module Google
|
|
370
389
|
|
371
390
|
@lineage_stub.call_rpc :create_process, request, options: options do |response, operation|
|
372
391
|
yield response, operation if block_given?
|
373
|
-
return response
|
374
392
|
end
|
375
393
|
rescue ::GRPC::BadStatus => e
|
376
394
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -463,7 +481,6 @@ module Google
|
|
463
481
|
|
464
482
|
@lineage_stub.call_rpc :update_process, request, options: options do |response, operation|
|
465
483
|
yield response, operation if block_given?
|
466
|
-
return response
|
467
484
|
end
|
468
485
|
rescue ::GRPC::BadStatus => e
|
469
486
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -549,7 +566,6 @@ module Google
|
|
549
566
|
|
550
567
|
@lineage_stub.call_rpc :get_process, request, options: options do |response, operation|
|
551
568
|
yield response, operation if block_given?
|
552
|
-
return response
|
553
569
|
end
|
554
570
|
rescue ::GRPC::BadStatus => e
|
555
571
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -653,7 +669,7 @@ module Google
|
|
653
669
|
@lineage_stub.call_rpc :list_processes, request, options: options do |response, operation|
|
654
670
|
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_processes, request, response, operation, options
|
655
671
|
yield response, operation if block_given?
|
656
|
-
|
672
|
+
throw :response, response
|
657
673
|
end
|
658
674
|
rescue ::GRPC::BadStatus => e
|
659
675
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -750,7 +766,7 @@ module Google
|
|
750
766
|
@lineage_stub.call_rpc :delete_process, request, options: options do |response, operation|
|
751
767
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
752
768
|
yield response, operation if block_given?
|
753
|
-
|
769
|
+
throw :response, response
|
754
770
|
end
|
755
771
|
rescue ::GRPC::BadStatus => e
|
756
772
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -842,7 +858,6 @@ module Google
|
|
842
858
|
|
843
859
|
@lineage_stub.call_rpc :create_run, request, options: options do |response, operation|
|
844
860
|
yield response, operation if block_given?
|
845
|
-
return response
|
846
861
|
end
|
847
862
|
rescue ::GRPC::BadStatus => e
|
848
863
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -938,7 +953,6 @@ module Google
|
|
938
953
|
|
939
954
|
@lineage_stub.call_rpc :update_run, request, options: options do |response, operation|
|
940
955
|
yield response, operation if block_given?
|
941
|
-
return response
|
942
956
|
end
|
943
957
|
rescue ::GRPC::BadStatus => e
|
944
958
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1024,7 +1038,6 @@ module Google
|
|
1024
1038
|
|
1025
1039
|
@lineage_stub.call_rpc :get_run, request, options: options do |response, operation|
|
1026
1040
|
yield response, operation if block_given?
|
1027
|
-
return response
|
1028
1041
|
end
|
1029
1042
|
rescue ::GRPC::BadStatus => e
|
1030
1043
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1127,7 +1140,7 @@ module Google
|
|
1127
1140
|
@lineage_stub.call_rpc :list_runs, request, options: options do |response, operation|
|
1128
1141
|
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_runs, request, response, operation, options
|
1129
1142
|
yield response, operation if block_given?
|
1130
|
-
|
1143
|
+
throw :response, response
|
1131
1144
|
end
|
1132
1145
|
rescue ::GRPC::BadStatus => e
|
1133
1146
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1224,7 +1237,7 @@ module Google
|
|
1224
1237
|
@lineage_stub.call_rpc :delete_run, request, options: options do |response, operation|
|
1225
1238
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1226
1239
|
yield response, operation if block_given?
|
1227
|
-
|
1240
|
+
throw :response, response
|
1228
1241
|
end
|
1229
1242
|
rescue ::GRPC::BadStatus => e
|
1230
1243
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1316,7 +1329,6 @@ module Google
|
|
1316
1329
|
|
1317
1330
|
@lineage_stub.call_rpc :create_lineage_event, request, options: options do |response, operation|
|
1318
1331
|
yield response, operation if block_given?
|
1319
|
-
return response
|
1320
1332
|
end
|
1321
1333
|
rescue ::GRPC::BadStatus => e
|
1322
1334
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1402,7 +1414,6 @@ module Google
|
|
1402
1414
|
|
1403
1415
|
@lineage_stub.call_rpc :get_lineage_event, request, options: options do |response, operation|
|
1404
1416
|
yield response, operation if block_given?
|
1405
|
-
return response
|
1406
1417
|
end
|
1407
1418
|
rescue ::GRPC::BadStatus => e
|
1408
1419
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1507,7 +1518,7 @@ module Google
|
|
1507
1518
|
@lineage_stub.call_rpc :list_lineage_events, request, options: options do |response, operation|
|
1508
1519
|
response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_lineage_events, request, response, operation, options
|
1509
1520
|
yield response, operation if block_given?
|
1510
|
-
|
1521
|
+
throw :response, response
|
1511
1522
|
end
|
1512
1523
|
rescue ::GRPC::BadStatus => e
|
1513
1524
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1596,7 +1607,6 @@ module Google
|
|
1596
1607
|
|
1597
1608
|
@lineage_stub.call_rpc :delete_lineage_event, request, options: options do |response, operation|
|
1598
1609
|
yield response, operation if block_given?
|
1599
|
-
return response
|
1600
1610
|
end
|
1601
1611
|
rescue ::GRPC::BadStatus => e
|
1602
1612
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1633,9 +1643,13 @@ module Google
|
|
1633
1643
|
# @param source [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1634
1644
|
# Optional. Send asset information in the **source** field to retrieve all
|
1635
1645
|
# links that lead from the specified asset to downstream assets.
|
1646
|
+
#
|
1647
|
+
# Note: The following fields are mutually exclusive: `source`, `target`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1636
1648
|
# @param target [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1637
1649
|
# Optional. Send asset information in the **target** field to retrieve all
|
1638
1650
|
# links that lead from upstream assets to the specified asset.
|
1651
|
+
#
|
1652
|
+
# Note: The following fields are mutually exclusive: `target`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1639
1653
|
# @param page_size [::Integer]
|
1640
1654
|
# Optional. The maximum number of links to return in a single page of the
|
1641
1655
|
# response. A page may contain fewer links than this value. If unspecified,
|
@@ -1714,7 +1728,7 @@ module Google
|
|
1714
1728
|
@lineage_stub.call_rpc :search_links, request, options: options do |response, operation|
|
1715
1729
|
response = ::Gapic::PagedEnumerable.new @lineage_stub, :search_links, request, response, operation, options
|
1716
1730
|
yield response, operation if block_given?
|
1717
|
-
|
1731
|
+
throw :response, response
|
1718
1732
|
end
|
1719
1733
|
rescue ::GRPC::BadStatus => e
|
1720
1734
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1836,7 +1850,7 @@ module Google
|
|
1836
1850
|
@lineage_stub.call_rpc :batch_search_link_processes, request, options: options do |response, operation|
|
1837
1851
|
response = ::Gapic::PagedEnumerable.new @lineage_stub, :batch_search_link_processes, request, response, operation, options
|
1838
1852
|
yield response, operation if block_given?
|
1839
|
-
|
1853
|
+
throw :response, response
|
1840
1854
|
end
|
1841
1855
|
rescue ::GRPC::BadStatus => e
|
1842
1856
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1886,6 +1900,13 @@ module Google
|
|
1886
1900
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1887
1901
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1888
1902
|
# * (`nil`) indicating no credentials
|
1903
|
+
#
|
1904
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1905
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1906
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1907
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1908
|
+
# For more information, refer to [Validate credential configurations from external
|
1909
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1889
1910
|
# @return [::Object]
|
1890
1911
|
# @!attribute [rw] scope
|
1891
1912
|
# The OAuth scopes
|
@@ -1925,6 +1946,11 @@ module Google
|
|
1925
1946
|
# default endpoint URL. The default value of nil uses the environment
|
1926
1947
|
# universe (usually the default "googleapis.com" universe).
|
1927
1948
|
# @return [::String,nil]
|
1949
|
+
# @!attribute [rw] logger
|
1950
|
+
# A custom logger to use for request/response debug logging, or the value
|
1951
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1952
|
+
# explicitly disable logging.
|
1953
|
+
# @return [::Logger,:default,nil]
|
1928
1954
|
#
|
1929
1955
|
class Configuration
|
1930
1956
|
extend ::Gapic::Config
|
@@ -1949,6 +1975,7 @@ module Google
|
|
1949
1975
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1950
1976
|
config_attr :quota_project, nil, ::String, nil
|
1951
1977
|
config_attr :universe_domain, nil, ::String, nil
|
1978
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1952
1979
|
|
1953
1980
|
# @private
|
1954
1981
|
def initialize parent_config = nil
|
@@ -125,14 +125,6 @@ module Google
|
|
125
125
|
# Lists operations that match the specified filter in the request. If the
|
126
126
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
127
127
|
#
|
128
|
-
# NOTE: the `name` binding allows API services to override the binding
|
129
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
130
|
-
# override the binding, API services can add a binding such as
|
131
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
132
|
-
# For backwards compatibility, the default name includes the operations
|
133
|
-
# collection id, however overriding users must ensure the name binding
|
134
|
-
# is the parent resource, without the operations collection id.
|
135
|
-
#
|
136
128
|
# @overload list_operations(request, options = nil)
|
137
129
|
# Pass arguments to `list_operations` via a request object, either of type
|
138
130
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -222,7 +214,7 @@ module Google
|
|
222
214
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
223
215
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
224
216
|
yield response, operation if block_given?
|
225
|
-
|
217
|
+
throw :response, response
|
226
218
|
end
|
227
219
|
rescue ::GRPC::BadStatus => e
|
228
220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -318,7 +310,7 @@ module Google
|
|
318
310
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
319
311
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
320
312
|
yield response, operation if block_given?
|
321
|
-
|
313
|
+
throw :response, response
|
322
314
|
end
|
323
315
|
rescue ::GRPC::BadStatus => e
|
324
316
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -407,7 +399,6 @@ module Google
|
|
407
399
|
|
408
400
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
409
401
|
yield response, operation if block_given?
|
410
|
-
return response
|
411
402
|
end
|
412
403
|
rescue ::GRPC::BadStatus => e
|
413
404
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -422,8 +413,9 @@ module Google
|
|
422
413
|
# other methods to check whether the cancellation succeeded or whether the
|
423
414
|
# operation completed despite cancellation. On successful cancellation,
|
424
415
|
# the operation is not deleted; instead, it becomes an operation with
|
425
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
426
|
-
# corresponding to
|
416
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
417
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
418
|
+
# `Code.CANCELLED`.
|
427
419
|
#
|
428
420
|
# @overload cancel_operation(request, options = nil)
|
429
421
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -502,7 +494,6 @@ module Google
|
|
502
494
|
|
503
495
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
504
496
|
yield response, operation if block_given?
|
505
|
-
return response
|
506
497
|
end
|
507
498
|
rescue ::GRPC::BadStatus => e
|
508
499
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -600,7 +591,7 @@ module Google
|
|
600
591
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
601
592
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
602
593
|
yield response, operation if block_given?
|
603
|
-
|
594
|
+
throw :response, response
|
604
595
|
end
|
605
596
|
rescue ::GRPC::BadStatus => e
|
606
597
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -650,6 +641,13 @@ module Google
|
|
650
641
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
651
642
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
652
643
|
# * (`nil`) indicating no credentials
|
644
|
+
#
|
645
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
646
|
+
# external source for authentication to Google Cloud, you must validate it before
|
647
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
648
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
649
|
+
# For more information, refer to [Validate credential configurations from external
|
650
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
653
651
|
# @return [::Object]
|
654
652
|
# @!attribute [rw] scope
|
655
653
|
# The OAuth scopes
|
@@ -689,6 +687,11 @@ module Google
|
|
689
687
|
# default endpoint URL. The default value of nil uses the environment
|
690
688
|
# universe (usually the default "googleapis.com" universe).
|
691
689
|
# @return [::String,nil]
|
690
|
+
# @!attribute [rw] logger
|
691
|
+
# A custom logger to use for request/response debug logging, or the value
|
692
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
693
|
+
# explicitly disable logging.
|
694
|
+
# @return [::Logger,:default,nil]
|
692
695
|
#
|
693
696
|
class Configuration
|
694
697
|
extend ::Gapic::Config
|
@@ -713,6 +716,7 @@ module Google
|
|
713
716
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
714
717
|
config_attr :quota_project, nil, ::String, nil
|
715
718
|
config_attr :universe_domain, nil, ::String, nil
|
719
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
720
|
|
717
721
|
# @private
|
718
722
|
def initialize parent_config = nil
|
@@ -166,8 +166,19 @@ module Google
|
|
166
166
|
endpoint: @config.endpoint,
|
167
167
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
168
168
|
universe_domain: @config.universe_domain,
|
169
|
-
credentials: credentials
|
169
|
+
credentials: credentials,
|
170
|
+
logger: @config.logger
|
170
171
|
)
|
172
|
+
|
173
|
+
@lineage_stub.logger(stub: true)&.info do |entry|
|
174
|
+
entry.set_system_name
|
175
|
+
entry.set_service
|
176
|
+
entry.message = "Created client for #{entry.service}"
|
177
|
+
entry.set_credentials_fields credentials
|
178
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
179
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
180
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
181
|
+
end
|
171
182
|
end
|
172
183
|
|
173
184
|
##
|
@@ -177,6 +188,15 @@ module Google
|
|
177
188
|
#
|
178
189
|
attr_reader :operations_client
|
179
190
|
|
191
|
+
##
|
192
|
+
# The logger used for request/response debug logging.
|
193
|
+
#
|
194
|
+
# @return [Logger]
|
195
|
+
#
|
196
|
+
def logger
|
197
|
+
@lineage_stub.logger
|
198
|
+
end
|
199
|
+
|
180
200
|
# Service calls
|
181
201
|
|
182
202
|
##
|
@@ -263,7 +283,6 @@ module Google
|
|
263
283
|
|
264
284
|
@lineage_stub.process_open_lineage_run_event request, options do |result, operation|
|
265
285
|
yield result, operation if block_given?
|
266
|
-
return result
|
267
286
|
end
|
268
287
|
rescue ::Gapic::Rest::Error => e
|
269
288
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -349,7 +368,6 @@ module Google
|
|
349
368
|
|
350
369
|
@lineage_stub.create_process request, options do |result, operation|
|
351
370
|
yield result, operation if block_given?
|
352
|
-
return result
|
353
371
|
end
|
354
372
|
rescue ::Gapic::Rest::Error => e
|
355
373
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -435,7 +453,6 @@ module Google
|
|
435
453
|
|
436
454
|
@lineage_stub.update_process request, options do |result, operation|
|
437
455
|
yield result, operation if block_given?
|
438
|
-
return result
|
439
456
|
end
|
440
457
|
rescue ::Gapic::Rest::Error => e
|
441
458
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -514,7 +531,6 @@ module Google
|
|
514
531
|
|
515
532
|
@lineage_stub.get_process request, options do |result, operation|
|
516
533
|
yield result, operation if block_given?
|
517
|
-
return result
|
518
534
|
end
|
519
535
|
rescue ::Gapic::Rest::Error => e
|
520
536
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -611,7 +627,7 @@ module Google
|
|
611
627
|
@lineage_stub.list_processes request, options do |result, operation|
|
612
628
|
result = ::Gapic::Rest::PagedEnumerable.new @lineage_stub, :list_processes, "processes", request, result, options
|
613
629
|
yield result, operation if block_given?
|
614
|
-
|
630
|
+
throw :response, result
|
615
631
|
end
|
616
632
|
rescue ::Gapic::Rest::Error => e
|
617
633
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -701,7 +717,7 @@ module Google
|
|
701
717
|
@lineage_stub.delete_process request, options do |result, operation|
|
702
718
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
703
719
|
yield result, operation if block_given?
|
704
|
-
|
720
|
+
throw :response, result
|
705
721
|
end
|
706
722
|
rescue ::Gapic::Rest::Error => e
|
707
723
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -786,7 +802,6 @@ module Google
|
|
786
802
|
|
787
803
|
@lineage_stub.create_run request, options do |result, operation|
|
788
804
|
yield result, operation if block_given?
|
789
|
-
return result
|
790
805
|
end
|
791
806
|
rescue ::Gapic::Rest::Error => e
|
792
807
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -875,7 +890,6 @@ module Google
|
|
875
890
|
|
876
891
|
@lineage_stub.update_run request, options do |result, operation|
|
877
892
|
yield result, operation if block_given?
|
878
|
-
return result
|
879
893
|
end
|
880
894
|
rescue ::Gapic::Rest::Error => e
|
881
895
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -954,7 +968,6 @@ module Google
|
|
954
968
|
|
955
969
|
@lineage_stub.get_run request, options do |result, operation|
|
956
970
|
yield result, operation if block_given?
|
957
|
-
return result
|
958
971
|
end
|
959
972
|
rescue ::Gapic::Rest::Error => e
|
960
973
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1050,7 +1063,7 @@ module Google
|
|
1050
1063
|
@lineage_stub.list_runs request, options do |result, operation|
|
1051
1064
|
result = ::Gapic::Rest::PagedEnumerable.new @lineage_stub, :list_runs, "runs", request, result, options
|
1052
1065
|
yield result, operation if block_given?
|
1053
|
-
|
1066
|
+
throw :response, result
|
1054
1067
|
end
|
1055
1068
|
rescue ::Gapic::Rest::Error => e
|
1056
1069
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1140,7 +1153,7 @@ module Google
|
|
1140
1153
|
@lineage_stub.delete_run request, options do |result, operation|
|
1141
1154
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1142
1155
|
yield result, operation if block_given?
|
1143
|
-
|
1156
|
+
throw :response, result
|
1144
1157
|
end
|
1145
1158
|
rescue ::Gapic::Rest::Error => e
|
1146
1159
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1225,7 +1238,6 @@ module Google
|
|
1225
1238
|
|
1226
1239
|
@lineage_stub.create_lineage_event request, options do |result, operation|
|
1227
1240
|
yield result, operation if block_given?
|
1228
|
-
return result
|
1229
1241
|
end
|
1230
1242
|
rescue ::Gapic::Rest::Error => e
|
1231
1243
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1304,7 +1316,6 @@ module Google
|
|
1304
1316
|
|
1305
1317
|
@lineage_stub.get_lineage_event request, options do |result, operation|
|
1306
1318
|
yield result, operation if block_given?
|
1307
|
-
return result
|
1308
1319
|
end
|
1309
1320
|
rescue ::Gapic::Rest::Error => e
|
1310
1321
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1402,7 +1413,7 @@ module Google
|
|
1402
1413
|
@lineage_stub.list_lineage_events request, options do |result, operation|
|
1403
1414
|
result = ::Gapic::Rest::PagedEnumerable.new @lineage_stub, :list_lineage_events, "lineage_events", request, result, options
|
1404
1415
|
yield result, operation if block_given?
|
1405
|
-
|
1416
|
+
throw :response, result
|
1406
1417
|
end
|
1407
1418
|
rescue ::Gapic::Rest::Error => e
|
1408
1419
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1484,7 +1495,6 @@ module Google
|
|
1484
1495
|
|
1485
1496
|
@lineage_stub.delete_lineage_event request, options do |result, operation|
|
1486
1497
|
yield result, operation if block_given?
|
1487
|
-
return result
|
1488
1498
|
end
|
1489
1499
|
rescue ::Gapic::Rest::Error => e
|
1490
1500
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1521,9 +1531,13 @@ module Google
|
|
1521
1531
|
# @param source [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1522
1532
|
# Optional. Send asset information in the **source** field to retrieve all
|
1523
1533
|
# links that lead from the specified asset to downstream assets.
|
1534
|
+
#
|
1535
|
+
# Note: The following fields are mutually exclusive: `source`, `target`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1524
1536
|
# @param target [::Google::Cloud::DataCatalog::Lineage::V1::EntityReference, ::Hash]
|
1525
1537
|
# Optional. Send asset information in the **target** field to retrieve all
|
1526
1538
|
# links that lead from upstream assets to the specified asset.
|
1539
|
+
#
|
1540
|
+
# Note: The following fields are mutually exclusive: `target`, `source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1527
1541
|
# @param page_size [::Integer]
|
1528
1542
|
# Optional. The maximum number of links to return in a single page of the
|
1529
1543
|
# response. A page may contain fewer links than this value. If unspecified,
|
@@ -1595,7 +1609,7 @@ module Google
|
|
1595
1609
|
@lineage_stub.search_links request, options do |result, operation|
|
1596
1610
|
result = ::Gapic::Rest::PagedEnumerable.new @lineage_stub, :search_links, "links", request, result, options
|
1597
1611
|
yield result, operation if block_given?
|
1598
|
-
|
1612
|
+
throw :response, result
|
1599
1613
|
end
|
1600
1614
|
rescue ::Gapic::Rest::Error => e
|
1601
1615
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1710,7 +1724,7 @@ module Google
|
|
1710
1724
|
@lineage_stub.batch_search_link_processes request, options do |result, operation|
|
1711
1725
|
result = ::Gapic::Rest::PagedEnumerable.new @lineage_stub, :batch_search_link_processes, "process_links", request, result, options
|
1712
1726
|
yield result, operation if block_given?
|
1713
|
-
|
1727
|
+
throw :response, result
|
1714
1728
|
end
|
1715
1729
|
rescue ::Gapic::Rest::Error => e
|
1716
1730
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1758,6 +1772,13 @@ module Google
|
|
1758
1772
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1759
1773
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1760
1774
|
# * (`nil`) indicating no credentials
|
1775
|
+
#
|
1776
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1777
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1778
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1779
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1780
|
+
# For more information, refer to [Validate credential configurations from external
|
1781
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1761
1782
|
# @return [::Object]
|
1762
1783
|
# @!attribute [rw] scope
|
1763
1784
|
# The OAuth scopes
|
@@ -1790,6 +1811,11 @@ module Google
|
|
1790
1811
|
# default endpoint URL. The default value of nil uses the environment
|
1791
1812
|
# universe (usually the default "googleapis.com" universe).
|
1792
1813
|
# @return [::String,nil]
|
1814
|
+
# @!attribute [rw] logger
|
1815
|
+
# A custom logger to use for request/response debug logging, or the value
|
1816
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1817
|
+
# explicitly disable logging.
|
1818
|
+
# @return [::Logger,:default,nil]
|
1793
1819
|
#
|
1794
1820
|
class Configuration
|
1795
1821
|
extend ::Gapic::Config
|
@@ -1811,6 +1837,7 @@ module Google
|
|
1811
1837
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1812
1838
|
config_attr :quota_project, nil, ::String, nil
|
1813
1839
|
config_attr :universe_domain, nil, ::String, nil
|
1840
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1814
1841
|
|
1815
1842
|
# @private
|
1816
1843
|
def initialize parent_config = nil
|