google-cloud-dataflow-v1beta3 0.9.1 → 0.11.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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/client.rb +34 -2
  4. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/client.rb +34 -2
  5. data/lib/google/cloud/dataflow/v1beta3/flex_templates_service/rest/service_stub.rb +22 -8
  6. data/lib/google/cloud/dataflow/v1beta3/jobs/client.rb +36 -8
  7. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/client.rb +34 -7
  8. data/lib/google/cloud/dataflow/v1beta3/jobs/rest/service_stub.rb +62 -38
  9. data/lib/google/cloud/dataflow/v1beta3/messages/client.rb +35 -2
  10. data/lib/google/cloud/dataflow/v1beta3/messages/rest/client.rb +34 -2
  11. data/lib/google/cloud/dataflow/v1beta3/messages/rest/service_stub.rb +22 -8
  12. data/lib/google/cloud/dataflow/v1beta3/metrics/client.rb +36 -4
  13. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/client.rb +36 -4
  14. data/lib/google/cloud/dataflow/v1beta3/metrics/rest/service_stub.rb +38 -20
  15. data/lib/google/cloud/dataflow/v1beta3/snapshots/client.rb +34 -4
  16. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/client.rb +34 -4
  17. data/lib/google/cloud/dataflow/v1beta3/snapshots/rest/service_stub.rb +38 -20
  18. data/lib/google/cloud/dataflow/v1beta3/templates_service/client.rb +38 -4
  19. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/client.rb +38 -4
  20. data/lib/google/cloud/dataflow/v1beta3/templates_service/rest/service_stub.rb +38 -20
  21. data/lib/google/cloud/dataflow/v1beta3/version.rb +1 -1
  22. data/proto_docs/google/api/client.rb +39 -0
  23. data/proto_docs/google/dataflow/v1beta3/jobs.rb +14 -0
  24. data/proto_docs/google/dataflow/v1beta3/streaming.rb +8 -0
  25. data/proto_docs/google/dataflow/v1beta3/templates.rb +8 -0
  26. data/proto_docs/google/protobuf/struct.rb +12 -0
  27. metadata +6 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5780c5c72d97d40a0a6e5ec1a91ed89eee37e4af9bae04e04f38c9d9a99b77f8
4
- data.tar.gz: dd055ef2135a4c9fea2cefc7cfbe1503e1e1cec5a19a944dfb28fb7a2211818c
3
+ metadata.gz: 3907a6695ac547d130ac4281f6904751200d6f8b9253d9045ff7e07eb957f886
4
+ data.tar.gz: 8fdf5822f03743a0c385bb16ad086d03285c338c8b429a94cd05c5b13d7f24c0
5
5
  SHA512:
6
- metadata.gz: 8132f20f36fd966e9f674c689974d64dbd2bae3e7fe2a20a2e284271bccb1c1bf323b4ed8af74dc8e84591b1299b690c238f13b20e0364204583bab7bf15d12e
7
- data.tar.gz: 26e95022a5c067b7c4ca3f53008403a97db24c43fd5302517e2bb0a00794482487af3c348ce4e5870a28789c72562ebef76c460f8f0ca5b9ea96369a18a7710b
6
+ metadata.gz: 204f7c1bf35c355735706dc90d0049f4c0480f192cb48ad5859a1363d90fda8e059601a48be0ebcc3ac71fc73d96a92be9e8cc23937cb9ebd872fe4c4308d806
7
+ data.tar.gz: f54bcd2599f48dd22b88a9e604021c4258810d22de3d025605623eaea280f63e4bd478eb958c72a9ecb121d9be0f5adce9983be38cd5934776a5c864fe27ac5d
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/dataflow)
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/dataflow/v1beta3"
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::Dataflow::V1beta3::Snapshots::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
@@ -155,8 +155,28 @@ module Google
155
155
  universe_domain: @config.universe_domain,
156
156
  channel_args: @config.channel_args,
157
157
  interceptors: @config.interceptors,
158
- channel_pool_config: @config.channel_pool
158
+ channel_pool_config: @config.channel_pool,
159
+ logger: @config.logger
159
160
  )
161
+
162
+ @flex_templates_service_stub.stub_logger&.info do |entry|
163
+ entry.set_system_name
164
+ entry.set_service
165
+ entry.message = "Created client for #{entry.service}"
166
+ entry.set_credentials_fields credentials
167
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
168
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
169
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
170
+ end
171
+ end
172
+
173
+ ##
174
+ # The logger used for request/response debug logging.
175
+ #
176
+ # @return [Logger]
177
+ #
178
+ def logger
179
+ @flex_templates_service_stub.logger
160
180
  end
161
181
 
