google-cloud-netapp-v1 1.3.0 → 1.4.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: 9d51ad5a5073ec55c819ae6f8d51ff19cc468bbda8f7e4551c32e366b49ddb72
4
- data.tar.gz: 67d1bfbd932903ccecc32c58e53395d1deec8f1d8d444fe51da53fe6d6323589
3
+ metadata.gz: 17df7af3057565b4eb0bb2e32ffb301d3ad02998815c20659a8475218ce0549c
4
+ data.tar.gz: dd8be4b18bae825c029fff7a00e44a446e4f5a023ba41dc6029558911acfd7ea
5
5
  SHA512:
6
- metadata.gz: 3c8ceac27307c5e1140f8406540113a7d348556f203a8e00dc8896726c8a3ab85285603fca838df99d4ab8e31a87ec90dccc10495d69d84294dec36bbf192f96
7
- data.tar.gz: 01b2a8fb5289857a60fc100c38e606f136779ef7c7184cf05b7fd1a4df3977d5365154da07b419f8b0db2e557fd24c598ab274395226c7af9b4dc6fb32ff38d4
6
+ metadata.gz: effcd9c15a9577c86e645cc7df3d7eefac266dcf73cebb8523c48eb52cc3eefb81d1e3f3cccf9ffb1cd8b59f137af408b1264dfc4f1b0b3ac067f8a6b99844de
7
+ data.tar.gz: 75aa7bfab9c99b2a65cce9b5e00c82555622fa23feb456c5dd30e2b4045d26ec13974e9935e651193a3ad727a3f42fe001c25945e4ffece4beaf5b965b384fe1
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/netapp/volumes/docs/discover/overview)
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/netapp/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::NetApp::V1::NetApp::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).
@@ -321,14 +321,26 @@ module Google
321
321
  universe_domain: @config.universe_domain,
322
322
  channel_args: @config.channel_args,
323
323
  interceptors: @config.interceptors,
324
- channel_pool_config: @config.channel_pool
324
+ channel_pool_config: @config.channel_pool,
325
+ logger: @config.logger
325
326
  )
326
327
 
328
+ @net_app_stub.stub_logger&.info do |entry|
329
+ entry.set_system_name
330
+ entry.set_service
331
+ entry.message = "Created client for #{entry.service}"
332
+ entry.set_credentials_fields credentials
333
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
334
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
335
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
336
+ end
337
+
327
338
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
328
339
  config.credentials = credentials
329
340
  config.quota_project = @quota_project_id
330
341
  config.endpoint = @net_app_stub.endpoint
331
342
  config.universe_domain = @net_app_stub.universe_domain
343
+ config.logger = @net_app_stub.logger if config.respond_to? :logger=
332
344
  end
333
345
  end
334
346
 
@@ -346,6 +358,15 @@ module Google
346
358
  #
347
359
  attr_reader :location_client
348
360
 
361
+ ##
362
+ # The logger used for request/response debug logging.
363
+ #
364
+ # @return [Logger]
365
+ #
366
+ def logger
367
+ @net_app_stub.logger
368
+ end
369
+
349
370
  # Service calls
350
371
 
351
372
  ##
@@ -443,7 +464,7 @@ module Google
443
464
  @net_app_stub.call_rpc :list_storage_pools, request, options: options do |response, operation|
444
465
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_storage_pools, request, response, operation, options
445
466
  yield response, operation if block_given?
446
- return response
467
+ throw :response, response
447
468
  end
448
469
  rescue ::GRPC::BadStatus => e
449
470
  raise ::Google::Cloud::Error.from_error(e)
@@ -544,7 +565,7 @@ module Google
544
565
  @net_app_stub.call_rpc :create_storage_pool, request, options: options do |response, operation|
545
566
  response = ::Gapic::Operation.new response, @operations_client, options: options
546
567
  yield response, operation if block_given?
547
- return response
568
+ throw :response, response
548
569
  end
549
570
  rescue ::GRPC::BadStatus => e
550
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -630,7 +651,6 @@ module Google
630
651
 
631
652
  @net_app_stub.call_rpc :get_storage_pool, request, options: options do |response, operation|
