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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dac7b8af68c072e5a80dbb34290159123c3a4a7cfb1f2c13655454f688146bb5
4
- data.tar.gz: 7db107f9c708dc27ad2428ebf999fba27c51564d2ed37e1092c5295b49526b15
3
+ metadata.gz: ea13e6d9c4db6ac794635a61e8eddfed97d23e45d657b0865f35975727c1cc11
4
+ data.tar.gz: c5a258f59648a7712e8570c1b20dac5d82f039033429521be236bb37dd789ae8
5
5
  SHA512:
6
- metadata.gz: ff8d582f584686439ddfd902e6f832eadae75e550fe96eca6b444636b70655875f73773971bf2107a38300b875e3e453e33b484444088f13c99084d7ff812ace
7
- data.tar.gz: 0eb8d85493479d3b67b13a946766a93e91691aeae7c14e6a65da862b744680bb8e207824db2f6877f3d98a2ff5b94a17fdbc0a86c90e07c4aab1e4ef00a91925
6
+ metadata.gz: 5ce4df12858f0c12f76b62e37872483a425e933096f2907bcee4ae6afcea4715b8b75e27f5e007f46eddf7910e96d1aca7289f5db80dfa83c118f5c7be83b125
7
+ data.tar.gz: 245e49065f7c69e35e605a8e91e88cb4793e7af819730c9cc3118e52f6dfc3397056ee5766d4d6ee21e81cfc1861a926f370baf731b3fffb4045c8b462ca1cec
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/artifact-registry/)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/artifact_registry/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -179,14 +179,26 @@ module Google
179
179
  universe_domain: @config.universe_domain,
180
180
  channel_args: @config.channel_args,
181
181
  interceptors: @config.interceptors,
182
- channel_pool_config: @config.channel_pool
182
+ channel_pool_config: @config.channel_pool,
183
+ logger: @config.logger
183
184
  )
184
185
 
186
+ @artifact_registry_stub.stub_logger&.info do |entry|
187
+ entry.set_system_name
188
+ entry.set_service
189
+ entry.message = "Created client for #{entry.service}"
190
+ entry.set_credentials_fields credentials
191
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
192
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
193
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
194
+ end
195
+
185
196
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
186
197
  config.credentials = credentials
187
198
  config.quota_project = @quota_project_id
188
199
  config.endpoint = @artifact_registry_stub.endpoint
189
200
  config.universe_domain = @artifact_registry_stub.universe_domain
201
+ config.logger = @artifact_registry_stub.logger if config.respond_to? :logger=
190
202
  end
191
203
  end
192
204
 
@@ -204,6 +216,15 @@ module Google
204
216
  #
205
217
  attr_reader :location_client
206
218
 
219
+ ##
220
+ # The logger used for request/response debug logging.
221
+ #
222
+ # @return [Logger]
223
+ #
224
+ def logger
225
+ @artifact_registry_stub.logger
226
+ end
227
+
207
228
  # Service calls
208
229
 
209
230
  ##
@@ -298,7 +319,7 @@ module Google
298
319
  @artifact_registry_stub.call_rpc :list_docker_images, request, options: options do |response, operation|
299
320
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_docker_images, request, response, operation, options
300
321
  yield response, operation if block_given?
301
- return response
322
+ throw :response, response
302
323
  end
303
324
  rescue ::GRPC::BadStatus => e
304
325
  raise ::Google::Cloud::Error.from_error(e)
@@ -384,7 +405,6 @@ module Google
384
405
 
385
406
  @artifact_registry_stub.call_rpc :get_docker_image, request, options: options do |response, operation|
386
407
  yield response, operation if block_given?
387
- return response
388
408
  end
389
409
  rescue ::GRPC::BadStatus => e
390
410
  raise ::Google::Cloud::Error.from_error(e)
@@ -480,7 +500,7 @@ module Google
480
500
  @artifact_registry_stub.call_rpc :list_maven_artifacts, request, options: options do |response, operation|
481
501
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_maven_artifacts, request, response, operation, options
482
502
  yield response, operation if block_given?
483
- return response
503
+ throw :response, response
484
504
  end
485
505
  rescue ::GRPC::BadStatus => e
486
506
  raise ::Google::Cloud::Error.from_error(e)
@@ -566,7 +586,6 @@ module Google
566
586
 
567
587
  @artifact_registry_stub.call_rpc :get_maven_artifact, request, options: options do |response, operation|
568
588
  yield response, operation if block_given?