162
182
  # Service calls
@@ -253,7 +273,6 @@ module Google
253
273
 
254
274
  @flex_templates_service_stub.call_rpc :launch_flex_template, request, options: options do |response, operation|
255
275
  yield response, operation if block_given?
256
- return response
257
276
  end
258
277
  rescue ::GRPC::BadStatus => e
259
278
  raise ::Google::Cloud::Error.from_error(e)
@@ -303,6 +322,13 @@ module Google
303
322
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
304
323
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
305
324
  # * (`nil`) indicating no credentials
325
+ #
326
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
327
+ # external source for authentication to Google Cloud, you must validate it before
328
+ # providing it to a Google API client library. Providing an unvalidated credential
329
+ # configuration to Google APIs can compromise the security of your systems and data.
330
+ # For more information, refer to [Validate credential configurations from external
331
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
306
332
  # @return [::Object]
307
333
  # @!attribute [rw] scope
308
334
  # The OAuth scopes
@@ -342,6 +368,11 @@ module Google
342
368
  # default endpoint URL. The default value of nil uses the environment
343
369
  # universe (usually the default "googleapis.com" universe).
344
370
  # @return [::String,nil]
371
+ # @!attribute [rw] logger
372
+ # A custom logger to use for request/response debug logging, or the value
373
+ # `:default` (the default) to construct a default logger, or `nil` to
374
+ # explicitly disable logging.
375
+ # @return [::Logger,:default,nil]
345
376
  #
346
377
  class Configuration
347
378
  extend ::Gapic::Config
@@ -366,6 +397,7 @@ module Google
366
397
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
367
398
  config_attr :quota_project, nil, ::String, nil
368
399
  config_attr :universe_domain, nil, ::String, nil
400
+ config_attr :logger, :default, ::Logger, nil, :default
369
401
 
370
402
  # @private
371
403
  def initialize parent_config = nil
@@ -148,8 +148,28 @@ module Google
148
148
  endpoint: @config.endpoint,
149
149
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
150
150
  universe_domain: @config.universe_domain,
151
- credentials: credentials
151
+ credentials: credentials,
152
+ logger: @config.logger
152
153
  )
154
+
155
+ @flex_templates_service_stub.logger(stub: true)&.info do |entry|
156
+ entry.set_system_name
157
+ entry.set_service
158
+ entry.message = "Created client for #{entry.service}"
159
+ entry.set_credentials_fields credentials
160
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
161
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
162
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
163
+ end
164
+ end
165
+
166
+ ##
167
+ # The logger used for request/response debug logging.
168
+ #
169
+ # @return [Logger]
170
+ #
171
+ def logger
172
+ @flex_templates_service_stub.logger
153
173
  end
154
174
 
155
175
  # Service calls
@@ -236,7 +256,6 @@ module Google
236
256
 
237
257
  @flex_templates_service_stub.launch_flex_template request, options do |result, operation|
238
258
  yield result, operation if block_given?
239
- return result
240
259
  end
241
260
  rescue ::Gapic::Rest::Error => e
242
261
  raise ::Google::Cloud::Error.from_error(e)
@@ -284,6 +303,13 @@ module Google
284
303
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
285
304
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
286
305
  # * (`nil`) indicating no credentials
306
+ #
307
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
308
+ # external source for authentication to Google Cloud, you must validate it before
309
+ # providing it to a Google API client library. Providing an unvalidated credential
310
+ # configuration to Google APIs can compromise the security of your systems and data.
311
+ # For more information, refer to [Validate credential configurations from external
312
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
287
313
  # @return [::Object]
288
314
  # @!attribute [rw] scope
289
315
  # The OAuth scopes
@@ -316,6 +342,11 @@ module Google
316
342
  # default endpoint URL. The default value of nil uses the environment
317
343
  # universe (usually the default "googleapis.com" universe).
318
344
  # @return [::String,nil]
345
+ # @!attribute [rw] logger
346
+ # A custom logger to use for request/response debug logging, or the value
347
+ # `:default` (the default) to construct a default logger, or `nil` to
348
+ # explicitly disable logging.
349
+ # @return [::Logger,:default,nil]
319
350
  #
320
351
  class Configuration
321
352
  extend ::Gapic::Config
@@ -337,6 +368,7 @@ module Google
337
368
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
338
369
  config_attr :quota_project, nil, ::String, nil
339
370
  config_attr :universe_domain, nil, ::String, nil
371
+ config_attr :logger, :default, ::Logger, nil, :default
340
372
 
341
373
  # @private
342
374
  def initialize parent_config = nil
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the launch_flex_template REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "launch_flex_template",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Dataflow::V1beta3::LaunchFlexTemplateResponse.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -158,8 +158,28 @@ module Google
158
158
  universe_domain: @config.universe_domain,
