google-cloud-resource_manager-v3 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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/resource_manager/v3/folders/client.rb +41 -12
  4. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +19 -15
  5. data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +41 -12
  6. data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +50 -38
  7. data/lib/google/cloud/resource_manager/v3/folders/rest/service_stub.rb +102 -68
  8. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +35 -6
  9. data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +35 -6
  10. data/lib/google/cloud/resource_manager/v3/organizations/rest/service_stub.rb +54 -32
  11. data/lib/google/cloud/resource_manager/v3/projects/client.rb +41 -12
  12. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +19 -15
  13. data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +41 -12
  14. data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +50 -38
  15. data/lib/google/cloud/resource_manager/v3/projects/rest/service_stub.rb +102 -68
  16. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +38 -5
  17. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +19 -15
  18. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +38 -5
  19. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +50 -38
  20. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +46 -26
  21. data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +37 -4
  22. data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +19 -15
  23. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +37 -4
  24. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +50 -38
  25. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +38 -20
  26. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +38 -10
  27. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +19 -15
  28. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +38 -10
  29. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +50 -38
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +86 -56
  31. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +38 -10
  32. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +19 -15
  33. data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +38 -10
  34. data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +50 -38
  35. data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +86 -56
  36. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  37. data/proto_docs/google/api/client.rb +39 -0
  38. data/proto_docs/google/longrunning/operations.rb +23 -14
  39. metadata +6 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92827b8a1dde2b810fbb9beaf540daeb104ede5675117a9066731dcea8ee48c9
4
- data.tar.gz: 528f349bb42b145439b37b0ca6262bb6a4519c2e88104688097a48ac9fec1035
3
+ metadata.gz: bff53e0ad379a6db9b59ca277ec758849aea1e418cb26f580c657f61f59e446c
4
+ data.tar.gz: 1512b787c07c8419b0ab5b0766fe82f0ecee092c38a99e4f620173a2835c5279
5
5
  SHA512:
6
- metadata.gz: 1d110d673cb93bab58f733445f5dc566f231af4b4985a419694feb61e0271ea96ffa264d8deb7d68eb71cdde73244ee3870de422f1c99e32d781d0062b495bc1
7
- data.tar.gz: 11e84680d9fdc1007bb5230454863b41ce15f5fb507b23dc33fbd361ba1edba55eaefba7ca2eb162b19241fd05af18c7ce16be4bd4a2dd1181b9e3d8961a9aa6
6
+ metadata.gz: 4edc8f4462c661b9123c06cb550602144b01a383addbe101e79cff834aadf8669d816de0077dab779b20b01fa994323937045f73222408bc1c0911b47990b4c0
7
+ data.tar.gz: 996b261be1232ba6645d6f8e55d62e748d26e4a8a8b85807de2266a1c7d23ab7c6e22763efbd83311a844dd572befe7caf5736c7330ad0e4f81887f9b3a36d3b
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/resource-manager/)
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/resource_manager/v3"
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::ResourceManager::V3::Folders::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
@@ -195,8 +195,19 @@ module Google
195
195
  universe_domain: @config.universe_domain,
196
196
  channel_args: @config.channel_args,
197
197
  interceptors: @config.interceptors,
198
- channel_pool_config: @config.channel_pool
198
+ channel_pool_config: @config.channel_pool,
199
+ logger: @config.logger
199
200
  )
201
+
202
+ @folders_stub.stub_logger&.info do |entry|
203
+ entry.set_system_name
204
+ entry.set_service
205
+ entry.message = "Created client for #{entry.service}"
206
+ entry.set_credentials_fields credentials
207
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
208
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
209
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
210
+ end
200
211
  end
201
212
 
202
213
  ##
@@ -206,6 +217,15 @@ module Google
206
217
  #
207
218
  attr_reader :operations_client
208
219
 
220
+ ##
221
+ # The logger used for request/response debug logging.
222
+ #
223
+ # @return [Logger]
224
+ #
225
+ def logger
226
+ @folders_stub.logger
227
+ end
228
+
209
229
  # Service calls
210
230
 
211
231
  ##
@@ -293,7 +313,6 @@ module Google
293
313
 
294
314
  @folders_stub.call_rpc :get_folder, request, options: options do |response, operation|
295
315
  yield response, operation if block_given?
296
- return response
297
316
  end
298
317
  rescue ::GRPC::BadStatus => e