632
653
  yield response, operation if block_given?
633
- return response
634
654
  end
635
655
  rescue ::GRPC::BadStatus => e
636
656
  raise ::Google::Cloud::Error.from_error(e)
@@ -730,7 +750,7 @@ module Google
730
750
  @net_app_stub.call_rpc :update_storage_pool, request, options: options do |response, operation|
731
751
  response = ::Gapic::Operation.new response, @operations_client, options: options
732
752
  yield response, operation if block_given?
733
- return response
753
+ throw :response, response
734
754
  end
735
755
  rescue ::GRPC::BadStatus => e
736
756
  raise ::Google::Cloud::Error.from_error(e)
@@ -824,7 +844,7 @@ module Google
824
844
  @net_app_stub.call_rpc :delete_storage_pool, request, options: options do |response, operation|
825
845
  response = ::Gapic::Operation.new response, @operations_client, options: options
826
846
  yield response, operation if block_given?
827
- return response
847
+ throw :response, response
828
848
  end
829
849
  rescue ::GRPC::BadStatus => e
830
850
  raise ::Google::Cloud::Error.from_error(e)
@@ -919,7 +939,7 @@ module Google
919
939
  @net_app_stub.call_rpc :switch_active_replica_zone, request, options: options do |response, operation|
920
940
  response = ::Gapic::Operation.new response, @operations_client, options: options
921
941
  yield response, operation if block_given?
922
- return response
942
+ throw :response, response
923
943
  end
924
944
  rescue ::GRPC::BadStatus => e
925
945
  raise ::Google::Cloud::Error.from_error(e)
@@ -1019,7 +1039,7 @@ module Google
1019
1039
  @net_app_stub.call_rpc :list_volumes, request, options: options do |response, operation|
1020
1040
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_volumes, request, response, operation, options
1021
1041
  yield response, operation if block_given?
1022
- return response
1042
+ throw :response, response
1023
1043
  end
1024
1044
  rescue ::GRPC::BadStatus => e
1025
1045
  raise ::Google::Cloud::Error.from_error(e)
@@ -1105,7 +1125,6 @@ module Google
1105
1125
 
1106
1126
  @net_app_stub.call_rpc :get_volume, request, options: options do |response, operation|
1107
1127
  yield response, operation if block_given?
1108
- return response
1109
1128
  end
1110
1129
  rescue ::GRPC::BadStatus => e
1111
1130
  raise ::Google::Cloud::Error.from_error(e)
@@ -1206,7 +1225,7 @@ module Google
1206
1225
  @net_app_stub.call_rpc :create_volume, request, options: options do |response, operation|
1207
1226
  response = ::Gapic::Operation.new response, @operations_client, options: options
1208
1227
  yield response, operation if block_given?
1209
- return response
1228
+ throw :response, response
1210
1229
  end
1211
1230
  rescue ::GRPC::BadStatus => e
1212
1231
  raise ::Google::Cloud::Error.from_error(e)
@@ -1306,7 +1325,7 @@ module Google
1306
1325
  @net_app_stub.call_rpc :update_volume, request, options: options do |response, operation|
1307
1326
  response = ::Gapic::Operation.new response, @operations_client, options: options
1308
1327
  yield response, operation if block_given?
1309
- return response
1328
+ throw :response, response
1310
1329
  end
1311
1330
  rescue ::GRPC::BadStatus => e
1312
1331
  raise ::Google::Cloud::Error.from_error(e)
@@ -1404,7 +1423,7 @@ module Google
1404
1423
  @net_app_stub.call_rpc :delete_volume, request, options: options do |response, operation|
1405
1424
  response = ::Gapic::Operation.new response, @operations_client, options: options
1406
1425
  yield response, operation if block_given?
1407
- return response
1426
+ throw :response, response
1408
1427
  end
1409
1428
  rescue ::GRPC::BadStatus => e
1410
1429
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1524,7 @@ module Google
1505
1524
  @net_app_stub.call_rpc :revert_volume, request, options: options do |response, operation|
1506
1525
  response = ::Gapic::Operation.new response, @operations_client, options: options
1507
1526
  yield response, operation if block_given?
1508
- return response
1527
+ throw :response, response
1509
1528
  end