569
- return response
570
589
  end
571
590
  rescue ::GRPC::BadStatus => e
572
591
  raise ::Google::Cloud::Error.from_error(e)
@@ -662,7 +681,7 @@ module Google
662
681
  @artifact_registry_stub.call_rpc :list_npm_packages, request, options: options do |response, operation|
663
682
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_npm_packages, request, response, operation, options
664
683
  yield response, operation if block_given?
665
- return response
684
+ throw :response, response
666
685
  end
667
686
  rescue ::GRPC::BadStatus => e
668
687
  raise ::Google::Cloud::Error.from_error(e)
@@ -748,7 +767,6 @@ module Google
748
767
 
749
768
  @artifact_registry_stub.call_rpc :get_npm_package, request, options: options do |response, operation|
750
769
  yield response, operation if block_given?
751
- return response
752
770
  end
753
771
  rescue ::GRPC::BadStatus => e
754
772
  raise ::Google::Cloud::Error.from_error(e)
@@ -844,7 +862,7 @@ module Google
844
862
  @artifact_registry_stub.call_rpc :list_python_packages, request, options: options do |response, operation|
845
863
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_python_packages, request, response, operation, options
846
864
  yield response, operation if block_given?
847
- return response
865
+ throw :response, response
848
866
  end
849
867
  rescue ::GRPC::BadStatus => e
850
868
  raise ::Google::Cloud::Error.from_error(e)
@@ -930,7 +948,6 @@ module Google
930
948
 
931
949
  @artifact_registry_stub.call_rpc :get_python_package, request, options: options do |response, operation|
932
950
  yield response, operation if block_given?
933
- return response
934
951
  end
935
952
  rescue ::GRPC::BadStatus => e
936
953
  raise ::Google::Cloud::Error.from_error(e)
@@ -1029,7 +1046,7 @@ module Google
1029
1046
  @artifact_registry_stub.call_rpc :import_apt_artifacts, request, options: options do |response, operation|
1030
1047
  response = ::Gapic::Operation.new response, @operations_client, options: options
1031
1048
  yield response, operation if block_given?
1032
- return response
1049
+ throw :response, response
1033
1050
  end
1034
1051
  rescue ::GRPC::BadStatus => e
1035
1052
  raise ::Google::Cloud::Error.from_error(e)
@@ -1128,7 +1145,7 @@ module Google
1128
1145
  @artifact_registry_stub.call_rpc :import_yum_artifacts, request, options: options do |response, operation|
1129
1146
  response = ::Gapic::Operation.new response, @operations_client, options: options
1130
1147
  yield response, operation if block_given?
1131
- return response
1148
+ throw :response, response
1132
1149
  end
1133
1150
  rescue ::GRPC::BadStatus => e
1134
1151
  raise ::Google::Cloud::Error.from_error(e)
@@ -1246,7 +1263,7 @@ module Google
1246
1263
  @artifact_registry_stub.call_rpc :list_repositories, request, options: options do |response, operation|
1247
1264
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_repositories, request, response, operation, options
1248
1265
  yield response, operation if block_given?
1249
- return response
1266
+ throw :response, response
1250
1267
  end
1251
1268
  rescue ::GRPC::BadStatus => e
1252
1269
  raise ::Google::Cloud::Error.from_error(e)
@@ -1332,7 +1349,6 @@ module Google
1332
1349
 
1333
1350
  @artifact_registry_stub.call_rpc :get_repository, request, options: options do |response, operation|
1334
1351
  yield response, operation if block_given?
1335
- return response
1336
1352
  end
1337
1353
  rescue ::GRPC::BadStatus => e
1338
1354
  raise ::Google::Cloud::Error.from_error(e)
@@ -1432,7 +1448,7 @@ module Google
1432
1448
  @artifact_registry_stub.call_rpc :create_repository, request, options: options do |response, operation|
1433
1449
  response = ::Gapic::Operation.new response, @operations_client, options: options
1434
1450
  yield response, operation if block_given?
1435
- return response
1451
+ throw :response, response
1436
1452
  end
1437
1453
  rescue ::GRPC::BadStatus => e
1438
1454
  raise ::Google::Cloud::Error.from_error(e)
@@ -1522,7 +1538,6 @@ module Google
1522
1538
 
1523
1539
  @artifact_registry_stub.call_rpc :update_repository, request, options: options do |response, operation|
1524
1540
  yield response, operation if block_given?
1525
- return response
1526
1541
  end