299
318
  raise ::Google::Cloud::Error.from_error(e)
@@ -401,7 +420,7 @@ module Google
401
420
  @folders_stub.call_rpc :list_folders, request, options: options do |response, operation|
402
421
  response = ::Gapic::PagedEnumerable.new @folders_stub, :list_folders, request, response, operation, options
403
422
  yield response, operation if block_given?
404
- return response
423
+ throw :response, response
405
424
  end
406
425
  rescue ::GRPC::BadStatus => e
407
426
  raise ::Google::Cloud::Error.from_error(e)
@@ -526,7 +545,7 @@ module Google
526
545
  @folders_stub.call_rpc :search_folders, request, options: options do |response, operation|
527
546
  response = ::Gapic::PagedEnumerable.new @folders_stub, :search_folders, request, response, operation, options
528
547
  yield response, operation if block_given?
529
- return response
548
+ throw :response, response
530
549
  end
531
550
  rescue ::GRPC::BadStatus => e
532
551
  raise ::Google::Cloud::Error.from_error(e)
@@ -639,7 +658,7 @@ module Google
639
658
  @folders_stub.call_rpc :create_folder, request, options: options do |response, operation|
640
659
  response = ::Gapic::Operation.new response, @operations_client, options: options
641
660
  yield response, operation if block_given?
642
- return response
661
+ throw :response, response
643
662
  end
644
663
  rescue ::GRPC::BadStatus => e
645
664
  raise ::Google::Cloud::Error.from_error(e)
@@ -753,7 +772,7 @@ module Google
753
772
  @folders_stub.call_rpc :update_folder, request, options: options do |response, operation|
754
773
  response = ::Gapic::Operation.new response, @operations_client, options: options
755
774
  yield response, operation if block_given?
756
- return response
775
+ throw :response, response
757
776
  end
758
777
  rescue ::GRPC::BadStatus => e
759
778
  raise ::Google::Cloud::Error.from_error(e)
@@ -868,7 +887,7 @@ module Google
868
887
  @folders_stub.call_rpc :move_folder, request, options: options do |response, operation|
869
888
  response = ::Gapic::Operation.new response, @operations_client, options: options
870
889
  yield response, operation if block_given?
871
- return response
890
+ throw :response, response
872
891
  end
873
892
  rescue ::GRPC::BadStatus => e
874
893
  raise ::Google::Cloud::Error.from_error(e)
@@ -973,7 +992,7 @@ module Google
973
992
  @folders_stub.call_rpc :delete_folder, request, options: options do |response, operation|
974
993
  response = ::Gapic::Operation.new response, @operations_client, options: options
975
994
  yield response, operation if block_given?
976
- return response
995
+ throw :response, response
977
996
  end
978
997
  rescue ::GRPC::BadStatus => e
979
998
  raise ::Google::Cloud::Error.from_error(e)
@@ -1078,7 +1097,7 @@ module Google
1078
1097
  @folders_stub.call_rpc :undelete_folder, request, options: options do |response, operation|
1079
1098
  response = ::Gapic::Operation.new response, @operations_client, options: options
1080
1099
  yield response, operation if block_given?
1081
- return response
1100
+ throw :response, response
1082
1101
  end
1083
1102
  rescue ::GRPC::BadStatus => e
1084
1103
  raise ::Google::Cloud::Error.from_error(e)
@@ -1172,7 +1191,6 @@ module Google
1172
1191
 
1173
1192
  @folders_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
1174
1193
  yield response, operation if block_given?
1175
- return response
1176
1194
  end
1177
1195
  rescue ::GRPC::BadStatus => e
1178
1196
  raise ::Google::Cloud::Error.from_error(e)
@@ -1274,7 +1292,6 @@ module Google
1274
1292
 
1275
1293
  @folders_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1276
1294
  yield response, operation if block_given?
1277
- return response
1278
1295
  end
1279
1296
  rescue ::GRPC::BadStatus => e
1280
1297
  raise ::Google::Cloud::Error.from_error(e)
@@ -1370,7 +1387,6 @@ module Google
1370
1387
 
1371
1388
  @folders_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1372
1389
  yield response, operation if block_given?
1373
- return response
1374
1390
  end
1375
1391
  rescue ::GRPC::BadStatus => e
1376
1392
  raise ::Google::Cloud::Error.from_error(e)
