google-cloud-network_services-v1 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9345e6cde69b08f1bc4fc5e11e69eb0cd0a1eebde07e5b9fa05fad33eb05edb0
4
- data.tar.gz: 5d6f6985b9b253bcecd70df3c85f7ec309cf7f9ddaa61c6dc8fe1be1a6db0066
3
+ metadata.gz: 7657da7c8bfe50d0794290f165f19c982d8ed69288f62e90024761be4ff46371
4
+ data.tar.gz: e0d3ec4f5c0ad13cd870fdd186a27fe6b8db8ed50f0bb65ef4e30d5e92dd3a8e
5
5
  SHA512:
6
- metadata.gz: ed149480630d8b85f9db6162aedb637b18f454b9a7769e1fd3706ae54b6948ee4ca1a0f10cb042159637c2ce392192e9745144a6b1b0c4f71025c176213d7462
7
- data.tar.gz: 2af0f7d427573548327798c3ca3eb2a43ae9eb4bc76fe29ab473a9f151293c478fcaefecdf386b061d3550c9fd67fd7f7b55de3a6aa620f80d37d527825645ff
6
+ metadata.gz: 98d8030ccf27c6cb3459a9f5892ec9ae2cdd88048ef6537be6799d42a1478d23ed9182ce3474bfcee7bc5441a93979dea02143e4977aafa500e2c23bc84a10e5
7
+ data.tar.gz: 4fcea2fa45a76b4cc7371ac19262cbdb66d2cfc61a3533e525cee5fc2f8cb2672743e7d3f065b07b185a396f20421e15cec3de3aa4f1326b3348b3622df6926c
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/products/networking)
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_services/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::NetworkServices::V1::DepService::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).
76
86
 
77
87
  ## Supported Ruby Versions
78
88
 
79
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
80
90
 
81
91
  Google provides official support for Ruby versions that are actively supported
82
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -168,14 +168,26 @@ module Google
168
168
  universe_domain: @config.universe_domain,
169
169
  channel_args: @config.channel_args,
170
170
  interceptors: @config.interceptors,
171
- channel_pool_config: @config.channel_pool
171
+ channel_pool_config: @config.channel_pool,
172
+ logger: @config.logger
172
173
  )
173
174
 
175
+ @dep_service_stub.stub_logger&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+
174
185
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
175
186
  config.credentials = credentials
176
187
  config.quota_project = @quota_project_id
177
188
  config.endpoint = @dep_service_stub.endpoint
178
189
  config.universe_domain = @dep_service_stub.universe_domain
190
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
179
191
  end
180
192
 
181
193
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -183,6 +195,7 @@ module Google
183
195
  config.quota_project = @quota_project_id
184
196
  config.endpoint = @dep_service_stub.endpoint
185
197
  config.universe_domain = @dep_service_stub.universe_domain
198
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
186
199
  end
187
200
  end
188
201
 
@@ -207,6 +220,15 @@ module Google
207
220
  #
208
221
  attr_reader :iam_policy_client
209
222
 
223
+ ##
224
+ # The logger used for request/response debug logging.
225
+ #
226
+ # @return [Logger]
227
+ #
228
+ def logger
229
+ @dep_service_stub.logger
230
+ end
231
+
210
232
  # Service calls
211
233
 
212
234
  ##
@@ -305,7 +327,7 @@ module Google
305
327
  @dep_service_stub.call_rpc :list_lb_traffic_extensions, request, options: options do |response, operation|
306
328
  response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_traffic_extensions, 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)
@@ -393,7 +415,6 @@ module Google
393
415
 
394
416
  @dep_service_stub.call_rpc :get_lb_traffic_extension, request, options: options do |response, operation|
395
417
  yield response, operation if block_given?
396
- return response
397
418
  end
398
419
  rescue ::GRPC::BadStatus => e
399
420
  raise ::Google::Cloud::Error.from_error(e)
@@ -508,7 +529,7 @@ module Google
508
529
  @dep_service_stub.call_rpc :create_lb_traffic_extension, request, options: options do |response, operation|
509
530
  response = ::Gapic::Operation.new response, @operations_client, options: options
510
531
  yield response, operation if block_given?
511
- return response
532
+ throw :response, response
512
533
  end
513
534
  rescue ::GRPC::BadStatus => e
514
535
  raise ::Google::Cloud::Error.from_error(e)
@@ -622,7 +643,7 @@ module Google
622
643
  @dep_service_stub.call_rpc :update_lb_traffic_extension, request, options: options do |response, operation|
