google-cloud-network_security-v1beta1 0.8.1 → 0.9.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: 97ba4eb83c0b14ef0d25bf5d3383c6db7c427464274e74c39a56766b5ee050af
4
- data.tar.gz: edfdff4e1fdb100913eb8939222841e78f6df4b89ae392e47287fdde8d5b9a7c
3
+ metadata.gz: d16637bff67e4cbd2d359dc9edac103aab5ecab7593ead546b0689590e138098
4
+ data.tar.gz: 464f45cba0a25456b06a7a0dbd61234bf338e97963e8b95e6d4dc3a186894dcf
5
5
  SHA512:
6
- metadata.gz: 565de9c25457c9b0ee26e0ecaf75ccb7c480abe5bc2c48c9a62e1861cbc781e2c4df63b513d0a61161a94c088eac39e75cf58413325650273e77ab1eb40da701
7
- data.tar.gz: dfb151621ce4e1c79b795589c2dbbb506de282a8352d6bd936de85bd15b14742be0ec23bb4b7bb5c0e5ccb0d7a319511bd80459282d5b7926128b108f23eed88
6
+ metadata.gz: 79c6c36c276830f0771821f5376a137b074640d61aef2843f2274b9e8a4ed0cb54e68356f9f6efa78a1698d08918ad92d3c17f96e7f79da18a87212a6cb3c6f4
7
+ data.tar.gz: b5e97d275c2ab6f82db7eb5820197c764d6bd2af63b43007e0aee24562670f5d615857945dd675c75feafd7d17b1485883138c0d81957188ef7cf04a900466ed
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/traffic-director/docs/reference/network-security/rest/)
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/network_security/v1beta1"
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::NetworkSecurity::V1beta1::NetworkSecurity::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).
@@ -170,14 +170,26 @@ module Google
170
170
  universe_domain: @config.universe_domain,
171
171
  channel_args: @config.channel_args,
172
172
  interceptors: @config.interceptors,
173
- channel_pool_config: @config.channel_pool
173
+ channel_pool_config: @config.channel_pool,
174
+ logger: @config.logger
174
175
  )
175
176
 
177
+ @network_security_stub.stub_logger&.info do |entry|
178
+ entry.set_system_name
179
+ entry.set_service
180
+ entry.message = "Created client for #{entry.service}"
181
+ entry.set_credentials_fields credentials
182
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
183
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
184
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
185
+ end
186
+
176
187
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
177
188
  config.credentials = credentials
178
189
  config.quota_project = @quota_project_id
179
190
  config.endpoint = @network_security_stub.endpoint
180
191
  config.universe_domain = @network_security_stub.universe_domain
192
+ config.logger = @network_security_stub.logger if config.respond_to? :logger=
181
193
  end
182
194
 
183
195
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -185,6 +197,7 @@ module Google
185
197
  config.quota_project = @quota_project_id
186
198
  config.endpoint = @network_security_stub.endpoint
187
199
  config.universe_domain = @network_security_stub.universe_domain
200
+ config.logger = @network_security_stub.logger if config.respond_to? :logger=
188
201
  end
189
202
  end
190
203
 
@@ -209,6 +222,15 @@ module Google
209
222
  #
210
223
  attr_reader :iam_policy_client
211
224
 
225
+ ##
226
+ # The logger used for request/response debug logging.
227
+ #
228
+ # @return [Logger]
229
+ #
230
+ def logger
231
+ @network_security_stub.logger
232
+ end
233
+
212
234
  # Service calls
213
235
 
214
236
  ##
@@ -305,7 +327,7 @@ module Google
305
327
  @network_security_stub.call_rpc :list_authorization_policies, request, options: options do |response, operation|
306
328
  response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_authorization_policies, request, response, operation, options
307
329
  yield response, operation if block_given?
308
- return response
330
+ throw :response, response
309
331
  end
310
332
  rescue ::GRPC::BadStatus => e
311
333
  raise ::Google::Cloud::Error.from_error(e)
@@ -392,7 +414,6 @@ module Google
392
414
 
393
415
  @network_security_stub.call_rpc :get_authorization_policy, request, options: options do |response, operation|
394
416
  yield response, operation if block_given?
