google-cloud-metastore-v1beta 0.13.0 → 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 +85 -39
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/operations.rb +25 -20
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/client.rb +82 -39
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore/rest/operations.rb +54 -42
- 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 +46 -11
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/operations.rb +25 -20
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/client.rb +45 -11
- data/lib/google/cloud/metastore/v1beta/dataproc_metastore_federation/rest/operations.rb +54 -42
- 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 +74 -10
- data/proto_docs/google/api/resource.rb +7 -2
- 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).
|
@@ -48,6 +48,9 @@ module Google
|
|
48
48
|
# `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
|
49
49
|
#
|
50
50
|
class Client
|
51
|
+
# @private
|
52
|
+
API_VERSION = ""
|
53
|
+
|
51
54
|
# @private
|
52
55
|
DEFAULT_ENDPOINT_TEMPLATE = "metastore.$UNIVERSE_DOMAIN$"
|
53
56
|
|
@@ -202,14 +205,26 @@ module Google
|
|
202
205
|
universe_domain: @config.universe_domain,
|
203
206
|
channel_args: @config.channel_args,
|
204
207
|
interceptors: @config.interceptors,
|
205
|
-
channel_pool_config: @config.channel_pool
|
208
|
+
channel_pool_config: @config.channel_pool,
|
209
|
+
logger: @config.logger
|
206
210
|
)
|
207
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
|
+
|
208
222
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
209
223
|
config.credentials = credentials
|
210
224
|
config.quota_project = @quota_project_id
|
211
225
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
212
226
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
227
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
213
228
|
end
|
214
229
|
|
215
230
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -217,6 +232,7 @@ module Google
|
|
217
232
|
config.quota_project = @quota_project_id
|
218
233
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
219
234
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
235
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
220
236
|
end
|
221
237
|
end
|
222
238
|
|
@@ -241,6 +257,15 @@ module Google
|
|
241
257
|
#
|
242
258
|
attr_reader :iam_policy_client
|
243
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
|
+
|
244
269
|
# Service calls
|
245
270
|
|
246
271
|
##
|
@@ -326,10 +351,11 @@ module Google
|
|
326
351
|
# Customize the options with defaults
|
327
352
|
metadata = @config.rpcs.list_services.metadata.to_h
|
328
353
|
|
329
|
-
# Set x-goog-api-client
|
354
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
330
355
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
331
356
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
332
357
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
358
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
333
359
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
334
360
|
|
335
361
|
header_params = {}
|
@@ -351,7 +377,7 @@ module Google
|
|
351
377
|
@dataproc_metastore_stub.call_rpc :list_services, request, options: options do |response, operation|
|
352
378
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_services, request, response, operation, options
|
353
379
|
yield response, operation if block_given?
|
354
|
-
|
380
|
+
throw :response, response
|
355
381
|
end
|
356
382
|
rescue ::GRPC::BadStatus => e
|
357
383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -415,10 +441,11 @@ module Google
|
|
415
441
|
# Customize the options with defaults
|
416
442
|
metadata = @config.rpcs.get_service.metadata.to_h
|
417
443
|
|
418
|
-
# Set x-goog-api-client
|
444
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
419
445
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
420
446
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
421
447
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
448
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
422
449
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
423
450
|
|
424
451
|
header_params = {}
|
@@ -439,7 +466,6 @@ module Google
|
|
439
466
|
|
440
467
|
@dataproc_metastore_stub.call_rpc :get_service, request, options: options do |response, operation|
|
441
468
|
yield response, operation if block_given?
|
442
|
-
return response
|
443
469
|
end
|
444
470
|
rescue ::GRPC::BadStatus => e
|
445
471
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -534,10 +560,11 @@ module Google
|
|
534
560
|
# Customize the options with defaults
|
535
561
|
metadata = @config.rpcs.create_service.metadata.to_h
|
536
562
|
|
537
|
-
# Set x-goog-api-client
|
563
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
538
564
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
539
565
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
540
566
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
567
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
541
568
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
542
569
|
|
543
570
|
header_params = {}
|
@@ -559,7 +586,7 @@ module Google
|
|
559
586
|
@dataproc_metastore_stub.call_rpc :create_service, request, options: options do |response, operation|
|
560
587
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
561
588
|
yield response, operation if block_given?
|
562
|
-
|
589
|
+
throw :response, response
|
563
590
|
end
|
564
591
|
rescue ::GRPC::BadStatus => e
|
565
592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,10 +676,11 @@ module Google
|
|
649
676
|
# Customize the options with defaults
|
650
677
|
metadata = @config.rpcs.update_service.metadata.to_h
|
651
678
|
|
652
|
-
# Set x-goog-api-client
|
679
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
653
680
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
654
681
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
655
682
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
683
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
656
684
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
657
685
|
|
658
686
|
header_params = {}
|
@@ -674,7 +702,7 @@ module Google
|
|
674
702
|
@dataproc_metastore_stub.call_rpc :update_service, request, options: options do |response, operation|
|
675
703
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
676
704
|
yield response, operation if block_given?
|
677
|
-
|
705
|
+
throw :response, response
|
678
706
|
end
|
679
707
|
rescue ::GRPC::BadStatus => e
|
680
708
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -758,10 +786,11 @@ module Google
|
|
758
786
|
# Customize the options with defaults
|
759
787
|
metadata = @config.rpcs.delete_service.metadata.to_h
|
760
788
|
|
761
|
-
# Set x-goog-api-client
|
789
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
762
790
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
763
791
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
764
792
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
793
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
765
794
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
766
795
|
|
767
796
|
header_params = {}
|
@@ -783,7 +812,7 @@ module Google
|
|
783
812
|
@dataproc_metastore_stub.call_rpc :delete_service, request, options: options do |response, operation|
|
784
813
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
785
814
|
yield response, operation if block_given?
|
786
|
-
|
815
|
+
throw :response, response
|
787
816
|
end
|
788
817
|
rescue ::GRPC::BadStatus => e
|
789
818
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -871,10 +900,11 @@ module Google
|
|
871
900
|
# Customize the options with defaults
|
872
901
|
metadata = @config.rpcs.list_metadata_imports.metadata.to_h
|
873
902
|
|
874
|
-
# Set x-goog-api-client
|
903
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
875
904
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
876
905
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
877
906
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
907
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
878
908
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
879
909
|
|
880
910
|
header_params = {}
|
@@ -896,7 +926,7 @@ module Google
|
|
896
926
|
@dataproc_metastore_stub.call_rpc :list_metadata_imports, request, options: options do |response, operation|
|
897
927
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_metadata_imports, request, response, operation, options
|
898
928
|
yield response, operation if block_given?
|
899
|
-
|
929
|
+
throw :response, response
|
900
930
|
end
|
901
931
|
rescue ::GRPC::BadStatus => e
|
902
932
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -960,10 +990,11 @@ module Google
|
|
960
990
|
# Customize the options with defaults
|
961
991
|
metadata = @config.rpcs.get_metadata_import.metadata.to_h
|
962
992
|
|
963
|
-
# Set x-goog-api-client
|
993
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
964
994
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
965
995
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
966
996
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
997
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
967
998
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
968
999
|
|
969
1000
|
header_params = {}
|
@@ -984,7 +1015,6 @@ module Google
|
|
984
1015
|
|
985
1016
|
@dataproc_metastore_stub.call_rpc :get_metadata_import, request, options: options do |response, operation|
|
986
1017
|
yield response, operation if block_given?
|
987
|
-
return response
|
988
1018
|
end
|
989
1019
|
rescue ::GRPC::BadStatus => e
|
990
1020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1079,10 +1109,11 @@ module Google
|
|
1079
1109
|
# Customize the options with defaults
|
1080
1110
|
metadata = @config.rpcs.create_metadata_import.metadata.to_h
|
1081
1111
|
|
1082
|
-
# Set x-goog-api-client
|
1112
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1083
1113
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1084
1114
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1085
1115
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1116
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1086
1117
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1087
1118
|
|
1088
1119
|
header_params = {}
|
@@ -1104,7 +1135,7 @@ module Google
|
|
1104
1135
|
@dataproc_metastore_stub.call_rpc :create_metadata_import, request, options: options do |response, operation|
|
1105
1136
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1106
1137
|
yield response, operation if block_given?
|
1107
|
-
|
1138
|
+
throw :response, response
|
1108
1139
|
end
|
1109
1140
|
rescue ::GRPC::BadStatus => e
|
1110
1141
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1195,10 +1226,11 @@ module Google
|
|
1195
1226
|
# Customize the options with defaults
|
1196
1227
|
metadata = @config.rpcs.update_metadata_import.metadata.to_h
|
1197
1228
|
|
1198
|
-
# Set x-goog-api-client
|
1229
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1199
1230
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1200
1231
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1201
1232
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1233
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1202
1234
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1203
1235
|
|
1204
1236
|
header_params = {}
|
@@ -1220,7 +1252,7 @@ module Google
|
|
1220
1252
|
@dataproc_metastore_stub.call_rpc :update_metadata_import, request, options: options do |response, operation|
|
1221
1253
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1222
1254
|
yield response, operation if block_given?
|
1223
|
-
|
1255
|
+
throw :response, response
|
1224
1256
|
end
|
1225
1257
|
rescue ::GRPC::BadStatus => e
|
1226
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1311,10 +1343,11 @@ module Google
|
|
1311
1343
|
# Customize the options with defaults
|
1312
1344
|
metadata = @config.rpcs.export_metadata.metadata.to_h
|
1313
1345
|
|
1314
|
-
# Set x-goog-api-client
|
1346
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1315
1347
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1316
1348
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1317
1349
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1350
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1318
1351
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1319
1352
|
|
1320
1353
|
header_params = {}
|
@@ -1336,7 +1369,7 @@ module Google
|
|
1336
1369
|
@dataproc_metastore_stub.call_rpc :export_metadata, request, options: options do |response, operation|
|
1337
1370
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1338
1371
|
yield response, operation if block_given?
|
1339
|
-
|
1372
|
+
throw :response, response
|
1340
1373
|
end
|
1341
1374
|
rescue ::GRPC::BadStatus => e
|
1342
1375
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1427,10 +1460,11 @@ module Google
|
|
1427
1460
|
# Customize the options with defaults
|
1428
1461
|
metadata = @config.rpcs.restore_service.metadata.to_h
|
1429
1462
|
|
1430
|
-
# Set x-goog-api-client
|
1463
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1431
1464
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1432
1465
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1433
1466
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1467
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1434
1468
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1435
1469
|
|
1436
1470
|
header_params = {}
|
@@ -1452,7 +1486,7 @@ module Google
|
|
1452
1486
|
@dataproc_metastore_stub.call_rpc :restore_service, request, options: options do |response, operation|
|
1453
1487
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1454
1488
|
yield response, operation if block_given?
|
1455
|
-
|
1489
|
+
throw :response, response
|
1456
1490
|
end
|
1457
1491
|
rescue ::GRPC::BadStatus => e
|
1458
1492
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1540,10 +1574,11 @@ module Google
|
|
1540
1574
|
# Customize the options with defaults
|
1541
1575
|
metadata = @config.rpcs.list_backups.metadata.to_h
|
1542
1576
|
|
1543
|
-
# Set x-goog-api-client
|
1577
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1544
1578
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1545
1579
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1546
1580
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1581
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1547
1582
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1548
1583
|
|
1549
1584
|
header_params = {}
|
@@ -1565,7 +1600,7 @@ module Google
|
|
1565
1600
|
@dataproc_metastore_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
1566
1601
|
response = ::Gapic::PagedEnumerable.new @dataproc_metastore_stub, :list_backups, request, response, operation, options
|
1567
1602
|
yield response, operation if block_given?
|
1568
|
-
|
1603
|
+
throw :response, response
|
1569
1604
|
end
|
1570
1605
|
rescue ::GRPC::BadStatus => e
|
1571
1606
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1629,10 +1664,11 @@ module Google
|
|
1629
1664
|
# Customize the options with defaults
|
1630
1665
|
metadata = @config.rpcs.get_backup.metadata.to_h
|
1631
1666
|
|
1632
|
-
# Set x-goog-api-client
|
1667
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1633
1668
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1634
1669
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1635
1670
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1671
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1636
1672
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1637
1673
|
|
1638
1674
|
header_params = {}
|
@@ -1653,7 +1689,6 @@ module Google
|
|
1653
1689
|
|
1654
1690
|
@dataproc_metastore_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
1655
1691
|
yield response, operation if block_given?
|
1656
|
-
return response
|
1657
1692
|
end
|
1658
1693
|
rescue ::GRPC::BadStatus => e
|
1659
1694
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1747,10 +1782,11 @@ module Google
|
|
1747
1782
|
# Customize the options with defaults
|
1748
1783
|
metadata = @config.rpcs.create_backup.metadata.to_h
|
1749
1784
|
|
1750
|
-
# Set x-goog-api-client
|
1785
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1751
1786
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1752
1787
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1753
1788
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1789
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1754
1790
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1755
1791
|
|
1756
1792
|
header_params = {}
|
@@ -1772,7 +1808,7 @@ module Google
|
|
1772
1808
|
@dataproc_metastore_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
1773
1809
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1774
1810
|
yield response, operation if block_given?
|
1775
|
-
|
1811
|
+
throw :response, response
|
1776
1812
|
end
|
1777
1813
|
rescue ::GRPC::BadStatus => e
|
1778
1814
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1856,10 +1892,11 @@ module Google
|
|
1856
1892
|
# Customize the options with defaults
|
1857
1893
|
metadata = @config.rpcs.delete_backup.metadata.to_h
|
1858
1894
|
|
1859
|
-
# Set x-goog-api-client
|
1895
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1860
1896
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1861
1897
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1862
1898
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1899
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1863
1900
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1864
1901
|
|
1865
1902
|
header_params = {}
|
@@ -1881,7 +1918,7 @@ module Google
|
|
1881
1918
|
@dataproc_metastore_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
1882
1919
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1883
1920
|
yield response, operation if block_given?
|
1884
|
-
|
1921
|
+
throw :response, response
|
1885
1922
|
end
|
1886
1923
|
rescue ::GRPC::BadStatus => e
|
1887
1924
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1950,10 +1987,11 @@ module Google
|
|
1950
1987
|
# Customize the options with defaults
|
1951
1988
|
metadata = @config.rpcs.remove_iam_policy.metadata.to_h
|
1952
1989
|
|
1953
|
-
# Set x-goog-api-client
|
1990
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1954
1991
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1955
1992
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1956
1993
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
1994
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1957
1995
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1958
1996
|
|
1959
1997
|
header_params = {}
|
@@ -1974,7 +2012,6 @@ module Google
|
|
1974
2012
|
|
1975
2013
|
@dataproc_metastore_stub.call_rpc :remove_iam_policy, request, options: options do |response, operation|
|
1976
2014
|
yield response, operation if block_given?
|
1977
|
-
return response
|
1978
2015
|
end
|
1979
2016
|
rescue ::GRPC::BadStatus => e
|
1980
2017
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2048,10 +2085,11 @@ module Google
|
|
2048
2085
|
# Customize the options with defaults
|
2049
2086
|
metadata = @config.rpcs.query_metadata.metadata.to_h
|
2050
2087
|
|
2051
|
-
# Set x-goog-api-client
|
2088
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2052
2089
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2053
2090
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2054
2091
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
2092
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2055
2093
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2056
2094
|
|
2057
2095
|
header_params = {}
|
@@ -2073,7 +2111,7 @@ module Google
|
|
2073
2111
|
@dataproc_metastore_stub.call_rpc :query_metadata, request, options: options do |response, operation|
|
2074
2112
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2075
2113
|
yield response, operation if block_given?
|
2076
|
-
|
2114
|
+
throw :response, response
|
2077
2115
|
end
|
2078
2116
|
rescue ::GRPC::BadStatus => e
|
2079
2117
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2150,10 +2188,11 @@ module Google
|
|
2150
2188
|
# Customize the options with defaults
|
2151
2189
|
metadata = @config.rpcs.move_table_to_database.metadata.to_h
|
2152
2190
|
|
2153
|
-
# Set x-goog-api-client
|
2191
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2154
2192
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2155
2193
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2156
2194
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
2195
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2157
2196
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2158
2197
|
|
2159
2198
|
header_params = {}
|
@@ -2175,7 +2214,7 @@ module Google
|
|
2175
2214
|
@dataproc_metastore_stub.call_rpc :move_table_to_database, request, options: options do |response, operation|
|
2176
2215
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2177
2216
|
yield response, operation if block_given?
|
2178
|
-
|
2217
|
+
throw :response, response
|
2179
2218
|
end
|
2180
2219
|
rescue ::GRPC::BadStatus => e
|
2181
2220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2259,10 +2298,11 @@ module Google
|
|
2259
2298
|
# Customize the options with defaults
|
2260
2299
|
metadata = @config.rpcs.alter_metadata_resource_location.metadata.to_h
|
2261
2300
|
|
2262
|
-
# Set x-goog-api-client
|
2301
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2263
2302
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2264
2303
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2265
2304
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION
|
2305
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2266
2306
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2267
2307
|
|
2268
2308
|
header_params = {}
|
@@ -2284,7 +2324,7 @@ module Google
|
|
2284
2324
|
@dataproc_metastore_stub.call_rpc :alter_metadata_resource_location, request, options: options do |response, operation|
|
2285
2325
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2286
2326
|
yield response, operation if block_given?
|
2287
|
-
|
2327
|
+
throw :response, response
|
2288
2328
|
end
|
2289
2329
|
rescue ::GRPC::BadStatus => e
|
2290
2330
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2373,6 +2413,11 @@ module Google
|
|
2373
2413
|
# default endpoint URL. The default value of nil uses the environment
|
2374
2414
|
# universe (usually the default "googleapis.com" universe).
|
2375
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]
|
2376
2421
|
#
|
2377
2422
|
class Configuration
|
2378
2423
|
extend ::Gapic::Config
|
@@ -2397,6 +2442,7 @@ module Google
|
|
2397
2442
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2398
2443
|
config_attr :quota_project, nil, ::String, nil
|
2399
2444
|
config_attr :universe_domain, nil, ::String, nil
|
2445
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2400
2446
|
|
2401
2447
|
# @private
|
2402
2448
|
def initialize parent_config = nil
|