@@ -1420,6 +1436,13 @@ module Google
1420
1436
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1421
1437
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1422
1438
  # * (`nil`) indicating no credentials
1439
+ #
1440
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1441
+ # external source for authentication to Google Cloud, you must validate it before
1442
+ # providing it to a Google API client library. Providing an unvalidated credential
1443
+ # configuration to Google APIs can compromise the security of your systems and data.
1444
+ # For more information, refer to [Validate credential configurations from external
1445
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1423
1446
  # @return [::Object]
1424
1447
  # @!attribute [rw] scope
1425
1448
  # The OAuth scopes
@@ -1459,6 +1482,11 @@ module Google
1459
1482
  # default endpoint URL. The default value of nil uses the environment
1460
1483
  # universe (usually the default "googleapis.com" universe).
1461
1484
  # @return [::String,nil]
1485
+ # @!attribute [rw] logger
1486
+ # A custom logger to use for request/response debug logging, or the value
1487
+ # `:default` (the default) to construct a default logger, or `nil` to
1488
+ # explicitly disable logging.
1489
+ # @return [::Logger,:default,nil]
1462
1490
  #
1463
1491
  class Configuration
1464
1492
  extend ::Gapic::Config
@@ -1483,6 +1511,7 @@ module Google
1483
1511
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1484
1512
  config_attr :quota_project, nil, ::String, nil
1485
1513
  config_attr :universe_domain, nil, ::String, nil
1514
+ config_attr :logger, :default, ::Logger, nil, :default
1486
1515
 
1487
1516
  # @private
1488
1517
  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
@@ -188,8 +188,19 @@ module Google
188
188
  endpoint: @config.endpoint,
189
189
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
190
  universe_domain: @config.universe_domain,
191
- credentials: credentials
191
+ credentials: credentials,
192
+ logger: @config.logger
192
193
  )
194
+
195
+ @folders_stub.logger(stub: true)&.info do |entry|
196
+ entry.set_system_name
197
+ entry.set_service
198
+ entry.message = "Created client for #{entry.service}"
199
+ entry.set_credentials_fields credentials
200
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
201
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
202
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
203
+ end
193
204
  end
194
205
 
195
206
  ##
@@ -199,6 +210,15 @@ module Google
199
210
  #
200
211
  attr_reader :operations_client
201
212
 
213
+ ##
214
+ # The logger used for request/response debug logging.
215
+ #
216
+ # @return [Logger]
217
+ #
218
+ def logger
219
+ @folders_stub.logger
220
+ end
221
+
202
222
  # Service calls
203
223
 
204
224
  ##
@@ -279,7 +299,6 @@ module Google
279
299
 
280
300
  @folders_stub.get_folder request, options do |result, operation|
281
301
  yield result, operation if block_given?
282
- return result
283
302
  end
284
303
  rescue ::Gapic::Rest::Error => e
285
304
  raise ::Google::Cloud::Error.from_error(e)
@@ -388,7 +407,7 @@ module Google
388
407
  @folders_stub.list_folders request, options do |result, operation|
389
408
  result = ::Gapic::Rest::PagedEnumerable.new @folders_stub, :list_folders, "folders", request, result, options
390
409
  yield result, operation if block_given?
391
- return result
410
+ throw :response, result
392
411
  end
393
412
  rescue ::Gapic::Rest::Error => e
394
413
  raise ::Google::Cloud::Error.from_error(e)
@@ -514,7 +533,7 @@ module Google
514
533
  @folders_stub.search_folders request, options do |result, operation|
515
534
  result = ::Gapic::Rest::PagedEnumerable.new @folders_stub, :search_folders, "folders", request, result, options
516
535
  yield result, operation if block_given?
517
- return result
536
+ throw :response, result
518
537
  end
519
538
  rescue ::Gapic::Rest::Error => e
520
539
  raise ::Google::Cloud::Error.from_error(e)
@@ -628,7 +647,7 @@ module Google
628
647
  @folders_stub.create_folder request, options do |result, operation|
629
648
  result = ::Gapic::Operation.new result, @operations_client, options: options
630
649
  yield result, operation if block_given?
631
- return result
650
+ throw :response, result
632
651
  end
633
652
  rescue ::Gapic::Rest::Error => e
634
653
  raise ::Google::Cloud::Error.from_error(e)
@@ -735,7 +754,7 @@ module Google
735
754
  @folders_stub.update_folder request, options do |result, operation|