395
- return response
396
417
  end
397
418
  rescue ::GRPC::BadStatus => e
398
419
  raise ::Google::Cloud::Error.from_error(e)
@@ -494,7 +515,7 @@ module Google
494
515
  @network_security_stub.call_rpc :create_authorization_policy, request, options: options do |response, operation|
495
516
  response = ::Gapic::Operation.new response, @operations_client, options: options
496
517
  yield response, operation if block_given?
497
- return response
518
+ throw :response, response
498
519
  end
499
520
  rescue ::GRPC::BadStatus => e
500
521
  raise ::Google::Cloud::Error.from_error(e)
@@ -594,7 +615,7 @@ module Google
594
615
  @network_security_stub.call_rpc :update_authorization_policy, request, options: options do |response, operation|
595
616
  response = ::Gapic::Operation.new response, @operations_client, options: options
596
617
  yield response, operation if block_given?
597
- return response
618
+ throw :response, response
598
619
  end
599
620
  rescue ::GRPC::BadStatus => e
600
621
  raise ::Google::Cloud::Error.from_error(e)
@@ -689,7 +710,7 @@ module Google
689
710
  @network_security_stub.call_rpc :delete_authorization_policy, request, options: options do |response, operation|
690
711
  response = ::Gapic::Operation.new response, @operations_client, options: options
691
712
  yield response, operation if block_given?
692
- return response
713
+ throw :response, response
693
714
  end
694
715
  rescue ::GRPC::BadStatus => e
695
716
  raise ::Google::Cloud::Error.from_error(e)
@@ -788,7 +809,7 @@ module Google
788
809
  @network_security_stub.call_rpc :list_server_tls_policies, request, options: options do |response, operation|
789
810
  response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_server_tls_policies, request, response, operation, options
790
811
  yield response, operation if block_given?
791
- return response
812
+ throw :response, response
792
813
  end
793
814
  rescue ::GRPC::BadStatus => e
794
815
  raise ::Google::Cloud::Error.from_error(e)
@@ -875,7 +896,6 @@ module Google
875
896
 
876
897
  @network_security_stub.call_rpc :get_server_tls_policy, request, options: options do |response, operation|
877
898
  yield response, operation if block_given?
878
- return response
879
899
  end
880
900
  rescue ::GRPC::BadStatus => e
881
901
  raise ::Google::Cloud::Error.from_error(e)
@@ -977,7 +997,7 @@ module Google
977
997
  @network_security_stub.call_rpc :create_server_tls_policy, request, options: options do |response, operation|
978
998
  response = ::Gapic::Operation.new response, @operations_client, options: options
979
999
  yield response, operation if block_given?
980
- return response
1000
+ throw :response, response
981
1001
  end
982
1002
  rescue ::GRPC::BadStatus => e
983
1003
  raise ::Google::Cloud::Error.from_error(e)
@@ -1078,7 +1098,7 @@ module Google
1078
1098
  @network_security_stub.call_rpc :update_server_tls_policy, request, options: options do |response, operation|
1079
1099
  response = ::Gapic::Operation.new response, @operations_client, options: options
1080
1100
  yield response, operation if block_given?
1081
- return response
1101
+ throw :response, response
1082
1102
  end
1083
1103
  rescue ::GRPC::BadStatus => e
1084
1104
  raise ::Google::Cloud::Error.from_error(e)
@@ -1173,7 +1193,7 @@ module Google
1173
1193
  @network_security_stub.call_rpc :delete_server_tls_policy, request, options: options do |response, operation|
1174
1194
  response = ::Gapic::Operation.new response, @operations_client, options: options
1175
1195
  yield response, operation if block_given?
1176
- return response
1196
+ throw :response, response
1177
1197
  end
1178
1198
  rescue ::GRPC::BadStatus => e
1179
1199
  raise ::Google::Cloud::Error.from_error(e)
@@ -1272,7 +1292,7 @@ module Google
1272
1292
  @network_security_stub.call_rpc :list_client_tls_policies, request, options: options do |response, operation|
1273
1293
  response = ::Gapic::PagedEnumerable.new @network_security_stub, :list_client_tls_policies, request, response, operation, options
