google-cloud-data_catalog-lineage-v1 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b5d7f24bd661238dcd03d9feaa66734947bdbdc81ace8835b4b14e1d14fe96e
4
- data.tar.gz: b953d48733349807d0d81550bf1cc076852f41ea59fa30eb3a2e4d0db37c83e2
3
+ metadata.gz: f43427e302f4f666d87eacc3539bf2bb5e3249b527ae1d019efba66d104bafd9
4
+ data.tar.gz: e7cf3b9ad100ffd65020696f8f3412bfbe8668dfc9b6e99684bc06575dcb6d64
5
5
  SHA512:
6
- metadata.gz: f079a1d7f80f7c44d2b3a00511a54734b45f9621f8b6fcfead19b38d66abc1b02eb939f06865d10d18e0e2fb2ce1548130f7c005a1383282f74dbca93eebe7bb
7
- data.tar.gz: 022bd26cfa5aa5304d3fde8bacce997abd1f8d83ef3a22a4b634b86db3fd87a8a4c92268e313fb23ae17189419c01c28830f8b8e9f613bb08b4d3224a1a9f6b9
6
+ metadata.gz: 944f1f77772b28287d658623892d6102e188abff891b4da8b2d37c6d7d8fe9b12c26ad48e9c6f40d64789e93c6076a65be5ea979496fd14946fba05a5626be48
7
+ data.tar.gz: 678b9fb72dcacc6c2b41b81b8779fd4e136d95b77df2706582ef50b35b72952c05a56af59cf73ea9a177643e266e25128e8ca5cdf71c46be20d6bd2c68b6f757
data/README.md CHANGED
@@ -43,33 +43,43 @@ 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
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
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
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
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).
@@ -34,6 +34,9 @@ module Google
34
34
  # example, when table data is based on data from multiple tables.
35
35
  #
36
36
  class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
37
40
  # @private
38
41
  DEFAULT_ENDPOINT_TEMPLATE = "datalineage.$UNIVERSE_DOMAIN$"
39
42
 
@@ -170,8 +173,19 @@ module Google
170
173
  universe_domain: @config.universe_domain,
171
174
  channel_args: @config.channel_args,
172
175
  interceptors: @config.interceptors,
173
- channel_pool_config: @config.channel_pool
176
+ channel_pool_config: @config.channel_pool,
177
+ logger: @config.logger
174
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
175
189
  end
176
190
 
177
191
  ##
@@ -181,6 +195,15 @@ module Google
181
195
  #
182
196
  attr_reader :operations_client
183
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
+
184
207
  # Service calls
185
208
 
186
209
  ##
@@ -249,10 +272,11 @@ module Google
249
272
  # Customize the options with defaults
250
273
  metadata = @config.rpcs.process_open_lineage_run_event.metadata.to_h
251
274
 
252
- # Set x-goog-api-client and x-goog-user-project headers
275
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
253
276
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
254
277
  lib_name: @config.lib_name, lib_version: @config.lib_version,
255
278
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
279
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
256
280
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
257
281
 
258
282
  header_params = {}
@@ -273,7 +297,6 @@ module Google
273
297
 
274
298
  @lineage_stub.call_rpc :process_open_lineage_run_event, request, options: options do |response, operation|
275
299
  yield response, operation if block_given?
276
- return response
277
300
  end
278
301
  rescue ::GRPC::BadStatus => e
279
302
  raise ::Google::Cloud::Error.from_error(e)
@@ -341,10 +364,11 @@ module Google
341
364
  # Customize the options with defaults
342
365
  metadata = @config.rpcs.create_process.metadata.to_h
343
366
 
344
- # Set x-goog-api-client and x-goog-user-project headers
367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
345
368
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
346
369
  lib_name: @config.lib_name, lib_version: @config.lib_version,
347
370
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
371
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
348
372
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
373
 
350
374
  header_params = {}
@@ -365,7 +389,6 @@ module Google
365
389
 
366
390
  @lineage_stub.call_rpc :create_process, request, options: options do |response, operation|
367
391
  yield response, operation if block_given?