623
644
  response = ::Gapic::Operation.new response, @operations_client, options: options
624
645
  yield response, operation if block_given?
625
- return response
646
+ throw :response, response
626
647
  end
627
648
  rescue ::GRPC::BadStatus => e
628
649
  raise ::Google::Cloud::Error.from_error(e)
@@ -732,7 +753,7 @@ module Google
732
753
  @dep_service_stub.call_rpc :delete_lb_traffic_extension, request, options: options do |response, operation|
733
754
  response = ::Gapic::Operation.new response, @operations_client, options: options
734
755
  yield response, operation if block_given?
735
- return response
756
+ throw :response, response
736
757
  end
737
758
  rescue ::GRPC::BadStatus => e
738
759
  raise ::Google::Cloud::Error.from_error(e)
@@ -834,7 +855,7 @@ module Google
834
855
  @dep_service_stub.call_rpc :list_lb_route_extensions, request, options: options do |response, operation|
835
856
  response = ::Gapic::PagedEnumerable.new @dep_service_stub, :list_lb_route_extensions, request, response, operation, options
836
857
  yield response, operation if block_given?
837
- return response
858
+ throw :response, response
838
859
  end
839
860
  rescue ::GRPC::BadStatus => e
840
861
  raise ::Google::Cloud::Error.from_error(e)
@@ -922,7 +943,6 @@ module Google
922
943
 
923
944
  @dep_service_stub.call_rpc :get_lb_route_extension, request, options: options do |response, operation|
924
945
  yield response, operation if block_given?
925
- return response
926
946
  end
927
947
  rescue ::GRPC::BadStatus => e
928
948
  raise ::Google::Cloud::Error.from_error(e)
@@ -1036,7 +1056,7 @@ module Google
1036
1056
  @dep_service_stub.call_rpc :create_lb_route_extension, request, options: options do |response, operation|
1037
1057
  response = ::Gapic::Operation.new response, @operations_client, options: options
1038
1058
  yield response, operation if block_given?
1039
- return response
1059
+ throw :response, response
1040
1060
  end
1041
1061
  rescue ::GRPC::BadStatus => e
1042
1062
  raise ::Google::Cloud::Error.from_error(e)
@@ -1150,7 +1170,7 @@ module Google
1150
1170
  @dep_service_stub.call_rpc :update_lb_route_extension, request, options: options do |response, operation|
1151
1171
  response = ::Gapic::Operation.new response, @operations_client, options: options
1152
1172
  yield response, operation if block_given?
1153
- return response
1173
+ throw :response, response
1154
1174
  end
1155
1175
  rescue ::GRPC::BadStatus => e
1156
1176
  raise ::Google::Cloud::Error.from_error(e)
@@ -1260,7 +1280,7 @@ module Google
1260
1280
  @dep_service_stub.call_rpc :delete_lb_route_extension, request, options: options do |response, operation|
1261
1281
  response = ::Gapic::Operation.new response, @operations_client, options: options
1262
1282
  yield response, operation if block_given?
1263
- return response
1283
+ throw :response, response
1264
1284
  end
1265
1285
  rescue ::GRPC::BadStatus => e
1266
1286
  raise ::Google::Cloud::Error.from_error(e)
@@ -1310,6 +1330,13 @@ module Google
1310
1330
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1311
1331
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1312
1332
  # * (`nil`) indicating no credentials
1333
+ #
1334
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1335
+ # external source for authentication to Google Cloud, you must validate it before
1336
+ # providing it to a Google API client library. Providing an unvalidated credential
1337
+ # configuration to Google APIs can compromise the security of your systems and data.
1338
+ # For more information, refer to [Validate credential configurations from external
1339
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1313
1340
  # @return [::Object]
1314
1341
  # @!attribute [rw] scope
1315
1342
  # The OAuth scopes
@@ -1349,6 +1376,11 @@ module Google
1349
1376
  # default endpoint URL. The default value of nil uses the environment
1350
1377
  # universe (usually the default "googleapis.com" universe).
1351
1378
  # @return [::String,nil]
1379
+ # @!attribute [rw] logger
1380
+ # A custom logger to use for request/response debug logging, or the value
1381
+ # `:default` (the default) to construct a default logger, or `nil` to
1382
+ # explicitly disable logging.
1383
+ # @return [::Logger,:default,nil]
1352
1384
  #
1353
1385
  class Configuration
1354
1386
  extend ::Gapic::Config