159
159
  channel_args: @config.channel_args,
160
160
  interceptors: @config.interceptors,
161
- channel_pool_config: @config.channel_pool
161
+ channel_pool_config: @config.channel_pool,
162
+ logger: @config.logger
162
163
  )
164
+
165
+ @jobs_stub.stub_logger&.info do |entry|
166
+ entry.set_system_name
167
+ entry.set_service
168
+ entry.message = "Created client for #{entry.service}"
169
+ entry.set_credentials_fields credentials
170
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
171
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
172
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
173
+ end
174
+ end
175
+
176
+ ##
177
+ # The logger used for request/response debug logging.
178
+ #
179
+ # @return [Logger]
180
+ #
181
+ def logger
182
+ @jobs_stub.logger
163
183
  end
164
184
 
165
185
  # Service calls
@@ -263,7 +283,6 @@ module Google
263
283
 
264
284
  @jobs_stub.call_rpc :create_job, 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)
@@ -369,7 +388,6 @@ module Google
369
388
 
370
389
  @jobs_stub.call_rpc :get_job, request, options: options do |response, operation|
371
390
  yield response, operation if block_given?
372
- return response
373
391
  end
374
392
  rescue ::GRPC::BadStatus => e
375
393
  raise ::Google::Cloud::Error.from_error(e)
@@ -476,7 +494,6 @@ module Google
476
494
 
477
495
  @jobs_stub.call_rpc :update_job, request, options: options do |response, operation|
478
496
  yield response, operation if block_given?
479
- return response
480
497
  end
481
498
  rescue ::GRPC::BadStatus => e
482
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -593,7 +610,7 @@ module Google
593
610
  @jobs_stub.call_rpc :list_jobs, request, options: options do |response, operation|
594
611
  response = ::Gapic::PagedEnumerable.new @jobs_stub, :list_jobs, request, response, operation, options
595
612
  yield response, operation if block_given?
596
- return response
613
+ throw :response, response
597
614
  end
598
615
  rescue ::GRPC::BadStatus => e
599
616
  raise ::Google::Cloud::Error.from_error(e)
@@ -700,7 +717,7 @@ module Google
700
717
  @jobs_stub.call_rpc :aggregated_list_jobs, request, options: options do |response, operation|
701
718
  response = ::Gapic::PagedEnumerable.new @jobs_stub, :aggregated_list_jobs, request, response, operation, options
702
719
  yield response, operation if block_given?
703
- return response
720
+ throw :response, response
704
721
  end
705
722
  rescue ::GRPC::BadStatus => e
706
723
  raise ::Google::Cloud::Error.from_error(e)
@@ -778,7 +795,6 @@ module Google
778
795
 
779
796
  @jobs_stub.call_rpc :check_active_jobs, request, options: options do |response, operation|
780
797
  yield response, operation if block_given?
781
- return response
782
798
  end
783
799
  rescue ::GRPC::BadStatus => e
784
800
  raise ::Google::Cloud::Error.from_error(e)
@@ -880,7 +896,6 @@ module Google
880
896
 
881
897
  @jobs_stub.call_rpc :snapshot_job, request, options: options do |response, operation|
882
898
  yield response, operation if block_given?
883
- return response
884
899
  end
885
900
  rescue ::GRPC::BadStatus => e
886
901
  raise ::Google::Cloud::Error.from_error(e)
@@ -930,6 +945,13 @@ module Google
930
945
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
931
946
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
932
947
  # * (`nil`) indicating no credentials
948
+ #
949
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
950
+ # external source for authentication to Google Cloud, you must validate it before
951
+ # providing it to a Google API client library. Providing an unvalidated credential
952
+ # configuration to Google APIs can compromise the security of your systems and data.
953
+ # For more information, refer to [Validate credential configurations from external
954
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
933
955
  # @return [::Object]
934
956
  # @!attribute [rw] scope
935
957
  # The OAuth scopes
@@ -969,6 +991,11 @@ module Google
969
991
  # default endpoint URL. The default value of nil uses the environment
970
992
  # universe (usually the default "googleapis.com" universe).
971
993
  # @return [::String,nil]
994
+ # @!attribute [rw] logger
995
+ # A custom logger to use for request/response debug logging, or the value
996
+ # `:default` (the default) to construct a default logger, or `nil` to
997
+ # explicitly disable logging.
998
+ # @return [::Logger,:default,nil]
972
999
  #
973
1000
  class Configuration
974
1001
  extend ::Gapic::Config