1274
1294
  yield response, operation if block_given?
1275
- return response
1295
+ throw :response, response
1276
1296
  end
1277
1297
  rescue ::GRPC::BadStatus => e
1278
1298
  raise ::Google::Cloud::Error.from_error(e)
@@ -1359,7 +1379,6 @@ module Google
1359
1379
 
1360
1380
  @network_security_stub.call_rpc :get_client_tls_policy, request, options: options do |response, operation|
1361
1381
  yield response, operation if block_given?
1362
- return response
1363
1382
  end
1364
1383
  rescue ::GRPC::BadStatus => e
1365
1384
  raise ::Google::Cloud::Error.from_error(e)
@@ -1461,7 +1480,7 @@ module Google
1461
1480
  @network_security_stub.call_rpc :create_client_tls_policy, request, options: options do |response, operation|
1462
1481
  response = ::Gapic::Operation.new response, @operations_client, options: options
1463
1482
  yield response, operation if block_given?
1464
- return response
1483
+ throw :response, response
1465
1484
  end
1466
1485
  rescue ::GRPC::BadStatus => e
1467
1486
  raise ::Google::Cloud::Error.from_error(e)
@@ -1562,7 +1581,7 @@ module Google
1562
1581
  @network_security_stub.call_rpc :update_client_tls_policy, request, options: options do |response, operation|
1563
1582
  response = ::Gapic::Operation.new response, @operations_client, options: options
1564
1583
  yield response, operation if block_given?
1565
- return response
1584
+ throw :response, response
1566
1585
  end
1567
1586
  rescue ::GRPC::BadStatus => e
1568
1587
  raise ::Google::Cloud::Error.from_error(e)
@@ -1657,7 +1676,7 @@ module Google
1657
1676
  @network_security_stub.call_rpc :delete_client_tls_policy, request, options: options do |response, operation|
1658
1677
  response = ::Gapic::Operation.new response, @operations_client, options: options
1659
1678
  yield response, operation if block_given?
1660
- return response
1679
+ throw :response, response
1661
1680
  end
1662
1681
  rescue ::GRPC::BadStatus => e
1663
1682
  raise ::Google::Cloud::Error.from_error(e)
@@ -1746,6 +1765,11 @@ module Google
1746
1765
  # default endpoint URL. The default value of nil uses the environment
1747
1766
  # universe (usually the default "googleapis.com" universe).
1748
1767
  # @return [::String,nil]
1768
+ # @!attribute [rw] logger
1769
+ # A custom logger to use for request/response debug logging, or the value
1770
+ # `:default` (the default) to construct a default logger, or `nil` to
1771
+ # explicitly disable logging.
1772
+ # @return [::Logger,:default,nil]
1749
1773
  #
1750
1774
  class Configuration
1751
1775
  extend ::Gapic::Config
@@ -1770,6 +1794,7 @@ module Google
1770
1794
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1771
1795
  config_attr :quota_project, nil, ::String, nil
1772
1796
  config_attr :universe_domain, nil, ::String, nil
1797
+ config_attr :logger, :default, ::Logger, nil, :default
1773
1798
 
1774
1799
  # @private
1775
1800
  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
@@ -163,15 +163,27 @@ module Google
163
163
  endpoint: @config.endpoint,
164
164
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
165
165
  universe_domain: @config.universe_domain,
166
- credentials: credentials
166
+ credentials: credentials,
167
+ logger: @config.logger
167
168
  )
168
169
 
170
+ @network_security_stub.logger(stub: true)&.info do |entry|
171
+ entry.set_system_name
172
+ entry.set_service
173
+ entry.message = "Created client for #{entry.service}"
174
+ entry.set_credentials_fields credentials
175
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
176
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
177
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
178
+ end
179
+
169
180
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
170
181
  config.credentials = credentials
171
182
  config.quota_project = @quota_project_id
172
183
  config.endpoint = @network_security_stub.endpoint
173
184
  config.universe_domain = @network_security_stub.universe_domain
174
185
  config.bindings_override = @config.bindings_override
186
+ config.logger = @network_security_stub.logger if config.respond_to? :logger=
175
187
  end
176
188
 