368
- return response
369
392
  end
370
393
  rescue ::GRPC::BadStatus => e
371
394
  raise ::Google::Cloud::Error.from_error(e)
@@ -433,10 +456,11 @@ module Google
433
456
  # Customize the options with defaults
434
457
  metadata = @config.rpcs.update_process.metadata.to_h
435
458
 
436
- # Set x-goog-api-client and x-goog-user-project headers
459
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
437
460
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
438
461
  lib_name: @config.lib_name, lib_version: @config.lib_version,
439
462
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
463
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
440
464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
441
465
 
442
466
  header_params = {}
@@ -457,7 +481,6 @@ module Google
457
481
 
458
482
  @lineage_stub.call_rpc :update_process, request, options: options do |response, operation|
459
483
  yield response, operation if block_given?
460
- return response
461
484
  end
462
485
  rescue ::GRPC::BadStatus => e
463
486
  raise ::Google::Cloud::Error.from_error(e)
@@ -518,10 +541,11 @@ module Google
518
541
  # Customize the options with defaults
519
542
  metadata = @config.rpcs.get_process.metadata.to_h
520
543
 
521
- # Set x-goog-api-client and x-goog-user-project headers
544
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
522
545
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
523
546
  lib_name: @config.lib_name, lib_version: @config.lib_version,
524
547
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
548
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
525
549
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
550
 
527
551
  header_params = {}
@@ -542,7 +566,6 @@ module Google
542
566
 
543
567
  @lineage_stub.call_rpc :get_process, request, options: options do |response, operation|
544
568
  yield response, operation if block_given?
545
- return response
546
569
  end
547
570
  rescue ::GRPC::BadStatus => e
548
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -620,10 +643,11 @@ module Google
620
643
  # Customize the options with defaults
621
644
  metadata = @config.rpcs.list_processes.metadata.to_h
622
645
 
623
- # Set x-goog-api-client and x-goog-user-project headers
646
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
624
647
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
625
648
  lib_name: @config.lib_name, lib_version: @config.lib_version,
626
649
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
650
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
627
651
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
628
652
 
629
653
  header_params = {}
@@ -645,7 +669,7 @@ module Google
645
669
  @lineage_stub.call_rpc :list_processes, request, options: options do |response, operation|
646
670
  response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_processes, request, response, operation, options
647
671
  yield response, operation if block_given?
648
- return response
672
+ throw :response, response
649
673
  end
650
674
  rescue ::GRPC::BadStatus => e
651
675
  raise ::Google::Cloud::Error.from_error(e)
@@ -716,10 +740,11 @@ module Google
716
740
  # Customize the options with defaults
717
741
  metadata = @config.rpcs.delete_process.metadata.to_h
718
742
 
719
- # Set x-goog-api-client and x-goog-user-project headers
743
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
720
744
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
721
745
  lib_name: @config.lib_name, lib_version: @config.lib_version,
722
746
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
747
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
723
748
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
724
749
 
725
750
  header_params = {}
@@ -741,7 +766,7 @@ module Google
741
766
  @lineage_stub.call_rpc :delete_process, request, options: options do |response, operation|
742
767
  response = ::Gapic::Operation.new response, @operations_client, options: options
743
768
  yield response, operation if block_given?
744
- return response
769
+ throw :response, response
745
770
  end
746
771
  rescue ::GRPC::BadStatus => e
747
772
  raise ::Google::Cloud::Error.from_error(e)
@@ -808,10 +833,11 @@ module Google
808
833
  # Customize the options with defaults
809
834
  metadata = @config.rpcs.create_run.metadata.to_h
810
835
 
811
- # Set x-goog-api-client and x-goog-user-project headers
836
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
812
837
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
813
838
  lib_name: @config.lib_name, lib_version: @config.lib_version,
814
839
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
840
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
815
841
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
842
 
817
843
  header_params = {}
@@ -832,7 +858,6 @@ module Google
832
858
 
833
859
  @lineage_stub.call_rpc :create_run, request, options: options do |response, operation|
834
860
  yield response, operation if block_given?
