google-cloud-artifact_registry-v1 1.1.0 → 1.2.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/v1/artifact_registry/client.rb +49 -50
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/operations.rb +9 -5
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/client.rb +49 -50
- data/lib/google/cloud/artifact_registry/v1/artifact_registry/rest/operations.rb +40 -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
- metadata +5 -5
@@ -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)
|
@@ -4643,6 +4636,11 @@ module Google
|
|
4643
4636
|
# default endpoint URL. The default value of nil uses the environment
|
4644
4637
|
# universe (usually the default "googleapis.com" universe).
|
4645
4638
|
# @return [::String,nil]
|
4639
|
+
# @!attribute [rw] logger
|
4640
|
+
# A custom logger to use for request/response debug logging, or the value
|
4641
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4642
|
+
# explicitly disable logging.
|
4643
|
+
# @return [::Logger,:default,nil]
|
4646
4644
|
#
|
4647
4645
|
class Configuration
|
4648
4646
|
extend ::Gapic::Config
|
@@ -4671,6 +4669,7 @@ module Google
|
|
4671
4669
|
# by the host service.
|
4672
4670
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
4673
4671
|
config_attr :bindings_override, {}, ::Hash, nil
|
4672
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4674
4673
|
|
4675
4674
|
# @private
|
4676
4675
|
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)
|
@@ -536,6 +534,11 @@ module Google
|
|
536
534
|
# default endpoint URL. The default value of nil uses the environment
|
537
535
|
# universe (usually the default "googleapis.com" universe).
|
538
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
539
542
|
#
|
540
543
|
class Configuration
|
541
544
|
extend ::Gapic::Config
|
@@ -557,6 +560,7 @@ module Google
|
|
557
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
561
|
config_attr :quota_project, nil, ::String, nil
|
559
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
564
|
|
561
565
|
# @private
|
562
566
|
def initialize parent_config = nil
|
@@ -676,16 +680,18 @@ module Google
|
|
676
680
|
|
677
681
|
response = @client_stub.make_http_request(
|
678
682
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
682
687
|
options: options
|
683
688
|
)
|
684
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
689
695
|
end
|
690
696
|
|
691
697
|
##
|
@@ -714,16 +720,18 @@ module Google
|
|
714
720
|
|
715
721
|
response = @client_stub.make_http_request(
|
716
722
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
720
727
|
options: options
|
721
728
|
)
|
722
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
727
735
|
end
|
728
736
|
|
729
737
|
##
|
@@ -752,16 +760,18 @@ module Google
|
|
752
760
|
|
753
761
|
response = @client_stub.make_http_request(
|
754
762
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
758
767
|
options: options
|
759
768
|
)
|
760
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
765
775
|
end
|
766
776
|
|
767
777
|
##
|
@@ -790,16 +800,18 @@ module Google
|
|
790
800
|
|
791
801
|
response = @client_stub.make_http_request(
|
792
802
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
796
807
|
options: options
|
797
808
|
)
|
798
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
803
815
|
end
|
804
816
|
|
805
817
|
##
|