177
189
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -180,6 +192,7 @@ module Google
180
192
  config.endpoint = @network_security_stub.endpoint
181
193
  config.universe_domain = @network_security_stub.universe_domain
182
194
  config.bindings_override = @config.bindings_override
195
+ config.logger = @network_security_stub.logger if config.respond_to? :logger=
183
196
  end
184
197
  end
185
198
 
@@ -204,6 +217,15 @@ module Google
204
217
  #
205
218
  attr_reader :iam_policy_client
206
219
 
220
+ ##
221
+ # The logger used for request/response debug logging.
222
+ #
223
+ # @return [Logger]
224
+ #
225
+ def logger
226
+ @network_security_stub.logger
227
+ end
228
+
207
229
  # Service calls
208
230
 
209
231
  ##
@@ -293,7 +315,7 @@ module Google
293
315
  @network_security_stub.list_authorization_policies request, options do |result, operation|
294
316
  result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_authorization_policies, "authorization_policies", request, result, options
295
317
  yield result, operation if block_given?
296
- return result
318
+ throw :response, result
297
319
  end
298
320
  rescue ::Gapic::Rest::Error => e
299
321
  raise ::Google::Cloud::Error.from_error(e)
@@ -373,7 +395,6 @@ module Google
373
395
 
374
396
  @network_security_stub.get_authorization_policy request, options do |result, operation|
375
397
  yield result, operation if block_given?
376
- return result
377
398
  end
378
399
  rescue ::Gapic::Rest::Error => e
379
400
  raise ::Google::Cloud::Error.from_error(e)
@@ -468,7 +489,7 @@ module Google
468
489
  @network_security_stub.create_authorization_policy request, options do |result, operation|
469
490
  result = ::Gapic::Operation.new result, @operations_client, options: options
470
491
  yield result, operation if block_given?
471
- return result
492
+ throw :response, result
472
493
  end
473
494
  rescue ::Gapic::Rest::Error => e
474
495
  raise ::Google::Cloud::Error.from_error(e)
@@ -561,7 +582,7 @@ module Google
561
582
  @network_security_stub.update_authorization_policy request, options do |result, operation|
562
583
  result = ::Gapic::Operation.new result, @operations_client, options: options
563
584
  yield result, operation if block_given?
564
- return result
585
+ throw :response, result
565
586
  end
566
587
  rescue ::Gapic::Rest::Error => e
567
588
  raise ::Google::Cloud::Error.from_error(e)
@@ -649,7 +670,7 @@ module Google
649
670
  @network_security_stub.delete_authorization_policy request, options do |result, operation|
650
671
  result = ::Gapic::Operation.new result, @operations_client, options: options
651
672
  yield result, operation if block_given?
652
- return result
673
+ throw :response, result
653
674
  end
654
675
  rescue ::Gapic::Rest::Error => e
655
676
  raise ::Google::Cloud::Error.from_error(e)
@@ -741,7 +762,7 @@ module Google
741
762
  @network_security_stub.list_server_tls_policies request, options do |result, operation|
742
763
  result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_server_tls_policies, "server_tls_policies", request, result, options
743
764
  yield result, operation if block_given?
744
- return result
765
+ throw :response, result
745
766
  end
746
767
  rescue ::Gapic::Rest::Error => e
747
768
  raise ::Google::Cloud::Error.from_error(e)
@@ -821,7 +842,6 @@ module Google
821
842
 
822
843
  @network_security_stub.get_server_tls_policy request, options do |result, operation|
823
844
  yield result, operation if block_given?
824
- return result
825
845
  end
826
846
  rescue ::Gapic::Rest::Error => e
827
847
  raise ::Google::Cloud::Error.from_error(e)
@@ -916,7 +936,7 @@ module Google
916
936
  @network_security_stub.create_server_tls_policy request, options do |result, operation|
917
937
  result = ::Gapic::Operation.new result, @operations_client, options: options
918
938
  yield result, operation if block_given?
919
- return result
939
+ throw :response, result
920
940
  end
921
941
  rescue ::Gapic::Rest::Error => e
922
942
  raise ::Google::Cloud::Error.from_error(e)
@@ -1010,7 +1030,7 @@ module Google
1010
1030
  @network_security_stub.update_server_tls_policy request, options do |result, operation|
