google-cloud-artifact_registry-v1 1.1.0 → 1.3.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 +31 -21
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/client.rb +56 -50
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +16 -5
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +56 -50
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +47 -28
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/service_stub.rb +406 -296
- data/lib/google/cloud/artifact_registry/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/devtools/artifactregistry/v1/repository.rb +50 -0
- data/proto_docs/google/longrunning/operations.rb +4 -0
- data/proto_docs/google/protobuf/struct.rb +12 -0
- metadata +6 -9
@@ -172,15 +172,27 @@ module Google
|
|
172
172
|
endpoint: @config.endpoint,
|
173
173
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
174
174
|
universe_domain: @config.universe_domain,
|
175
|
-
credentials: credentials
|
175
|
+
credentials: credentials,
|
176
|
+
logger: @config.logger
|
176
177
|
)
|
177
178
|
|
179
|
+
@artifact_registry_stub.logger(stub: true)&.info do |entry|
|
180
|
+
entry.set_system_name
|
181
|
+
entry.set_service
|
182
|
+
entry.message = "Created client for #{entry.service}"
|
183
|
+
entry.set_credentials_fields credentials
|
184
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
185
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
186
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
187
|
+
end
|
188
|
+
|
178
189
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
179
190
|
config.credentials = credentials
|
180
191
|
config.quota_project = @quota_project_id
|
181
192
|
config.endpoint = @artifact_registry_stub.endpoint
|
182
193
|
config.universe_domain = @artifact_registry_stub.universe_domain
|
183
194
|
config.bindings_override = @config.bindings_override
|
195
|
+
config.logger = @artifact_registry_stub.logger if config.respond_to? :logger=
|
184
196
|
end
|
185
197
|
end
|
186
198
|
|
@@ -198,6 +210,15 @@ module Google
|
|
198
210
|
#
|
199
211
|
attr_reader :location_client
|
200
212
|
|
213
|
+
##
|
214
|
+
# The logger used for request/response debug logging.
|
215
|
+
#
|
216
|
+
# @return [Logger]
|
217
|
+
#
|
218
|
+
def logger
|
219
|
+
@artifact_registry_stub.logger
|
220
|
+
end
|
221
|
+
|
201
222
|
# Service calls
|
202
223
|
|
203
224
|
##
|
@@ -285,7 +306,7 @@ module Google
|
|
285
306
|
@artifact_registry_stub.list_docker_images request, options do |result, operation|
|
286
307
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, "docker_images", request, result, options
|
287
308
|
yield result, operation if block_given?
|
288
|
-
|
309
|
+
throw :response, result
|
289
310
|
end
|
290
311
|
rescue ::Gapic::Rest::Error => e
|
291
312
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -364,7 +385,6 @@ module Google
|
|
364
385
|
|
365
386
|
@artifact_registry_stub.get_docker_image request, options do |result, operation|
|
366
387
|
yield result, operation if block_given?
|
367
|
-
return result
|
368
388
|
end
|
369
389
|
rescue ::Gapic::Rest::Error => e
|
370
390
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -453,7 +473,7 @@ module Google
|
|
453
473
|
@artifact_registry_stub.list_maven_artifacts request, options do |result, operation|
|
454
474
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, "maven_artifacts", request, result, options
|
455
475
|
yield result, operation if block_given?
|
456
|
-
|
476
|
+
throw :response, result
|
457
477
|
end
|
458
478
|
rescue ::Gapic::Rest::Error => e
|
459
479
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -532,7 +552,6 @@ module Google
|
|
532
552
|
|
533
553
|
@artifact_registry_stub.get_maven_artifact request, options do |result, operation|
|
534
554
|
yield result, operation if block_given?
|
535
|
-
return result
|
536
555
|
end
|
537
556
|
rescue ::Gapic::Rest::Error => e
|
538
557
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -621,7 +640,7 @@ module Google
|
|
621
640
|
@artifact_registry_stub.list_npm_packages request, options do |result, operation|
|
622
641
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, "npm_packages", request, result, options
|
623
642
|
yield result, operation if block_given?
|
624
|
-
|
643
|
+
throw :response, result
|
625
644
|
end
|
626
645
|
rescue ::Gapic::Rest::Error => e
|
627
646
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -700,7 +719,6 @@ module Google
|
|
700
719
|
|
701
720
|
@artifact_registry_stub.get_npm_package request, options do |result, operation|
|
702
721
|
yield result, operation if block_given?
|
703
|
-
return result
|
704
722
|
end
|
705
723
|
rescue ::Gapic::Rest::Error => e
|
706
724
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -789,7 +807,7 @@ module Google
|
|
789
807
|
@artifact_registry_stub.list_python_packages request, options do |result, operation|
|
790
808
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, "python_packages", request, result, options
|
791
809
|
yield result, operation if block_given?
|
792
|
-
|
810
|
+
throw :response, result
|
793
811
|
end
|
794
812
|
rescue ::Gapic::Rest::Error => e
|
795
813
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -868,7 +886,6 @@ module Google
|
|
868
886
|
|
869
887
|
@artifact_registry_stub.get_python_package request, options do |result, operation|
|
870
888
|
yield result, operation if block_given?
|
871
|
-
return result
|
872
889
|
end
|
873
890
|
rescue ::Gapic::Rest::Error => e
|
874
891
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -960,7 +977,7 @@ module Google
|
|
960
977
|
@artifact_registry_stub.import_apt_artifacts request, options do |result, operation|
|
961
978
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
962
979
|
yield result, operation if block_given?
|
963
|
-
|
980
|
+
throw :response, result
|
964
981
|
end
|
965
982
|
rescue ::Gapic::Rest::Error => e
|
966
983
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1052,7 +1069,7 @@ module Google
|
|
1052
1069
|
@artifact_registry_stub.import_yum_artifacts request, options do |result, operation|
|
1053
1070
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1054
1071
|
yield result, operation if block_given?
|
1055
|
-
|
1072
|
+
throw :response, result
|
1056
1073
|
end
|
1057
1074
|
rescue ::Gapic::Rest::Error => e
|
1058
1075
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1163,7 +1180,7 @@ module Google
|
|
1163
1180
|
@artifact_registry_stub.list_repositories request, options do |result, operation|
|
1164
1181
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_repositories, "repositories", request, result, options
|
1165
1182
|
yield result, operation if block_given?
|
1166
|
-
|
1183
|
+
throw :response, result
|
1167
1184
|
end
|
1168
1185
|
rescue ::Gapic::Rest::Error => e
|
1169
1186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1242,7 +1259,6 @@ module Google
|
|
1242
1259
|
|
1243
1260
|
@artifact_registry_stub.get_repository request, options do |result, operation|
|
1244
1261
|
yield result, operation if block_given?
|
1245
|
-
return result
|
1246
1262
|
end
|
1247
1263
|
rescue ::Gapic::Rest::Error => e
|
1248
1264
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1335,7 +1351,7 @@ module Google
|
|
1335
1351
|
@artifact_registry_stub.create_repository request, options do |result, operation|
|
1336
1352
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1337
1353
|
yield result, operation if block_given?
|
1338
|
-
|
1354
|
+
throw :response, result
|
1339
1355
|
end
|
1340
1356
|
rescue ::Gapic::Rest::Error => e
|
1341
1357
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1418,7 +1434,6 @@ module Google
|
|
1418
1434
|
|
1419
1435
|
@artifact_registry_stub.update_repository request, options do |result, operation|
|
1420
1436
|
yield result, operation if block_given?
|
1421
|
-
return result
|
1422
1437
|
end
|
1423
1438
|
rescue ::Gapic::Rest::Error => e
|
1424
1439
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1507,7 +1522,7 @@ module Google
|
|
1507
1522
|
@artifact_registry_stub.delete_repository request, options do |result, operation|
|
1508
1523
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1509
1524
|
yield result, operation if block_given?
|
1510
|
-
|
1525
|
+
throw :response, result
|
1511
1526
|
end
|
1512
1527
|
rescue ::Gapic::Rest::Error => e
|
1513
1528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1643,7 +1658,7 @@ module Google
|
|
1643
1658
|
@artifact_registry_stub.list_packages request, options do |result, operation|
|
1644
1659
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_packages, "packages", request, result, options
|
1645
1660
|
yield result, operation if block_given?
|
1646
|
-
|
1661
|
+
throw :response, result
|
1647
1662
|
end
|
1648
1663
|
rescue ::Gapic::Rest::Error => e
|
1649
1664
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1722,7 +1737,6 @@ module Google
|
|
1722
1737
|
|
1723
1738
|
@artifact_registry_stub.get_package request, options do |result, operation|
|
1724
1739
|
yield result, operation if block_given?
|
1725
|
-
return result
|
1726
1740
|
end
|
1727
1741
|
rescue ::Gapic::Rest::Error => e
|
1728
1742
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1810,7 +1824,7 @@ module Google
|
|
1810
1824
|
@artifact_registry_stub.delete_package request, options do |result, operation|
|
1811
1825
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1812
1826
|
yield result, operation if block_given?
|
1813
|
-
|
1827
|
+
throw :response, result
|
1814
1828
|
end
|
1815
1829
|
rescue ::Gapic::Rest::Error => e
|
1816
1830
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1948,7 +1962,7 @@ module Google
|
|
1948
1962
|
@artifact_registry_stub.list_versions request, options do |result, operation|
|
1949
1963
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_versions, "versions", request, result, options
|
1950
1964
|
yield result, operation if block_given?
|
1951
|
-
|
1965
|
+
throw :response, result
|
1952
1966
|
end
|
1953
1967
|
rescue ::Gapic::Rest::Error => e
|
1954
1968
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2029,7 +2043,6 @@ module Google
|
|
2029
2043
|
|
2030
2044
|
@artifact_registry_stub.get_version request, options do |result, operation|
|
2031
2045
|
yield result, operation if block_given?
|
2032
|
-
return result
|
2033
2046
|
end
|
2034
2047
|
rescue ::Gapic::Rest::Error => e
|
2035
2048
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2120,7 +2133,7 @@ module Google
|
|
2120
2133
|
@artifact_registry_stub.delete_version request, options do |result, operation|
|
2121
2134
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2122
2135
|
yield result, operation if block_given?
|
2123
|
-
|
2136
|
+
throw :response, result
|
2124
2137
|
end
|
2125
2138
|
rescue ::Gapic::Rest::Error => e
|
2126
2139
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2213,7 +2226,7 @@ module Google
|
|
2213
2226
|
@artifact_registry_stub.batch_delete_versions request, options do |result, operation|
|
2214
2227
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2215
2228
|
yield result, operation if block_given?
|
2216
|
-
|
2229
|
+
throw :response, result
|
2217
2230
|
end
|
2218
2231
|
rescue ::Gapic::Rest::Error => e
|
2219
2232
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2296,7 +2309,6 @@ module Google
|
|
2296
2309
|
|
2297
2310
|
@artifact_registry_stub.update_version request, options do |result, operation|
|
2298
2311
|
yield result, operation if block_given?
|
2299
|
-
return result
|
2300
2312
|
end
|
2301
2313
|
rescue ::Gapic::Rest::Error => e
|
2302
2314
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2438,7 +2450,7 @@ module Google
|
|
2438
2450
|
@artifact_registry_stub.list_files request, options do |result, operation|
|
2439
2451
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_files, "files", request, result, options
|
2440
2452
|
yield result, operation if block_given?
|
2441
|
-
|
2453
|
+
throw :response, result
|
2442
2454
|
end
|
2443
2455
|
rescue ::Gapic::Rest::Error => e
|
2444
2456
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2517,7 +2529,6 @@ module Google
|
|
2517
2529
|
|
2518
2530
|
@artifact_registry_stub.get_file request, options do |result, operation|
|
2519
2531
|
yield result, operation if block_given?
|
2520
|
-
return result
|
2521
2532
|
end
|
2522
2533
|
rescue ::Gapic::Rest::Error => e
|
2523
2534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2606,7 +2617,7 @@ module Google
|
|
2606
2617
|
@artifact_registry_stub.delete_file request, options do |result, operation|
|
2607
2618
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2608
2619
|
yield result, operation if block_given?
|
2609
|
-
|
2620
|
+
throw :response, result
|
2610
2621
|
end
|
2611
2622
|
rescue ::Gapic::Rest::Error => e
|
2612
2623
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2689,7 +2700,6 @@ module Google
|
|
2689
2700
|
|
2690
2701
|
@artifact_registry_stub.update_file request, options do |result, operation|
|
2691
2702
|
yield result, operation if block_given?
|
2692
|
-
return result
|
2693
2703
|
end
|
2694
2704
|
rescue ::Gapic::Rest::Error => e
|
2695
2705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2807,7 +2817,7 @@ module Google
|
|
2807
2817
|
@artifact_registry_stub.list_tags request, options do |result, operation|
|
2808
2818
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_tags, "tags", request, result, options
|
2809
2819
|
yield result, operation if block_given?
|
2810
|
-
|
2820
|
+
throw :response, result
|
2811
2821
|
end
|
2812
2822
|
rescue ::Gapic::Rest::Error => e
|
2813
2823
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2886,7 +2896,6 @@ module Google
|
|
2886
2896
|
|
2887
2897
|
@artifact_registry_stub.get_tag request, options do |result, operation|
|
2888
2898
|
yield result, operation if block_given?
|
2889
|
-
return result
|
2890
2899
|
end
|
2891
2900
|
rescue ::Gapic::Rest::Error => e
|
2892
2901
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2969,7 +2978,6 @@ module Google
|
|
2969
2978
|
|
2970
2979
|
@artifact_registry_stub.create_tag request, options do |result, operation|
|
2971
2980
|
yield result, operation if block_given?
|
2972
|
-
return result
|
2973
2981
|
end
|
2974
2982
|
rescue ::Gapic::Rest::Error => e
|
2975
2983
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3052,7 +3060,6 @@ module Google
|
|
3052
3060
|
|
3053
3061
|
@artifact_registry_stub.update_tag request, options do |result, operation|
|
3054
3062
|
yield result, operation if block_given?
|
3055
|
-
return result
|
3056
3063
|
end
|
3057
3064
|
rescue ::Gapic::Rest::Error => e
|
3058
3065
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3131,7 +3138,6 @@ module Google
|
|
3131
3138
|
|
3132
3139
|
@artifact_registry_stub.delete_tag request, options do |result, operation|
|
3133
3140
|
yield result, operation if block_given?
|
3134
|
-
return result
|
3135
3141
|
end
|
3136
3142
|
rescue ::Gapic::Rest::Error => e
|
3137
3143
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3214,7 +3220,6 @@ module Google
|
|
3214
3220
|
|
3215
3221
|
@artifact_registry_stub.create_rule request, options do |result, operation|
|
3216
3222
|
yield result, operation if block_given?
|
3217
|
-
return result
|
3218
3223
|
end
|
3219
3224
|
rescue ::Gapic::Rest::Error => e
|
3220
3225
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3304,7 +3309,7 @@ module Google
|
|
3304
3309
|
@artifact_registry_stub.list_rules request, options do |result, operation|
|
3305
3310
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_rules, "rules", request, result, options
|
3306
3311
|
yield result, operation if block_given?
|
3307
|
-
|
3312
|
+
throw :response, result
|
3308
3313
|
end
|
3309
3314
|
rescue ::Gapic::Rest::Error => e
|
3310
3315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3383,7 +3388,6 @@ module Google
|
|
3383
3388
|
|
3384
3389
|
@artifact_registry_stub.get_rule request, options do |result, operation|
|
3385
3390
|
yield result, operation if block_given?
|
3386
|
-
return result
|
3387
3391
|
end
|
3388
3392
|
rescue ::Gapic::Rest::Error => e
|
3389
3393
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3466,7 +3470,6 @@ module Google
|
|
3466
3470
|
|
3467
3471
|
@artifact_registry_stub.update_rule request, options do |result, operation|
|
3468
3472
|
yield result, operation if block_given?
|
3469
|
-
return result
|
3470
3473
|
end
|
3471
3474
|
rescue ::Gapic::Rest::Error => e
|
3472
3475
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3545,7 +3548,6 @@ module Google
|
|
3545
3548
|
|
3546
3549
|
@artifact_registry_stub.delete_rule request, options do |result, operation|
|
3547
3550
|
yield result, operation if block_given?
|
3548
|
-
return result
|
3549
3551
|
end
|
3550
3552
|
rescue ::Gapic::Rest::Error => e
|
3551
3553
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3636,7 +3638,6 @@ module Google
|
|
3636
3638
|
|
3637
3639
|
@artifact_registry_stub.set_iam_policy request, options do |result, operation|
|
3638
3640
|
yield result, operation if block_given?
|
3639
|
-
return result
|
3640
3641
|
end
|
3641
3642
|
rescue ::Gapic::Rest::Error => e
|
3642
3643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3719,7 +3720,6 @@ module Google
|
|
3719
3720
|
|
3720
3721
|
@artifact_registry_stub.get_iam_policy request, options do |result, operation|
|
3721
3722
|
yield result, operation if block_given?
|
3722
|
-
return result
|
3723
3723
|
end
|
3724
3724
|
rescue ::Gapic::Rest::Error => e
|
3725
3725
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3804,7 +3804,6 @@ module Google
|
|
3804
3804
|
|
3805
3805
|
@artifact_registry_stub.test_iam_permissions request, options do |result, operation|
|
3806
3806
|
yield result, operation if block_given?
|
3807
|
-
return result
|
3808
3807
|
end
|
3809
3808
|
rescue ::Gapic::Rest::Error => e
|
3810
3809
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3883,7 +3882,6 @@ module Google
|
|
3883
3882
|
|
3884
3883
|
@artifact_registry_stub.get_project_settings request, options do |result, operation|
|
3885
3884
|
yield result, operation if block_given?
|
3886
|
-
return result
|
3887
3885
|
end
|
3888
3886
|
rescue ::Gapic::Rest::Error => e
|
3889
3887
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3964,7 +3962,6 @@ module Google
|
|
3964
3962
|
|
3965
3963
|
@artifact_registry_stub.update_project_settings request, options do |result, operation|
|
3966
3964
|
yield result, operation if block_given?
|
3967
|
-
return result
|
3968
3965
|
end
|
3969
3966
|
rescue ::Gapic::Rest::Error => e
|
3970
3967
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4043,7 +4040,6 @@ module Google
|
|
4043
4040
|
|
4044
4041
|
@artifact_registry_stub.get_vpcsc_config request, options do |result, operation|
|
4045
4042
|
yield result, operation if block_given?
|
4046
|
-
return result
|
4047
4043
|
end
|
4048
4044
|
rescue ::Gapic::Rest::Error => e
|
4049
4045
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4124,7 +4120,6 @@ module Google
|
|
4124
4120
|
|
4125
4121
|
@artifact_registry_stub.update_vpcsc_config request, options do |result, operation|
|
4126
4122
|
yield result, operation if block_given?
|
4127
|
-
return result
|
4128
4123
|
end
|
4129
4124
|
rescue ::Gapic::Rest::Error => e
|
4130
4125
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4207,7 +4202,6 @@ module Google
|
|
4207
4202
|
|
4208
4203
|
@artifact_registry_stub.update_package request, options do |result, operation|
|
4209
4204
|
yield result, operation if block_given?
|
4210
|
-
return result
|
4211
4205
|
end
|
4212
4206
|
rescue ::Gapic::Rest::Error => e
|
4213
4207
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4302,7 +4296,7 @@ module Google
|
|
4302
4296
|
@artifact_registry_stub.list_attachments request, options do |result, operation|
|
4303
4297
|
result = ::Gapic::Rest::PagedEnumerable.new @artifact_registry_stub, :list_attachments, "attachments", request, result, options
|
4304
4298
|
yield result, operation if block_given?
|
4305
|
-
|
4299
|
+
throw :response, result
|
4306
4300
|
end
|
4307
4301
|
rescue ::Gapic::Rest::Error => e
|
4308
4302
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4381,7 +4375,6 @@ module Google
|
|
4381
4375
|
|
4382
4376
|
@artifact_registry_stub.get_attachment request, options do |result, operation|
|
4383
4377
|
yield result, operation if block_given?
|
4384
|
-
return result
|
4385
4378
|
end
|
4386
4379
|
rescue ::Gapic::Rest::Error => e
|
4387
4380
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4474,7 +4467,7 @@ module Google
|
|
4474
4467
|
@artifact_registry_stub.create_attachment request, options do |result, operation|
|
4475
4468
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4476
4469
|
yield result, operation if block_given?
|
4477
|
-
|
4470
|
+
throw :response, result
|
4478
4471
|
end
|
4479
4472
|
rescue ::Gapic::Rest::Error => e
|
4480
4473
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4563,7 +4556,7 @@ module Google
|
|
4563
4556
|
@artifact_registry_stub.delete_attachment request, options do |result, operation|
|
4564
4557
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
4565
4558
|
yield result, operation if block_given?
|
4566
|
-
|
4559
|
+
throw :response, result
|
4567
4560
|
end
|
4568
4561
|
rescue ::Gapic::Rest::Error => e
|
4569
4562
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4611,6 +4604,13 @@ module Google
|
|
4611
4604
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
4612
4605
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
4613
4606
|
# * (`nil`) indicating no credentials
|
4607
|
+
#
|
4608
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
4609
|
+
# external source for authentication to Google Cloud, you must validate it before
|
4610
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
4611
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
4612
|
+
# For more information, refer to [Validate credential configurations from external
|
4613
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
4614
4614
|
# @return [::Object]
|
4615
4615
|
# @!attribute [rw] scope
|
4616
4616
|
# The OAuth scopes
|
@@ -4643,6 +4643,11 @@ module Google
|
|
4643
4643
|
# default endpoint URL. The default value of nil uses the environment
|
4644
4644
|
# universe (usually the default "googleapis.com" universe).
|
4645
4645
|
# @return [::String,nil]
|
4646
|
+
# @!attribute [rw] logger
|
4647
|
+
# A custom logger to use for request/response debug logging, or the value
|
4648
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4649
|
+
# explicitly disable logging.
|
4650
|
+
# @return [::Logger,:default,nil]
|
4646
4651
|
#
|
4647
4652
|
class Configuration
|
4648
4653
|
extend ::Gapic::Config
|
@@ -4671,6 +4676,7 @@ module Google
|
|
4671
4676
|
# by the host service.
|
4672
4677
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
4673
4678
|
config_attr :bindings_override, {}, ::Hash, nil
|
4679
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4674
4680
|
|
4675
4681
|
# @private
|
4676
4682
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -504,6 +502,13 @@ module Google
|
|
504
502
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
505
503
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
506
504
|
# * (`nil`) indicating no credentials
|
505
|
+
#
|
506
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
507
|
+
# external source for authentication to Google Cloud, you must validate it before
|
508
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
509
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
510
|
+
# For more information, refer to [Validate credential configurations from external
|
511
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
507
512
|
# @return [::Object]
|
508
513
|
# @!attribute [rw] scope
|
509
514
|
# The OAuth scopes
|
@@ -536,6 +541,11 @@ module Google
|
|
536
541
|
# default endpoint URL. The default value of nil uses the environment
|
537
542
|
# universe (usually the default "googleapis.com" universe).
|
538
543
|
# @return [::String,nil]
|
544
|
+
# @!attribute [rw] logger
|
545
|
+
# A custom logger to use for request/response debug logging, or the value
|
546
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
547
|
+
# explicitly disable logging.
|
548
|
+
# @return [::Logger,:default,nil]
|
539
549
|
#
|
540
550
|
class Configuration
|
541
551
|
extend ::Gapic::Config
|
@@ -557,6 +567,7 @@ module Google
|
|
557
567
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
568
|
config_attr :quota_project, nil, ::String, nil
|
559
569
|
config_attr :universe_domain, nil, ::String, nil
|
570
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
571
|
|
561
572
|
# @private
|
562
573
|
def initialize parent_config = nil
|
@@ -676,16 +687,18 @@ module Google
|
|
676
687
|
|
677
688
|
response = @client_stub.make_http_request(
|
678
689
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
690
|
+
uri: uri,
|
691
|
+
body: body || "",
|
692
|
+
params: query_string_params,
|
693
|
+
method_name: "list_operations",
|
682
694
|
options: options
|
683
695
|
)
|
684
696
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
697
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
698
|
+
catch :response do
|
699
|
+
yield result, operation if block_given?
|
700
|
+
result
|
701
|
+
end
|
689
702
|
end
|
690
703
|
|
691
704
|
##
|
@@ -714,16 +727,18 @@ module Google
|
|
714
727
|
|
715
728
|
response = @client_stub.make_http_request(
|
716
729
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
730
|
+
uri: uri,
|
731
|
+
body: body || "",
|
732
|
+
params: query_string_params,
|
733
|
+
method_name: "get_operation",
|
720
734
|
options: options
|
721
735
|
)
|
722
736
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
737
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
738
|
+
catch :response do
|
739
|
+
yield result, operation if block_given?
|
740
|
+
result
|
741
|
+
end
|
727
742
|
end
|
728
743
|
|
729
744
|
##
|
@@ -752,16 +767,18 @@ module Google
|
|
752
767
|
|
753
768
|
response = @client_stub.make_http_request(
|
754
769
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
770
|
+
uri: uri,
|
771
|
+
body: body || "",
|
772
|
+
params: query_string_params,
|
773
|
+
method_name: "delete_operation",
|
758
774
|
options: options
|
759
775
|
)
|
760
776
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
777
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
778
|
+
catch :response do
|
779
|
+
yield result, operation if block_given?
|
780
|
+
result
|
781
|
+
end
|
765
782
|
end
|
766
783
|
|
767
784
|
##
|
@@ -790,16 +807,18 @@ module Google
|
|
790
807
|
|
791
808
|
response = @client_stub.make_http_request(
|
792
809
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
810
|
+
uri: uri,
|
811
|
+
body: body || "",
|
812
|
+
params: query_string_params,
|
813
|
+
method_name: "cancel_operation",
|
796
814
|
options: options
|
797
815
|
)
|
798
816
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
817
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
818
|
+
catch :response do
|
819
|
+
yield result, operation if block_given?
|
820
|
+
result
|
821
|
+
end
|
803
822
|
end
|
804
823
|
|
805
824
|
##
|