google-cloud-secure_source_manager-v1 1.1.0 → 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: 6be47686a07eebc4c9ba12077b0513e85f739f810bd93822a58a88435cdfca74
4
- data.tar.gz: c6d0a9b1e82e7f827350a35f26b9d268ce8eda684bc1dfb90f52ed1d507c417d
3
+ metadata.gz: e43cbb9e3f7091ab76b03c275132ecd2a0441911724aa00bb55bd7ccec9795b5
4
+ data.tar.gz: bce8619fe0f1927872ea3260b018ce68ff01171e250339fe15053806af3a7266
5
5
  SHA512:
6
- metadata.gz: 26a7b6dd027718d6d3ea03352500a79e6ee76428b1346aa5446bc1bc079b6f413e20099c392b79b7cf851dc0f61e8f6160181856795b61ac24f060dd65297ac4
7
- data.tar.gz: 711d170f6dfbfb43d4917fb7588517a08cd851dee7d4569f46149f741905f971f14d89cadf12f96f64225d13cefbcd57880e75046eeb274aad07628ed0705f99
6
+ metadata.gz: 7394409031f2d0cc04720e7f58149a5cd5cc7cdb4767994127acbb0fb352134428c6e58bc809b5c3276124bc053d0bf8c46dbb98c5a82f5c584cc8915202d5b1
7
+ data.tar.gz: 6c4073a186ea6e6e67f039a40845a575304d02eb5422cbfd40bb26ca3c1a05e295fdc3fa9a34a4497759309e23a58bbebb13b81c2b9a4c42c0a37e06dbf72153
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/secure-source-manager/docs/overview)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/secure_source_manager/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::SecureSourceManager::V1::SecureSourceManager::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).
@@ -210,14 +210,26 @@ module Google
210
210
  universe_domain: @config.universe_domain,
211
211
  channel_args: @config.channel_args,
212
212
  interceptors: @config.interceptors,
213
- channel_pool_config: @config.channel_pool
213
+ channel_pool_config: @config.channel_pool,
214
+ logger: @config.logger
214
215
  )
215
216
 
217
+ @secure_source_manager_stub.stub_logger&.info do |entry|
218
+ entry.set_system_name
219
+ entry.set_service
220
+ entry.message = "Created client for #{entry.service}"
221
+ entry.set_credentials_fields credentials
222
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
223
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
224
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
225
+ end
226
+
216
227
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
217
228
  config.credentials = credentials
218
229
  config.quota_project = @quota_project_id
219
230
  config.endpoint = @secure_source_manager_stub.endpoint
220
231
  config.universe_domain = @secure_source_manager_stub.universe_domain
232
+ config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
221
233
  end
222
234
 
223
235
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -225,6 +237,7 @@ module Google
225
237
  config.quota_project = @quota_project_id
226
238
  config.endpoint = @secure_source_manager_stub.endpoint
227
239
  config.universe_domain = @secure_source_manager_stub.universe_domain
240
+ config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
228
241
  end
229
242
  end
230
243
 
@@ -249,6 +262,15 @@ module Google
249
262
  #
250
263
  attr_reader :iam_policy_client
251
264
 
265
+ ##
266
+ # The logger used for request/response debug logging.
267
+ #
268
+ # @return [Logger]
269
+ #
270
+ def logger
271
+ @secure_source_manager_stub.logger
272
+ end
273
+
252
274
  # Service calls
253
275
 
254
276
  ##
@@ -345,7 +367,7 @@ module Google
345
367
  @secure_source_manager_stub.call_rpc :list_instances, request, options: options do |response, operation|
346
368
  response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_instances, request, response, operation, options
347
369
  yield response, operation if block_given?
348
- return response
370
+ throw :response, response
349
371
  end
350
372
  rescue ::GRPC::BadStatus => e
351
373
  raise ::Google::Cloud::Error.from_error(e)
@@ -431,7 +453,6 @@ module Google
431
453
 
432
454
  @secure_source_manager_stub.call_rpc :get_instance, request, options: options do |response, operation|
433
455
  yield response, operation if block_given?
434
- return response
435
456
  end
436
457
  rescue ::GRPC::BadStatus => e
