google-cloud-domains-v1 0.7.1 → 0.9.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: 9bebc4d66e1e1a49815683e7184584cf9fcaebae51884c6ded71906e5dd8f511
4
- data.tar.gz: e28848f29bf71f7ef8430ab08918930bae65042a29283aaa4fd7971a84e9278b
3
+ metadata.gz: 044b6fa2a77cb076c84852334d70adad6766b5a074113ba9eb9a5119b75d836b
4
+ data.tar.gz: 2105915c93759332de4c3f9b01ad5b87d591e35eec54a56d883253b22374a82a
5
5
  SHA512:
6
- metadata.gz: db9d446b5da33baa913d6d7ae6a3e94397ad3cf7e4428a98b64a5204522ed31038929f2a380f5e7447fa499d3d2ceeff8bf5a507317f33cb9a9f43a61e63f432
7
- data.tar.gz: c9090f42a19b51f6d9cd57cb6b30c47222f5fd9bea0b07f5aaf8ebb0c451019ed3be33d39a22e730cdcd4f6abf95d1d9db8cad935ad5381bb227628f13734872
6
+ metadata.gz: 006aa9c6a964e334e85d8584636c672db9f504b17b8cd56995cda7f67f1462674e675988cd5df21182d6a84a059986418682aef7aefe97dce80bda1eb0fdca4c
7
+ data.tar.gz: bab50078d3eb0a801193c45cfbe983f8ae1cd0634679e17c88f0d556f6461842b078d2fa441a41ca7dea39a0e2782ae63e254531a8f7cb8caf11bbb9d3ae58f5
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/domains)
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/domains/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::Domains::V1::Domains::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
@@ -164,8 +164,19 @@ module Google
164
164
  universe_domain: @config.universe_domain,
165
165
  channel_args: @config.channel_args,
166
166
  interceptors: @config.interceptors,
167
- channel_pool_config: @config.channel_pool
167
+ channel_pool_config: @config.channel_pool,
168
+ logger: @config.logger
168
169
  )
170
+
171
+ @domains_stub.stub_logger&.info do |entry|
172
+ entry.set_system_name
173
+ entry.set_service
174
+ entry.message = "Created client for #{entry.service}"
175
+ entry.set_credentials_fields credentials
176
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
177
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
178
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
179
+ end
169
180
  end
170
181
 
171
182
  ##
@@ -175,6 +186,15 @@ module Google
175
186
  #
176
187
  attr_reader :operations_client
177
188
 
189
+ ##
190
+ # The logger used for request/response debug logging.
191
+ #
192
+ # @return [Logger]
193
+ #
194
+ def logger
195
+ @domains_stub.logger
196
+ end
197
+
178
198
  # Service calls
179
199
 
180
200
  ##
@@ -263,7 +283,6 @@ module Google
263
283
 
264
284
  @domains_stub.call_rpc :search_domains, request, options: options do |response, operation|
265
285
  yield response, operation if block_given?
266
- return response
267
286
  end
268
287
  rescue ::GRPC::BadStatus => e
269
288
  raise ::Google::Cloud::Error.from_error(e)
@@ -352,7 +371,6 @@ module Google
352
371
 
353
372
  @domains_stub.call_rpc :retrieve_register_parameters, request, options: options do |response, operation|
354
373
  yield response, operation if block_given?
355
- return response
356
374
  end
357
375
  rescue ::GRPC::BadStatus => e
358
376
  raise ::Google::Cloud::Error.from_error(e)
@@ -476,7 +494,7 @@ module Google
476
494
  @domains_stub.call_rpc :register_domain, request, options: options do |response, operation|
477
495
  response = ::Gapic::Operation.new response, @operations_client, options: options
478
496
  yield response, operation if block_given?
479
- return response
497
+ throw :response, response
480
498
  end
481
499
  rescue ::GRPC::BadStatus => e
482
500
  raise ::Google::Cloud::Error.from_error(e)