@@ -1373,6 +1405,7 @@ module Google
1373
1405
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1374
1406
  config_attr :quota_project, nil, ::String, nil
1375
1407
  config_attr :universe_domain, nil, ::String, nil
1408
+ config_attr :logger, :default, ::Logger, nil, :default
1376
1409
 
1377
1410
  # @private
1378
1411
  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)
@@ -649,6 +640,13 @@ module Google
649
640
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
650
641
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
651
642
  # * (`nil`) indicating no credentials
643
+ #
644
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
645
+ # external source for authentication to Google Cloud, you must validate it before
646
+ # providing it to a Google API client library. Providing an unvalidated credential
647
+ # configuration to Google APIs can compromise the security of your systems and data.
648
+ # For more information, refer to [Validate credential configurations from external
649
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
652
650
  # @return [::Object]
653
651
  # @!attribute [rw] scope
654
652
  # The OAuth scopes
@@ -688,6 +686,11 @@ module Google
688
686
  # default endpoint URL. The default value of nil uses the environment
689
687
  # universe (usually the default "googleapis.com" universe).
690
688
  # @return [::String,nil]
689
+ # @!attribute [rw] logger
690
+ # A custom logger to use for request/response debug logging, or the value
691
+ # `:default` (the default) to construct a default logger, or `nil` to
692
+ # explicitly disable logging.
693
+ # @return [::Logger,:default,nil]
691
694
  #
692
695
  class Configuration
693
696
  extend ::Gapic::Config
@@ -712,6 +715,7 @@ module Google
712
715
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
716
  config_attr :quota_project, nil, ::String, nil
714
717
  config_attr :universe_domain, nil, ::String, nil
718
+ config_attr :logger, :default, ::Logger, nil, :default
715
719
 
716
720
  # @private
717
721
  def initialize parent_config = nil
@@ -161,15 +161,27 @@ module Google
161
161
  endpoint: @config.endpoint,
162
162
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
163
  universe_domain: @config.universe_domain,
164
- credentials: credentials
164
+ credentials: credentials,
165
+ logger: @config.logger
165
166
  )
166
167
 
168
+ @dep_service_stub.logger(stub: true)&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+
167
178
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
168
179
  config.credentials = credentials
169
180
  config.quota_project = @quota_project_id
170
181
  config.endpoint = @dep_service_stub.endpoint
171
182
  config.universe_domain = @dep_service_stub.universe_domain
172
183
  config.bindings_override = @config.bindings_override
184
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
173
185
  end
174
186
 
175
187
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -178,6 +190,7 @@ module Google
178
190
  config.endpoint = @dep_service_stub.endpoint
179
191
  config.universe_domain = @dep_service_stub.universe_domain
180
192
  config.bindings_override = @config.bindings_override
193
+ config.logger = @dep_service_stub.logger if config.respond_to? :logger=
181
194
  end
182
195
  end
183
196
 
@@ -202,6 +215,15 @@ module Google
202
215
  #
203
216
  attr_reader :iam_policy_client
204
217
 
218
+ ##
219
+ # The logger used for request/response debug logging.
220
+ #
221
+ # @return [Logger]
222
+ #
223
+ def logger
224
+ @dep_service_stub.logger
225
+ end
226
+
205
227
  # Service calls
206
228
 
207
229
  ##
@@ -292,7 +314,6 @@ module Google
292
314
 
293
315
  @dep_service_stub.list_lb_traffic_extensions request, options do |result, operation|
294
316
  yield result, operation if block_given?
295
- return result
296
317
  end
297
318
  rescue ::Gapic::Rest::Error => e
298
319
  raise ::Google::Cloud::Error.from_error(e)
@@ -373,7 +394,6 @@ module Google
373
394
 
374
395
  @dep_service_stub.get_lb_traffic_extension request, options do |result, operation|
375
396
  yield result, operation if block_given?
376
- return result
377
397
  end
378
398
  rescue ::Gapic::Rest::Error => e
379
399
  raise ::Google::Cloud::Error.from_error(e)
@@ -481,7 +501,7 @@ module Google
481
501
  @dep_service_stub.create_lb_traffic_extension request, options do |result, operation|
482
502
  result = ::Gapic::Operation.new result, @operations_client, options: options
483
503
  yield result, operation if block_given?
484
- return result
504
+ throw :response, result
485
505
  end
486
506
  rescue ::Gapic::Rest::Error => e
487
507
  raise ::Google::Cloud::Error.from_error(e)
@@ -588,7 +608,7 @@ module Google
588
608
  @dep_service_stub.update_lb_traffic_extension request, options do |result, operation|