835
- return response
836
861
  end
837
862
  rescue ::GRPC::BadStatus => e
838
863
  raise ::Google::Cloud::Error.from_error(e)
@@ -903,10 +928,11 @@ module Google
903
928
  # Customize the options with defaults
904
929
  metadata = @config.rpcs.update_run.metadata.to_h
905
930
 
906
- # Set x-goog-api-client and x-goog-user-project headers
931
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
907
932
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
908
933
  lib_name: @config.lib_name, lib_version: @config.lib_version,
909
934
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
935
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
910
936
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
911
937
 
912
938
  header_params = {}
@@ -927,7 +953,6 @@ module Google
927
953
 
928
954
  @lineage_stub.call_rpc :update_run, request, options: options do |response, operation|
929
955
  yield response, operation if block_given?
930
- return response
931
956
  end
932
957
  rescue ::GRPC::BadStatus => e
933
958
  raise ::Google::Cloud::Error.from_error(e)
@@ -988,10 +1013,11 @@ module Google
988
1013
  # Customize the options with defaults
989
1014
  metadata = @config.rpcs.get_run.metadata.to_h
990
1015
 
991
- # Set x-goog-api-client and x-goog-user-project headers
1016
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
992
1017
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
993
1018
  lib_name: @config.lib_name, lib_version: @config.lib_version,
994
1019
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1020
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
995
1021
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
996
1022
 
997
1023
  header_params = {}
@@ -1012,7 +1038,6 @@ module Google
1012
1038
 
1013
1039
  @lineage_stub.call_rpc :get_run, request, options: options do |response, operation|
1014
1040
  yield response, operation if block_given?
1015
- return response
1016
1041
  end
1017
1042
  rescue ::GRPC::BadStatus => e
1018
1043
  raise ::Google::Cloud::Error.from_error(e)
@@ -1089,10 +1114,11 @@ module Google
1089
1114
  # Customize the options with defaults
1090
1115
  metadata = @config.rpcs.list_runs.metadata.to_h
1091
1116
 
1092
- # Set x-goog-api-client and x-goog-user-project headers
1117
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1093
1118
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1094
1119
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1095
1120
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1121
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1096
1122
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1097
1123
 
1098
1124
  header_params = {}
@@ -1114,7 +1140,7 @@ module Google
1114
1140
  @lineage_stub.call_rpc :list_runs, request, options: options do |response, operation|
1115
1141
  response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_runs, request, response, operation, options
1116
1142
  yield response, operation if block_given?
1117
- return response
1143
+ throw :response, response
1118
1144
  end
1119
1145
  rescue ::GRPC::BadStatus => e
1120
1146
  raise ::Google::Cloud::Error.from_error(e)
@@ -1185,10 +1211,11 @@ module Google
1185
1211
  # Customize the options with defaults
1186
1212
  metadata = @config.rpcs.delete_run.metadata.to_h
1187
1213
 
1188
- # Set x-goog-api-client and x-goog-user-project headers
1214
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1189
1215
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1190
1216
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1191
1217
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1218
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1192
1219
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1193
1220
 
1194
1221
  header_params = {}
@@ -1210,7 +1237,7 @@ module Google
1210
1237
  @lineage_stub.call_rpc :delete_run, request, options: options do |response, operation|
1211
1238
  response = ::Gapic::Operation.new response, @operations_client, options: options
1212
1239
  yield response, operation if block_given?
1213
- return response
1240
+ throw :response, response
1214
1241
  end
1215
1242
  rescue ::GRPC::BadStatus => e
1216
1243
  raise ::Google::Cloud::Error.from_error(e)
@@ -1277,10 +1304,11 @@ module Google
1277
1304
  # Customize the options with defaults
1278
1305
  metadata = @config.rpcs.create_lineage_event.metadata.to_h
1279
1306
 
1280
- # Set x-goog-api-client and x-goog-user-project headers
1307
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1281
1308
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1282
1309
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1283
1310
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1311
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1284
1312
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1285
1313
 
1286
1314
  header_params = {}