@@ -569,7 +587,6 @@ module Google
569
587
 
570
588
  @domains_stub.call_rpc :retrieve_transfer_parameters, request, options: options do |response, operation|
571
589
  yield response, operation if block_given?
572
- return response
573
590
  end
574
591
  rescue ::GRPC::BadStatus => e
575
592
  raise ::Google::Cloud::Error.from_error(e)
@@ -705,7 +722,7 @@ module Google
705
722
  @domains_stub.call_rpc :transfer_domain, request, options: options do |response, operation|
706
723
  response = ::Gapic::Operation.new response, @operations_client, options: options
707
724
  yield response, operation if block_given?
708
- return response
725
+ throw :response, response
709
726
  end
710
727
  rescue ::GRPC::BadStatus => e
711
728
  raise ::Google::Cloud::Error.from_error(e)
@@ -819,7 +836,7 @@ module Google
819
836
  @domains_stub.call_rpc :list_registrations, request, options: options do |response, operation|
820
837
  response = ::Gapic::PagedEnumerable.new @domains_stub, :list_registrations, request, response, operation, options
821
838
  yield response, operation if block_given?
822
- return response
839
+ throw :response, response
823
840
  end
824
841
  rescue ::GRPC::BadStatus => e
825
842
  raise ::Google::Cloud::Error.from_error(e)
@@ -906,7 +923,6 @@ module Google
906
923
 
907
924
  @domains_stub.call_rpc :get_registration, request, options: options do |response, operation|
908
925
  yield response, operation if block_given?
909
- return response
910
926
  end
911
927
  rescue ::GRPC::BadStatus => e
912
928
  raise ::Google::Cloud::Error.from_error(e)
@@ -1009,7 +1025,7 @@ module Google
1009
1025
  @domains_stub.call_rpc :update_registration, request, options: options do |response, operation|
1010
1026
  response = ::Gapic::Operation.new response, @operations_client, options: options
1011
1027
  yield response, operation if block_given?
1012
- return response
1028
+ throw :response, response
1013
1029
  end
1014
1030
  rescue ::GRPC::BadStatus => e
1015
1031
  raise ::Google::Cloud::Error.from_error(e)
@@ -1110,7 +1126,7 @@ module Google
1110
1126
  @domains_stub.call_rpc :configure_management_settings, request, options: options do |response, operation|
1111
1127
  response = ::Gapic::Operation.new response, @operations_client, options: options
1112
1128
  yield response, operation if block_given?
1113
- return response
1129
+ throw :response, response
1114
1130
  end
1115
1131
  rescue ::GRPC::BadStatus => e
1116
1132
  raise ::Google::Cloud::Error.from_error(e)
@@ -1219,7 +1235,7 @@ module Google
1219
1235
  @domains_stub.call_rpc :configure_dns_settings, request, options: options do |response, operation|
1220
1236
  response = ::Gapic::Operation.new response, @operations_client, options: options
1221
1237
  yield response, operation if block_given?
1222
- return response
1238
+ throw :response, response
1223
1239
  end
1224
1240
  rescue ::GRPC::BadStatus => e
1225
1241
  raise ::Google::Cloud::Error.from_error(e)
@@ -1326,7 +1342,7 @@ module Google
1326
1342
  @domains_stub.call_rpc :configure_contact_settings, request, options: options do |response, operation|
1327
1343
  response = ::Gapic::Operation.new response, @operations_client, options: options
1328
1344
  yield response, operation if block_given?
1329
- return response
1345
+ throw :response, response
1330
1346
  end
1331
1347
  rescue ::GRPC::BadStatus => e
1332
1348
  raise ::Google::Cloud::Error.from_error(e)
@@ -1429,7 +1445,7 @@ module Google
1429
1445
  @domains_stub.call_rpc :export_registration, request, options: options do |response, operation|
1430
1446
  response = ::Gapic::Operation.new response, @operations_client, options: options
1431
1447
  yield response, operation if block_given?