437
458
  raise ::Google::Cloud::Error.from_error(e)
@@ -543,7 +564,7 @@ module Google
543
564
  @secure_source_manager_stub.call_rpc :create_instance, request, options: options do |response, operation|
544
565
  response = ::Gapic::Operation.new response, @operations_client, options: options
545
566
  yield response, operation if block_given?
546
- return response
567
+ throw :response, response
547
568
  end
548
569
  rescue ::GRPC::BadStatus => e
549
570
  raise ::Google::Cloud::Error.from_error(e)
@@ -651,7 +672,7 @@ module Google
651
672
  @secure_source_manager_stub.call_rpc :delete_instance, request, options: options do |response, operation|
652
673
  response = ::Gapic::Operation.new response, @operations_client, options: options
653
674
  yield response, operation if block_given?
654
- return response
675
+ throw :response, response
655
676
  end
656
677
  rescue ::GRPC::BadStatus => e
657
678
  raise ::Google::Cloud::Error.from_error(e)
@@ -759,7 +780,7 @@ module Google
759
780
  @secure_source_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation|
760
781
  response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, request, response, operation, options
761
782
  yield response, operation if block_given?
762
- return response
783
+ throw :response, response
763
784
  end
764
785
  rescue ::GRPC::BadStatus => e
765
786
  raise ::Google::Cloud::Error.from_error(e)
@@ -849,7 +870,6 @@ module Google
849
870
 
850
871
  @secure_source_manager_stub.call_rpc :get_repository, request, options: options do |response, operation|
851
872
  yield response, operation if block_given?
852
- return response
853
873
  end
854
874
  rescue ::GRPC::BadStatus => e
855
875
  raise ::Google::Cloud::Error.from_error(e)
@@ -952,7 +972,7 @@ module Google
952
972
  @secure_source_manager_stub.call_rpc :create_repository, request, options: options do |response, operation|
953
973
  response = ::Gapic::Operation.new response, @operations_client, options: options
954
974
  yield response, operation if block_given?
955
- return response
975
+ throw :response, response
956
976
  end
957
977
  rescue ::GRPC::BadStatus => e
958
978
  raise ::Google::Cloud::Error.from_error(e)
@@ -1053,7 +1073,7 @@ module Google
1053
1073
  @secure_source_manager_stub.call_rpc :delete_repository, request, options: options do |response, operation|
1054
1074
  response = ::Gapic::Operation.new response, @operations_client, options: options
1055
1075
  yield response, operation if block_given?
1056
- return response
1076
+ throw :response, response
1057
1077
  end
1058
1078
  rescue ::GRPC::BadStatus => e
1059
1079
  raise ::Google::Cloud::Error.from_error(e)
@@ -1143,7 +1163,6 @@ module Google
1143
1163
 
1144
1164
  @secure_source_manager_stub.call_rpc :get_iam_policy_repo, request, options: options do |response, operation|
1145
1165
  yield response, operation if block_given?
1146
- return response
1147
1166
  end
1148
1167
  rescue ::GRPC::BadStatus => e
1149
1168
  raise ::Google::Cloud::Error.from_error(e)
@@ -1241,7 +1260,6 @@ module Google
1241
1260
 
1242
1261
  @secure_source_manager_stub.call_rpc :set_iam_policy_repo, request, options: options do |response, operation|
1243
1262
  yield response, operation if block_given?
1244
- return response
1245
1263
  end
1246
1264
  rescue ::GRPC::BadStatus => e
1247
1265
  raise ::Google::Cloud::Error.from_error(e)
@@ -1334,7 +1352,6 @@ module Google
1334
1352
 
1335
1353
  @secure_source_manager_stub.call_rpc :test_iam_permissions_repo, 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)
@@ -1429,7 +1446,7 @@ module Google
1429
1446
  @secure_source_manager_stub.call_rpc :create_branch_rule, request, options: options do |response, operation|
1430
1447
  response = ::Gapic::Operation.new response, @operations_client, options: options
1431
1448
  yield response, operation if block_given?
1432
- return response
1449
+ throw :response, response
1433
1450
  end
1434
1451
  rescue ::GRPC::BadStatus => e
