google-cloud-gdc_hardware_management-v1alpha 0.4.0 → 0.5.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: b3ab4a50763a639adb89f313f9d72ba9973b43858ad4d21b5581883d8e55f7a3
4
- data.tar.gz: 8bc9652ce6c06429134d0e2c3f914aec9b4aaba8b9ff3228ea117f702fca7453
3
+ metadata.gz: f3e0db5b4d1bcbd5c8abb0faa5e2bb23afc0bc4917ea0eb1e48ec495338a0ec6
4
+ data.tar.gz: 6e850a6415222d76905ca548c8461da13a0fbdb5c52f5a870f7e0e02f306e11b
5
5
  SHA512:
6
- metadata.gz: 7886e557a2535ddf16d481156c6a511d327409efa3472bae5e8c23a6e51817d314bb69d545d998907421d71bb6dd5dab585bd247af91f5b17a7232b3709e0a28
7
- data.tar.gz: 5f4cb6b7545b6a8e05ee05f696de1cfbd28c53c19280d91a93a66849a33f059f1c12535ebd1d1378d9fde4794c76addbe1b6e8d534dca11f52c9f566c013bad2
6
+ metadata.gz: 30cbfdc05b55d202050343c4b0ea60c03fb8fb78bfbe78e9e1f67fecc5a55c8aae3de707d7a9e22a253121e6c9d825c27993bfd5f040335ac56dab037325c874
7
+ data.tar.gz: 551e88510374992d67af83c4dc6301d1a5be71023d5968211f4311f67b3ed2484e5900cf5a68faa2966dc549a61ec1e013b8f7b0da46275bc2abcbb1151e3cf7
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs)
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/gdc_hardware_management/v1alpha"
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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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).
@@ -312,14 +312,26 @@ module Google
312
312
  universe_domain: @config.universe_domain,
313
313
  channel_args: @config.channel_args,
314
314
  interceptors: @config.interceptors,
315
- channel_pool_config: @config.channel_pool
315
+ channel_pool_config: @config.channel_pool,
316
+ logger: @config.logger
316
317
  )
317
318
 
319
+ @gdc_hardware_management_stub.stub_logger&.info do |entry|
320
+ entry.set_system_name
321
+ entry.set_service
322
+ entry.message = "Created client for #{entry.service}"
323
+ entry.set_credentials_fields credentials
324
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
325
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
326
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
327
+ end
328
+
318
329
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
319
330
  config.credentials = credentials
320
331
  config.quota_project = @quota_project_id
321
332
  config.endpoint = @gdc_hardware_management_stub.endpoint
322
333
  config.universe_domain = @gdc_hardware_management_stub.universe_domain
334
+ config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger=
323
335
  end
324
336
  end
325
337
 
@@ -337,6 +349,15 @@ module Google
337
349
  #
338
350
  attr_reader :location_client
339
351
 
352
+ ##
353
+ # The logger used for request/response debug logging.
354
+ #
355
+ # @return [Logger]
356
+ #
357
+ def logger
358
+ @gdc_hardware_management_stub.logger
359
+ end
360
+
340
361
  # Service calls
341
362
 
342
363
  ##
@@ -438,7 +459,7 @@ module Google
438
459
  @gdc_hardware_management_stub.call_rpc :list_orders, request, options: options do |response, operation|
439
460
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, request, response, operation, options
440
461
  yield response, operation if block_given?
441
- return response
462
+ throw :response, response
442
463
  end
443
464
  rescue ::GRPC::BadStatus => e
444
465
  raise ::Google::Cloud::Error.from_error(e)
@@ -524,7 +545,6 @@ module Google
524
545
 
525
546
  @gdc_hardware_management_stub.call_rpc :get_order, request, options: options do |response, operation|
526
547
  yield response, operation if block_given?
527
- return response
528
548
  end
529
549
  rescue ::GRPC::BadStatus => e
530
550
  raise ::Google::Cloud::Error.from_error(e)
@@ -633,7 +653,7 @@ module Google
633
653
  @gdc_hardware_management_stub.call_rpc :create_order, request, options: options do |response, operation|