736
755
  result = ::Gapic::Operation.new result, @operations_client, options: options
737
756
  yield result, operation if block_given?
738
- return result
757
+ throw :response, result
739
758
  end
740
759
  rescue ::Gapic::Rest::Error => e
741
760
  raise ::Google::Cloud::Error.from_error(e)
@@ -843,7 +862,7 @@ module Google
843
862
  @folders_stub.move_folder request, options do |result, operation|
844
863
  result = ::Gapic::Operation.new result, @operations_client, options: options
845
864
  yield result, operation if block_given?
846
- return result
865
+ throw :response, result
847
866
  end
848
867
  rescue ::Gapic::Rest::Error => e
849
868
  raise ::Google::Cloud::Error.from_error(e)
@@ -941,7 +960,7 @@ module Google
941
960
  @folders_stub.delete_folder request, options do |result, operation|
942
961
  result = ::Gapic::Operation.new result, @operations_client, options: options
943
962
  yield result, operation if block_given?
944
- return result
963
+ throw :response, result
945
964
  end
946
965
  rescue ::Gapic::Rest::Error => e
947
966
  raise ::Google::Cloud::Error.from_error(e)
@@ -1039,7 +1058,7 @@ module Google
1039
1058
  @folders_stub.undelete_folder request, options do |result, operation|
1040
1059
  result = ::Gapic::Operation.new result, @operations_client, options: options
1041
1060
  yield result, operation if block_given?
1042
- return result
1061
+ throw :response, result
1043
1062
  end
1044
1063
  rescue ::Gapic::Rest::Error => e
1045
1064
  raise ::Google::Cloud::Error.from_error(e)
@@ -1126,7 +1145,6 @@ module Google
1126
1145
 
1127
1146
  @folders_stub.get_iam_policy request, options do |result, operation|
1128
1147
  yield result, operation if block_given?
1129
- return result
1130
1148
  end
1131
1149
  rescue ::Gapic::Rest::Error => e
1132
1150
  raise ::Google::Cloud::Error.from_error(e)
@@ -1221,7 +1239,6 @@ module Google
1221
1239
 
1222
1240
  @folders_stub.set_iam_policy request, options do |result, operation|
1223
1241
  yield result, operation if block_given?
1224
- return result
1225
1242
  end
1226
1243
  rescue ::Gapic::Rest::Error => e
1227
1244
  raise ::Google::Cloud::Error.from_error(e)
@@ -1310,7 +1327,6 @@ module Google
1310
1327
 
1311
1328
  @folders_stub.test_iam_permissions request, options do |result, operation|
1312
1329
  yield result, operation if block_given?
1313
- return result
1314
1330
  end
1315
1331
  rescue ::Gapic::Rest::Error => e
1316
1332
  raise ::Google::Cloud::Error.from_error(e)
@@ -1358,6 +1374,13 @@ module Google
1358
1374
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1359
1375
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1360
1376
  # * (`nil`) indicating no credentials
1377
+ #
1378
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1379
+ # external source for authentication to Google Cloud, you must validate it before
1380
+ # providing it to a Google API client library. Providing an unvalidated credential
1381
+ # configuration to Google APIs can compromise the security of your systems and data.
1382
+ # For more information, refer to [Validate credential configurations from external
1383
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1361
1384
  # @return [::Object]
1362
1385
  # @!attribute [rw] scope
1363
1386
  # The OAuth scopes
@@ -1390,6 +1413,11 @@ module Google
1390
1413
  # default endpoint URL. The default value of nil uses the environment
1391
1414
  # universe (usually the default "googleapis.com" universe).
1392
1415
  # @return [::String,nil]
1416
+ # @!attribute [rw] logger
1417
+ # A custom logger to use for request/response debug logging, or the value
1418
+ # `:default` (the default) to construct a default logger, or `nil` to
1419
+ # explicitly disable logging.
1420
+ # @return [::Logger,:default,nil]
1393
1421
  #
1394
1422
  class Configuration
1395
1423
  extend ::Gapic::Config
@@ -1411,6 +1439,7 @@ module Google
1411
1439
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1412
1440
  config_attr :quota_project, nil, ::String, nil
1413
1441
  config_attr :universe_domain, nil, ::String, nil
1442
+ config_attr :logger, :default, ::Logger, nil, :default
1414
1443
 
1415
1444
  # @private
1416
1445
  def initialize parent_config = nil