1435
1452
  raise ::Google::Cloud::Error.from_error(e)
@@ -1521,7 +1538,7 @@ module Google
1521
1538
  @secure_source_manager_stub.call_rpc :list_branch_rules, request, options: options do |response, operation|
1522
1539
  response = ::Gapic::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, request, response, operation, options
1523
1540
  yield response, operation if block_given?
1524
- return response
1541
+ throw :response, response
1525
1542
  end
1526
1543
  rescue ::GRPC::BadStatus => e
1527
1544
  raise ::Google::Cloud::Error.from_error(e)
@@ -1609,7 +1626,6 @@ module Google
1609
1626
 
1610
1627
  @secure_source_manager_stub.call_rpc :get_branch_rule, request, options: options do |response, operation|
1611
1628
  yield response, operation if block_given?
1612
- return response
1613
1629
  end
1614
1630
  rescue ::GRPC::BadStatus => e
1615
1631
  raise ::Google::Cloud::Error.from_error(e)
@@ -1711,7 +1727,7 @@ module Google
1711
1727
  @secure_source_manager_stub.call_rpc :update_branch_rule, request, options: options do |response, operation|
1712
1728
  response = ::Gapic::Operation.new response, @operations_client, options: options
1713
1729
  yield response, operation if block_given?
1714
- return response
1730
+ throw :response, response
1715
1731
  end
1716
1732
  rescue ::GRPC::BadStatus => e
1717
1733
  raise ::Google::Cloud::Error.from_error(e)
@@ -1807,7 +1823,7 @@ module Google
1807
1823
  @secure_source_manager_stub.call_rpc :delete_branch_rule, request, options: options do |response, operation|
1808
1824
  response = ::Gapic::Operation.new response, @operations_client, options: options
1809
1825
  yield response, operation if block_given?
1810
- return response
1826
+ throw :response, response
1811
1827
  end
1812
1828
  rescue ::GRPC::BadStatus => e
1813
1829
  raise ::Google::Cloud::Error.from_error(e)
@@ -1896,6 +1912,11 @@ module Google
1896
1912
  # default endpoint URL. The default value of nil uses the environment
1897
1913
  # universe (usually the default "googleapis.com" universe).
1898
1914
  # @return [::String,nil]
1915
+ # @!attribute [rw] logger
1916
+ # A custom logger to use for request/response debug logging, or the value
1917
+ # `:default` (the default) to construct a default logger, or `nil` to
1918
+ # explicitly disable logging.
1919
+ # @return [::Logger,:default,nil]
1899
1920
  #
1900
1921
  class Configuration
1901
1922
  extend ::Gapic::Config
@@ -1920,6 +1941,7 @@ module Google
1920
1941
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1921
1942
  config_attr :quota_project, nil, ::String, nil
1922
1943
  config_attr :universe_domain, nil, ::String, nil
1944
+ config_attr :logger, :default, ::Logger, nil, :default
1923
1945
 
1924
1946
  # @private
1925
1947
  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
@@ -203,15 +203,27 @@ module Google
203
203
  endpoint: @config.endpoint,
204
204
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
205
205
  universe_domain: @config.universe_domain,
206
- credentials: credentials
206
+ credentials: credentials,
207
+ logger: @config.logger
207
208
  )
208
209
 
210
+ @secure_source_manager_stub.logger(stub: true)&.info do |entry|
211
+ entry.set_system_name
212
+ entry.set_service
213
+ entry.message = "Created client for #{entry.service}"
214
+ entry.set_credentials_fields credentials
215
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
216
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
217
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
218
+ end
219
+
209
220
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
210
221
  config.credentials = credentials
211
222
  config.quota_project = @quota_project_id
212
223
  config.endpoint = @secure_source_manager_stub.endpoint
213
224
  config.universe_domain = @secure_source_manager_stub.universe_domain
214
225
  config.bindings_override = @config.bindings_override
226
+ config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
215
227
  end
216
228
 
217
229
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -220,6 +232,7 @@ module Google
220
232
  config.endpoint = @secure_source_manager_stub.endpoint
221
233
  config.universe_domain = @secure_source_manager_stub.universe_domain
222
234
  config.bindings_override = @config.bindings_override