1527
1542
  rescue ::GRPC::BadStatus => e
1528
1543
  raise ::Google::Cloud::Error.from_error(e)
@@ -1618,7 +1633,7 @@ module Google
1618
1633
  @artifact_registry_stub.call_rpc :delete_repository, request, options: options do |response, operation|
1619
1634
  response = ::Gapic::Operation.new response, @operations_client, options: options
1620
1635
  yield response, operation if block_given?
1621
- return response
1636
+ throw :response, response
1622
1637
  end
1623
1638
  rescue ::GRPC::BadStatus => e
1624
1639
  raise ::Google::Cloud::Error.from_error(e)
@@ -1761,7 +1776,7 @@ module Google
1761
1776
  @artifact_registry_stub.call_rpc :list_packages, request, options: options do |response, operation|
1762
1777
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_packages, request, response, operation, options
1763
1778
  yield response, operation if block_given?
1764
- return response
1779
+ throw :response, response
1765
1780
  end
1766
1781
  rescue ::GRPC::BadStatus => e
1767
1782
  raise ::Google::Cloud::Error.from_error(e)
@@ -1847,7 +1862,6 @@ module Google
1847
1862
 
1848
1863
  @artifact_registry_stub.call_rpc :get_package, request, options: options do |response, operation|
1849
1864
  yield response, operation if block_given?
1850
- return response
1851
1865
  end
1852
1866
  rescue ::GRPC::BadStatus => e
1853
1867
  raise ::Google::Cloud::Error.from_error(e)
@@ -1942,7 +1956,7 @@ module Google
1942
1956
  @artifact_registry_stub.call_rpc :delete_package, request, options: options do |response, operation|
1943
1957
  response = ::Gapic::Operation.new response, @operations_client, options: options
1944
1958
  yield response, operation if block_given?
1945
- return response
1959
+ throw :response, response
1946
1960
  end
1947
1961
  rescue ::GRPC::BadStatus => e
1948
1962
  raise ::Google::Cloud::Error.from_error(e)
@@ -2087,7 +2101,7 @@ module Google
2087
2101
  @artifact_registry_stub.call_rpc :list_versions, request, options: options do |response, operation|
2088
2102
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_versions, request, response, operation, options
2089
2103
  yield response, operation if block_given?
2090
- return response
2104
+ throw :response, response
2091
2105
  end
2092
2106
  rescue ::GRPC::BadStatus => e
2093
2107
  raise ::Google::Cloud::Error.from_error(e)
@@ -2175,7 +2189,6 @@ module Google
2175
2189
 
2176
2190
  @artifact_registry_stub.call_rpc :get_version, request, options: options do |response, operation|
2177
2191
  yield response, operation if block_given?
2178
- return response
2179
2192
  end
2180
2193
  rescue ::GRPC::BadStatus => e
2181
2194
  raise ::Google::Cloud::Error.from_error(e)
@@ -2273,7 +2286,7 @@ module Google
2273
2286
  @artifact_registry_stub.call_rpc :delete_version, request, options: options do |response, operation|
2274
2287
  response = ::Gapic::Operation.new response, @operations_client, options: options
2275
2288
  yield response, operation if block_given?
2276
- return response
2289
+ throw :response, response
2277
2290
  end
2278
2291
  rescue ::GRPC::BadStatus => e
2279
2292
  raise ::Google::Cloud::Error.from_error(e)
@@ -2373,7 +2386,7 @@ module Google
2373
2386
  @artifact_registry_stub.call_rpc :batch_delete_versions, request, options: options do |response, operation|
2374
2387
  response = ::Gapic::Operation.new response, @operations_client, options: options
2375
2388
  yield response, operation if block_given?
2376
- return response
2389
+ throw :response, response
2377
2390
  end
2378
2391
  rescue ::GRPC::BadStatus => e
2379
2392
  raise ::Google::Cloud::Error.from_error(e)
@@ -2463,7 +2476,6 @@ module Google
2463
2476
 
2464
2477
  @artifact_registry_stub.call_rpc :update_version, request, options: options do |response, operation|
2465
2478
  yield response, operation if block_given?
2466
- return response
2467
2479
  end
2468
2480
  rescue ::GRPC::BadStatus => e
2469
2481
  raise ::Google::Cloud::Error.from_error(e)
@@ -2612,7 +2624,7 @@ module Google
2612
2624
  @artifact_registry_stub.call_rpc :list_files, request, options: options do |response, operation|