634
654
  response = ::Gapic::Operation.new response, @operations_client, options: options
635
655
  yield response, operation if block_given?
636
- return response
656
+ throw :response, response
637
657
  end
638
658
  rescue ::GRPC::BadStatus => e
639
659
  raise ::Google::Cloud::Error.from_error(e)
@@ -735,7 +755,7 @@ module Google
735
755
  @gdc_hardware_management_stub.call_rpc :update_order, request, options: options do |response, operation|
736
756
  response = ::Gapic::Operation.new response, @operations_client, options: options
737
757
  yield response, operation if block_given?
738
- return response
758
+ throw :response, response
739
759
  end
740
760
  rescue ::GRPC::BadStatus => e
741
761
  raise ::Google::Cloud::Error.from_error(e)
@@ -838,7 +858,7 @@ module Google
838
858
  @gdc_hardware_management_stub.call_rpc :delete_order, request, options: options do |response, operation|
839
859
  response = ::Gapic::Operation.new response, @operations_client, options: options
840
860
  yield response, operation if block_given?
841
- return response
861
+ throw :response, response
842
862
  end
843
863
  rescue ::GRPC::BadStatus => e
844
864
  raise ::Google::Cloud::Error.from_error(e)
@@ -939,7 +959,7 @@ module Google
939
959
  @gdc_hardware_management_stub.call_rpc :submit_order, request, options: options do |response, operation|
940
960
  response = ::Gapic::Operation.new response, @operations_client, options: options
941
961
  yield response, operation if block_given?
942
- return response
962
+ throw :response, response
943
963
  end
944
964
  rescue ::GRPC::BadStatus => e
945
965
  raise ::Google::Cloud::Error.from_error(e)
@@ -1044,7 +1064,7 @@ module Google
1044
1064
  @gdc_hardware_management_stub.call_rpc :list_sites, request, options: options do |response, operation|
1045
1065
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, request, response, operation, options
1046
1066
  yield response, operation if block_given?
1047
- return response
1067
+ throw :response, response
1048
1068
  end
1049
1069
  rescue ::GRPC::BadStatus => e
1050
1070
  raise ::Google::Cloud::Error.from_error(e)
@@ -1131,7 +1151,6 @@ module Google
1131
1151
 
1132
1152
  @gdc_hardware_management_stub.call_rpc :get_site, request, options: options do |response, operation|
1133
1153
  yield response, operation if block_given?
1134
- return response
1135
1154
  end
1136
1155
  rescue ::GRPC::BadStatus => e
1137
1156
  raise ::Google::Cloud::Error.from_error(e)
@@ -1240,7 +1259,7 @@ module Google
1240
1259
  @gdc_hardware_management_stub.call_rpc :create_site, request, options: options do |response, operation|
1241
1260
  response = ::Gapic::Operation.new response, @operations_client, options: options
1242
1261
  yield response, operation if block_given?
1243
- return response
1262
+ throw :response, response
1244
1263
  end
1245
1264
  rescue ::GRPC::BadStatus => e
1246
1265
  raise ::Google::Cloud::Error.from_error(e)
@@ -1342,7 +1361,7 @@ module Google
1342
1361
  @gdc_hardware_management_stub.call_rpc :update_site, request, options: options do |response, operation|
1343
1362
  response = ::Gapic::Operation.new response, @operations_client, options: options
1344
1363
  yield response, operation if block_given?
1345
- return response
1364
+ throw :response, response
1346
1365
  end
1347
1366
  rescue ::GRPC::BadStatus => e
1348
1367
  raise ::Google::Cloud::Error.from_error(e)
@@ -1440,7 +1459,7 @@ module Google
1440
1459
  @gdc_hardware_management_stub.call_rpc :delete_site, request, options: options do |response, operation|
1441
1460
  response = ::Gapic::Operation.new response, @operations_client, options: options
1442
1461
  yield response, operation if block_given?
1443
- return response
1462
+ throw :response, response
1444
1463
  end
1445
1464
  rescue ::GRPC::BadStatus => e
1446
1465
  raise ::Google::Cloud::Error.from_error(e)