589
609
  result = ::Gapic::Operation.new result, @operations_client, options: options
590
610
  yield result, operation if block_given?
591
- return result
611
+ throw :response, result
592
612
  end
593
613
  rescue ::Gapic::Rest::Error => e
594
614
  raise ::Google::Cloud::Error.from_error(e)
@@ -691,7 +711,7 @@ module Google
691
711
  @dep_service_stub.delete_lb_traffic_extension request, options do |result, operation|
692
712
  result = ::Gapic::Operation.new result, @operations_client, options: options
693
713
  yield result, operation if block_given?
694
- return result
714
+ throw :response, result
695
715
  end
696
716
  rescue ::Gapic::Rest::Error => e
697
717
  raise ::Google::Cloud::Error.from_error(e)
@@ -785,7 +805,6 @@ module Google
785
805
 
786
806
  @dep_service_stub.list_lb_route_extensions request, options do |result, operation|
787
807
  yield result, operation if block_given?
788
- return result
789
808
  end
790
809
  rescue ::Gapic::Rest::Error => e
791
810
  raise ::Google::Cloud::Error.from_error(e)
@@ -866,7 +885,6 @@ module Google
866
885
 
867
886
  @dep_service_stub.get_lb_route_extension request, options do |result, operation|
868
887
  yield result, operation if block_given?
869
- return result
870
888
  end
871
889
  rescue ::Gapic::Rest::Error => e
872
890
  raise ::Google::Cloud::Error.from_error(e)
@@ -973,7 +991,7 @@ module Google
973
991
  @dep_service_stub.create_lb_route_extension request, options do |result, operation|
974
992
  result = ::Gapic::Operation.new result, @operations_client, options: options
975
993
  yield result, operation if block_given?
976
- return result
994
+ throw :response, result
977
995
  end
978
996
  rescue ::Gapic::Rest::Error => e
979
997
  raise ::Google::Cloud::Error.from_error(e)
@@ -1080,7 +1098,7 @@ module Google
1080
1098
  @dep_service_stub.update_lb_route_extension request, options do |result, operation|
1081
1099
  result = ::Gapic::Operation.new result, @operations_client, options: options
1082
1100
  yield result, operation if block_given?
1083
- return result
1101
+ throw :response, result
1084
1102
  end
1085
1103
  rescue ::Gapic::Rest::Error => e
1086
1104
  raise ::Google::Cloud::Error.from_error(e)
@@ -1183,7 +1201,7 @@ module Google
1183
1201
  @dep_service_stub.delete_lb_route_extension request, options do |result, operation|
1184
1202
  result = ::Gapic::Operation.new result, @operations_client, options: options
1185
1203
  yield result, operation if block_given?
1186
- return result
1204
+ throw :response, result
1187
1205
  end
1188
1206
  rescue ::Gapic::Rest::Error => e
1189
1207
  raise ::Google::Cloud::Error.from_error(e)
@@ -1231,6 +1249,13 @@ module Google
1231
1249
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1232
1250
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1233
1251
  # * (`nil`) indicating no credentials
1252
+ #
1253
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1254
+ # external source for authentication to Google Cloud, you must validate it before
1255
+ # providing it to a Google API client library. Providing an unvalidated credential
1256
+ # configuration to Google APIs can compromise the security of your systems and data.
1257
+ # For more information, refer to [Validate credential configurations from external
1258
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1234
1259
  # @return [::Object]
1235
1260
  # @!attribute [rw] scope
1236
1261
  # The OAuth scopes
@@ -1263,6 +1288,11 @@ module Google
1263
1288
  # default endpoint URL. The default value of nil uses the environment
1264
1289
  # universe (usually the default "googleapis.com" universe).
1265
1290
  # @return [::String,nil]
1291
+ # @!attribute [rw] logger
1292
+ # A custom logger to use for request/response debug logging, or the value
1293
+ # `:default` (the default) to construct a default logger, or `nil` to
1294
+ # explicitly disable logging.
1295
+ # @return [::Logger,:default,nil]
1266
1296
  #
1267
1297
  class Configuration
1268
1298
  extend ::Gapic::Config
@@ -1291,6 +1321,7 @@ module Google
1291
1321
  # by the host service.
1292
1322
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1293
1323
  config_attr :bindings_override, {}, ::Hash, nil
1324
+ config_attr :logger, :default, ::Logger, nil, :default
1294
1325
 
1295
1326
  # @private
1296
1327
  def initialize parent_config = nil