1432
- return response
1448
+ throw :response, response
1433
1449
  end
1434
1450
  rescue ::GRPC::BadStatus => e
1435
1451
  raise ::Google::Cloud::Error.from_error(e)
@@ -1542,7 +1558,7 @@ module Google
1542
1558
  @domains_stub.call_rpc :delete_registration, request, options: options do |response, operation|
1543
1559
  response = ::Gapic::Operation.new response, @operations_client, options: options
1544
1560
  yield response, operation if block_given?
1545
- return response
1561
+ throw :response, response
1546
1562
  end
1547
1563
  rescue ::GRPC::BadStatus => e
1548
1564
  raise ::Google::Cloud::Error.from_error(e)
@@ -1633,7 +1649,6 @@ module Google
1633
1649
 
1634
1650
  @domains_stub.call_rpc :retrieve_authorization_code, request, options: options do |response, operation|
1635
1651
  yield response, operation if block_given?
1636
- return response
1637
1652
  end
1638
1653
  rescue ::GRPC::BadStatus => e
1639
1654
  raise ::Google::Cloud::Error.from_error(e)
@@ -1723,7 +1738,6 @@ module Google
1723
1738
 
1724
1739
  @domains_stub.call_rpc :reset_authorization_code, request, options: options do |response, operation|
1725
1740
  yield response, operation if block_given?
1726
- return response
1727
1741
  end
1728
1742
  rescue ::GRPC::BadStatus => e
1729
1743
  raise ::Google::Cloud::Error.from_error(e)
@@ -1773,6 +1787,13 @@ module Google
1773
1787
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1774
1788
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1775
1789
  # * (`nil`) indicating no credentials
1790
+ #
1791
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1792
+ # external source for authentication to Google Cloud, you must validate it before
1793
+ # providing it to a Google API client library. Providing an unvalidated credential
1794
+ # configuration to Google APIs can compromise the security of your systems and data.
1795
+ # For more information, refer to [Validate credential configurations from external
1796
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1776
1797
  # @return [::Object]
1777
1798
  # @!attribute [rw] scope
1778
1799
  # The OAuth scopes
@@ -1812,6 +1833,11 @@ module Google
1812
1833
  # default endpoint URL. The default value of nil uses the environment
1813
1834
  # universe (usually the default "googleapis.com" universe).
1814
1835
  # @return [::String,nil]
1836
+ # @!attribute [rw] logger
1837
+ # A custom logger to use for request/response debug logging, or the value
1838
+ # `:default` (the default) to construct a default logger, or `nil` to
1839
+ # explicitly disable logging.
1840
+ # @return [::Logger,:default,nil]
1815
1841
  #
1816
1842
  class Configuration
1817
1843
  extend ::Gapic::Config
@@ -1836,6 +1862,7 @@ module Google
1836
1862
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1837
1863
  config_attr :quota_project, nil, ::String, nil
1838
1864
  config_attr :universe_domain, nil, ::String, nil
1865
+ config_attr :logger, :default, ::Logger, nil, :default
1839
1866
 
1840
1867
  # @private
1841
1868
  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
@@ -157,8 +157,19 @@ module Google
157
157
  endpoint: @config.endpoint,
158
158
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
159
  universe_domain: @config.universe_domain,
160
- credentials: credentials
160
+ credentials: credentials,
161
+ logger: @config.logger
161
162
  )
163
+
164
+ @domains_stub.logger(stub: true)&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
162
173
  end
163
174
 
164
175
  ##
@@ -168,6 +179,15 @@ module Google
168
179
  #
169
180
  attr_reader :operations_client
170
181
 
182
+ ##
183
+ # The logger used for request/response debug logging.
184
+ #
185
+ # @return [Logger]
186
+ #
187
+ def logger
188
+ @domains_stub.logger
189
+ end
190
+
171
191
  # Service calls
172
192
 
173
193
  ##
@@ -249,7 +269,6 @@ module Google
249
269
 