@@ -1541,7 +1560,7 @@ module Google
1541
1560
  @gdc_hardware_management_stub.call_rpc :list_hardware_groups, request, options: options do |response, operation|
1542
1561
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_groups, request, response, operation, options
1543
1562
  yield response, operation if block_given?
1544
- return response
1563
+ throw :response, response
1545
1564
  end
1546
1565
  rescue ::GRPC::BadStatus => e
1547
1566
  raise ::Google::Cloud::Error.from_error(e)
@@ -1629,7 +1648,6 @@ module Google
1629
1648
 
1630
1649
  @gdc_hardware_management_stub.call_rpc :get_hardware_group, request, options: options do |response, operation|
1631
1650
  yield response, operation if block_given?
1632
- return response
1633
1651
  end
1634
1652
  rescue ::GRPC::BadStatus => e
1635
1653
  raise ::Google::Cloud::Error.from_error(e)
@@ -1738,7 +1756,7 @@ module Google
1738
1756
  @gdc_hardware_management_stub.call_rpc :create_hardware_group, request, options: options do |response, operation|
1739
1757
  response = ::Gapic::Operation.new response, @operations_client, options: options
1740
1758
  yield response, operation if block_given?
1741
- return response
1759
+ throw :response, response
1742
1760
  end
1743
1761
  rescue ::GRPC::BadStatus => e
1744
1762
  raise ::Google::Cloud::Error.from_error(e)
@@ -1841,7 +1859,7 @@ module Google
1841
1859
  @gdc_hardware_management_stub.call_rpc :update_hardware_group, request, options: options do |response, operation|
1842
1860
  response = ::Gapic::Operation.new response, @operations_client, options: options
1843
1861
  yield response, operation if block_given?
1844
- return response
1862
+ throw :response, response
1845
1863
  end
1846
1864
  rescue ::GRPC::BadStatus => e
1847
1865
  raise ::Google::Cloud::Error.from_error(e)
@@ -1940,7 +1958,7 @@ module Google
1940
1958
  @gdc_hardware_management_stub.call_rpc :delete_hardware_group, request, options: options do |response, operation|
1941
1959
  response = ::Gapic::Operation.new response, @operations_client, options: options
1942
1960
  yield response, operation if block_given?
1943
- return response
1961
+ throw :response, response
1944
1962
  end
1945
1963
  rescue ::GRPC::BadStatus => e
1946
1964
  raise ::Google::Cloud::Error.from_error(e)
@@ -2045,7 +2063,7 @@ module Google
2045
2063
  @gdc_hardware_management_stub.call_rpc :list_hardware, request, options: options do |response, operation|
2046
2064
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, request, response, operation, options
2047
2065
  yield response, operation if block_given?
2048
- return response
2066
+ throw :response, response
2049
2067
  end
2050
2068
  rescue ::GRPC::BadStatus => e
2051
2069
  raise ::Google::Cloud::Error.from_error(e)
@@ -2132,7 +2150,6 @@ module Google
2132
2150
 
2133
2151
  @gdc_hardware_management_stub.call_rpc :get_hardware, request, options: options do |response, operation|
2134
2152
  yield response, operation if block_given?
2135
- return response
2136
2153
  end
2137
2154
  rescue ::GRPC::BadStatus => e
2138
2155
  raise ::Google::Cloud::Error.from_error(e)
@@ -2238,7 +2255,7 @@ module Google
2238
2255
  @gdc_hardware_management_stub.call_rpc :create_hardware, request, options: options do |response, operation|
2239
2256
  response = ::Gapic::Operation.new response, @operations_client, options: options
2240
2257
  yield response, operation if block_given?
2241
- return response
2258
+ throw :response, response
2242
2259
  end
2243
2260
  rescue ::GRPC::BadStatus => e
2244
2261
  raise ::Google::Cloud::Error.from_error(e)
@@ -2340,7 +2357,7 @@ module Google
2340
2357
  @gdc_hardware_management_stub.call_rpc :update_hardware, request, options: options do |response, operation|
2341
2358
  response = ::Gapic::Operation.new response, @operations_client, options: options
2342
2359
  yield response, operation if block_given?