1510
1529
  rescue ::GRPC::BadStatus => e
1511
1530
  raise ::Google::Cloud::Error.from_error(e)
@@ -1607,7 +1626,7 @@ module Google
1607
1626
  @net_app_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
1608
1627
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_snapshots, request, response, operation, options
1609
1628
  yield response, operation if block_given?
1610
- return response
1629
+ throw :response, response
1611
1630
  end
1612
1631
  rescue ::GRPC::BadStatus => e
1613
1632
  raise ::Google::Cloud::Error.from_error(e)
@@ -1694,7 +1713,6 @@ module Google
1694
1713
 
1695
1714
  @net_app_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
1696
1715
  yield response, operation if block_given?
1697
- return response
1698
1716
  end
1699
1717
  rescue ::GRPC::BadStatus => e
1700
1718
  raise ::Google::Cloud::Error.from_error(e)
@@ -1796,7 +1814,7 @@ module Google
1796
1814
  @net_app_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
1797
1815
  response = ::Gapic::Operation.new response, @operations_client, options: options
1798
1816
  yield response, operation if block_given?
1799
- return response
1817
+ throw :response, response
1800
1818
  end
1801
1819
  rescue ::GRPC::BadStatus => e
1802
1820
  raise ::Google::Cloud::Error.from_error(e)
@@ -1891,7 +1909,7 @@ module Google
1891
1909
  @net_app_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
1892
1910
  response = ::Gapic::Operation.new response, @operations_client, options: options
1893
1911
  yield response, operation if block_given?
1894
- return response
1912
+ throw :response, response
1895
1913
  end
1896
1914
  rescue ::GRPC::BadStatus => e
1897
1915
  raise ::Google::Cloud::Error.from_error(e)
@@ -1988,7 +2006,7 @@ module Google
1988
2006
  @net_app_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
1989
2007
  response = ::Gapic::Operation.new response, @operations_client, options: options
1990
2008
  yield response, operation if block_given?
1991
- return response
2009
+ throw :response, response
1992
2010
  end
1993
2011
  rescue ::GRPC::BadStatus => e
1994
2012
  raise ::Google::Cloud::Error.from_error(e)
@@ -2088,7 +2106,7 @@ module Google
2088
2106
  @net_app_stub.call_rpc :list_active_directories, request, options: options do |response, operation|
2089
2107
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_active_directories, request, response, operation, options
2090
2108
  yield response, operation if block_given?
2091
- return response
2109
+ throw :response, response
2092
2110
  end
2093
2111
  rescue ::GRPC::BadStatus => e
2094
2112
  raise ::Google::Cloud::Error.from_error(e)
@@ -2174,7 +2192,6 @@ module Google
2174
2192
 
2175
2193
  @net_app_stub.call_rpc :get_active_directory, request, options: options do |response, operation|
2176
2194
  yield response, operation if block_given?
2177
- return response
2178
2195
  end
2179
2196
  rescue ::GRPC::BadStatus => e
2180
2197
  raise ::Google::Cloud::Error.from_error(e)
@@ -2276,7 +2293,7 @@ module Google
2276
2293
  @net_app_stub.call_rpc :create_active_directory, request, options: options do |response, operation|
2277
2294
  response = ::Gapic::Operation.new response, @operations_client, options: options
2278
2295
  yield response, operation if block_given?
2279
- return response
2296
+ throw :response, response
2280
2297
  end
2281
2298
  rescue ::GRPC::BadStatus => e
2282
2299
  raise ::Google::Cloud::Error.from_error(e)
@@ -2376,7 +2393,7 @@ module Google
2376
2393
  @net_app_stub.call_rpc :update_active_directory, request, options: options do |response, operation|
2377
2394
  response = ::Gapic::Operation.new response, @operations_client, options: options
2378
2395
  yield response, operation if block_given?
2379
- return response
2396
+ throw :response, response
2380
2397
  end
2381
2398
  rescue ::GRPC::BadStatus => e
2382
2399
  raise ::Google::Cloud::Error.from_error(e)
@@ -2470,7 +2487,7 @@ module Google
2470
2487
  @net_app_stub.call_rpc :delete_active_directory, request, options: options do |response, operation|