2613
2625
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_files, request, response, operation, options
2614
2626
  yield response, operation if block_given?
2615
- return response
2627
+ throw :response, response
2616
2628
  end
2617
2629
  rescue ::GRPC::BadStatus => e
2618
2630
  raise ::Google::Cloud::Error.from_error(e)
@@ -2698,7 +2710,6 @@ module Google
2698
2710
 
2699
2711
  @artifact_registry_stub.call_rpc :get_file, request, options: options do |response, operation|
2700
2712
  yield response, operation if block_given?
2701
- return response
2702
2713
  end
2703
2714
  rescue ::GRPC::BadStatus => e
2704
2715
  raise ::Google::Cloud::Error.from_error(e)
@@ -2794,7 +2805,7 @@ module Google
2794
2805
  @artifact_registry_stub.call_rpc :delete_file, request, options: options do |response, operation|
2795
2806
  response = ::Gapic::Operation.new response, @operations_client, options: options
2796
2807
  yield response, operation if block_given?
2797
- return response
2808
+ throw :response, response
2798
2809
  end
2799
2810
  rescue ::GRPC::BadStatus => e
2800
2811
  raise ::Google::Cloud::Error.from_error(e)
@@ -2884,7 +2895,6 @@ module Google
2884
2895
 
2885
2896
  @artifact_registry_stub.call_rpc :update_file, request, options: options do |response, operation|
2886
2897
  yield response, operation if block_given?
2887
- return response
2888
2898
  end
2889
2899
  rescue ::GRPC::BadStatus => e
2890
2900
  raise ::Google::Cloud::Error.from_error(e)
@@ -3009,7 +3019,7 @@ module Google
3009
3019
  @artifact_registry_stub.call_rpc :list_tags, request, options: options do |response, operation|
3010
3020
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_tags, request, response, operation, options
3011
3021
  yield response, operation if block_given?
3012
- return response
3022
+ throw :response, response
3013
3023
  end
3014
3024
  rescue ::GRPC::BadStatus => e
3015
3025
  raise ::Google::Cloud::Error.from_error(e)
@@ -3095,7 +3105,6 @@ module Google
3095
3105
 
3096
3106
  @artifact_registry_stub.call_rpc :get_tag, request, options: options do |response, operation|
3097
3107
  yield response, operation if block_given?
3098
- return response
3099
3108
  end
3100
3109
  rescue ::GRPC::BadStatus => e
3101
3110
  raise ::Google::Cloud::Error.from_error(e)
@@ -3185,7 +3194,6 @@ module Google
3185
3194
 
3186
3195
  @artifact_registry_stub.call_rpc :create_tag, request, options: options do |response, operation|
3187
3196
  yield response, operation if block_given?
3188
- return response
3189
3197
  end
3190
3198
  rescue ::GRPC::BadStatus => e
3191
3199
  raise ::Google::Cloud::Error.from_error(e)
@@ -3275,7 +3283,6 @@ module Google
3275
3283
 
3276
3284
  @artifact_registry_stub.call_rpc :update_tag, request, options: options do |response, operation|
3277
3285
  yield response, operation if block_given?
3278
- return response
3279
3286
  end
3280
3287
  rescue ::GRPC::BadStatus => e
3281
3288
  raise ::Google::Cloud::Error.from_error(e)
@@ -3361,7 +3368,6 @@ module Google
3361
3368
 
3362
3369
  @artifact_registry_stub.call_rpc :delete_tag, request, options: options do |response, operation|
3363
3370
  yield response, operation if block_given?
3364
- return response
3365
3371
  end
3366
3372
  rescue ::GRPC::BadStatus => e
3367
3373
  raise ::Google::Cloud::Error.from_error(e)
@@ -3451,7 +3457,6 @@ module Google
3451
3457
 
3452
3458
  @artifact_registry_stub.call_rpc :create_rule, request, options: options do |response, operation|
3453
3459
  yield response, operation if block_given?
3454
- return response
3455
3460
  end
3456
3461
  rescue ::GRPC::BadStatus => e
3457
3462
  raise ::Google::Cloud::Error.from_error(e)
@@ -3548,7 +3553,7 @@ module Google
3548
3553
  @artifact_registry_stub.call_rpc :list_rules, request, options: options do |response, operation|
3549
3554
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_rules, request, response, operation, options
3550
3555
  yield response, operation if block_given?
3551
- return response
3556
+ throw :response, response
3552
3557
  end
3553
3558
  rescue ::GRPC::BadStatus => e