2343
- return response
2360
+ throw :response, response
2344
2361
  end
2345
2362
  rescue ::GRPC::BadStatus => e
2346
2363
  raise ::Google::Cloud::Error.from_error(e)
@@ -2438,7 +2455,7 @@ module Google
2438
2455
  @gdc_hardware_management_stub.call_rpc :delete_hardware, request, options: options do |response, operation|
2439
2456
  response = ::Gapic::Operation.new response, @operations_client, options: options
2440
2457
  yield response, operation if block_given?
2441
- return response
2458
+ throw :response, response
2442
2459
  end
2443
2460
  rescue ::GRPC::BadStatus => e
2444
2461
  raise ::Google::Cloud::Error.from_error(e)
@@ -2539,7 +2556,7 @@ module Google
2539
2556
  @gdc_hardware_management_stub.call_rpc :list_comments, request, options: options do |response, operation|
2540
2557
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, request, response, operation, options
2541
2558
  yield response, operation if block_given?
2542
- return response
2559
+ throw :response, response
2543
2560
  end
2544
2561
  rescue ::GRPC::BadStatus => e
2545
2562
  raise ::Google::Cloud::Error.from_error(e)
@@ -2627,7 +2644,6 @@ module Google
2627
2644
 
2628
2645
  @gdc_hardware_management_stub.call_rpc :get_comment, request, options: options do |response, operation|
2629
2646
  yield response, operation if block_given?
2630
- return response
2631
2647
  end
2632
2648
  rescue ::GRPC::BadStatus => e
2633
2649
  raise ::Google::Cloud::Error.from_error(e)
@@ -2736,7 +2752,7 @@ module Google
2736
2752
  @gdc_hardware_management_stub.call_rpc :create_comment, request, options: options do |response, operation|
2737
2753
  response = ::Gapic::Operation.new response, @operations_client, options: options
2738
2754
  yield response, operation if block_given?
2739
- return response
2755
+ throw :response, response
2740
2756
  end
2741
2757
  rescue ::GRPC::BadStatus => e
2742
2758
  raise ::Google::Cloud::Error.from_error(e)
@@ -2829,7 +2845,6 @@ module Google
2829
2845
 
2830
2846
  @gdc_hardware_management_stub.call_rpc :record_action_on_comment, request, options: options do |response, operation|
2831
2847
  yield response, operation if block_given?
2832
- return response
2833
2848
  end
2834
2849
  rescue ::GRPC::BadStatus => e
2835
2850
  raise ::Google::Cloud::Error.from_error(e)
@@ -2930,7 +2945,7 @@ module Google
2930
2945
  @gdc_hardware_management_stub.call_rpc :list_change_log_entries, request, options: options do |response, operation|
2931
2946
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_entries, request, response, operation, options
2932
2947
  yield response, operation if block_given?
2933
- return response
2948
+ throw :response, response
2934
2949
  end
2935
2950
  rescue ::GRPC::BadStatus => e
2936
2951
  raise ::Google::Cloud::Error.from_error(e)
@@ -3018,7 +3033,6 @@ module Google
3018
3033
 
3019
3034
  @gdc_hardware_management_stub.call_rpc :get_change_log_entry, request, options: options do |response, operation|
3020
3035
  yield response, operation if block_given?
3021
- return response
3022
3036
  end
3023
3037
  rescue ::GRPC::BadStatus => e
3024
3038
  raise ::Google::Cloud::Error.from_error(e)
@@ -3123,7 +3137,7 @@ module Google
3123
3137
  @gdc_hardware_management_stub.call_rpc :list_skus, request, options: options do |response, operation|
3124
3138
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, request, response, operation, options
3125
3139
  yield response, operation if block_given?
3126
- return response
3140
+ throw :response, response
3127
3141
  end
3128
3142
  rescue ::GRPC::BadStatus => e
3129
3143
  raise ::Google::Cloud::Error.from_error(e)
@@ -3210,7 +3224,6 @@ module Google
3210
3224
 
3211
3225
  @gdc_hardware_management_stub.call_rpc :get_sku, request, options: options do |response, operation|