250
270
  @domains_stub.search_domains request, options do |result, operation|
251
271
  yield result, operation if block_given?
252
- return result
253
272
  end
254
273
  rescue ::Gapic::Rest::Error => e
255
274
  raise ::Google::Cloud::Error.from_error(e)
@@ -331,7 +350,6 @@ module Google
331
350
 
332
351
  @domains_stub.retrieve_register_parameters request, options do |result, operation|
333
352
  yield result, operation if block_given?
334
- return result
335
353
  end
336
354
  rescue ::Gapic::Rest::Error => e
337
355
  raise ::Google::Cloud::Error.from_error(e)
@@ -448,7 +466,7 @@ module Google
448
466
  @domains_stub.register_domain request, options do |result, operation|
449
467
  result = ::Gapic::Operation.new result, @operations_client, options: options
450
468
  yield result, operation if block_given?
451
- return result
469
+ throw :response, result
452
470
  end
453
471
  rescue ::Gapic::Rest::Error => e
454
472
  raise ::Google::Cloud::Error.from_error(e)
@@ -534,7 +552,6 @@ module Google
534
552
 
535
553
  @domains_stub.retrieve_transfer_parameters request, options do |result, operation|
536
554
  yield result, operation if block_given?
537
- return result
538
555
  end
539
556
  rescue ::Gapic::Rest::Error => e
540
557
  raise ::Google::Cloud::Error.from_error(e)
@@ -663,7 +680,7 @@ module Google
663
680
  @domains_stub.transfer_domain request, options do |result, operation|
664
681
  result = ::Gapic::Operation.new result, @operations_client, options: options
665
682
  yield result, operation if block_given?
666
- return result
683
+ throw :response, result
667
684
  end
668
685
  rescue ::Gapic::Rest::Error => e
669
686
  raise ::Google::Cloud::Error.from_error(e)
@@ -770,7 +787,7 @@ module Google
770
787
  @domains_stub.list_registrations request, options do |result, operation|
771
788
  result = ::Gapic::Rest::PagedEnumerable.new @domains_stub, :list_registrations, "registrations", request, result, options
772
789
  yield result, operation if block_given?
773
- return result
790
+ throw :response, result
774
791
  end
775
792
  rescue ::Gapic::Rest::Error => e
776
793
  raise ::Google::Cloud::Error.from_error(e)
@@ -850,7 +867,6 @@ module Google
850
867
 
851
868
  @domains_stub.get_registration request, options do |result, operation|
852
869
  yield result, operation if block_given?
853
- return result
854
870
  end
855
871
  rescue ::Gapic::Rest::Error => e
856
872
  raise ::Google::Cloud::Error.from_error(e)
@@ -946,7 +962,7 @@ module Google
946
962
  @domains_stub.update_registration request, options do |result, operation|
947
963
  result = ::Gapic::Operation.new result, @operations_client, options: options
948
964
  yield result, operation if block_given?
949
- return result
965
+ throw :response, result
950
966
  end
951
967
  rescue ::Gapic::Rest::Error => e
952
968
  raise ::Google::Cloud::Error.from_error(e)
@@ -1040,7 +1056,7 @@ module Google
1040
1056
  @domains_stub.configure_management_settings request, options do |result, operation|
1041
1057
  result = ::Gapic::Operation.new result, @operations_client, options: options
1042
1058
  yield result, operation if block_given?
1043
- return result
1059
+ throw :response, result
1044
1060
  end
1045
1061
  rescue ::Gapic::Rest::Error => e
1046
1062
  raise ::Google::Cloud::Error.from_error(e)
@@ -1142,7 +1158,7 @@ module Google
1142
1158
  @domains_stub.configure_dns_settings request, options do |result, operation|
1143
1159
  result = ::Gapic::Operation.new result, @operations_client, options: options
1144
1160
  yield result, operation if block_given?
1145
- return result
1161
+ throw :response, result
1146
1162
  end
1147
1163
  rescue ::Gapic::Rest::Error => e
1148
1164
  raise ::Google::Cloud::Error.from_error(e)
@@ -1242,7 +1258,7 @@ module Google
1242
1258
  @domains_stub.configure_contact_settings request, options do |result, operation|
1243
1259
  result = ::Gapic::Operation.new result, @operations_client, options: options
1244
1260
  yield result, operation if block_given?
1245
- return result
1261
+ throw :response, result
1246
1262
  end
1247
1263
  rescue ::Gapic::Rest::Error => e
1248
1264
  raise ::Google::Cloud::Error.from_error(e)
@@ -1338,7 +1354,7 @@ module Google
1338
1354
  @domains_stub.export_registration request, options do |result, operation|
1339
1355
  result = ::Gapic::Operation.new result, @operations_client, options: options
1340
1356
  yield result, operation if block_given?
1341
- return result
1357
+ throw :response, result
1342
1358
  end
1343
1359
  rescue ::Gapic::Rest::Error => e
1344
1360
  raise ::Google::Cloud::Error.from_error(e)
@@ -1444,7 +1460,7 @@ module Google
1444
1460
  @domains_stub.delete_registration request, options do |result, operation|
1445
1461
  result = ::Gapic::Operation.new result, @operations_client, options: options
1446
1462
  yield result, operation if block_given?
1447
- return result
1463
+ throw :response, result
1448
1464
  end
1449
1465
  rescue ::Gapic::Rest::Error => e
1450
1466
  raise ::Google::Cloud::Error.from_error(e)
@@ -1528,7 +1544,6 @@ module Google
1528
1544
 
1529
1545
  @domains_stub.retrieve_authorization_code request, options do |result, operation|
1530
1546
  yield result, operation if block_given?
1531
- return result
1532
1547
  end
1533
1548
  rescue ::Gapic::Rest::Error => e
1534
1549
  raise ::Google::Cloud::Error.from_error(e)
@@ -1611,7 +1626,6 @@ module Google
1611
1626
 
1612
1627
  @domains_stub.reset_authorization_code request, options do |result, operation|
1613
1628
  yield result, operation if block_given?
1614
- return result
1615
1629
  end
1616
1630
  rescue ::Gapic::Rest::Error => e
1617
1631
  raise ::Google::Cloud::Error.from_error(e)
@@ -1659,6 +1673,13 @@ module Google
1659
1673
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1660
1674
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1661
1675
  # * (`nil`) indicating no credentials
1676
+ #
1677
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1678
+ # external source for authentication to Google Cloud, you must validate it before
1679
+ # providing it to a Google API client library. Providing an unvalidated credential
1680
+ # configuration to Google APIs can compromise the security of your systems and data.
1681
+ # For more information, refer to [Validate credential configurations from external
1682
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1662
1683
  # @return [::Object]
1663
1684
  # @!attribute [rw] scope
1664
1685
  # The OAuth scopes
@@ -1691,6 +1712,11 @@ module Google
1691
1712
  # default endpoint URL. The default value of nil uses the environment
1692
1713
  # universe (usually the default "googleapis.com" universe).
1693
1714
  # @return [::String,nil]
1715
+ # @!attribute [rw] logger
1716
+ # A custom logger to use for request/response debug logging, or the value
1717
+ # `:default` (the default) to construct a default logger, or `nil` to
1718
+ # explicitly disable logging.
1719
+ # @return [::Logger,:default,nil]
1694
1720
  #
1695
1721
  class Configuration
1696
1722
  extend ::Gapic::Config
@@ -1712,6 +1738,7 @@ module Google
1712
1738
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1713
1739
  config_attr :quota_project, nil, ::String, nil
1714
1740
  config_attr :universe_domain, nil, ::String, nil
1741
+ config_attr :logger, :default, ::Logger, nil, :default
1715
1742
 
1716
1743
  # @private
1717
1744
  def initialize parent_config = nil