3554
3559
  raise ::Google::Cloud::Error.from_error(e)
@@ -3634,7 +3639,6 @@ module Google
3634
3639
 
3635
3640
  @artifact_registry_stub.call_rpc :get_rule, request, options: options do |response, operation|
3636
3641
  yield response, operation if block_given?
3637
- return response
3638
3642
  end
3639
3643
  rescue ::GRPC::BadStatus => e
3640
3644
  raise ::Google::Cloud::Error.from_error(e)
@@ -3724,7 +3728,6 @@ module Google
3724
3728
 
3725
3729
  @artifact_registry_stub.call_rpc :update_rule, request, options: options do |response, operation|
3726
3730
  yield response, operation if block_given?
3727
- return response
3728
3731
  end
3729
3732
  rescue ::GRPC::BadStatus => e
3730
3733
  raise ::Google::Cloud::Error.from_error(e)
@@ -3810,7 +3813,6 @@ module Google
3810
3813
 
3811
3814
  @artifact_registry_stub.call_rpc :delete_rule, request, options: options do |response, operation|
3812
3815
  yield response, operation if block_given?
3813
- return response
3814
3816
  end
3815
3817
  rescue ::GRPC::BadStatus => e
3816
3818
  raise ::Google::Cloud::Error.from_error(e)
@@ -3908,7 +3910,6 @@ module Google
3908
3910
 
3909
3911
  @artifact_registry_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
3910
3912
  yield response, operation if block_given?
3911
- return response
3912
3913
  end
3913
3914
  rescue ::GRPC::BadStatus => e
3914
3915
  raise ::Google::Cloud::Error.from_error(e)
@@ -3998,7 +3999,6 @@ module Google
3998
3999
 
3999
4000
  @artifact_registry_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
4000
4001
  yield response, operation if block_given?
4001
- return response
4002
4002
  end
4003
4003
  rescue ::GRPC::BadStatus => e
4004
4004
  raise ::Google::Cloud::Error.from_error(e)
@@ -4090,7 +4090,6 @@ module Google
4090
4090
 
4091
4091
  @artifact_registry_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
4092
4092
  yield response, operation if block_given?
4093
- return response
4094
4093
  end
4095
4094
  rescue ::GRPC::BadStatus => e
4096
4095
  raise ::Google::Cloud::Error.from_error(e)
@@ -4176,7 +4175,6 @@ module Google
4176
4175
 
4177
4176
  @artifact_registry_stub.call_rpc :get_project_settings, request, options: options do |response, operation|
4178
4177
  yield response, operation if block_given?
4179
- return response
4180
4178
  end
4181
4179
  rescue ::GRPC::BadStatus => e
4182
4180
  raise ::Google::Cloud::Error.from_error(e)
@@ -4264,7 +4262,6 @@ module Google
4264
4262
 
4265
4263
  @artifact_registry_stub.call_rpc :update_project_settings, request, options: options do |response, operation|
4266
4264
  yield response, operation if block_given?
4267
- return response
4268
4265
  end
4269
4266
  rescue ::GRPC::BadStatus => e
4270
4267
  raise ::Google::Cloud::Error.from_error(e)
@@ -4350,7 +4347,6 @@ module Google
4350
4347
 
4351
4348
  @artifact_registry_stub.call_rpc :get_vpcsc_config, request, options: options do |response, operation|
4352
4349
  yield response, operation if block_given?
4353
- return response
4354
4350
  end
4355
4351
  rescue ::GRPC::BadStatus => e
4356
4352
  raise ::Google::Cloud::Error.from_error(e)
@@ -4438,7 +4434,6 @@ module Google
4438
4434
 
4439
4435
  @artifact_registry_stub.call_rpc :update_vpcsc_config, request, options: options do |response, operation|
4440
4436
  yield response, operation if block_given?
4441
- return response
4442
4437
  end
4443
4438
  rescue ::GRPC::BadStatus => e
4444
4439
  raise ::Google::Cloud::Error.from_error(e)
@@ -4528,7 +4523,6 @@ module Google
4528
4523
 
4529
4524
  @artifact_registry_stub.call_rpc :update_package, request, options: options do |response, operation|
4530
4525
  yield response, operation if block_given?
4531
- return response
4532
4526
  end
4533
4527
  rescue ::GRPC::BadStatus => e
4534
4528
  raise ::Google::Cloud::Error.from_error(e)
@@ -4630,7 +4624,7 @@ module Google
4630
4624
  @artifact_registry_stub.call_rpc :list_attachments, request, options: options do |response, operation|