235
+ config.logger = @secure_source_manager_stub.logger if config.respond_to? :logger=
223
236
  end
224
237
  end
225
238
 
@@ -244,6 +257,15 @@ module Google
244
257
  #
245
258
  attr_reader :iam_policy_client
246
259
 
260
+ ##
261
+ # The logger used for request/response debug logging.
262
+ #
263
+ # @return [Logger]
264
+ #
265
+ def logger
266
+ @secure_source_manager_stub.logger
267
+ end
268
+
247
269
  # Service calls
248
270
 
249
271
  ##
@@ -332,7 +354,6 @@ module Google
332
354
 
333
355
  @secure_source_manager_stub.list_instances request, options do |result, operation|
334
356
  yield result, operation if block_given?
335
- return result
336
357
  end
337
358
  rescue ::Gapic::Rest::Error => e
338
359
  raise ::Google::Cloud::Error.from_error(e)
@@ -411,7 +432,6 @@ module Google
411
432
 
412
433
  @secure_source_manager_stub.get_instance request, options do |result, operation|
413
434
  yield result, operation if block_given?
414
- return result
415
435
  end
416
436
  rescue ::Gapic::Rest::Error => e
417
437
  raise ::Google::Cloud::Error.from_error(e)
@@ -516,7 +536,7 @@ module Google
516
536
  @secure_source_manager_stub.create_instance request, options do |result, operation|
517
537
  result = ::Gapic::Operation.new result, @operations_client, options: options
518
538
  yield result, operation if block_given?
519
- return result
539
+ throw :response, result
520
540
  end
521
541
  rescue ::Gapic::Rest::Error => e
522
542
  raise ::Google::Cloud::Error.from_error(e)
@@ -617,7 +637,7 @@ module Google
617
637
  @secure_source_manager_stub.delete_instance request, options do |result, operation|
618
638
  result = ::Gapic::Operation.new result, @operations_client, options: options
619
639
  yield result, operation if block_given?
620
- return result
640
+ throw :response, result
621
641
  end
622
642
  rescue ::Gapic::Rest::Error => e
623
643
  raise ::Google::Cloud::Error.from_error(e)
@@ -718,7 +738,7 @@ module Google
718
738
  @secure_source_manager_stub.list_repositories request, options do |result, operation|
719
739
  result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_repositories, "repositories", request, result, options
720
740
  yield result, operation if block_given?
721
- return result
741
+ throw :response, result
722
742
  end
723
743
  rescue ::Gapic::Rest::Error => e
724
744
  raise ::Google::Cloud::Error.from_error(e)
@@ -801,7 +821,6 @@ module Google
801
821
 
802
822
  @secure_source_manager_stub.get_repository request, options do |result, operation|
803
823
  yield result, operation if block_given?
804
- return result
805
824
  end
806
825
  rescue ::Gapic::Rest::Error => e
807
826
  raise ::Google::Cloud::Error.from_error(e)
@@ -897,7 +916,7 @@ module Google
897
916
  @secure_source_manager_stub.create_repository request, options do |result, operation|
898
917
  result = ::Gapic::Operation.new result, @operations_client, options: options
899
918
  yield result, operation if block_given?
900
- return result
919
+ throw :response, result
901
920
  end
902
921
  rescue ::Gapic::Rest::Error => e
903
922
  raise ::Google::Cloud::Error.from_error(e)
@@ -991,7 +1010,7 @@ module Google
991
1010
  @secure_source_manager_stub.delete_repository request, options do |result, operation|
992
1011
  result = ::Gapic::Operation.new result, @operations_client, options: options
993
1012
  yield result, operation if block_given?
994
- return result
1013
+ throw :response, result
995
1014
  end
996
1015
  rescue ::Gapic::Rest::Error => e
997
1016
  raise ::Google::Cloud::Error.from_error(e)
@@ -1074,7 +1093,6 @@ module Google
1074
1093
 
1075
1094
  @secure_source_manager_stub.get_iam_policy_repo request, options do |result, operation|
1076
1095
  yield result, operation if block_given?
1077
- return result
1078
1096
  end
1079
1097
  rescue ::Gapic::Rest::Error => e