3212
3226
  yield response, operation if block_given?
3213
- return response
3214
3227
  end
3215
3228
  rescue ::GRPC::BadStatus => e
3216
3229
  raise ::Google::Cloud::Error.from_error(e)
@@ -3315,7 +3328,7 @@ module Google
3315
3328
  @gdc_hardware_management_stub.call_rpc :list_zones, request, options: options do |response, operation|
3316
3329
  response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_zones, request, response, operation, options
3317
3330
  yield response, operation if block_given?
3318
- return response
3331
+ throw :response, response
3319
3332
  end
3320
3333
  rescue ::GRPC::BadStatus => e
3321
3334
  raise ::Google::Cloud::Error.from_error(e)
@@ -3402,7 +3415,6 @@ module Google
3402
3415
 
3403
3416
  @gdc_hardware_management_stub.call_rpc :get_zone, request, options: options do |response, operation|
3404
3417
  yield response, operation if block_given?
3405
- return response
3406
3418
  end
3407
3419
  rescue ::GRPC::BadStatus => e
3408
3420
  raise ::Google::Cloud::Error.from_error(e)
@@ -3511,7 +3523,7 @@ module Google
3511
3523
  @gdc_hardware_management_stub.call_rpc :create_zone, request, options: options do |response, operation|
3512
3524
  response = ::Gapic::Operation.new response, @operations_client, options: options
3513
3525
  yield response, operation if block_given?
3514
- return response
3526
+ throw :response, response
3515
3527
  end
3516
3528
  rescue ::GRPC::BadStatus => e
3517
3529
  raise ::Google::Cloud::Error.from_error(e)
@@ -3613,7 +3625,7 @@ module Google
3613
3625
  @gdc_hardware_management_stub.call_rpc :update_zone, request, options: options do |response, operation|
3614
3626
  response = ::Gapic::Operation.new response, @operations_client, options: options
3615
3627
  yield response, operation if block_given?
3616
- return response
3628
+ throw :response, response
3617
3629
  end
3618
3630
  rescue ::GRPC::BadStatus => e
3619
3631
  raise ::Google::Cloud::Error.from_error(e)
@@ -3711,7 +3723,7 @@ module Google
3711
3723
  @gdc_hardware_management_stub.call_rpc :delete_zone, request, options: options do |response, operation|
3712
3724
  response = ::Gapic::Operation.new response, @operations_client, options: options
3713
3725
  yield response, operation if block_given?
3714
- return response
3726
+ throw :response, response
3715
3727
  end
3716
3728
  rescue ::GRPC::BadStatus => e
3717
3729
  raise ::Google::Cloud::Error.from_error(e)
@@ -3815,7 +3827,7 @@ module Google
3815
3827
  @gdc_hardware_management_stub.call_rpc :signal_zone_state, request, options: options do |response, operation|
3816
3828
  response = ::Gapic::Operation.new response, @operations_client, options: options
3817
3829
  yield response, operation if block_given?
3818
- return response
3830
+ throw :response, response
3819
3831
  end
3820
3832
  rescue ::GRPC::BadStatus => e
3821
3833
  raise ::Google::Cloud::Error.from_error(e)
@@ -3904,6 +3916,11 @@ module Google
3904
3916
  # default endpoint URL. The default value of nil uses the environment
3905
3917
  # universe (usually the default "googleapis.com" universe).
3906
3918
  # @return [::String,nil]
3919
+ # @!attribute [rw] logger
3920
+ # A custom logger to use for request/response debug logging, or the value
3921
+ # `:default` (the default) to construct a default logger, or `nil` to
3922
+ # explicitly disable logging.
3923
+ # @return [::Logger,:default,nil]
3907
3924
  #
3908
3925
  class Configuration
3909
3926
  extend ::Gapic::Config
@@ -3928,6 +3945,7 @@ module Google
3928
3945
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3929
3946
  config_attr :quota_project, nil, ::String, nil
3930
3947
  config_attr :universe_domain, nil, ::String, nil
3948
+ config_attr :logger, :default, ::Logger, nil, :default
3931
3949
 
3932
3950
  # @private
3933
3951
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
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]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil