google-cloud-security-private_ca-v1 1.0.1 → 1.1.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: 1aa01aab74362d5b17b4bc06354949799e730e208bb3de518a6758f013dbd9cf
4
- data.tar.gz: 5c3791abfdceb4aa8bd4e8b8cfeff4692df1b048201f2c42deccbf9fc4565300
3
+ metadata.gz: 3be935887978acdcd37f8bed808890428445c3d400071b0a2e025f9d4edb9de1
4
+ data.tar.gz: 89bbcf3a743b97264eebcb6488fb15ea00b58f9924b3a594166481f766120d9f
5
5
  SHA512:
6
- metadata.gz: fc45892bbbfb98a6a48d8fa2d44dd6e7481616ccfc38995611598f3c92f3eb7179917590bca1b34f2eda48da2ba6a5a5d18860cac2c488359026c6da20110682
7
- data.tar.gz: 8a9598b9d995c1aac57fc1f26661668228e464994500dd3670002d04ccefb93339977e14a8505f8f5c93e8a738e1b6dbf4dbbe54a19f23daa7b735123dafc711
6
+ metadata.gz: f5fb65d2882d7f43ffd4d0caadbd80ec185142397041beda2caf9847ffdaad5fe7165ce7f569794960bdc38851a689682bc795b14ef485f79a6ea5584e810370
7
+ data.tar.gz: 6c8383a1f83b6638aad28facccb5691ea14c1ff2144480137bccaa78739bade6a0f6a697696cd1f7f243ff81fdd2aa8835e339693275b7d3bff94292b2d70858
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title="Ceritificate Authority Service V1 API"
2
+ --title="Certificate Authority Service V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Ruby Client for the Ceritificate Authority Service V1 API
1
+ # Ruby Client for the Certificate Authority Service V1 API
2
2
 
3
3
  The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys.
4
4
 
@@ -7,7 +7,7 @@ Certificate Authority Service is a highly available, scalable Google Cloud servi
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
9
9
  This gem is a _versioned_ client. It provides basic client classes for a
10
- specific version of the Ceritificate Authority Service V1 API. Most users should consider using
10
+ specific version of the Certificate Authority Service V1 API. Most users should consider using
11
11
  the main client gem,
12
12
  [google-cloud-security-private_ca](https://rubygems.org/gems/google-cloud-security-private_ca).
13
13
  See the section below titled *Which client should I use?* for more information.
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/certificate-authority-service/)
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/security/private_ca/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::Security::PrivateCA::V1::CertificateAuthorityService::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).
@@ -174,14 +174,26 @@ module Google
174
174
  universe_domain: @config.universe_domain,
175
175
  channel_args: @config.channel_args,
176
176
  interceptors: @config.interceptors,
177
- channel_pool_config: @config.channel_pool
177
+ channel_pool_config: @config.channel_pool,
178
+ logger: @config.logger
178
179
  )
179
180
 
181
+ @certificate_authority_service_stub.stub_logger&.info do |entry|
182
+ entry.set_system_name
183
+ entry.set_service
184
+ entry.message = "Created client for #{entry.service}"
185
+ entry.set_credentials_fields credentials
186
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
187
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
188
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
189
+ end
190
+
180
191
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
181
192
  config.credentials = credentials
182
193
  config.quota_project = @quota_project_id
183
194
  config.endpoint = @certificate_authority_service_stub.endpoint
184
195
  config.universe_domain = @certificate_authority_service_stub.universe_domain
196
+ config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger=
185
197
  end
186
198
 
187
199
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -189,6 +201,7 @@ module Google
189
201
  config.quota_project = @quota_project_id
190
202
  config.endpoint = @certificate_authority_service_stub.endpoint
191
203
  config.universe_domain = @certificate_authority_service_stub.universe_domain
204
+ config.logger = @certificate_authority_service_stub.logger if config.respond_to? :logger=
192
205
  end
193
206
  end
194
207
 
@@ -213,6 +226,15 @@ module Google
213
226
  #
214
227
  attr_reader :iam_policy_client
215
228
 
229
+ ##
230
+ # The logger used for request/response debug logging.
231
+ #
232
+ # @return [Logger]
233
+ #
234
+ def logger
235
+ @certificate_authority_service_stub.logger
236
+ end
237
+
216
238
  # Service calls
217
239
 
218
240
  ##
@@ -352,7 +374,6 @@ module Google
352
374
 
353
375
  @certificate_authority_service_stub.call_rpc :create_certificate, request, options: options do |response, operation|
354
376
  yield response, operation if block_given?
355
- return response
356
377
  end
357
378
  rescue ::GRPC::BadStatus => e
358
379
  raise ::Google::Cloud::Error.from_error(e)
@@ -440,7 +461,6 @@ module Google
440
461
 
441
462
  @certificate_authority_service_stub.call_rpc :get_certificate, request, options: options do |response, operation|
442
463
  yield response, operation if block_given?
443
- return response
444
464
  end
445
465
  rescue ::GRPC::BadStatus => e
446
466
  raise ::Google::Cloud::Error.from_error(e)
@@ -553,7 +573,7 @@ module Google
553
573
  @certificate_authority_service_stub.call_rpc :list_certificates, request, options: options do |response, operation|
554
574
  response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificates, request, response, operation, options
555
575
  yield response, operation if block_given?
556
- return response
576
+ throw :response, response
557
577
  end
558
578
  rescue ::GRPC::BadStatus => e
559
579
  raise ::Google::Cloud::Error.from_error(e)
@@ -659,7 +679,6 @@ module Google
659
679
 
660
680
  @certificate_authority_service_stub.call_rpc :revoke_certificate, request, options: options do |response, operation|
661
681
  yield response, operation if block_given?
662
- return response
663
682
  end
664
683
  rescue ::GRPC::BadStatus => e
665
684
  raise ::Google::Cloud::Error.from_error(e)
@@ -764,7 +783,6 @@ module Google
764
783
 
765
784
  @certificate_authority_service_stub.call_rpc :update_certificate, request, options: options do |response, operation|
766
785
  yield response, operation if block_given?
767
- return response
768
786
  end
769
787
  rescue ::GRPC::BadStatus => e
770
788
  raise ::Google::Cloud::Error.from_error(e)
@@ -889,7 +907,7 @@ module Google
889
907
  @certificate_authority_service_stub.call_rpc :activate_certificate_authority, request, options: options do |response, operation|
890
908
  response = ::Gapic::Operation.new response, @operations_client, options: options
891
909
  yield response, operation if block_given?
892
- return response
910
+ throw :response, response
893
911
  end
894
912
  rescue ::GRPC::BadStatus => e
895
913
  raise ::Google::Cloud::Error.from_error(e)
@@ -1009,7 +1027,7 @@ module Google
1009
1027
  @certificate_authority_service_stub.call_rpc :create_certificate_authority, request, options: options do |response, operation|
1010
1028
  response = ::Gapic::Operation.new response, @operations_client, options: options
1011
1029
  yield response, operation if block_given?
1012
- return response
1030
+ throw :response, response
1013
1031
  end
1014
1032
  rescue ::GRPC::BadStatus => e
1015
1033
  raise ::Google::Cloud::Error.from_error(e)
@@ -1125,7 +1143,7 @@ module Google
1125
1143
  @certificate_authority_service_stub.call_rpc :disable_certificate_authority, request, options: options do |response, operation|
1126
1144
  response = ::Gapic::Operation.new response, @operations_client, options: options
1127
1145
  yield response, operation if block_given?
1128
- return response
1146
+ throw :response, response
1129
1147
  end
1130
1148
  rescue ::GRPC::BadStatus => e
1131
1149
  raise ::Google::Cloud::Error.from_error(e)
@@ -1236,7 +1254,7 @@ module Google
1236
1254
  @certificate_authority_service_stub.call_rpc :enable_certificate_authority, request, options: options do |response, operation|
1237
1255
  response = ::Gapic::Operation.new response, @operations_client, options: options
1238
1256
  yield response, operation if block_given?
1239
- return response
1257
+ throw :response, response
1240
1258
  end
1241
1259
  rescue ::GRPC::BadStatus => e
1242
1260
  raise ::Google::Cloud::Error.from_error(e)
@@ -1334,7 +1352,6 @@ module Google
1334
1352
 
1335
1353
  @certificate_authority_service_stub.call_rpc :fetch_certificate_authority_csr, request, options: options do |response, operation|
1336
1354
  yield response, operation if block_given?
1337
- return response
1338
1355
  end
1339
1356
  rescue ::GRPC::BadStatus => e
1340
1357
  raise ::Google::Cloud::Error.from_error(e)
@@ -1424,7 +1441,6 @@ module Google
1424
1441
 
1425
1442
  @certificate_authority_service_stub.call_rpc :get_certificate_authority, request, options: options do |response, operation|
1426
1443
  yield response, operation if block_given?
1427
- return response
1428
1444
  end
1429
1445
  rescue ::GRPC::BadStatus => e
1430
1446
  raise ::Google::Cloud::Error.from_error(e)
@@ -1535,7 +1551,7 @@ module Google
1535
1551
  @certificate_authority_service_stub.call_rpc :list_certificate_authorities, request, options: options do |response, operation|
1536
1552
  response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_authorities, request, response, operation, options
1537
1553
  yield response, operation if block_given?
1538
- return response
1554
+ throw :response, response
1539
1555
  end
1540
1556
  rescue ::GRPC::BadStatus => e
1541
1557
  raise ::Google::Cloud::Error.from_error(e)
@@ -1647,7 +1663,7 @@ module Google
1647
1663
  @certificate_authority_service_stub.call_rpc :undelete_certificate_authority, request, options: options do |response, operation|
1648
1664
  response = ::Gapic::Operation.new response, @operations_client, options: options
1649
1665
  yield response, operation if block_given?
1650
- return response
1666
+ throw :response, response
1651
1667
  end
1652
1668
  rescue ::GRPC::BadStatus => e
1653
1669
  raise ::Google::Cloud::Error.from_error(e)
@@ -1770,7 +1786,7 @@ module Google
1770
1786
  @certificate_authority_service_stub.call_rpc :delete_certificate_authority, request, options: options do |response, operation|
1771
1787
  response = ::Gapic::Operation.new response, @operations_client, options: options
1772
1788
  yield response, operation if block_given?
1773
- return response
1789
+ throw :response, response
1774
1790
  end
1775
1791
  rescue ::GRPC::BadStatus => e
1776
1792
  raise ::Google::Cloud::Error.from_error(e)
@@ -1883,7 +1899,7 @@ module Google
1883
1899
  @certificate_authority_service_stub.call_rpc :update_certificate_authority, request, options: options do |response, operation|
1884
1900
  response = ::Gapic::Operation.new response, @operations_client, options: options
1885
1901
  yield response, operation if block_given?
1886
- return response
1902
+ throw :response, response
1887
1903
  end
1888
1904
  rescue ::GRPC::BadStatus => e
1889
1905
  raise ::Google::Cloud::Error.from_error(e)
@@ -1999,7 +2015,7 @@ module Google
1999
2015
  @certificate_authority_service_stub.call_rpc :create_ca_pool, request, options: options do |response, operation|
2000
2016
  response = ::Gapic::Operation.new response, @operations_client, options: options
2001
2017
  yield response, operation if block_given?
2002
- return response
2018
+ throw :response, response
2003
2019
  end
2004
2020
  rescue ::GRPC::BadStatus => e
2005
2021
  raise ::Google::Cloud::Error.from_error(e)
@@ -2110,7 +2126,7 @@ module Google
2110
2126
  @certificate_authority_service_stub.call_rpc :update_ca_pool, request, options: options do |response, operation|
2111
2127
  response = ::Gapic::Operation.new response, @operations_client, options: options
2112
2128
  yield response, operation if block_given?
2113
- return response
2129
+ throw :response, response
2114
2130
  end
2115
2131
  rescue ::GRPC::BadStatus => e
2116
2132
  raise ::Google::Cloud::Error.from_error(e)
@@ -2197,7 +2213,6 @@ module Google
2197
2213
 
2198
2214
  @certificate_authority_service_stub.call_rpc :get_ca_pool, request, options: options do |response, operation|
2199
2215
  yield response, operation if block_given?
2200
- return response
2201
2216
  end
2202
2217
  rescue ::GRPC::BadStatus => e
2203
2218
  raise ::Google::Cloud::Error.from_error(e)
@@ -2305,7 +2320,7 @@ module Google
2305
2320
  @certificate_authority_service_stub.call_rpc :list_ca_pools, request, options: options do |response, operation|
2306
2321
  response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_ca_pools, request, response, operation, options
2307
2322
  yield response, operation if block_given?
2308
- return response
2323
+ throw :response, response
2309
2324
  end
2310
2325
  rescue ::GRPC::BadStatus => e
2311
2326
  raise ::Google::Cloud::Error.from_error(e)
@@ -2420,7 +2435,7 @@ module Google
2420
2435
  @certificate_authority_service_stub.call_rpc :delete_ca_pool, request, options: options do |response, operation|
2421
2436
  response = ::Gapic::Operation.new response, @operations_client, options: options
2422
2437
  yield response, operation if block_given?
2423
- return response
2438
+ throw :response, response
2424
2439
  end
2425
2440
  rescue ::GRPC::BadStatus => e
2426
2441
  raise ::Google::Cloud::Error.from_error(e)
@@ -2525,7 +2540,6 @@ module Google
2525
2540
 
2526
2541
  @certificate_authority_service_stub.call_rpc :fetch_ca_certs, request, options: options do |response, operation|
2527
2542
  yield response, operation if block_given?
2528
- return response
2529
2543
  end
2530
2544
  rescue ::GRPC::BadStatus => e
2531
2545
  raise ::Google::Cloud::Error.from_error(e)
@@ -2616,7 +2630,6 @@ module Google
2616
2630
 
2617
2631
  @certificate_authority_service_stub.call_rpc :get_certificate_revocation_list, request, options: options do |response, operation|
2618
2632
  yield response, operation if block_given?
2619
- return response
2620
2633
  end
2621
2634
  rescue ::GRPC::BadStatus => e
2622
2635
  raise ::Google::Cloud::Error.from_error(e)
@@ -2726,7 +2739,7 @@ module Google
2726
2739
  @certificate_authority_service_stub.call_rpc :list_certificate_revocation_lists, request, options: options do |response, operation|
2727
2740
  response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_revocation_lists, request, response, operation, options
2728
2741
  yield response, operation if block_given?
2729
- return response
2742
+ throw :response, response
2730
2743
  end
2731
2744
  rescue ::GRPC::BadStatus => e
2732
2745
  raise ::Google::Cloud::Error.from_error(e)
@@ -2839,7 +2852,7 @@ module Google
2839
2852
  @certificate_authority_service_stub.call_rpc :update_certificate_revocation_list, request, options: options do |response, operation|
2840
2853
  response = ::Gapic::Operation.new response, @operations_client, options: options
2841
2854
  yield response, operation if block_given?
2842
- return response
2855
+ throw :response, response
2843
2856
  end
2844
2857
  rescue ::GRPC::BadStatus => e
2845
2858
  raise ::Google::Cloud::Error.from_error(e)
@@ -2958,7 +2971,7 @@ module Google
2958
2971
  @certificate_authority_service_stub.call_rpc :create_certificate_template, request, options: options do |response, operation|
2959
2972
  response = ::Gapic::Operation.new response, @operations_client, options: options
2960
2973
  yield response, operation if block_given?
2961
- return response
2974
+ throw :response, response
2962
2975
  end
2963
2976
  rescue ::GRPC::BadStatus => e
2964
2977
  raise ::Google::Cloud::Error.from_error(e)
@@ -3069,7 +3082,7 @@ module Google
3069
3082
  @certificate_authority_service_stub.call_rpc :delete_certificate_template, request, options: options do |response, operation|
3070
3083
  response = ::Gapic::Operation.new response, @operations_client, options: options
3071
3084
  yield response, operation if block_given?
3072
- return response
3085
+ throw :response, response
3073
3086
  end
3074
3087
  rescue ::GRPC::BadStatus => e
3075
3088
  raise ::Google::Cloud::Error.from_error(e)
@@ -3159,7 +3172,6 @@ module Google
3159
3172
 
3160
3173
  @certificate_authority_service_stub.call_rpc :get_certificate_template, request, options: options do |response, operation|
3161
3174
  yield response, operation if block_given?
3162
- return response
3163
3175
  end
3164
3176
  rescue ::GRPC::BadStatus => e
3165
3177
  raise ::Google::Cloud::Error.from_error(e)
@@ -3269,7 +3281,7 @@ module Google
3269
3281
  @certificate_authority_service_stub.call_rpc :list_certificate_templates, request, options: options do |response, operation|
3270
3282
  response = ::Gapic::PagedEnumerable.new @certificate_authority_service_stub, :list_certificate_templates, request, response, operation, options
3271
3283
  yield response, operation if block_given?
3272
- return response
3284
+ throw :response, response
3273
3285
  end
3274
3286
  rescue ::GRPC::BadStatus => e
3275
3287
  raise ::Google::Cloud::Error.from_error(e)
@@ -3382,7 +3394,7 @@ module Google
3382
3394
  @certificate_authority_service_stub.call_rpc :update_certificate_template, request, options: options do |response, operation|
3383
3395
  response = ::Gapic::Operation.new response, @operations_client, options: options
3384
3396
  yield response, operation if block_given?
3385
- return response
3397
+ throw :response, response
3386
3398
  end
3387
3399
  rescue ::GRPC::BadStatus => e
3388
3400
  raise ::Google::Cloud::Error.from_error(e)
@@ -3471,6 +3483,11 @@ module Google
3471
3483
  # default endpoint URL. The default value of nil uses the environment
3472
3484
  # universe (usually the default "googleapis.com" universe).
3473
3485
  # @return [::String,nil]
3486
+ # @!attribute [rw] logger
3487
+ # A custom logger to use for request/response debug logging, or the value
3488
+ # `:default` (the default) to construct a default logger, or `nil` to
3489
+ # explicitly disable logging.
3490
+ # @return [::Logger,:default,nil]
3474
3491
  #
3475
3492
  class Configuration
3476
3493
  extend ::Gapic::Config
@@ -3495,6 +3512,7 @@ module Google
3495
3512
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3496
3513
  config_attr :quota_project, nil, ::String, nil
3497
3514
  config_attr :universe_domain, nil, ::String, nil
3515
+ config_attr :logger, :default, ::Logger, nil, :default
3498
3516
 
3499
3517
  # @private
3500
3518
  def initialize parent_config = nil
@@ -125,14 +125,6 @@ module Google
125
125
  # Lists operations that match the specified filter in the request. If the
126
126
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
127
127
  #
128
- # NOTE: the `name` binding allows API services to override the binding
129
- # to use different resource name schemes, such as `users/*/operations`. To
130
- # override the binding, API services can add a binding such as
131
- # `"/v1/{name=users/*}/operations"` to their service configuration.
132
- # For backwards compatibility, the default name includes the operations
133
- # collection id, however overriding users must ensure the name binding
134
- # is the parent resource, without the operations collection id.
135
- #
136
128
  # @overload list_operations(request, options = nil)
137
129
  # Pass arguments to `list_operations` via a request object, either of type
138
130
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -222,7 +214,7 @@ module Google
222
214
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
223
215
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
224
216
  yield response, operation if block_given?
225
- return response
217
+ throw :response, response
226
218
  end
227
219
  rescue ::GRPC::BadStatus => e
228
220
  raise ::Google::Cloud::Error.from_error(e)
@@ -318,7 +310,7 @@ module Google
318
310
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
319
311
  response = ::Gapic::Operation.new response, @operations_client, options: options
320
312
  yield response, operation if block_given?
321
- return response
313
+ throw :response, response
322
314
  end
323
315
  rescue ::GRPC::BadStatus => e
324
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -407,7 +399,6 @@ module Google
407
399
 
408
400
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
409
401
  yield response, operation if block_given?
410
- return response
411
402
  end
412
403
  rescue ::GRPC::BadStatus => e
413
404
  raise ::Google::Cloud::Error.from_error(e)
@@ -422,8 +413,9 @@ module Google
422
413
  # other methods to check whether the cancellation succeeded or whether the
423
414
  # operation completed despite cancellation. On successful cancellation,
424
415
  # the operation is not deleted; instead, it becomes an operation with
425
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
426
- # corresponding to `Code.CANCELLED`.
416
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
417
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
418
+ # `Code.CANCELLED`.
427
419
  #
428
420
  # @overload cancel_operation(request, options = nil)
429
421
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -502,7 +494,6 @@ module Google
502
494
 
503
495
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
504
496
  yield response, operation if block_given?
505
- return response
506
497
  end
507
498
  rescue ::GRPC::BadStatus => e
508
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -600,7 +591,7 @@ module Google
600
591
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
601
592
  response = ::Gapic::Operation.new response, @operations_client, options: options
602
593
  yield response, operation if block_given?
603
- return response
594
+ throw :response, response
604
595
  end
605
596
  rescue ::GRPC::BadStatus => e
606
597
  raise ::Google::Cloud::Error.from_error(e)
@@ -689,6 +680,11 @@ module Google
689
680
  # default endpoint URL. The default value of nil uses the environment
690
681
  # universe (usually the default "googleapis.com" universe).
691
682
  # @return [::String,nil]
683
+ # @!attribute [rw] logger
684
+ # A custom logger to use for request/response debug logging, or the value
685
+ # `:default` (the default) to construct a default logger, or `nil` to
686
+ # explicitly disable logging.
687
+ # @return [::Logger,:default,nil]
692
688
  #
693
689
  class Configuration
694
690
  extend ::Gapic::Config
@@ -713,6 +709,7 @@ module Google
713
709
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
714
710
  config_attr :quota_project, nil, ::String, nil
715
711
  config_attr :universe_domain, nil, ::String, nil
712
+ config_attr :logger, :default, ::Logger, nil, :default
716
713
 
717
714
  # @private
718
715
  def initialize parent_config = nil