2471
2488
  response = ::Gapic::Operation.new response, @operations_client, options: options
2472
2489
  yield response, operation if block_given?
2473
- return response
2490
+ throw :response, response
2474
2491
  end
2475
2492
  rescue ::GRPC::BadStatus => e
2476
2493
  raise ::Google::Cloud::Error.from_error(e)
@@ -2570,7 +2587,7 @@ module Google
2570
2587
  @net_app_stub.call_rpc :list_kms_configs, request, options: options do |response, operation|
2571
2588
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_kms_configs, request, response, operation, options
2572
2589
  yield response, operation if block_given?
2573
- return response
2590
+ throw :response, response
2574
2591
  end
2575
2592
  rescue ::GRPC::BadStatus => e
2576
2593
  raise ::Google::Cloud::Error.from_error(e)
@@ -2671,7 +2688,7 @@ module Google
2671
2688
  @net_app_stub.call_rpc :create_kms_config, request, options: options do |response, operation|
2672
2689
  response = ::Gapic::Operation.new response, @operations_client, options: options
2673
2690
  yield response, operation if block_given?
2674
- return response
2691
+ throw :response, response
2675
2692
  end
2676
2693
  rescue ::GRPC::BadStatus => e
2677
2694
  raise ::Google::Cloud::Error.from_error(e)
@@ -2757,7 +2774,6 @@ module Google
2757
2774
 
2758
2775
  @net_app_stub.call_rpc :get_kms_config, request, options: options do |response, operation|
2759
2776
  yield response, operation if block_given?
2760
- return response
2761
2777
  end
2762
2778
  rescue ::GRPC::BadStatus => e
2763
2779
  raise ::Google::Cloud::Error.from_error(e)
@@ -2857,7 +2873,7 @@ module Google
2857
2873
  @net_app_stub.call_rpc :update_kms_config, request, options: options do |response, operation|
2858
2874
  response = ::Gapic::Operation.new response, @operations_client, options: options
2859
2875
  yield response, operation if block_given?
2860
- return response
2876
+ throw :response, response
2861
2877
  end
2862
2878
  rescue ::GRPC::BadStatus => e
2863
2879
  raise ::Google::Cloud::Error.from_error(e)
@@ -2952,7 +2968,7 @@ module Google
2952
2968
  @net_app_stub.call_rpc :encrypt_volumes, request, options: options do |response, operation|
2953
2969
  response = ::Gapic::Operation.new response, @operations_client, options: options
2954
2970
  yield response, operation if block_given?
2955
- return response
2971
+ throw :response, response
2956
2972
  end
2957
2973
  rescue ::GRPC::BadStatus => e
2958
2974
  raise ::Google::Cloud::Error.from_error(e)
@@ -3038,7 +3054,6 @@ module Google
3038
3054
 
3039
3055
  @net_app_stub.call_rpc :verify_kms_config, request, options: options do |response, operation|
3040
3056
  yield response, operation if block_given?
3041
- return response
3042
3057
  end
3043
3058
  rescue ::GRPC::BadStatus => e
3044
3059
  raise ::Google::Cloud::Error.from_error(e)
@@ -3132,7 +3147,7 @@ module Google
3132
3147
  @net_app_stub.call_rpc :delete_kms_config, request, options: options do |response, operation|
3133
3148
  response = ::Gapic::Operation.new response, @operations_client, options: options
3134
3149
  yield response, operation if block_given?
3135
- return response
3150
+ throw :response, response
3136
3151
  end
3137
3152
  rescue ::GRPC::BadStatus => e
3138
3153
  raise ::Google::Cloud::Error.from_error(e)
@@ -3234,7 +3249,7 @@ module Google
3234
3249
  @net_app_stub.call_rpc :list_replications, request, options: options do |response, operation|
3235
3250
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_replications, request, response, operation, options
3236
3251
  yield response, operation if block_given?
3237
- return response
3252
+ throw :response, response
3238
3253
  end
3239
3254
  rescue ::GRPC::BadStatus => e
3240
3255
  raise ::Google::Cloud::Error.from_error(e)