@@ -1301,7 +1329,6 @@ module Google
1301
1329
 
1302
1330
  @lineage_stub.call_rpc :create_lineage_event, request, options: options do |response, operation|
1303
1331
  yield response, operation if block_given?
1304
- return response
1305
1332
  end
1306
1333
  rescue ::GRPC::BadStatus => e
1307
1334
  raise ::Google::Cloud::Error.from_error(e)
@@ -1362,10 +1389,11 @@ module Google
1362
1389
  # Customize the options with defaults
1363
1390
  metadata = @config.rpcs.get_lineage_event.metadata.to_h
1364
1391
 
1365
- # Set x-goog-api-client and x-goog-user-project headers
1392
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1366
1393
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1367
1394
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1368
1395
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1396
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1369
1397
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1370
1398
 
1371
1399
  header_params = {}
@@ -1386,7 +1414,6 @@ module Google
1386
1414
 
1387
1415
  @lineage_stub.call_rpc :get_lineage_event, request, options: options do |response, operation|
1388
1416
  yield response, operation if block_given?
1389
- return response
1390
1417
  end
1391
1418
  rescue ::GRPC::BadStatus => e
1392
1419
  raise ::Google::Cloud::Error.from_error(e)
@@ -1465,10 +1492,11 @@ module Google
1465
1492
  # Customize the options with defaults
1466
1493
  metadata = @config.rpcs.list_lineage_events.metadata.to_h
1467
1494
 
1468
- # Set x-goog-api-client and x-goog-user-project headers
1495
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1469
1496
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1470
1497
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1471
1498
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1499
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1472
1500
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1473
1501
 
1474
1502
  header_params = {}
@@ -1490,7 +1518,7 @@ module Google
1490
1518
  @lineage_stub.call_rpc :list_lineage_events, request, options: options do |response, operation|
1491
1519
  response = ::Gapic::PagedEnumerable.new @lineage_stub, :list_lineage_events, request, response, operation, options
1492
1520
  yield response, operation if block_given?
1493
- return response
1521
+ throw :response, response
1494
1522
  end
1495
1523
  rescue ::GRPC::BadStatus => e
1496
1524
  raise ::Google::Cloud::Error.from_error(e)
@@ -1554,10 +1582,11 @@ module Google
1554
1582
  # Customize the options with defaults
1555
1583
  metadata = @config.rpcs.delete_lineage_event.metadata.to_h
1556
1584
 
1557
- # Set x-goog-api-client and x-goog-user-project headers
1585
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1558
1586
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1559
1587
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1560
1588
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1589
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1561
1590
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1562
1591
 
1563
1592
  header_params = {}
@@ -1578,7 +1607,6 @@ module Google
1578
1607
 
1579
1608
  @lineage_stub.call_rpc :delete_lineage_event, request, options: options do |response, operation|
1580
1609
  yield response, operation if block_given?
1581
- return response
1582
1610
  end
1583
1611
  rescue ::GRPC::BadStatus => e
1584
1612
  raise ::Google::Cloud::Error.from_error(e)
@@ -1670,10 +1698,11 @@ module Google
1670
1698
  # Customize the options with defaults
1671
1699
  metadata = @config.rpcs.search_links.metadata.to_h
1672
1700
 
1673
- # Set x-goog-api-client and x-goog-user-project headers
1701
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1674
1702
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1675
1703
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1676
1704
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1705
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1677
1706
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1678
1707
 
1679
1708
  header_params = {}
@@ -1695,7 +1724,7 @@ module Google
1695
1724
  @lineage_stub.call_rpc :search_links, request, options: options do |response, operation|
1696
1725
  response = ::Gapic::PagedEnumerable.new @lineage_stub, :search_links, request, response, operation, options
1697
1726
  yield response, operation if block_given?
1698
- return response
1727
+ throw :response, response
1699
1728
  end
1700
1729
  rescue ::GRPC::BadStatus => e
1701
1730
  raise ::Google::Cloud::Error.from_error(e)
@@ -1791,10 +1820,11 @@ module Google
1791
1820
  # Customize the options with defaults