1011
1031
  result = ::Gapic::Operation.new result, @operations_client, options: options
1012
1032
  yield result, operation if block_given?
1013
- return result
1033
+ throw :response, result
1014
1034
  end
1015
1035
  rescue ::Gapic::Rest::Error => e
1016
1036
  raise ::Google::Cloud::Error.from_error(e)
@@ -1098,7 +1118,7 @@ module Google
1098
1118
  @network_security_stub.delete_server_tls_policy request, options do |result, operation|
1099
1119
  result = ::Gapic::Operation.new result, @operations_client, options: options
1100
1120
  yield result, operation if block_given?
1101
- return result
1121
+ throw :response, result
1102
1122
  end
1103
1123
  rescue ::Gapic::Rest::Error => e
1104
1124
  raise ::Google::Cloud::Error.from_error(e)
@@ -1190,7 +1210,7 @@ module Google
1190
1210
  @network_security_stub.list_client_tls_policies request, options do |result, operation|
1191
1211
  result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_client_tls_policies, "client_tls_policies", request, result, options
1192
1212
  yield result, operation if block_given?
1193
- return result
1213
+ throw :response, result
1194
1214
  end
1195
1215
  rescue ::Gapic::Rest::Error => e
1196
1216
  raise ::Google::Cloud::Error.from_error(e)
@@ -1270,7 +1290,6 @@ module Google
1270
1290
 
1271
1291
  @network_security_stub.get_client_tls_policy request, options do |result, operation|
1272
1292
  yield result, operation if block_given?
1273
- return result
1274
1293
  end
1275
1294
  rescue ::Gapic::Rest::Error => e
1276
1295
  raise ::Google::Cloud::Error.from_error(e)
@@ -1365,7 +1384,7 @@ module Google
1365
1384
  @network_security_stub.create_client_tls_policy request, options do |result, operation|
1366
1385
  result = ::Gapic::Operation.new result, @operations_client, options: options
1367
1386
  yield result, operation if block_given?
1368
- return result
1387
+ throw :response, result
1369
1388
  end
1370
1389
  rescue ::Gapic::Rest::Error => e
1371
1390
  raise ::Google::Cloud::Error.from_error(e)
@@ -1459,7 +1478,7 @@ module Google
1459
1478
  @network_security_stub.update_client_tls_policy request, options do |result, operation|
1460
1479
  result = ::Gapic::Operation.new result, @operations_client, options: options
1461
1480
  yield result, operation if block_given?
1462
- return result
1481
+ throw :response, result
1463
1482
  end
1464
1483
  rescue ::Gapic::Rest::Error => e
1465
1484
  raise ::Google::Cloud::Error.from_error(e)
@@ -1547,7 +1566,7 @@ module Google
1547
1566
  @network_security_stub.delete_client_tls_policy request, options do |result, operation|
1548
1567
  result = ::Gapic::Operation.new result, @operations_client, options: options
1549
1568
  yield result, operation if block_given?
1550
- return result
1569
+ throw :response, result
1551
1570
  end
1552
1571
  rescue ::Gapic::Rest::Error => e
1553
1572
  raise ::Google::Cloud::Error.from_error(e)
@@ -1627,6 +1646,11 @@ module Google
1627
1646
  # default endpoint URL. The default value of nil uses the environment
1628
1647
  # universe (usually the default "googleapis.com" universe).
1629
1648
  # @return [::String,nil]
1649
+ # @!attribute [rw] logger
1650
+ # A custom logger to use for request/response debug logging, or the value
1651
+ # `:default` (the default) to construct a default logger, or `nil` to
1652
+ # explicitly disable logging.
1653
+ # @return [::Logger,:default,nil]
1630
1654
  #
1631
1655
  class Configuration
1632
1656
  extend ::Gapic::Config
@@ -1655,6 +1679,7 @@ module Google
1655
1679
  # by the host service.
1656
1680
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1657
1681
  config_attr :bindings_override, {}, ::Hash, nil
1682
+ config_attr :logger, :default, ::Logger, nil, :default
1658
1683
 
1659
1684
  # @private
1660
1685
  def initialize parent_config = nil