@@ -3321,7 +3336,6 @@ module Google
3321
3336
 
3322
3337
  @net_app_stub.call_rpc :get_replication, request, options: options do |response, operation|
3323
3338
  yield response, operation if block_given?
3324
- return response
3325
3339
  end
3326
3340
  rescue ::GRPC::BadStatus => e
3327
3341
  raise ::Google::Cloud::Error.from_error(e)
@@ -3423,7 +3437,7 @@ module Google
3423
3437
  @net_app_stub.call_rpc :create_replication, request, options: options do |response, operation|
3424
3438
  response = ::Gapic::Operation.new response, @operations_client, options: options
3425
3439
  yield response, operation if block_given?
3426
- return response
3440
+ throw :response, response
3427
3441
  end
3428
3442
  rescue ::GRPC::BadStatus => e
3429
3443
  raise ::Google::Cloud::Error.from_error(e)
@@ -3518,7 +3532,7 @@ module Google
3518
3532
  @net_app_stub.call_rpc :delete_replication, request, options: options do |response, operation|
3519
3533
  response = ::Gapic::Operation.new response, @operations_client, options: options
3520
3534
  yield response, operation if block_given?
3521
- return response
3535
+ throw :response, response
3522
3536
  end
3523
3537
  rescue ::GRPC::BadStatus => e
3524
3538
  raise ::Google::Cloud::Error.from_error(e)
@@ -3615,7 +3629,7 @@ module Google
3615
3629
  @net_app_stub.call_rpc :update_replication, request, options: options do |response, operation|
3616
3630
  response = ::Gapic::Operation.new response, @operations_client, options: options
3617
3631
  yield response, operation if block_given?
3618
- return response
3632
+ throw :response, response
3619
3633
  end
3620
3634
  rescue ::GRPC::BadStatus => e
3621
3635
  raise ::Google::Cloud::Error.from_error(e)
@@ -3717,7 +3731,7 @@ module Google
3717
3731
  @net_app_stub.call_rpc :stop_replication, request, options: options do |response, operation|
3718
3732
  response = ::Gapic::Operation.new response, @operations_client, options: options
3719
3733
  yield response, operation if block_given?
3720
- return response
3734
+ throw :response, response
3721
3735
  end
3722
3736
  rescue ::GRPC::BadStatus => e
3723
3737
  raise ::Google::Cloud::Error.from_error(e)
@@ -3812,7 +3826,7 @@ module Google
3812
3826
  @net_app_stub.call_rpc :resume_replication, request, options: options do |response, operation|
3813
3827
  response = ::Gapic::Operation.new response, @operations_client, options: options
3814
3828
  yield response, operation if block_given?
3815
- return response
3829
+ throw :response, response
3816
3830
  end
3817
3831
  rescue ::GRPC::BadStatus => e
3818
3832
  raise ::Google::Cloud::Error.from_error(e)
@@ -3908,7 +3922,7 @@ module Google
3908
3922
  @net_app_stub.call_rpc :reverse_replication_direction, request, options: options do |response, operation|
3909
3923
  response = ::Gapic::Operation.new response, @operations_client, options: options
3910
3924
  yield response, operation if block_given?
3911
- return response
3925
+ throw :response, response
3912
3926
  end
3913
3927
  rescue ::GRPC::BadStatus => e
3914
3928
  raise ::Google::Cloud::Error.from_error(e)
@@ -4014,7 +4028,7 @@ module Google
4014
4028
  @net_app_stub.call_rpc :establish_peering, request, options: options do |response, operation|
4015
4029
  response = ::Gapic::Operation.new response, @operations_client, options: options
4016
4030
  yield response, operation if block_given?
4017
- return response
4031
+ throw :response, response
4018
4032
  end
4019
4033
  rescue ::GRPC::BadStatus => e
4020
4034
  raise ::Google::Cloud::Error.from_error(e)
@@ -4110,7 +4124,7 @@ module Google
4110
4124
  @net_app_stub.call_rpc :sync_replication, request, options: options do |response, operation|
4111
4125
  response = ::Gapic::Operation.new response, @operations_client, options: options
4112
4126
  yield response, operation if block_given?
