google-cloud-artifact_registry-v1beta2 0.12.0 → 0.13.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/artifact_registry/v1beta2/artifact_registry/client.rb +92 -51
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/operations.rb +25 -20
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/client.rb +92 -51
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/operations.rb +54 -42
- data/lib/google/cloud/artifact_registry/v1beta2/artifact_registry/rest/service_stub.rb +214 -152
- data/lib/google/cloud/artifact_registry/v1beta2/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
@@ -45,6 +45,9 @@ module Google
|
|
45
45
|
# or Version.
|
46
46
|
#
|
47
47
|
class Client
|
48
|
+
# @private
|
49
|
+
API_VERSION = ""
|
50
|
+
|
48
51
|
# @private
|
49
52
|
DEFAULT_ENDPOINT_TEMPLATE = "artifactregistry.$UNIVERSE_DOMAIN$"
|
50
53
|
|
@@ -252,15 +255,27 @@ module Google
|
|
252
255
|
endpoint: @config.endpoint,
|
253
256
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
254
257
|
universe_domain: @config.universe_domain,
|
255
|
-
credentials: credentials
|
258
|
+
credentials: credentials,
|
259
|
+
logger: @config.logger
|
256
260
|
)
|
257
261
|
|
262
|
+
@artifact_registry_stub.logger(stub: true)&.info do |entry|
|
263
|
+
entry.set_system_name
|
264
|
+
entry.set_service
|
265
|
+
entry.message = "Created client for #{entry.service}"
|
266
|
+
entry.set_credentials_fields credentials
|
267
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
268
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
269
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
270
|
+
end
|
271
|
+
|
258
272
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
259
273
|
config.credentials = credentials
|
260
274
|
config.quota_project = @quota_project_id
|
261
275
|
config.endpoint = @artifact_registry_stub.endpoint
|
262
276
|
config.universe_domain = @artifact_registry_stub.universe_domain
|
263
277
|
config.bindings_override = @config.bindings_override
|
278
|
+
config.logger = @artifact_registry_stub.logger if config.respond_to? :logger=
|
264
279
|
end
|
265
280
|
end
|
266
281
|
|
@@ -278,6 +293,15 @@ module Google
|
|
278
293
|
#
|
279
294
|
attr_reader :location_client
|
280
295
|
|
296
|
+
##
|
297
|
+
# The logger used for request/response debug logging.
|
298
|
+
#
|
299
|
+
# @return [Logger]
|
300
|
+
#
|
301
|
+
def logger
|
302
|
+
@artifact_registry_stub.logger
|
303
|
+
end
|
304
|
+
|
281
305
|
# Service calls
|
282
306
|
|
283
307
|
##
|
@@ -346,12 +370,13 @@ module Google
|
|
346
370
|
# Customize the options with defaults
|
347
371
|
call_metadata = @config.rpcs.import_apt_artifacts.metadata.to_h
|
348
372
|
|
349
|
-
# Set x-goog-api-client
|
373
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
350
374
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
351
375
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
352
376
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
353
377
|
transports_version_send: [:rest]
|
354
378
|
|
379
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
355
380
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
356
381
|
|
357
382
|
options.apply_defaults timeout: @config.rpcs.import_apt_artifacts.timeout,
|
@@ -365,7 +390,7 @@ module Google
|
|
365
390
|
@artifact_registry_stub.import_apt_artifacts request, options do |result, operation|
|
366
391
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
367
392
|
yield result, operation if block_given?
|
368
|
-
|
393
|
+
throw :response, result
|
369
394
|
end
|
370
395
|
rescue ::Gapic::Rest::Error => e
|
371
396
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -437,12 +462,13 @@ module Google
|
|
437
462
|
# Customize the options with defaults
|
438
463
|
call_metadata = @config.rpcs.import_yum_artifacts.metadata.to_h
|
439
464
|
|
440
|
-
# Set x-goog-api-client
|
465
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
441
466
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
442
467
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
443
468
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
444
469
|
transports_version_send: [:rest]
|
445
470
|
|
471
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
446
472
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
447
473
|
|
448
474
|
options.apply_defaults timeout: @config.rpcs.import_yum_artifacts.timeout,
|
@@ -456,7 +482,7 @@ module Google
|
|
456
482
|
@artifact_registry_stub.import_yum_artifacts request, options do |result, operation|
|
457
483
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
458
484
|
yield result, operation if block_given?
|
459
|
-
|
485
|
+
throw :response, result
|
460
486
|
end
|
461
487
|
rescue ::Gapic::Rest::Error => e
|
462
488
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -524,12 +550,13 @@ module Google
|
|
524
550
|
# Customize the options with defaults
|
525
551
|
call_metadata = @config.rpcs.list_repositories.metadata.to_h
|
526
552
|
|
527
|
-
# Set x-goog-api-client
|
553
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
528
554
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
529
555
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
530
556
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
531
557
|
transports_version_send: [:rest]
|
532
558
|
|
559
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
533
560
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
534
561
|
|
535
562
|
options.apply_defaults timeout: @config.rpcs.list_repositories.timeout,
|
@@ -543,7 +570,7 @@ module Google
|
|
543
570
|
@artifact_registry_stub.list_repositories request, options do |result, operation|
|
544
571
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options
|
545
572
|
yield result, operation if block_given?
|
546
|
-
|
573
|
+
throw :response, result
|
547
574
|
end
|
548
575
|
rescue ::Gapic::Rest::Error => e
|
549
576
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -603,12 +630,13 @@ module Google
|
|
603
630
|
# Customize the options with defaults
|
604
631
|
call_metadata = @config.rpcs.get_repository.metadata.to_h
|
605
632
|
|
606
|
-
# Set x-goog-api-client
|
633
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
607
634
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
608
635
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
609
636
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
610
637
|
transports_version_send: [:rest]
|
611
638
|
|
639
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
612
640
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
613
641
|
|
614
642
|
options.apply_defaults timeout: @config.rpcs.get_repository.timeout,
|
@@ -621,7 +649,6 @@ module Google
|
|
621
649
|
|
622
650
|
@artifact_registry_stub.get_repository request, options do |result, operation|
|
623
651
|
yield result, operation if block_given?
|
624
|
-
return result
|
625
652
|
end
|
626
653
|
rescue ::Gapic::Rest::Error => e
|
627
654
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -693,12 +720,13 @@ module Google
|
|
693
720
|
# Customize the options with defaults
|
694
721
|
call_metadata = @config.rpcs.create_repository.metadata.to_h
|
695
722
|
|
696
|
-
# Set x-goog-api-client
|
723
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
697
724
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
698
725
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
699
726
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
700
727
|
transports_version_send: [:rest]
|
701
728
|
|
729
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
702
730
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
703
731
|
|
704
732
|
options.apply_defaults timeout: @config.rpcs.create_repository.timeout,
|
@@ -712,7 +740,7 @@ module Google
|
|
712
740
|
@artifact_registry_stub.create_repository request, options do |result, operation|
|
713
741
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
714
742
|
yield result, operation if block_given?
|
715
|
-
|
743
|
+
throw :response, result
|
716
744
|
end
|
717
745
|
rescue ::Gapic::Rest::Error => e
|
718
746
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -776,12 +804,13 @@ module Google
|
|
776
804
|
# Customize the options with defaults
|
777
805
|
call_metadata = @config.rpcs.update_repository.metadata.to_h
|
778
806
|
|
779
|
-
# Set x-goog-api-client
|
807
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
780
808
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
781
809
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
782
810
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
783
811
|
transports_version_send: [:rest]
|
784
812
|
|
813
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
785
814
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
786
815
|
|
787
816
|
options.apply_defaults timeout: @config.rpcs.update_repository.timeout,
|
@@ -794,7 +823,6 @@ module Google
|
|
794
823
|
|
795
824
|
@artifact_registry_stub.update_repository request, options do |result, operation|
|
796
825
|
yield result, operation if block_given?
|
797
|
-
return result
|
798
826
|
end
|
799
827
|
rescue ::Gapic::Rest::Error => e
|
800
828
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -863,12 +891,13 @@ module Google
|
|
863
891
|
# Customize the options with defaults
|
864
892
|
call_metadata = @config.rpcs.delete_repository.metadata.to_h
|
865
893
|
|
866
|
-
# Set x-goog-api-client
|
894
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
867
895
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
868
896
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
869
897
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
870
898
|
transports_version_send: [:rest]
|
871
899
|
|
900
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
872
901
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
873
902
|
|
874
903
|
options.apply_defaults timeout: @config.rpcs.delete_repository.timeout,
|
@@ -882,7 +911,7 @@ module Google
|
|
882
911
|
@artifact_registry_stub.delete_repository request, options do |result, operation|
|
883
912
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
884
913
|
yield result, operation if block_given?
|
885
|
-
|
914
|
+
throw :response, result
|
886
915
|
end
|
887
916
|
rescue ::Gapic::Rest::Error => e
|
888
917
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -951,12 +980,13 @@ module Google
|
|
951
980
|
# Customize the options with defaults
|
952
981
|
call_metadata = @config.rpcs.list_packages.metadata.to_h
|
953
982
|
|
954
|
-
# Set x-goog-api-client
|
983
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
955
984
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
956
985
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
957
986
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
958
987
|
transports_version_send: [:rest]
|
959
988
|
|
989
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
960
990
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
961
991
|
|
962
992
|
options.apply_defaults timeout: @config.rpcs.list_packages.timeout,
|
@@ -970,7 +1000,7 @@ module Google
|
|
970
1000
|
@artifact_registry_stub.list_packages request, options do |result, operation|
|
971
1001
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options
|
972
1002
|
yield result, operation if block_given?
|
973
|
-
|
1003
|
+
throw :response, result
|
974
1004
|
end
|
975
1005
|
rescue ::Gapic::Rest::Error => e
|
976
1006
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1030,12 +1060,13 @@ module Google
|
|
1030
1060
|
# Customize the options with defaults
|
1031
1061
|
call_metadata = @config.rpcs.get_package.metadata.to_h
|
1032
1062
|
|
1033
|
-
# Set x-goog-api-client
|
1063
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1034
1064
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1035
1065
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1036
1066
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1037
1067
|
transports_version_send: [:rest]
|
1038
1068
|
|
1069
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1039
1070
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1040
1071
|
|
1041
1072
|
options.apply_defaults timeout: @config.rpcs.get_package.timeout,
|
@@ -1048,7 +1079,6 @@ module Google
|
|
1048
1079
|
|
1049
1080
|
@artifact_registry_stub.get_package request, options do |result, operation|
|
1050
1081
|
yield result, operation if block_given?
|
1051
|
-
return result
|
1052
1082
|
end
|
1053
1083
|
rescue ::Gapic::Rest::Error => e
|
1054
1084
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1116,12 +1146,13 @@ module Google
|
|
1116
1146
|
# Customize the options with defaults
|
1117
1147
|
call_metadata = @config.rpcs.delete_package.metadata.to_h
|
1118
1148
|
|
1119
|
-
# Set x-goog-api-client
|
1149
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1120
1150
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1121
1151
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1122
1152
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1123
1153
|
transports_version_send: [:rest]
|
1124
1154
|
|
1155
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1125
1156
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1126
1157
|
|
1127
1158
|
options.apply_defaults timeout: @config.rpcs.delete_package.timeout,
|
@@ -1135,7 +1166,7 @@ module Google
|
|
1135
1166
|
@artifact_registry_stub.delete_package request, options do |result, operation|
|
1136
1167
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1137
1168
|
yield result, operation if block_given?
|
1138
|
-
|
1169
|
+
throw :response, result
|
1139
1170
|
end
|
1140
1171
|
rescue ::Gapic::Rest::Error => e
|
1141
1172
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1207,12 +1238,13 @@ module Google
|
|
1207
1238
|
# Customize the options with defaults
|
1208
1239
|
call_metadata = @config.rpcs.list_versions.metadata.to_h
|
1209
1240
|
|
1210
|
-
# Set x-goog-api-client
|
1241
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1211
1242
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1212
1243
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1213
1244
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1214
1245
|
transports_version_send: [:rest]
|
1215
1246
|
|
1247
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1216
1248
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1217
1249
|
|
1218
1250
|
options.apply_defaults timeout: @config.rpcs.list_versions.timeout,
|
@@ -1226,7 +1258,7 @@ module Google
|
|
1226
1258
|
@artifact_registry_stub.list_versions request, options do |result, operation|
|
1227
1259
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options
|
1228
1260
|
yield result, operation if block_given?
|
1229
|
-
|
1261
|
+
throw :response, result
|
1230
1262
|
end
|
1231
1263
|
rescue ::Gapic::Rest::Error => e
|
1232
1264
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1288,12 +1320,13 @@ module Google
|
|
1288
1320
|
# Customize the options with defaults
|
1289
1321
|
call_metadata = @config.rpcs.get_version.metadata.to_h
|
1290
1322
|
|
1291
|
-
# Set x-goog-api-client
|
1323
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1292
1324
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1293
1325
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1294
1326
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1295
1327
|
transports_version_send: [:rest]
|
1296
1328
|
|
1329
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1297
1330
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1298
1331
|
|
1299
1332
|
options.apply_defaults timeout: @config.rpcs.get_version.timeout,
|
@@ -1306,7 +1339,6 @@ module Google
|
|
1306
1339
|
|
1307
1340
|
@artifact_registry_stub.get_version request, options do |result, operation|
|
1308
1341
|
yield result, operation if block_given?
|
1309
|
-
return result
|
1310
1342
|
end
|
1311
1343
|
rescue ::Gapic::Rest::Error => e
|
1312
1344
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1377,12 +1409,13 @@ module Google
|
|
1377
1409
|
# Customize the options with defaults
|
1378
1410
|
call_metadata = @config.rpcs.delete_version.metadata.to_h
|
1379
1411
|
|
1380
|
-
# Set x-goog-api-client
|
1412
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1381
1413
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1382
1414
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1383
1415
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1384
1416
|
transports_version_send: [:rest]
|
1385
1417
|
|
1418
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1386
1419
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1387
1420
|
|
1388
1421
|
options.apply_defaults timeout: @config.rpcs.delete_version.timeout,
|
@@ -1396,7 +1429,7 @@ module Google
|
|
1396
1429
|
@artifact_registry_stub.delete_version request, options do |result, operation|
|
1397
1430
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1398
1431
|
yield result, operation if block_given?
|
1399
|
-
|
1432
|
+
throw :response, result
|
1400
1433
|
end
|
1401
1434
|
rescue ::Gapic::Rest::Error => e
|
1402
1435
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1478,12 +1511,13 @@ module Google
|
|
1478
1511
|
# Customize the options with defaults
|
1479
1512
|
call_metadata = @config.rpcs.list_files.metadata.to_h
|
1480
1513
|
|
1481
|
-
# Set x-goog-api-client
|
1514
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1482
1515
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1483
1516
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1484
1517
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1485
1518
|
transports_version_send: [:rest]
|
1486
1519
|
|
1520
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1487
1521
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1488
1522
|
|
1489
1523
|
options.apply_defaults timeout: @config.rpcs.list_files.timeout,
|
@@ -1497,7 +1531,7 @@ module Google
|
|
1497
1531
|
@artifact_registry_stub.list_files request, options do |result, operation|
|
1498
1532
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options
|
1499
1533
|
yield result, operation if block_given?
|
1500
|
-
|
1534
|
+
throw :response, result
|
1501
1535
|
end
|
1502
1536
|
rescue ::Gapic::Rest::Error => e
|
1503
1537
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1557,12 +1591,13 @@ module Google
|
|
1557
1591
|
# Customize the options with defaults
|
1558
1592
|
call_metadata = @config.rpcs.get_file.metadata.to_h
|
1559
1593
|
|
1560
|
-
# Set x-goog-api-client
|
1594
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1561
1595
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1562
1596
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1563
1597
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1564
1598
|
transports_version_send: [:rest]
|
1565
1599
|
|
1600
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1566
1601
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1567
1602
|
|
1568
1603
|
options.apply_defaults timeout: @config.rpcs.get_file.timeout,
|
@@ -1575,7 +1610,6 @@ module Google
|
|
1575
1610
|
|
1576
1611
|
@artifact_registry_stub.get_file request, options do |result, operation|
|
1577
1612
|
yield result, operation if block_given?
|
1578
|
-
return result
|
1579
1613
|
end
|
1580
1614
|
rescue ::Gapic::Rest::Error => e
|
1581
1615
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1653,12 +1687,13 @@ module Google
|
|
1653
1687
|
# Customize the options with defaults
|
1654
1688
|
call_metadata = @config.rpcs.list_tags.metadata.to_h
|
1655
1689
|
|
1656
|
-
# Set x-goog-api-client
|
1690
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1657
1691
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1658
1692
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1659
1693
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1660
1694
|
transports_version_send: [:rest]
|
1661
1695
|
|
1696
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1662
1697
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1663
1698
|
|
1664
1699
|
options.apply_defaults timeout: @config.rpcs.list_tags.timeout,
|
@@ -1672,7 +1707,7 @@ module Google
|
|
1672
1707
|
@artifact_registry_stub.list_tags request, options do |result, operation|
|
1673
1708
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
|
1674
1709
|
yield result, operation if block_given?
|
1675
|
-
|
1710
|
+
throw :response, result
|
1676
1711
|
end
|
1677
1712
|
rescue ::Gapic::Rest::Error => e
|
1678
1713
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1732,12 +1767,13 @@ module Google
|
|
1732
1767
|
# Customize the options with defaults
|
1733
1768
|
call_metadata = @config.rpcs.get_tag.metadata.to_h
|
1734
1769
|
|
1735
|
-
# Set x-goog-api-client
|
1770
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1736
1771
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1737
1772
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1738
1773
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1739
1774
|
transports_version_send: [:rest]
|
1740
1775
|
|
1776
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1741
1777
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1742
1778
|
|
1743
1779
|
options.apply_defaults timeout: @config.rpcs.get_tag.timeout,
|
@@ -1750,7 +1786,6 @@ module Google
|
|
1750
1786
|
|
1751
1787
|
@artifact_registry_stub.get_tag request, options do |result, operation|
|
1752
1788
|
yield result, operation if block_given?
|
1753
|
-
return result
|
1754
1789
|
end
|
1755
1790
|
rescue ::Gapic::Rest::Error => e
|
1756
1791
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1814,12 +1849,13 @@ module Google
|
|
1814
1849
|
# Customize the options with defaults
|
1815
1850
|
call_metadata = @config.rpcs.create_tag.metadata.to_h
|
1816
1851
|
|
1817
|
-
# Set x-goog-api-client
|
1852
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1818
1853
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1819
1854
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1820
1855
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1821
1856
|
transports_version_send: [:rest]
|
1822
1857
|
|
1858
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1823
1859
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1824
1860
|
|
1825
1861
|
options.apply_defaults timeout: @config.rpcs.create_tag.timeout,
|
@@ -1832,7 +1868,6 @@ module Google
|
|
1832
1868
|
|
1833
1869
|
@artifact_registry_stub.create_tag request, options do |result, operation|
|
1834
1870
|
yield result, operation if block_given?
|
1835
|
-
return result
|
1836
1871
|
end
|
1837
1872
|
rescue ::Gapic::Rest::Error => e
|
1838
1873
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1896,12 +1931,13 @@ module Google
|
|
1896
1931
|
# Customize the options with defaults
|
1897
1932
|
call_metadata = @config.rpcs.update_tag.metadata.to_h
|
1898
1933
|
|
1899
|
-
# Set x-goog-api-client
|
1934
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1900
1935
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1901
1936
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1902
1937
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1903
1938
|
transports_version_send: [:rest]
|
1904
1939
|
|
1940
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1905
1941
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1906
1942
|
|
1907
1943
|
options.apply_defaults timeout: @config.rpcs.update_tag.timeout,
|
@@ -1914,7 +1950,6 @@ module Google
|
|
1914
1950
|
|
1915
1951
|
@artifact_registry_stub.update_tag request, options do |result, operation|
|
1916
1952
|
yield result, operation if block_given?
|
1917
|
-
return result
|
1918
1953
|
end
|
1919
1954
|
rescue ::Gapic::Rest::Error => e
|
1920
1955
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1974,12 +2009,13 @@ module Google
|
|
1974
2009
|
# Customize the options with defaults
|
1975
2010
|
call_metadata = @config.rpcs.delete_tag.metadata.to_h
|
1976
2011
|
|
1977
|
-
# Set x-goog-api-client
|
2012
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1978
2013
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1979
2014
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1980
2015
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
1981
2016
|
transports_version_send: [:rest]
|
1982
2017
|
|
2018
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1983
2019
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1984
2020
|
|
1985
2021
|
options.apply_defaults timeout: @config.rpcs.delete_tag.timeout,
|
@@ -1992,7 +2028,6 @@ module Google
|
|
1992
2028
|
|
1993
2029
|
@artifact_registry_stub.delete_tag request, options do |result, operation|
|
1994
2030
|
yield result, operation if block_given?
|
1995
|
-
return result
|
1996
2031
|
end
|
1997
2032
|
rescue ::Gapic::Rest::Error => e
|
1998
2033
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2064,12 +2099,13 @@ module Google
|
|
2064
2099
|
# Customize the options with defaults
|
2065
2100
|
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
2066
2101
|
|
2067
|
-
# Set x-goog-api-client
|
2102
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2068
2103
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2069
2104
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2070
2105
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
2071
2106
|
transports_version_send: [:rest]
|
2072
2107
|
|
2108
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2073
2109
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2074
2110
|
|
2075
2111
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
@@ -2082,7 +2118,6 @@ module Google
|
|
2082
2118
|
|
2083
2119
|
@artifact_registry_stub.set_iam_policy request, options do |result, operation|
|
2084
2120
|
yield result, operation if block_given?
|
2085
|
-
return result
|
2086
2121
|
end
|
2087
2122
|
rescue ::Gapic::Rest::Error => e
|
2088
2123
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2146,12 +2181,13 @@ module Google
|
|
2146
2181
|
# Customize the options with defaults
|
2147
2182
|
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
2148
2183
|
|
2149
|
-
# Set x-goog-api-client
|
2184
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2150
2185
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2151
2186
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2152
2187
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
2153
2188
|
transports_version_send: [:rest]
|
2154
2189
|
|
2190
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2155
2191
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2156
2192
|
|
2157
2193
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
@@ -2164,7 +2200,6 @@ module Google
|
|
2164
2200
|
|
2165
2201
|
@artifact_registry_stub.get_iam_policy request, options do |result, operation|
|
2166
2202
|
yield result, operation if block_given?
|
2167
|
-
return result
|
2168
2203
|
end
|
2169
2204
|
rescue ::Gapic::Rest::Error => e
|
2170
2205
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2230,12 +2265,13 @@ module Google
|
|
2230
2265
|
# Customize the options with defaults
|
2231
2266
|
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
2232
2267
|
|
2233
|
-
# Set x-goog-api-client
|
2268
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2234
2269
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2235
2270
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2236
2271
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
2237
2272
|
transports_version_send: [:rest]
|
2238
2273
|
|
2274
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2239
2275
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2240
2276
|
|
2241
2277
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
@@ -2248,7 +2284,6 @@ module Google
|
|
2248
2284
|
|
2249
2285
|
@artifact_registry_stub.test_iam_permissions request, options do |result, operation|
|
2250
2286
|
yield result, operation if block_given?
|
2251
|
-
return result
|
2252
2287
|
end
|
2253
2288
|
rescue ::Gapic::Rest::Error => e
|
2254
2289
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2308,12 +2343,13 @@ module Google
|
|
2308
2343
|
# Customize the options with defaults
|
2309
2344
|
call_metadata = @config.rpcs.get_project_settings.metadata.to_h
|
2310
2345
|
|
2311
|
-
# Set x-goog-api-client
|
2346
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2312
2347
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2313
2348
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2314
2349
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
2315
2350
|
transports_version_send: [:rest]
|
2316
2351
|
|
2352
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2317
2353
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2318
2354
|
|
2319
2355
|
options.apply_defaults timeout: @config.rpcs.get_project_settings.timeout,
|
@@ -2326,7 +2362,6 @@ module Google
|
|
2326
2362
|
|
2327
2363
|
@artifact_registry_stub.get_project_settings request, options do |result, operation|
|
2328
2364
|
yield result, operation if block_given?
|
2329
|
-
return result
|
2330
2365
|
end
|
2331
2366
|
rescue ::Gapic::Rest::Error => e
|
2332
2367
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2388,12 +2423,13 @@ module Google
|
|
2388
2423
|
# Customize the options with defaults
|
2389
2424
|
call_metadata = @config.rpcs.update_project_settings.metadata.to_h
|
2390
2425
|
|
2391
|
-
# Set x-goog-api-client
|
2426
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
2392
2427
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2393
2428
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2394
2429
|
gapic_version: ::Google::Cloud::ArtifactRegistry::V1beta2::VERSION,
|
2395
2430
|
transports_version_send: [:rest]
|
2396
2431
|
|
2432
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
2397
2433
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2398
2434
|
|
2399
2435
|
options.apply_defaults timeout: @config.rpcs.update_project_settings.timeout,
|
@@ -2406,7 +2442,6 @@ module Google
|
|
2406
2442
|
|
2407
2443
|
@artifact_registry_stub.update_project_settings request, options do |result, operation|
|
2408
2444
|
yield result, operation if block_given?
|
2409
|
-
return result
|
2410
2445
|
end
|
2411
2446
|
rescue ::Gapic::Rest::Error => e
|
2412
2447
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2486,6 +2521,11 @@ module Google
|
|
2486
2521
|
# default endpoint URL. The default value of nil uses the environment
|
2487
2522
|
# universe (usually the default "googleapis.com" universe).
|
2488
2523
|
# @return [::String,nil]
|
2524
|
+
# @!attribute [rw] logger
|
2525
|
+
# A custom logger to use for request/response debug logging, or the value
|
2526
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2527
|
+
# explicitly disable logging.
|
2528
|
+
# @return [::Logger,:default,nil]
|
2489
2529
|
#
|
2490
2530
|
class Configuration
|
2491
2531
|
extend ::Gapic::Config
|
@@ -2514,6 +2554,7 @@ module Google
|
|
2514
2554
|
# by the host service.
|
2515
2555
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
2516
2556
|
config_attr :bindings_override, {}, ::Hash, nil
|
2557
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2517
2558
|
|
2518
2559
|
# @private
|
2519
2560
|
def initialize parent_config = nil
|