google-cloud-metastore-v1beta 0.13.0 → 0.14.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 +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
@@ -50,6 +50,9 @@ module Google
|
|
50
50
|
# `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
|
51
51
|
#
|
52
52
|
class Client
|
53
|
+
# @private
|
54
|
+
API_VERSION = ""
|
55
|
+
|
53
56
|
# @private
|
54
57
|
DEFAULT_ENDPOINT_TEMPLATE = "metastore.$UNIVERSE_DOMAIN$"
|
55
58
|
|
@@ -195,15 +198,27 @@ module Google
|
|
195
198
|
endpoint: @config.endpoint,
|
196
199
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
197
200
|
universe_domain: @config.universe_domain,
|
198
|
-
credentials: credentials
|
201
|
+
credentials: credentials,
|
202
|
+
logger: @config.logger
|
199
203
|
)
|
200
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
|
+
|
201
215
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
202
216
|
config.credentials = credentials
|
203
217
|
config.quota_project = @quota_project_id
|
204
218
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
205
219
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
206
220
|
config.bindings_override = @config.bindings_override
|
221
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
207
222
|
end
|
208
223
|
|
209
224
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
@@ -212,6 +227,7 @@ module Google
|
|
212
227
|
config.endpoint = @dataproc_metastore_stub.endpoint
|
213
228
|
config.universe_domain = @dataproc_metastore_stub.universe_domain
|
214
229
|
config.bindings_override = @config.bindings_override
|
230
|
+
config.logger = @dataproc_metastore_stub.logger if config.respond_to? :logger=
|
215
231
|
end
|
216
232
|
end
|
217
233
|
|
@@ -236,6 +252,15 @@ module Google
|
|
236
252
|
#
|
237
253
|
attr_reader :iam_policy_client
|
238
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
|
+
|
239
264
|
# Service calls
|
240
265
|
|
241
266
|
##
|
@@ -320,12 +345,13 @@ module Google
|
|
320
345
|
# Customize the options with defaults
|
321
346
|
call_metadata = @config.rpcs.list_services.metadata.to_h
|
322
347
|
|
323
|
-
# Set x-goog-api-client
|
348
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
324
349
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
325
350
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
326
351
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
327
352
|
transports_version_send: [:rest]
|
328
353
|
|
354
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
329
355
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
330
356
|
|
331
357
|
options.apply_defaults timeout: @config.rpcs.list_services.timeout,
|
@@ -338,7 +364,6 @@ module Google
|
|
338
364
|
|
339
365
|
@dataproc_metastore_stub.list_services request, options do |result, operation|
|
340
366
|
yield result, operation if block_given?
|
341
|
-
return result
|
342
367
|
end
|
343
368
|
rescue ::Gapic::Rest::Error => e
|
344
369
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -401,12 +426,13 @@ module Google
|
|
401
426
|
# Customize the options with defaults
|
402
427
|
call_metadata = @config.rpcs.get_service.metadata.to_h
|
403
428
|
|
404
|
-
# Set x-goog-api-client
|
429
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
405
430
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
406
431
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
407
432
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
408
433
|
transports_version_send: [:rest]
|
409
434
|
|
435
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
410
436
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
411
437
|
|
412
438
|
options.apply_defaults timeout: @config.rpcs.get_service.timeout,
|
@@ -419,7 +445,6 @@ module Google
|
|
419
445
|
|
420
446
|
@dataproc_metastore_stub.get_service request, options do |result, operation|
|
421
447
|
yield result, operation if block_given?
|
422
|
-
return result
|
423
448
|
end
|
424
449
|
rescue ::Gapic::Rest::Error => e
|
425
450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -513,12 +538,13 @@ module Google
|
|
513
538
|
# Customize the options with defaults
|
514
539
|
call_metadata = @config.rpcs.create_service.metadata.to_h
|
515
540
|
|
516
|
-
# Set x-goog-api-client
|
541
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
517
542
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
518
543
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
519
544
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
520
545
|
transports_version_send: [:rest]
|
521
546
|
|
547
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
522
548
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
523
549
|
|
524
550
|
options.apply_defaults timeout: @config.rpcs.create_service.timeout,
|
@@ -532,7 +558,7 @@ module Google
|
|
532
558
|
@dataproc_metastore_stub.create_service request, options do |result, operation|
|
533
559
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
534
560
|
yield result, operation if block_given?
|
535
|
-
|
561
|
+
throw :response, result
|
536
562
|
end
|
537
563
|
rescue ::Gapic::Rest::Error => e
|
538
564
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -621,12 +647,13 @@ module Google
|
|
621
647
|
# Customize the options with defaults
|
622
648
|
call_metadata = @config.rpcs.update_service.metadata.to_h
|
623
649
|
|
624
|
-
# Set x-goog-api-client
|
650
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
625
651
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
626
652
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
627
653
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
628
654
|
transports_version_send: [:rest]
|
629
655
|
|
656
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
630
657
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
631
658
|
|
632
659
|
options.apply_defaults timeout: @config.rpcs.update_service.timeout,
|
@@ -640,7 +667,7 @@ module Google
|
|
640
667
|
@dataproc_metastore_stub.update_service request, options do |result, operation|
|
641
668
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
642
669
|
yield result, operation if block_given?
|
643
|
-
|
670
|
+
throw :response, result
|
644
671
|
end
|
645
672
|
rescue ::Gapic::Rest::Error => e
|
646
673
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -723,12 +750,13 @@ module Google
|
|
723
750
|
# Customize the options with defaults
|
724
751
|
call_metadata = @config.rpcs.delete_service.metadata.to_h
|
725
752
|
|
726
|
-
# Set x-goog-api-client
|
753
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
727
754
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
728
755
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
729
756
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
730
757
|
transports_version_send: [:rest]
|
731
758
|
|
759
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
732
760
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
733
761
|
|
734
762
|
options.apply_defaults timeout: @config.rpcs.delete_service.timeout,
|
@@ -742,7 +770,7 @@ module Google
|
|
742
770
|
@dataproc_metastore_stub.delete_service request, options do |result, operation|
|
743
771
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
744
772
|
yield result, operation if block_given?
|
745
|
-
|
773
|
+
throw :response, result
|
746
774
|
end
|
747
775
|
rescue ::Gapic::Rest::Error => e
|
748
776
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -829,12 +857,13 @@ module Google
|
|
829
857
|
# Customize the options with defaults
|
830
858
|
call_metadata = @config.rpcs.list_metadata_imports.metadata.to_h
|
831
859
|
|
832
|
-
# Set x-goog-api-client
|
860
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
833
861
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
834
862
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
835
863
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
836
864
|
transports_version_send: [:rest]
|
837
865
|
|
866
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
838
867
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
839
868
|
|
840
869
|
options.apply_defaults timeout: @config.rpcs.list_metadata_imports.timeout,
|
@@ -847,7 +876,6 @@ module Google
|
|
847
876
|
|
848
877
|
@dataproc_metastore_stub.list_metadata_imports request, options do |result, operation|
|
849
878
|
yield result, operation if block_given?
|
850
|
-
return result
|
851
879
|
end
|
852
880
|
rescue ::Gapic::Rest::Error => e
|
853
881
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -910,12 +938,13 @@ module Google
|
|
910
938
|
# Customize the options with defaults
|
911
939
|
call_metadata = @config.rpcs.get_metadata_import.metadata.to_h
|
912
940
|
|
913
|
-
# Set x-goog-api-client
|
941
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
914
942
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
915
943
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
916
944
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
917
945
|
transports_version_send: [:rest]
|
918
946
|
|
947
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
919
948
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
920
949
|
|
921
950
|
options.apply_defaults timeout: @config.rpcs.get_metadata_import.timeout,
|
@@ -928,7 +957,6 @@ module Google
|
|
928
957
|
|
929
958
|
@dataproc_metastore_stub.get_metadata_import request, options do |result, operation|
|
930
959
|
yield result, operation if block_given?
|
931
|
-
return result
|
932
960
|
end
|
933
961
|
rescue ::Gapic::Rest::Error => e
|
934
962
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1022,12 +1050,13 @@ module Google
|
|
1022
1050
|
# Customize the options with defaults
|
1023
1051
|
call_metadata = @config.rpcs.create_metadata_import.metadata.to_h
|
1024
1052
|
|
1025
|
-
# Set x-goog-api-client
|
1053
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1026
1054
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1027
1055
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1028
1056
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1029
1057
|
transports_version_send: [:rest]
|
1030
1058
|
|
1059
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1031
1060
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1032
1061
|
|
1033
1062
|
options.apply_defaults timeout: @config.rpcs.create_metadata_import.timeout,
|
@@ -1041,7 +1070,7 @@ module Google
|
|
1041
1070
|
@dataproc_metastore_stub.create_metadata_import request, options do |result, operation|
|
1042
1071
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1043
1072
|
yield result, operation if block_given?
|
1044
|
-
|
1073
|
+
throw :response, result
|
1045
1074
|
end
|
1046
1075
|
rescue ::Gapic::Rest::Error => e
|
1047
1076
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1131,12 +1160,13 @@ module Google
|
|
1131
1160
|
# Customize the options with defaults
|
1132
1161
|
call_metadata = @config.rpcs.update_metadata_import.metadata.to_h
|
1133
1162
|
|
1134
|
-
# Set x-goog-api-client
|
1163
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1135
1164
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1136
1165
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1137
1166
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1138
1167
|
transports_version_send: [:rest]
|
1139
1168
|
|
1169
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1140
1170
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1141
1171
|
|
1142
1172
|
options.apply_defaults timeout: @config.rpcs.update_metadata_import.timeout,
|
@@ -1150,7 +1180,7 @@ module Google
|
|
1150
1180
|
@dataproc_metastore_stub.update_metadata_import request, options do |result, operation|
|
1151
1181
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1152
1182
|
yield result, operation if block_given?
|
1153
|
-
|
1183
|
+
throw :response, result
|
1154
1184
|
end
|
1155
1185
|
rescue ::Gapic::Rest::Error => e
|
1156
1186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1240,12 +1270,13 @@ module Google
|
|
1240
1270
|
# Customize the options with defaults
|
1241
1271
|
call_metadata = @config.rpcs.export_metadata.metadata.to_h
|
1242
1272
|
|
1243
|
-
# Set x-goog-api-client
|
1273
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1244
1274
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1245
1275
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1246
1276
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1247
1277
|
transports_version_send: [:rest]
|
1248
1278
|
|
1279
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1249
1280
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1250
1281
|
|
1251
1282
|
options.apply_defaults timeout: @config.rpcs.export_metadata.timeout,
|
@@ -1259,7 +1290,7 @@ module Google
|
|
1259
1290
|
@dataproc_metastore_stub.export_metadata request, options do |result, operation|
|
1260
1291
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1261
1292
|
yield result, operation if block_given?
|
1262
|
-
|
1293
|
+
throw :response, result
|
1263
1294
|
end
|
1264
1295
|
rescue ::Gapic::Rest::Error => e
|
1265
1296
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1349,12 +1380,13 @@ module Google
|
|
1349
1380
|
# Customize the options with defaults
|
1350
1381
|
call_metadata = @config.rpcs.restore_service.metadata.to_h
|
1351
1382
|
|
1352
|
-
# Set x-goog-api-client
|
1383
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1353
1384
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1354
1385
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1355
1386
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1356
1387
|
transports_version_send: [:rest]
|
1357
1388
|
|
1389
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1358
1390
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1359
1391
|
|
1360
1392
|
options.apply_defaults timeout: @config.rpcs.restore_service.timeout,
|
@@ -1368,7 +1400,7 @@ module Google
|
|
1368
1400
|
@dataproc_metastore_stub.restore_service request, options do |result, operation|
|
1369
1401
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1370
1402
|
yield result, operation if block_given?
|
1371
|
-
|
1403
|
+
throw :response, result
|
1372
1404
|
end
|
1373
1405
|
rescue ::Gapic::Rest::Error => e
|
1374
1406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1455,12 +1487,13 @@ module Google
|
|
1455
1487
|
# Customize the options with defaults
|
1456
1488
|
call_metadata = @config.rpcs.list_backups.metadata.to_h
|
1457
1489
|
|
1458
|
-
# Set x-goog-api-client
|
1490
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1459
1491
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1460
1492
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1461
1493
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1462
1494
|
transports_version_send: [:rest]
|
1463
1495
|
|
1496
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1464
1497
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1465
1498
|
|
1466
1499
|
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
@@ -1473,7 +1506,6 @@ module Google
|
|
1473
1506
|
|
1474
1507
|
@dataproc_metastore_stub.list_backups request, options do |result, operation|
|
1475
1508
|
yield result, operation if block_given?
|
1476
|
-
return result
|
1477
1509
|
end
|
1478
1510
|
rescue ::Gapic::Rest::Error => e
|
1479
1511
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1536,12 +1568,13 @@ module Google
|
|
1536
1568
|
# Customize the options with defaults
|
1537
1569
|
call_metadata = @config.rpcs.get_backup.metadata.to_h
|
1538
1570
|
|
1539
|
-
# Set x-goog-api-client
|
1571
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1540
1572
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1541
1573
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1542
1574
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1543
1575
|
transports_version_send: [:rest]
|
1544
1576
|
|
1577
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1545
1578
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1546
1579
|
|
1547
1580
|
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
@@ -1554,7 +1587,6 @@ module Google
|
|
1554
1587
|
|
1555
1588
|
@dataproc_metastore_stub.get_backup request, options do |result, operation|
|
1556
1589
|
yield result, operation if block_given?
|
1557
|
-
return result
|
1558
1590
|
end
|
1559
1591
|
rescue ::Gapic::Rest::Error => e
|
1560
1592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1647,12 +1679,13 @@ module Google
|
|
1647
1679
|
# Customize the options with defaults
|
1648
1680
|
call_metadata = @config.rpcs.create_backup.metadata.to_h
|
1649
1681
|
|
1650
|
-
# Set x-goog-api-client
|
1682
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1651
1683
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1652
1684
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1653
1685
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1654
1686
|
transports_version_send: [:rest]
|
1655
1687
|
|
1688
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1656
1689
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1657
1690
|
|
1658
1691
|
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
@@ -1666,7 +1699,7 @@ module Google
|
|
1666
1699
|
@dataproc_metastore_stub.create_backup request, options do |result, operation|
|
1667
1700
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1668
1701
|
yield result, operation if block_given?
|
1669
|
-
|
1702
|
+
throw :response, result
|
1670
1703
|
end
|
1671
1704
|
rescue ::Gapic::Rest::Error => e
|
1672
1705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1749,12 +1782,13 @@ module Google
|
|
1749
1782
|
# Customize the options with defaults
|
1750
1783
|
call_metadata = @config.rpcs.delete_backup.metadata.to_h
|
1751
1784
|
|
1752
|
-
# Set x-goog-api-client
|
1785
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1753
1786
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1754
1787
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1755
1788
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1756
1789
|
transports_version_send: [:rest]
|
1757
1790
|
|
1791
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1758
1792
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1759
1793
|
|
1760
1794
|
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
@@ -1768,7 +1802,7 @@ module Google
|
|
1768
1802
|
@dataproc_metastore_stub.delete_backup request, options do |result, operation|
|
1769
1803
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1770
1804
|
yield result, operation if block_given?
|
1771
|
-
|
1805
|
+
throw :response, result
|
1772
1806
|
end
|
1773
1807
|
rescue ::Gapic::Rest::Error => e
|
1774
1808
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1836,12 +1870,13 @@ module Google
|
|
1836
1870
|
# Customize the options with defaults
|
1837
1871
|
call_metadata = @config.rpcs.remove_iam_policy.metadata.to_h
|
1838
1872
|
|
1839
|
-
# Set x-goog-api-client
|
1873
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1840
1874
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1841
1875
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1842
1876
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1843
1877
|
transports_version_send: [:rest]
|
1844
1878
|
|
1879
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1845
1880
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1846
1881
|
|
1847
1882
|
options.apply_defaults timeout: @config.rpcs.remove_iam_policy.timeout,
|
@@ -1854,7 +1889,6 @@ module Google
|
|
1854
1889
|
|
1855
1890
|
@dataproc_metastore_stub.remove_iam_policy request, options do |result, operation|
|
1856
1891
|
yield result, operation if block_given?
|
1857
|
-
return result
|
1858
1892
|
end
|
1859
1893
|
rescue ::Gapic::Rest::Error => e
|
1860
1894
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1927,12 +1961,13 @@ module Google
|
|
1927
1961
|
# Customize the options with defaults
|
1928
1962
|
call_metadata = @config.rpcs.query_metadata.metadata.to_h
|
1929
1963
|
|
1930
|
-
# Set x-goog-api-client
|
1964
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1931
1965
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1932
1966
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1933
1967
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
1934
1968
|
transports_version_send: [:rest]
|
1935
1969
|
|
1970
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1936
1971
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1937
1972
|
|
1938
1973
|
options.apply_defaults timeout: @config.rpcs.query_metadata.timeout,
|
@@ -1946,7 +1981,7 @@ module Google
|
|
1946
1981
|
@dataproc_metastore_stub.query_metadata request, options do |result, operation|
|
1947
1982
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1948
1983
|
yield result, operation if block_given?
|
1949
|
-
|
1984
|
+
throw :response, result
|
1950
1985
|
end
|
1951
1986
|
rescue ::Gapic::Rest::Error => e
|
1952
1987
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2022,12 +2057,13 @@ module Google
|
|
2022
2057
|
# Customize the options with defaults
|
2023
2058
|
call_metadata = @config.rpcs.move_table_to_database.metadata.to_h
|
2024
2059
|
|
2025
|
-
# Set x-goog-api-client
|
2060
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2026
2061
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2027
2062
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2028
2063
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
2029
2064
|
transports_version_send: [:rest]
|
2030
2065
|
|
2066
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2031
2067
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2032
2068
|
|
2033
2069
|
options.apply_defaults timeout: @config.rpcs.move_table_to_database.timeout,
|
@@ -2041,7 +2077,7 @@ module Google
|
|
2041
2077
|
@dataproc_metastore_stub.move_table_to_database request, options do |result, operation|
|
2042
2078
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2043
2079
|
yield result, operation if block_given?
|
2044
|
-
|
2080
|
+
throw :response, result
|
2045
2081
|
end
|
2046
2082
|
rescue ::Gapic::Rest::Error => e
|
2047
2083
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2124,12 +2160,13 @@ module Google
|
|
2124
2160
|
# Customize the options with defaults
|
2125
2161
|
call_metadata = @config.rpcs.alter_metadata_resource_location.metadata.to_h
|
2126
2162
|
|
2127
|
-
# Set x-goog-api-client
|
2163
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2128
2164
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2129
2165
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2130
2166
|
gapic_version: ::Google::Cloud::Metastore::V1beta::VERSION,
|
2131
2167
|
transports_version_send: [:rest]
|
2132
2168
|
|
2169
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2133
2170
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2134
2171
|
|
2135
2172
|
options.apply_defaults timeout: @config.rpcs.alter_metadata_resource_location.timeout,
|
@@ -2143,7 +2180,7 @@ module Google
|
|
2143
2180
|
@dataproc_metastore_stub.alter_metadata_resource_location request, options do |result, operation|
|
2144
2181
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2145
2182
|
yield result, operation if block_given?
|
2146
|
-
|
2183
|
+
throw :response, result
|
2147
2184
|
end
|
2148
2185
|
rescue ::Gapic::Rest::Error => e
|
2149
2186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2223,6 +2260,11 @@ module Google
|
|
2223
2260
|
# default endpoint URL. The default value of nil uses the environment
|
2224
2261
|
# universe (usually the default "googleapis.com" universe).
|
2225
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]
|
2226
2268
|
#
|
2227
2269
|
class Configuration
|
2228
2270
|
extend ::Gapic::Config
|
@@ -2251,6 +2293,7 @@ module Google
|
|
2251
2293
|
# by the host service.
|
2252
2294
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2253
2295
|
config_attr :bindings_override, {}, ::Hash, nil
|
2296
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2254
2297
|
|
2255
2298
|
# @private
|
2256
2299
|
def initialize parent_config = nil
|