4113
- return response
4127
+ throw :response, response
4114
4128
  end
4115
4129
  rescue ::GRPC::BadStatus => e
4116
4130
  raise ::Google::Cloud::Error.from_error(e)
@@ -4213,7 +4227,7 @@ module Google
4213
4227
  @net_app_stub.call_rpc :create_backup_vault, request, options: options do |response, operation|
4214
4228
  response = ::Gapic::Operation.new response, @operations_client, options: options
4215
4229
  yield response, operation if block_given?
4216
- return response
4230
+ throw :response, response
4217
4231
  end
4218
4232
  rescue ::GRPC::BadStatus => e
4219
4233
  raise ::Google::Cloud::Error.from_error(e)
@@ -4300,7 +4314,6 @@ module Google
4300
4314
 
4301
4315
  @net_app_stub.call_rpc :get_backup_vault, request, options: options do |response, operation|
4302
4316
  yield response, operation if block_given?
4303
- return response
4304
4317
  end
4305
4318
  rescue ::GRPC::BadStatus => e
4306
4319
  raise ::Google::Cloud::Error.from_error(e)
@@ -4402,7 +4415,7 @@ module Google
4402
4415
  @net_app_stub.call_rpc :list_backup_vaults, request, options: options do |response, operation|
4403
4416
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_vaults, request, response, operation, options
4404
4417
  yield response, operation if block_given?
4405
- return response
4418
+ throw :response, response
4406
4419
  end
4407
4420
  rescue ::GRPC::BadStatus => e
4408
4421
  raise ::Google::Cloud::Error.from_error(e)
@@ -4502,7 +4515,7 @@ module Google
4502
4515
  @net_app_stub.call_rpc :update_backup_vault, request, options: options do |response, operation|
4503
4516
  response = ::Gapic::Operation.new response, @operations_client, options: options
4504
4517
  yield response, operation if block_given?
4505
- return response
4518
+ throw :response, response
4506
4519
  end
4507
4520
  rescue ::GRPC::BadStatus => e
4508
4521
  raise ::Google::Cloud::Error.from_error(e)
@@ -4597,7 +4610,7 @@ module Google
4597
4610
  @net_app_stub.call_rpc :delete_backup_vault, request, options: options do |response, operation|
4598
4611
  response = ::Gapic::Operation.new response, @operations_client, options: options
4599
4612
  yield response, operation if block_given?
4600
- return response
4613
+ throw :response, response
4601
4614
  end
4602
4615
  rescue ::GRPC::BadStatus => e
4603
4616
  raise ::Google::Cloud::Error.from_error(e)
@@ -4703,7 +4716,7 @@ module Google
4703
4716
  @net_app_stub.call_rpc :create_backup, request, options: options do |response, operation|
4704
4717
  response = ::Gapic::Operation.new response, @operations_client, options: options
4705
4718
  yield response, operation if block_given?
4706
- return response
4719
+ throw :response, response
4707
4720
  end
4708
4721
  rescue ::GRPC::BadStatus => e
4709
4722
  raise ::Google::Cloud::Error.from_error(e)
@@ -4790,7 +4803,6 @@ module Google
4790
4803
 
4791
4804
  @net_app_stub.call_rpc :get_backup, request, options: options do |response, operation|
4792
4805
  yield response, operation if block_given?
4793
- return response
4794
4806
  end
4795
4807
  rescue ::GRPC::BadStatus => e
4796
4808
  raise ::Google::Cloud::Error.from_error(e)
@@ -4903,7 +4915,7 @@ module Google
4903
4915
  @net_app_stub.call_rpc :list_backups, request, options: options do |response, operation|
4904
4916
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backups, request, response, operation, options
4905
4917
  yield response, operation if block_given?
4906
- return response
4918
+ throw :response, response
4907
4919
  end
4908
4920
  rescue ::GRPC::BadStatus => e
4909
4921
  raise ::Google::Cloud::Error.from_error(e)
@@ -4998,7 +5010,7 @@ module Google
4998
5010
  @net_app_stub.call_rpc :delete_backup, request, options: options do |response, operation|
4999
5011
  response = ::Gapic::Operation.new response, @operations_client, options: options