@@ -993,6 +1020,7 @@ module Google
993
1020
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
994
1021
  config_attr :quota_project, nil, ::String, nil
995
1022
  config_attr :universe_domain, nil, ::String, nil
1023
+ config_attr :logger, :default, ::Logger, nil, :default
996
1024
 
997
1025
  # @private
998
1026
  def initialize parent_config = nil
@@ -151,8 +151,28 @@ module Google
151
151
  endpoint: @config.endpoint,
152
152
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
153
153
  universe_domain: @config.universe_domain,
154
- credentials: credentials
154
+ credentials: credentials,
155
+ logger: @config.logger
155
156
  )
157
+
158
+ @jobs_stub.logger(stub: true)&.info do |entry|
159
+ entry.set_system_name
160
+ entry.set_service
161
+ entry.message = "Created client for #{entry.service}"
162
+ entry.set_credentials_fields credentials
163
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
164
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
165
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
166
+ end
167
+ end
168
+
169
+ ##
170
+ # The logger used for request/response debug logging.
171
+ #
172
+ # @return [Logger]
173
+ #
174
+ def logger
175
+ @jobs_stub.logger
156
176
  end
157
177
 
158
178
  # Service calls
@@ -246,7 +266,6 @@ module Google
246
266
 
247
267
  @jobs_stub.create_job request, options do |result, operation|
248
268
  yield result, operation if block_given?
249
- return result
250
269
  end
251
270
  rescue ::Gapic::Rest::Error => e
252
271
  raise ::Google::Cloud::Error.from_error(e)
@@ -339,7 +358,6 @@ module Google
339
358
 
340
359
  @jobs_stub.get_job request, options do |result, operation|
341
360
  yield result, operation if block_given?
342
- return result
343
361
  end
344
362
  rescue ::Gapic::Rest::Error => e
345
363
  raise ::Google::Cloud::Error.from_error(e)
@@ -433,7 +451,6 @@ module Google
433
451
 
434
452
  @jobs_stub.update_job request, options do |result, operation|
435
453
  yield result, operation if block_given?
436
- return result
437
454
  end
438
455
  rescue ::Gapic::Rest::Error => e
439
456
  raise ::Google::Cloud::Error.from_error(e)
@@ -539,7 +556,6 @@ module Google
539
556
 
540
557
  @jobs_stub.list_jobs request, options do |result, operation|
541
558
  yield result, operation if block_given?
542
- return result
543
559
  end
544
560
  rescue ::Gapic::Rest::Error => e
545
561
  raise ::Google::Cloud::Error.from_error(e)
@@ -638,7 +654,6 @@ module Google
638
654
 
639
655
  @jobs_stub.aggregated_list_jobs request, options do |result, operation|
640
656
  yield result, operation if block_given?
641
- return result
642
657
  end
643
658
  rescue ::Gapic::Rest::Error => e
644
659
  raise ::Google::Cloud::Error.from_error(e)
@@ -727,7 +742,6 @@ module Google
727
742
 
728
743
  @jobs_stub.snapshot_job request, options do |result, operation|
729
744
  yield result, operation if block_given?
730
- return result
731
745
  end
732
746
  rescue ::Gapic::Rest::Error => e
733
747
  raise ::Google::Cloud::Error.from_error(e)
@@ -775,6 +789,13 @@ module Google
775
789
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
776
790
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
777
791
  # * (`nil`) indicating no credentials
792
+ #
793
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
794
+ # external source for authentication to Google Cloud, you must validate it before
795
+ # providing it to a Google API client library. Providing an unvalidated credential
796
+ # configuration to Google APIs can compromise the security of your systems and data.
797
+ # For more information, refer to [Validate credential configurations from external
798
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
778
799
  # @return [::Object]
779
800
  # @!attribute [rw] scope
780
801
  # The OAuth scopes
@@ -807,6 +828,11 @@ module Google
807
828
  # default endpoint URL. The default value of nil uses the environment
808
829
  # universe (usually the default "googleapis.com" universe).
809
830
  # @return [::String,nil]
831
+ # @!attribute [rw] logger
832
+ # A custom logger to use for request/response debug logging, or the value
833
+ # `:default` (the default) to construct a default logger, or `nil` to
834
+ # explicitly disable logging.
835
+ # @return [::Logger,:default,nil]
810
836
  #
811
837
  class Configuration
812
838
  extend ::Gapic::Config
@@ -828,6 +854,7 @@ module Google
828
854
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
829
855
  config_attr :quota_project, nil, ::String, nil
830
856
  config_attr :universe_domain, nil, ::String, nil
857
+ config_attr :logger, :default, ::Logger, nil, :default
831
858
 
832
859
  # @private
833
860
  def initialize parent_config = nil