1080
1098
  raise ::Google::Cloud::Error.from_error(e)
@@ -1165,7 +1183,6 @@ module Google
1165
1183
 
1166
1184
  @secure_source_manager_stub.set_iam_policy_repo request, options do |result, operation|
1167
1185
  yield result, operation if block_given?
1168
- return result
1169
1186
  end
1170
1187
  rescue ::Gapic::Rest::Error => e
1171
1188
  raise ::Google::Cloud::Error.from_error(e)
@@ -1251,7 +1268,6 @@ module Google
1251
1268
 
1252
1269
  @secure_source_manager_stub.test_iam_permissions_repo request, options do |result, operation|
1253
1270
  yield result, operation if block_given?
1254
- return result
1255
1271
  end
1256
1272
  rescue ::Gapic::Rest::Error => e
1257
1273
  raise ::Google::Cloud::Error.from_error(e)
@@ -1339,7 +1355,7 @@ module Google
1339
1355
  @secure_source_manager_stub.create_branch_rule request, options do |result, operation|
1340
1356
  result = ::Gapic::Operation.new result, @operations_client, options: options
1341
1357
  yield result, operation if block_given?
1342
- return result
1358
+ throw :response, result
1343
1359
  end
1344
1360
  rescue ::Gapic::Rest::Error => e
1345
1361
  raise ::Google::Cloud::Error.from_error(e)
@@ -1424,7 +1440,7 @@ module Google
1424
1440
  @secure_source_manager_stub.list_branch_rules request, options do |result, operation|
1425
1441
  result = ::Gapic::Rest::PagedEnumerable.new @secure_source_manager_stub, :list_branch_rules, "branch_rules", request, result, options
1426
1442
  yield result, operation if block_given?
1427
- return result
1443
+ throw :response, result
1428
1444
  end
1429
1445
  rescue ::Gapic::Rest::Error => e
1430
1446
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1521,6 @@ module Google
1505
1521
 
1506
1522
  @secure_source_manager_stub.get_branch_rule request, options do |result, operation|
1507
1523
  yield result, operation if block_given?
1508
- return result
1509
1524
  end
1510
1525
  rescue ::Gapic::Rest::Error => e
1511
1526
  raise ::Google::Cloud::Error.from_error(e)
@@ -1600,7 +1615,7 @@ module Google
1600
1615
  @secure_source_manager_stub.update_branch_rule request, options do |result, operation|
1601
1616
  result = ::Gapic::Operation.new result, @operations_client, options: options
1602
1617
  yield result, operation if block_given?
1603
- return result
1618
+ throw :response, result
1604
1619
  end
1605
1620
  rescue ::Gapic::Rest::Error => e
1606
1621
  raise ::Google::Cloud::Error.from_error(e)
@@ -1689,7 +1704,7 @@ module Google
1689
1704
  @secure_source_manager_stub.delete_branch_rule request, options do |result, operation|
1690
1705
  result = ::Gapic::Operation.new result, @operations_client, options: options
1691
1706
  yield result, operation if block_given?
1692
- return result
1707
+ throw :response, result
1693
1708
  end
1694
1709
  rescue ::Gapic::Rest::Error => e
1695
1710
  raise ::Google::Cloud::Error.from_error(e)
@@ -1769,6 +1784,11 @@ module Google
1769
1784
  # default endpoint URL. The default value of nil uses the environment
1770
1785
  # universe (usually the default "googleapis.com" universe).
1771
1786
  # @return [::String,nil]
1787
+ # @!attribute [rw] logger
1788
+ # A custom logger to use for request/response debug logging, or the value
1789
+ # `:default` (the default) to construct a default logger, or `nil` to
1790
+ # explicitly disable logging.
1791
+ # @return [::Logger,:default,nil]
1772
1792
  #
1773
1793
  class Configuration
1774
1794
  extend ::Gapic::Config
@@ -1797,6 +1817,7 @@ module Google
1797
1817
  # by the host service.
1798
1818
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1799
1819
  config_attr :bindings_override, {}, ::Hash, nil
1820
+ config_attr :logger, :default, ::Logger, nil, :default
1800
1821
 
1801
1822
  # @private
1802
1823
  def initialize parent_config = nil