4631
4625
  response = ::Gapic::PagedEnumerable.new @artifact_registry_stub, :list_attachments, request, response, operation, options
4632
4626
  yield response, operation if block_given?
4633
- return response
4627
+ throw :response, response
4634
4628
  end
4635
4629
  rescue ::GRPC::BadStatus => e
4636
4630
  raise ::Google::Cloud::Error.from_error(e)
@@ -4716,7 +4710,6 @@ module Google
4716
4710
 
4717
4711
  @artifact_registry_stub.call_rpc :get_attachment, request, options: options do |response, operation|
4718
4712
  yield response, operation if block_given?
4719
- return response
4720
4713
  end
4721
4714
  rescue ::GRPC::BadStatus => e
4722
4715
  raise ::Google::Cloud::Error.from_error(e)
@@ -4816,7 +4809,7 @@ module Google
4816
4809
  @artifact_registry_stub.call_rpc :create_attachment, request, options: options do |response, operation|
4817
4810
  response = ::Gapic::Operation.new response, @operations_client, options: options
4818
4811
  yield response, operation if block_given?
4819
- return response
4812
+ throw :response, response
4820
4813
  end
4821
4814
  rescue ::GRPC::BadStatus => e
4822
4815
  raise ::Google::Cloud::Error.from_error(e)
@@ -4912,7 +4905,7 @@ module Google
4912
4905
  @artifact_registry_stub.call_rpc :delete_attachment, request, options: options do |response, operation|
4913
4906
  response = ::Gapic::Operation.new response, @operations_client, options: options
4914
4907
  yield response, operation if block_given?
4915
- return response
4908
+ throw :response, response
4916
4909
  end
4917
4910
  rescue ::GRPC::BadStatus => e
4918
4911
  raise ::Google::Cloud::Error.from_error(e)
@@ -5001,6 +4994,11 @@ module Google
5001
4994
  # default endpoint URL. The default value of nil uses the environment
5002
4995
  # universe (usually the default "googleapis.com" universe).
5003
4996
  # @return [::String,nil]
4997
+ # @!attribute [rw] logger
4998
+ # A custom logger to use for request/response debug logging, or the value
4999
+ # `:default` (the default) to construct a default logger, or `nil` to
5000
+ # explicitly disable logging.
5001
+ # @return [::Logger,:default,nil]
5004
5002
  #
5005
5003
  class Configuration
5006
5004
  extend ::Gapic::Config
@@ -5025,6 +5023,7 @@ module Google
5025
5023
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
5026
5024
  config_attr :quota_project, nil, ::String, nil
5027
5025
  config_attr :universe_domain, nil, ::String, nil
5026
+ config_attr :logger, :default, ::Logger, nil, :default
5028
5027
 
5029
5028
  # @private
5030
5029
  def initialize parent_config = nil
@@ -213,7 +213,7 @@ module Google
213
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
214
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
215
215
  yield response, operation if block_given?
216
- return response
216
+ throw :response, response
217
217
  end
218
218
  rescue ::GRPC::BadStatus => e
219
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -309,7 +309,7 @@ module Google
309
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
310
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
311
311
  yield response, operation if block_given?
312
- return response
312
+ throw :response, response
313
313
  end
314
314
  rescue ::GRPC::BadStatus => e
315
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -398,7 +398,6 @@ module Google
398
398
 
399
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
400
400
  yield response, operation if block_given?
401
- return response
402
401
  end
403
402
  rescue ::GRPC::BadStatus => e
404
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -494,7 +493,6 @@ module Google
494
493
 
495
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
496
495
  yield response, operation if block_given?
497
- return response
498
496
  end
499
497
  rescue ::GRPC::BadStatus => e
500
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -592,7 +590,7 @@ module Google
592
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
593
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
594
592
  yield response, operation if block_given?
595
- return response
593
+ throw :response, response
596
594
  end
597
595
  rescue ::GRPC::BadStatus => e
598
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -681,6 +679,11 @@ module Google
681
679
  # default endpoint URL. The default value of nil uses the environment
682
680
  # universe (usually the default "googleapis.com" universe).
683
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
684
687
  #
685
688
  class Configuration
686
689
  extend ::Gapic::Config
@@ -705,6 +708,7 @@ module Google
705
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
706
709
  config_attr :quota_project, nil, ::String, nil
707
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
708
712
 
709
713
  # @private
710
714
  def initialize parent_config = nil