google-cloud-metastore-v1beta 0.13.1 → 0.14.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 +30 -20
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/client.rb +44 -20
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/operations.rb +12 -15
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/client.rb +41 -20
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/operations.rb +43 -38
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/service_stub.rb +166 -116
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/client.rb +33 -6
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/operations.rb +12 -15
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/client.rb +32 -6
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/operations.rb +43 -38
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/service_stub.rb +54 -32
- data/lib/google/cloud/metastore/v1beta/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27900dc1a48e0ee575295d5190fe4e9d98a7b5bc46d7d050b09ed488d98d37e5
|
4
|
+
data.tar.gz: f4111ccfb31c3d3b6b6a16cbbb10c20c9c0efe9b43c185021081c671723cf9c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb6bdd1cd78a4fd3145152d62f6855fcd43cb1ffca6fed3db78799e51187d2ce2acca9be865336f52a24f17a2db9e6387b74d341065a3bae4bae9d1a6fa59f9a
|
7
|
+
data.tar.gz: c69814a4b43d97f7de5398b4f5182a0ac44b528f254616a9c44791b08e065166c8434ef230d728382698c2f92a61963625fef51161f445589a13f3b88b9b1321
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/dataproc-metastore/)
|
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/metastore/v1beta"
|
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::Metastore::V1beta::DataprocMetastore::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).
|
@@ -205,14 +205,26 @@ module Google
|
|
205
205
|
universe_domain: @config.universe_domain,
|
206
206
|
channel_args: @config.channel_args,
|
207
207
|
interceptors: @config.interceptors,
|
208
|
-
channel_pool_config: @config.channel_pool
|
208
|
+
channel_pool_config: @config.channel_pool,
|
209
|
+
logger: @config.logger
|
209
210
|
)
|
210
211
|
|
212
|
+
@dataproc_metastore_stub.stub_logger&.info do |entry|
|
213
|
+
entry.set_system_name
|
214
|
+
entry.set_service
|
215
|
+
entry.message = "Created client for #{entry.service}"
|
216
|
+
entry.set_credentials_fields credentials
|
217
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
218
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
219
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
220
|
+
end
|
221
|
+
|
211
222
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
212
223
|
config.credentials = credentials
|
213
224
|
config.quota_project = @quota_project_id
|
214
225
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
215
226
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
227
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
216
228
|
end
|
217
229
|
|
218
230
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -220,6 +232,7 @@ module Google
|
|
220
232
|
config.quota_project = @quota_project_id
|
221
233
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
222
234
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
235
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
223
236
|
end
|
224
237
|
end
|
225
238
|
|
@@ -244,6 +257,15 @@ module Google
|
|
244
257
|
#
|
245
258
|
attr_reader :iam_policy_client
|
246
259
|
|
260
|
+
##
|
261
|
+
# The logger used for request/response debug logging.
|
262
|
+
#
|
263
|
+
# @return [Logger]
|
264
|
+
#
|
265
|
+
def logger
|
266
|
+
@dataproc_metastore_stub.logger
|
267
|
+
end
|
268
|
+
|
247
269
|
# Service calls
|
248
270
|
|
249
271
|
##
|
@@ -355,7 +377,7 @@ module Google
|
|
355
377
|
@dataproc_metastore_stub.call_rpc :list_services, request, options: options do |response, operation|
|
356
378
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_services, request, response, operation, options
|
357
379
|
yield response, operation if block_given?
|
358
|
-
|
380
|
+
throw :response, response
|
359
381
|
end
|
360
382
|
rescue ::GRPC::BadStatus => e
|
361
383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -444,7 +466,6 @@ module Google
|
|
444
466
|
|
445
467
|
@dataproc_metastore_stub.call_rpc :get_service, request, options: options do |response, operation|
|
446
468
|
yield response, operation if block_given?
|
447
|
-
return response
|
448
469
|
end
|
449
470
|
rescue ::GRPC::BadStatus => e
|
450
471
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -565,7 +586,7 @@ module Google
|
|
565
586
|
@dataproc_metastore_stub.call_rpc :create_service, request, options: options do |response, operation|
|
566
587
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
567
588
|
yield response, operation if block_given?
|
568
|
-
|
589
|
+
throw :response, response
|
569
590
|
end
|
570
591
|
rescue ::GRPC::BadStatus => e
|
571
592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -681,7 +702,7 @@ module Google
|
|
681
702
|
@dataproc_metastore_stub.call_rpc :update_service, request, options: options do |response, operation|
|
682
703
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
683
704
|
yield response, operation if block_given?
|
684
|
-
|
705
|
+
throw :response, response
|
685
706
|
end
|
686
707
|
rescue ::GRPC::BadStatus => e
|
687
708
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -791,7 +812,7 @@ module Google
|
|
791
812
|
@dataproc_metastore_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
792
813
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
793
814
|
yield response, operation if block_given?
|
794
|
-
|
815
|
+
throw :response, response
|
795
816
|
end
|
796
817
|
rescue ::GRPC::BadStatus => e
|
797
818
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -905,7 +926,7 @@ module Google
|
|
905
926
|
@dataproc_metastore_stub.call_rpc :list_metadata_imports, request, options: options do |response, operation|
|
906
927
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_metadata_imports, request, response, operation, options
|
907
928
|
yield response, operation if block_given?
|
908
|
-
|
929
|
+
throw :response, response
|
909
930
|
end
|
910
931
|
rescue ::GRPC::BadStatus => e
|
911
932
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -994,7 +1015,6 @@ module Google
|
|
994
1015
|
|
995
1016
|
@dataproc_metastore_stub.call_rpc :get_metadata_import, request, options: options do |response, operation|
|
996
1017
|
yield response, operation if block_given?
|
997
|
-
return response
|
998
1018
|
end
|
999
1019
|
rescue ::GRPC::BadStatus => e
|
1000
1020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1115,7 +1135,7 @@ module Google
|
|
1115
1135
|
@dataproc_metastore_stub.call_rpc :create_metadata_import, request, options: options do |response, operation|
|
1116
1136
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1117
1137
|
yield response, operation if block_given?
|
1118
|
-
|
1138
|
+
throw :response, response
|
1119
1139
|
end
|
1120
1140
|
rescue ::GRPC::BadStatus => e
|
1121
1141
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1232,7 +1252,7 @@ module Google
|
|
1232
1252
|
@dataproc_metastore_stub.call_rpc :update_metadata_import, request, options: options do |response, operation|
|
1233
1253
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1234
1254
|
yield response, operation if block_given?
|
1235
|
-
|
1255
|
+
throw :response, response
|
1236
1256
|
end
|
1237
1257
|
rescue ::GRPC::BadStatus => e
|
1238
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1349,7 +1369,7 @@ module Google
|
|
1349
1369
|
@dataproc_metastore_stub.call_rpc :export_metadata, request, options: options do |response, operation|
|
1350
1370
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1351
1371
|
yield response, operation if block_given?
|
1352
|
-
|
1372
|
+
throw :response, response
|
1353
1373
|
end
|
1354
1374
|
rescue ::GRPC::BadStatus => e
|
1355
1375
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1466,7 +1486,7 @@ module Google
|
|
1466
1486
|
@dataproc_metastore_stub.call_rpc :restore_service, request, options: options do |response, operation|
|
1467
1487
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1468
1488
|
yield response, operation if block_given?
|
1469
|
-
|
1489
|
+
throw :response, response
|
1470
1490
|
end
|
1471
1491
|
rescue ::GRPC::BadStatus => e
|
1472
1492
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1580,7 +1600,7 @@ module Google
|
|
1580
1600
|
@dataproc_metastore_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
1581
1601
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_backups, request, response, operation, options
|
1582
1602
|
yield response, operation if block_given?
|
1583
|
-
|
1603
|
+
throw :response, response
|
1584
1604
|
end
|
1585
1605
|
rescue ::GRPC::BadStatus => e
|
1586
1606
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1669,7 +1689,6 @@ module Google
|
|
1669
1689
|
|
1670
1690
|
@dataproc_metastore_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
1671
1691
|
yield response, operation if block_given?
|
1672
|
-
return response
|
1673
1692
|
end
|
1674
1693
|
rescue ::GRPC::BadStatus => e
|
1675
1694
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1789,7 +1808,7 @@ module Google
|
|
1789
1808
|
@dataproc_metastore_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
1790
1809
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1791
1810
|
yield response, operation if block_given?
|
1792
|
-
|
1811
|
+
throw :response, response
|
1793
1812
|
end
|
1794
1813
|
rescue ::GRPC::BadStatus => e
|
1795
1814
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1899,7 +1918,7 @@ module Google
|
|
1899
1918
|
@dataproc_metastore_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
1900
1919
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1901
1920
|
yield response, operation if block_given?
|
1902
|
-
|
1921
|
+
throw :response, response
|
1903
1922
|
end
|
1904
1923
|
rescue ::GRPC::BadStatus => e
|
1905
1924
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1993,7 +2012,6 @@ module Google
|
|
1993
2012
|
|
1994
2013
|
@dataproc_metastore_stub.call_rpc :remove_iam_policy, request, options: options do |response, operation|
|
1995
2014
|
yield response, operation if block_given?
|
1996
|
-
return response
|
1997
2015
|
end
|
1998
2016
|
rescue ::GRPC::BadStatus => e
|
1999
2017
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2093,7 +2111,7 @@ module Google
|
|
2093
2111
|
@dataproc_metastore_stub.call_rpc :query_metadata, request, options: options do |response, operation|
|
2094
2112
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2095
2113
|
yield response, operation if block_given?
|
2096
|
-
|
2114
|
+
throw :response, response
|
2097
2115
|
end
|
2098
2116
|
rescue ::GRPC::BadStatus => e
|
2099
2117
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2196,7 +2214,7 @@ module Google
|
|
2196
2214
|
@dataproc_metastore_stub.call_rpc :move_table_to_database, request, options: options do |response, operation|
|
2197
2215
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2198
2216
|
yield response, operation if block_given?
|
2199
|
-
|
2217
|
+
throw :response, response
|
2200
2218
|
end
|
2201
2219
|
rescue ::GRPC::BadStatus => e
|
2202
2220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2306,7 +2324,7 @@ module Google
|
|
2306
2324
|
@dataproc_metastore_stub.call_rpc :alter_metadata_resource_location, request, options: options do |response, operation|
|
2307
2325
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2308
2326
|
yield response, operation if block_given?
|
2309
|
-
|
2327
|
+
throw :response, response
|
2310
2328
|
end
|
2311
2329
|
rescue ::GRPC::BadStatus => e
|
2312
2330
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2395,6 +2413,11 @@ module Google
|
|
2395
2413
|
# default endpoint URL. The default value of nil uses the environment
|
2396
2414
|
# universe (usually the default "googleapis.com" universe).
|
2397
2415
|
# @return [::String,nil]
|
2416
|
+
# @!attribute [rw] logger
|
2417
|
+
# A custom logger to use for request/response debug logging, or the value
|
2418
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2419
|
+
# explicitly disable logging.
|
2420
|
+
# @return [::Logger,:default,nil]
|
2398
2421
|
#
|
2399
2422
|
class Configuration
|
2400
2423
|
extend ::Gapic::Config
|
@@ -2419,6 +2442,7 @@ module Google
|
|
2419
2442
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2420
2443
|
config_attr :quota_project, nil, ::String, nil
|
2421
2444
|
config_attr :universe_domain, nil, ::String, nil
|
2445
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2422
2446
|
|
2423
2447
|
# @private
|
2424
2448
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|
@@ -198,15 +198,27 @@ module Google
|
|
198
198
|
endpoint: @config.endpoint,
|
199
199
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
200
200
|
universe_domain: @config.universe_domain,
|
201
|
-
credentials: credentials
|
201
|
+
credentials: credentials,
|
202
|
+
logger: @config.logger
|
202
203
|
)
|
203
204
|
|
205
|
+
@dataproc_metastore_stub.logger(stub: true)&.info do |entry|
|
206
|
+
entry.set_system_name
|
207
|
+
entry.set_service
|
208
|
+
entry.message = "Created client for #{entry.service}"
|
209
|
+
entry.set_credentials_fields credentials
|
210
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
211
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
212
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
213
|
+
end
|
214
|
+
|
204
215
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
205
216
|
config.credentials = credentials
|
206
217
|
config.quota_project = @quota_project_id
|
207
218
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
208
219
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
209
220
|
config.bindings_override = @config.bindings_override
|
221
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
210
222
|
end
|
211
223
|
|
212
224
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -215,6 +227,7 @@ module Google
|
|
215
227
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
216
228
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
217
229
|
config.bindings_override = @config.bindings_override
|
230
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
218
231
|
end
|
219
232
|
end
|
220
233
|
|
@@ -239,6 +252,15 @@ module Google
|
|
239
252
|
#
|
240
253
|
attr_reader :iam_policy_client
|
241
254
|
|
255
|
+
##
|
256
|
+
# The logger used for request/response debug logging.
|
257
|
+
#
|
258
|
+
# @return [Logger]
|
259
|
+
#
|
260
|
+
def logger
|
261
|
+
@dataproc_metastore_stub.logger
|
262
|
+
end
|
263
|
+
|
242
264
|
# Service calls
|
243
265
|
|
244
266
|
##
|
@@ -342,7 +364,6 @@ module Google
|
|
342
364
|
|
343
365
|
@dataproc_metastore_stub.list_services request, options do |result, operation|
|
344
366
|
yield result, operation if block_given?
|
345
|
-
return result
|
346
367
|
end
|
347
368
|
rescue ::Gapic::Rest::Error => e
|
348
369
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -424,7 +445,6 @@ module Google
|
|
424
445
|
|
425
446
|
@dataproc_metastore_stub.get_service request, options do |result, operation|
|
426
447
|
yield result, operation if block_given?
|
427
|
-
return result
|
428
448
|
end
|
429
449
|
rescue ::Gapic::Rest::Error => e
|
430
450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -538,7 +558,7 @@ module Google
|
|
538
558
|
@dataproc_metastore_stub.create_service request, options do |result, operation|
|
539
559
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
540
560
|
yield result, operation if block_given?
|
541
|
-
|
561
|
+
throw :response, result
|
542
562
|
end
|
543
563
|
rescue ::Gapic::Rest::Error => e
|
544
564
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -647,7 +667,7 @@ module Google
|
|
647
667
|
@dataproc_metastore_stub.update_service request, options do |result, operation|
|
648
668
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
649
669
|
yield result, operation if block_given?
|
650
|
-
|
670
|
+
throw :response, result
|
651
671
|
end
|
652
672
|
rescue ::Gapic::Rest::Error => e
|
653
673
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -750,7 +770,7 @@ module Google
|
|
750
770
|
@dataproc_metastore_stub.delete_service request, options do |result, operation|
|
751
771
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
752
772
|
yield result, operation if block_given?
|
753
|
-
|
773
|
+
throw :response, result
|
754
774
|
end
|
755
775
|
rescue ::Gapic::Rest::Error => e
|
756
776
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -856,7 +876,6 @@ module Google
|
|
856
876
|
|
857
877
|
@dataproc_metastore_stub.list_metadata_imports request, options do |result, operation|
|
858
878
|
yield result, operation if block_given?
|
859
|
-
return result
|
860
879
|
end
|
861
880
|
rescue ::Gapic::Rest::Error => e
|
862
881
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -938,7 +957,6 @@ module Google
|
|
938
957
|
|
939
958
|
@dataproc_metastore_stub.get_metadata_import request, options do |result, operation|
|
940
959
|
yield result, operation if block_given?
|
941
|
-
return result
|
942
960
|
end
|
943
961
|
rescue ::Gapic::Rest::Error => e
|
944
962
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1052,7 +1070,7 @@ module Google
|
|
1052
1070
|
@dataproc_metastore_stub.create_metadata_import request, options do |result, operation|
|
1053
1071
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1054
1072
|
yield result, operation if block_given?
|
1055
|
-
|
1073
|
+
throw :response, result
|
1056
1074
|
end
|
1057
1075
|
rescue ::Gapic::Rest::Error => e
|
1058
1076
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1162,7 +1180,7 @@ module Google
|
|
1162
1180
|
@dataproc_metastore_stub.update_metadata_import request, options do |result, operation|
|
1163
1181
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1164
1182
|
yield result, operation if block_given?
|
1165
|
-
|
1183
|
+
throw :response, result
|
1166
1184
|
end
|
1167
1185
|
rescue ::Gapic::Rest::Error => e
|
1168
1186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1272,7 +1290,7 @@ module Google
|
|
1272
1290
|
@dataproc_metastore_stub.export_metadata request, options do |result, operation|
|
1273
1291
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1274
1292
|
yield result, operation if block_given?
|
1275
|
-
|
1293
|
+
throw :response, result
|
1276
1294
|
end
|
1277
1295
|
rescue ::Gapic::Rest::Error => e
|
1278
1296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1382,7 +1400,7 @@ module Google
|
|
1382
1400
|
@dataproc_metastore_stub.restore_service request, options do |result, operation|
|
1383
1401
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1384
1402
|
yield result, operation if block_given?
|
1385
|
-
|
1403
|
+
throw :response, result
|
1386
1404
|
end
|
1387
1405
|
rescue ::Gapic::Rest::Error => e
|
1388
1406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1488,7 +1506,6 @@ module Google
|
|
1488
1506
|
|
1489
1507
|
@dataproc_metastore_stub.list_backups request, options do |result, operation|
|
1490
1508
|
yield result, operation if block_given?
|
1491
|
-
return result
|
1492
1509
|
end
|
1493
1510
|
rescue ::Gapic::Rest::Error => e
|
1494
1511
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1570,7 +1587,6 @@ module Google
|
|
1570
1587
|
|
1571
1588
|
@dataproc_metastore_stub.get_backup request, options do |result, operation|
|
1572
1589
|
yield result, operation if block_given?
|
1573
|
-
return result
|
1574
1590
|
end
|
1575
1591
|
rescue ::Gapic::Rest::Error => e
|
1576
1592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1683,7 +1699,7 @@ module Google
|
|
1683
1699
|
@dataproc_metastore_stub.create_backup request, options do |result, operation|
|
1684
1700
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1685
1701
|
yield result, operation if block_given?
|
1686
|
-
|
1702
|
+
throw :response, result
|
1687
1703
|
end
|
1688
1704
|
rescue ::Gapic::Rest::Error => e
|
1689
1705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1786,7 +1802,7 @@ module Google
|
|
1786
1802
|
@dataproc_metastore_stub.delete_backup request, options do |result, operation|
|
1787
1803
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1788
1804
|
yield result, operation if block_given?
|
1789
|
-
|
1805
|
+
throw :response, result
|
1790
1806
|
end
|
1791
1807
|
rescue ::Gapic::Rest::Error => e
|
1792
1808
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1873,7 +1889,6 @@ module Google
|
|
1873
1889
|
|
1874
1890
|
@dataproc_metastore_stub.remove_iam_policy request, options do |result, operation|
|
1875
1891
|
yield result, operation if block_given?
|
1876
|
-
return result
|
1877
1892
|
end
|
1878
1893
|
rescue ::Gapic::Rest::Error => e
|
1879
1894
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1966,7 +1981,7 @@ module Google
|
|
1966
1981
|
@dataproc_metastore_stub.query_metadata request, options do |result, operation|
|
1967
1982
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1968
1983
|
yield result, operation if block_given?
|
1969
|
-
|
1984
|
+
throw :response, result
|
1970
1985
|
end
|
1971
1986
|
rescue ::Gapic::Rest::Error => e
|
1972
1987
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2062,7 +2077,7 @@ module Google
|
|
2062
2077
|
@dataproc_metastore_stub.move_table_to_database request, options do |result, operation|
|
2063
2078
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2064
2079
|
yield result, operation if block_given?
|
2065
|
-
|
2080
|
+
throw :response, result
|
2066
2081
|
end
|
2067
2082
|
rescue ::Gapic::Rest::Error => e
|
2068
2083
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2165,7 +2180,7 @@ module Google
|
|
2165
2180
|
@dataproc_metastore_stub.alter_metadata_resource_location request, options do |result, operation|
|
2166
2181
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2167
2182
|
yield result, operation if block_given?
|
2168
|
-
|
2183
|
+
throw :response, result
|
2169
2184
|
end
|
2170
2185
|
rescue ::Gapic::Rest::Error => e
|
2171
2186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2245,6 +2260,11 @@ module Google
|
|
2245
2260
|
# default endpoint URL. The default value of nil uses the environment
|
2246
2261
|
# universe (usually the default "googleapis.com" universe).
|
2247
2262
|
# @return [::String,nil]
|
2263
|
+
# @!attribute [rw] logger
|
2264
|
+
# A custom logger to use for request/response debug logging, or the value
|
2265
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2266
|
+
# explicitly disable logging.
|
2267
|
+
# @return [::Logger,:default,nil]
|
2248
2268
|
#
|
2249
2269
|
class Configuration
|
2250
2270
|
extend ::Gapic::Config
|
@@ -2273,6 +2293,7 @@ module Google
|
|
2273
2293
|
# by the host service.
|
2274
2294
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2275
2295
|
config_attr :bindings_override, {}, ::Hash, nil
|
2296
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2276
2297
|
|
2277
2298
|
# @private
|
2278
2299
|
def initialize parent_config = nil
|