5000
5012
  yield response, operation if block_given?
5001
- return response
5013
+ throw :response, response
5002
5014
  end
5003
5015
  rescue ::GRPC::BadStatus => e
5004
5016
  raise ::Google::Cloud::Error.from_error(e)
@@ -5098,7 +5110,7 @@ module Google
5098
5110
  @net_app_stub.call_rpc :update_backup, request, options: options do |response, operation|
5099
5111
  response = ::Gapic::Operation.new response, @operations_client, options: options
5100
5112
  yield response, operation if block_given?
5101
- return response
5113
+ throw :response, response
5102
5114
  end
5103
5115
  rescue ::GRPC::BadStatus => e
5104
5116
  raise ::Google::Cloud::Error.from_error(e)
@@ -5201,7 +5213,7 @@ module Google
5201
5213
  @net_app_stub.call_rpc :create_backup_policy, request, options: options do |response, operation|
5202
5214
  response = ::Gapic::Operation.new response, @operations_client, options: options
5203
5215
  yield response, operation if block_given?
5204
- return response
5216
+ throw :response, response
5205
5217
  end
5206
5218
  rescue ::GRPC::BadStatus => e
5207
5219
  raise ::Google::Cloud::Error.from_error(e)
@@ -5288,7 +5300,6 @@ module Google
5288
5300
 
5289
5301
  @net_app_stub.call_rpc :get_backup_policy, request, options: options do |response, operation|
5290
5302
  yield response, operation if block_given?
5291
- return response
5292
5303
  end
5293
5304
  rescue ::GRPC::BadStatus => e
5294
5305
  raise ::Google::Cloud::Error.from_error(e)
@@ -5388,7 +5399,7 @@ module Google
5388
5399
  @net_app_stub.call_rpc :list_backup_policies, request, options: options do |response, operation|
5389
5400
  response = ::Gapic::PagedEnumerable.new @net_app_stub, :list_backup_policies, request, response, operation, options
5390
5401
  yield response, operation if block_given?
5391
- return response
5402
+ throw :response, response
5392
5403
  end
5393
5404
  rescue ::GRPC::BadStatus => e
5394
5405
  raise ::Google::Cloud::Error.from_error(e)
@@ -5488,7 +5499,7 @@ module Google
5488
5499
  @net_app_stub.call_rpc :update_backup_policy, request, options: options do |response, operation|
5489
5500
  response = ::Gapic::Operation.new response, @operations_client, options: options
5490
5501
  yield response, operation if block_given?
5491
- return response
5502
+ throw :response, response
5492
5503
  end
5493
5504
  rescue ::GRPC::BadStatus => e
5494
5505
  raise ::Google::Cloud::Error.from_error(e)
@@ -5583,7 +5594,7 @@ module Google
5583
5594
  @net_app_stub.call_rpc :delete_backup_policy, request, options: options do |response, operation|
5584
5595
  response = ::Gapic::Operation.new response, @operations_client, options: options
5585
5596
  yield response, operation if block_given?
5586
- return response
5597
+ throw :response, response
5587
5598
  end
5588
5599
  rescue ::GRPC::BadStatus => e
5589
5600
  raise ::Google::Cloud::Error.from_error(e)
@@ -5672,6 +5683,11 @@ module Google
5672
5683
  # default endpoint URL. The default value of nil uses the environment
5673
5684
  # universe (usually the default "googleapis.com" universe).
5674
5685
  # @return [::String,nil]
5686
+ # @!attribute [rw] logger
5687
+ # A custom logger to use for request/response debug logging, or the value
5688
+ # `:default` (the default) to construct a default logger, or `nil` to
5689
+ # explicitly disable logging.
5690
+ # @return [::Logger,:default,nil]
5675
5691
  #
5676
5692
  class Configuration
5677
5693
  extend ::Gapic::Config
@@ -5696,6 +5712,7 @@ module Google
5696
5712
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
5697
5713
  config_attr :quota_project, nil, ::String, nil
5698
5714
  config_attr :universe_domain, nil, ::String, nil
5715
+ config_attr :logger, :default, ::Logger, nil, :default
5699
5716
 
5700
5717
  # @private
5701
5718
  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