1792
1821
  metadata = @config.rpcs.batch_search_link_processes.metadata.to_h
1793
1822
 
1794
- # Set x-goog-api-client and x-goog-user-project headers
1823
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1795
1824
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1796
1825
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1797
1826
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
1827
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1798
1828
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1799
1829
 
1800
1830
  header_params = {}
@@ -1816,7 +1846,7 @@ module Google
1816
1846
  @lineage_stub.call_rpc :batch_search_link_processes, request, options: options do |response, operation|
1817
1847
  response = ::Gapic::PagedEnumerable.new @lineage_stub, :batch_search_link_processes, request, response, operation, options
1818
1848
  yield response, operation if block_given?
1819
- return response
1849
+ throw :response, response
1820
1850
  end
1821
1851
  rescue ::GRPC::BadStatus => e
1822
1852
  raise ::Google::Cloud::Error.from_error(e)
@@ -1905,6 +1935,11 @@ module Google
1905
1935
  # default endpoint URL. The default value of nil uses the environment
1906
1936
  # universe (usually the default "googleapis.com" universe).
1907
1937
  # @return [::String,nil]
1938
+ # @!attribute [rw] logger
1939
+ # A custom logger to use for request/response debug logging, or the value
1940
+ # `:default` (the default) to construct a default logger, or `nil` to
1941
+ # explicitly disable logging.
1942
+ # @return [::Logger,:default,nil]
1908
1943
  #
1909
1944
  class Configuration
1910
1945
  extend ::Gapic::Config
@@ -1929,6 +1964,7 @@ module Google
1929
1964
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1930
1965
  config_attr :quota_project, nil, ::String, nil
1931
1966
  config_attr :universe_domain, nil, ::String, nil
1967
+ config_attr :logger, :default, ::Logger, nil, :default
1932
1968
 
1933
1969
  # @private
1934
1970
  def initialize parent_config = nil
@@ -27,6 +27,9 @@ module Google
27
27
  module Lineage
28
28
  # Service that implements Longrunning Operations API.
29
29
  class Operations
30
+ # @private
31
+ API_VERSION = ""
32
+
30
33
  # @private
31
34
  DEFAULT_ENDPOINT_TEMPLATE = "datalineage.$UNIVERSE_DOMAIN$"
32
35
 
@@ -122,14 +125,6 @@ module Google
122
125
  # Lists operations that match the specified filter in the request. If the
123
126
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
124
127
  #
125
- # NOTE: the `name` binding allows API services to override the binding
126
- # to use different resource name schemes, such as `users/*/operations`. To
127
- # override the binding, API services can add a binding such as
128
- # `"/v1/{name=users/*}/operations"` to their service configuration.
129
- # For backwards compatibility, the default name includes the operations
130
- # collection id, however overriding users must ensure the name binding
131
- # is the parent resource, without the operations collection id.
132
- #
133
128
  # @overload list_operations(request, options = nil)
134
129
  # Pass arguments to `list_operations` via a request object, either of type
135
130
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -192,10 +187,11 @@ module Google
192
187
  # Customize the options with defaults
193
188
  metadata = @config.rpcs.list_operations.metadata.to_h
194
189
 
195
- # Set x-goog-api-client and x-goog-user-project headers
190
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
196
191
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
197
192
  lib_name: @config.lib_name, lib_version: @config.lib_version,
198
193
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
194
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
199
195
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
200
196
 
201
197
  header_params = {}
@@ -218,7 +214,7 @@ module Google
218
214
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
219
215
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
220
216
  yield response, operation if block_given?
221
- return response
217
+ throw :response, response
222
218
  end
223
219
  rescue ::GRPC::BadStatus => e
224
220
  raise ::Google::Cloud::Error.from_error(e)
@@ -288,10 +284,11 @@ module Google
288
284
  # Customize the options with defaults
289
285
  metadata = @config.rpcs.get_operation.metadata.to_h
290
286
 
291
- # Set x-goog-api-client and x-goog-user-project headers
287
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
292
288
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
293
289
  lib_name: @config.lib_name, lib_version: @config.lib_version,
294
290
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
291
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
295
292
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
296
293
 
297
294
  header_params = {}
@@ -313,7 +310,7 @@ module Google
313
310
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
314
311
  response = ::Gapic::Operation.new response, @operations_client, options: options
315
312
  yield response, operation if block_given?
316
- return response
313
+ throw :response, response
317
314
  end
318
315
  rescue ::GRPC::BadStatus => e
319
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -377,10 +374,11 @@ module Google
377
374
  # Customize the options with defaults
378
375
  metadata = @config.rpcs.delete_operation.metadata.to_h
379
376
 
380
- # Set x-goog-api-client and x-goog-user-project headers
377
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
381
378
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
382
379
  lib_name: @config.lib_name, lib_version: @config.lib_version,
383
380
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
381
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
384
382
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
385
383
 
386
384
  header_params = {}
@@ -401,7 +399,6 @@ module Google
401
399
 
402
400
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
403
401
  yield response, operation if block_given?
404
- return response
405
402
  end
406
403
  rescue ::GRPC::BadStatus => e
407
404
  raise ::Google::Cloud::Error.from_error(e)
@@ -416,8 +413,9 @@ module Google
416
413
  # other methods to check whether the cancellation succeeded or whether the
417
414
  # operation completed despite cancellation. On successful cancellation,
418
415
  # the operation is not deleted; instead, it becomes an operation with
419
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
420
- # corresponding to `Code.CANCELLED`.
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`.
421
419
  #
422
420
  # @overload cancel_operation(request, options = nil)
423
421
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -471,10 +469,11 @@ module Google
471
469
  # Customize the options with defaults
472
470
  metadata = @config.rpcs.cancel_operation.metadata.to_h
473
471
 
474
- # Set x-goog-api-client and x-goog-user-project headers
472
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
475
473
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
476
474
  lib_name: @config.lib_name, lib_version: @config.lib_version,
477
475
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
476
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
478
477
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
479
478
 
480
479
  header_params = {}
@@ -495,7 +494,6 @@ module Google
495
494
 
496
495
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
497
496
  yield response, operation if block_given?
498
- return response
499
497
  end
500
498
  rescue ::GRPC::BadStatus => e
501
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -575,10 +573,11 @@ module Google
575
573
  # Customize the options with defaults
576
574
  metadata = @config.rpcs.wait_operation.metadata.to_h
577
575
 
578
- # Set x-goog-api-client and x-goog-user-project headers
576
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
579
577
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
580
578
  lib_name: @config.lib_name, lib_version: @config.lib_version,
581
579
  gapic_version: ::Google::Cloud::DataCatalog::Lineage::V1::VERSION
580
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
582
581
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
583
582
 
584
583
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
@@ -592,7 +591,7 @@ module Google
592
591
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
593
592
  response = ::Gapic::Operation.new response, @operations_client, options: options
594
593
  yield response, operation if block_given?
595
- return response
594
+ throw :response, response
596
595
  end
597
596
  rescue ::GRPC::BadStatus => e
598
597
  raise ::Google::Cloud::Error.from_error(e)
@@ -681,6 +680,11 @@ module Google
681
680
  # default endpoint URL. The default value of nil uses the environment
682
681
  # universe (usually the default "googleapis.com" universe).
683
682
  # @return [::String,nil]
683
+ # @!attribute [rw] logger
684
+ # A custom logger to use for request/response debug logging, or the value
685
+ # `:default` (the default) to construct a default logger, or `nil` to
686
+ # explicitly disable logging.
687
+ # @return [::Logger,:default,nil]
684
688
  #
685
689
  class Configuration
686
690
  extend ::Gapic::Config
@@ -705,6 +709,7 @@ module Google
705
709
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
706
710
  config_attr :quota_project, nil, ::String, nil
707
711
  config_attr :universe_domain, nil, ::String, nil
712
+ config_attr :logger, :default, ::Logger, nil, :default
708
713
 
709
714
  # @private
710
715
  def initialize parent_config = nil