google-cloud-storage_transfer-v1 1.1.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45fb795177f75aea586fe5474b2713cf69181f1a9d6b57adcc81ccfa0d0d1bc6
4
- data.tar.gz: 0006f1f7379c7838d899cc4244fa46e064ad80f0a3ba68c8a8ba56627b3a8d20
3
+ metadata.gz: f9b1e8785565756ae5630147d48ca8a51f005ed7dc115035cf0d2abd23f2c9f4
4
+ data.tar.gz: 10cfdb8cfb060e65f114fe0b86eb5f8cd99bec848e97d9d9c6ff018e3a55ba85
5
5
  SHA512:
6
- metadata.gz: 73bce4f27811ced6fceed6a01089b1314a834a4e58f4e4f268e6fdfd9a325798199d023efd3bb4c94169d1dfe509f8a3a7797cb3fa3a90d9e6e2cc36d0d9ba65
7
- data.tar.gz: ceb6b9b73f48b48a310eaddb5c6191d79e1d492dbdc301eb598560025842b8d42fb1ce0d1f86a77a4e9aa950f2e47e7ff7d0dc43681b71baca78db8577d37f83
6
+ metadata.gz: 80e8c3ea772be504f23a104de7b194d99a920225eb90b68e233b95874b65c616c1f300f75374225ad90ddd94a68beabc8206693fb2c832c42f425c03808f28af
7
+ data.tar.gz: a46a8838a2c88e28e2cb48dffa01a330700449a593b66f870f5adccb43c243c292aa996aac9fedaa00f79069053ba4d155881b7b17c48cad366ddec9076a0cf3
data/README.md CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/storage-transfer-service/)
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/storage_transfer/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::StorageTransfer::V1::StorageTransferService::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).
@@ -173,8 +173,19 @@ module Google
173
173
  universe_domain: @config.universe_domain,
174
174
  channel_args: @config.channel_args,
175
175
  interceptors: @config.interceptors,
176
- channel_pool_config: @config.channel_pool
176
+ channel_pool_config: @config.channel_pool,
177
+ logger: @config.logger
177
178
  )
179
+
180
+ @storage_transfer_service_stub.stub_logger&.info do |entry|
181
+ entry.set_system_name
182
+ entry.set_service
183
+ entry.message = "Created client for #{entry.service}"
184
+ entry.set_credentials_fields credentials
185
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
186
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
187
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
188
+ end
178
189
  end
179
190
 
180
191
  ##
@@ -184,6 +195,15 @@ module Google
184
195
  #
185
196
  attr_reader :operations_client
186
197
 
198
+ ##
199
+ # The logger used for request/response debug logging.
200
+ #
201
+ # @return [Logger]
202
+ #
203
+ def logger
204
+ @storage_transfer_service_stub.logger
205
+ end
206
+
187
207
  # Service calls
188
208
 
189
209
  ##
@@ -274,7 +294,6 @@ module Google
274
294
 
275
295
  @storage_transfer_service_stub.call_rpc :get_google_service_account, request, options: options do |response, operation|
276
296
  yield response, operation if block_given?
277
- return response
278
297
  end
279
298
  rescue ::GRPC::BadStatus => e
280
299
  raise ::Google::Cloud::Error.from_error(e)
@@ -352,7 +371,6 @@ module Google
352
371
 
353
372
  @storage_transfer_service_stub.call_rpc :create_transfer_job, 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)
@@ -473,7 +491,6 @@ module Google
473
491
 
474
492
  @storage_transfer_service_stub.call_rpc :update_transfer_job, request, options: options do |response, operation|
475
493
  yield response, operation if block_given?
476
- return response
477
494
  end
478
495
  rescue ::GRPC::BadStatus => e
479
496
  raise ::Google::Cloud::Error.from_error(e)
@@ -562,7 +579,6 @@ module Google
562
579
 
563
580
  @storage_transfer_service_stub.call_rpc :get_transfer_job, request, options: options do |response, operation|
564
581
  yield response, operation if block_given?
565
- return response
566
582
  end
567
583
  rescue ::GRPC::BadStatus => e
568
584
  raise ::Google::Cloud::Error.from_error(e)
@@ -588,17 +604,32 @@ module Google
588
604
  #
589
605
  # @param filter [::String]
590
606
  # Required. A list of query parameters specified as JSON text in the form of:
591
- # `{"projectId":"my_project_id",
592
- # "jobNames":["jobid1","jobid2",...],
593
- # "jobStatuses":["status1","status2",...]}`
594
- #
595
- # Since `jobNames` and `jobStatuses` support multiple values, their values
596
- # must be specified with array notation. `projectId` is required.
597
- # `jobNames` and `jobStatuses` are optional. The valid values for
598
- # `jobStatuses` are case-insensitive:
599
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED},
600
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}, and
601
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}.
607
+ #
608
+ # ```
609
+ # {
610
+ # "projectId":"my_project_id",
611
+ # "jobNames":["jobid1","jobid2",...],
612
+ # "jobStatuses":["status1","status2",...],
613
+ # "dataBackend":"QUERY_REPLICATION_CONFIGS",
614
+ # "sourceBucket":"source-bucket-name",
615
+ # "sinkBucket":"sink-bucket-name",
616
+ # }
617
+ # ```
618
+ #
619
+ # The JSON formatting in the example is for display only; provide the
620
+ # query parameters without spaces or line breaks.
621
+ #
622
+ # * `projectId` is required.
623
+ # * Since `jobNames` and `jobStatuses` support multiple values, their values
624
+ # must be specified with array notation. `jobNames` and `jobStatuses` are
625
+ # optional. Valid values are case-insensitive:
626
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED}
627
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}
628
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}
629
+ # * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of
630
+ # cross-bucket replication jobs.
631
+ # * Limit the results to jobs from a particular bucket with `sourceBucket`
632
+ # and/or to a particular bucket with `sinkBucket`.
602
633
  # @param page_size [::Integer]
603
634
  # The list page size. The max allowed value is 256.
604
635
  # @param page_token [::String]
@@ -660,7 +691,7 @@ module Google
660
691
  @storage_transfer_service_stub.call_rpc :list_transfer_jobs, request, options: options do |response, operation|
661
692
  response = ::Gapic::PagedEnumerable.new @storage_transfer_service_stub, :list_transfer_jobs, request, response, operation, options
662
693
  yield response, operation if block_given?
663
- return response
694
+ throw :response, response
664
695
  end
665
696
  rescue ::GRPC::BadStatus => e
666
697
  raise ::Google::Cloud::Error.from_error(e)
@@ -746,7 +777,6 @@ module Google
746
777
 
747
778
  @storage_transfer_service_stub.call_rpc :pause_transfer_operation, request, options: options do |response, operation|
748
779
  yield response, operation if block_given?
749
- return response
750
780
  end
751
781
  rescue ::GRPC::BadStatus => e
752
782
  raise ::Google::Cloud::Error.from_error(e)
@@ -832,7 +862,6 @@ module Google
832
862
 
833
863
  @storage_transfer_service_stub.call_rpc :resume_transfer_operation, request, options: options do |response, operation|
834
864
  yield response, operation if block_given?
835
- return response
836
865
  end
837
866
  rescue ::GRPC::BadStatus => e
838
867
  raise ::Google::Cloud::Error.from_error(e)
@@ -932,7 +961,7 @@ module Google
932
961
  @storage_transfer_service_stub.call_rpc :run_transfer_job, request, options: options do |response, operation|
933
962
  response = ::Gapic::Operation.new response, @operations_client, options: options
934
963
  yield response, operation if block_given?
935
- return response
964
+ throw :response, response
936
965
  end
937
966
  rescue ::GRPC::BadStatus => e
938
967
  raise ::Google::Cloud::Error.from_error(e)
@@ -1022,7 +1051,6 @@ module Google
1022
1051
 
1023
1052
  @storage_transfer_service_stub.call_rpc :delete_transfer_job, request, options: options do |response, operation|
1024
1053
  yield response, operation if block_given?
1025
- return response
1026
1054
  end
1027
1055
  rescue ::GRPC::BadStatus => e
1028
1056
  raise ::Google::Cloud::Error.from_error(e)
@@ -1125,7 +1153,6 @@ module Google
1125
1153
 
1126
1154
  @storage_transfer_service_stub.call_rpc :create_agent_pool, request, options: options do |response, operation|
1127
1155
  yield response, operation if block_given?
1128
- return response
1129
1156
  end
1130
1157
  rescue ::GRPC::BadStatus => e
1131
1158
  raise ::Google::Cloud::Error.from_error(e)
@@ -1229,7 +1256,6 @@ module Google
1229
1256
 
1230
1257
  @storage_transfer_service_stub.call_rpc :update_agent_pool, request, options: options do |response, operation|
1231
1258
  yield response, operation if block_given?
1232
- return response
1233
1259
  end
1234
1260
  rescue ::GRPC::BadStatus => e
1235
1261
  raise ::Google::Cloud::Error.from_error(e)
@@ -1315,7 +1341,6 @@ module Google
1315
1341
 
1316
1342
  @storage_transfer_service_stub.call_rpc :get_agent_pool, request, options: options do |response, operation|
1317
1343
  yield response, operation if block_given?
1318
- return response
1319
1344
  end
1320
1345
  rescue ::GRPC::BadStatus => e
1321
1346
  raise ::Google::Cloud::Error.from_error(e)
@@ -1419,7 +1444,7 @@ module Google
1419
1444
  @storage_transfer_service_stub.call_rpc :list_agent_pools, request, options: options do |response, operation|
1420
1445
  response = ::Gapic::PagedEnumerable.new @storage_transfer_service_stub, :list_agent_pools, request, response, operation, options
1421
1446
  yield response, operation if block_given?
1422
- return response
1447
+ throw :response, response
1423
1448
  end
1424
1449
  rescue ::GRPC::BadStatus => e
1425
1450
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1530,6 @@ module Google
1505
1530
 
1506
1531
  @storage_transfer_service_stub.call_rpc :delete_agent_pool, request, options: options do |response, operation|
1507
1532
  yield response, operation if block_given?
1508
- return response
1509
1533
  end
1510
1534
  rescue ::GRPC::BadStatus => e
1511
1535
  raise ::Google::Cloud::Error.from_error(e)
@@ -1594,6 +1618,11 @@ module Google
1594
1618
  # default endpoint URL. The default value of nil uses the environment
1595
1619
  # universe (usually the default "googleapis.com" universe).
1596
1620
  # @return [::String,nil]
1621
+ # @!attribute [rw] logger
1622
+ # A custom logger to use for request/response debug logging, or the value
1623
+ # `:default` (the default) to construct a default logger, or `nil` to
1624
+ # explicitly disable logging.
1625
+ # @return [::Logger,:default,nil]
1597
1626
  #
1598
1627
  class Configuration
1599
1628
  extend ::Gapic::Config
@@ -1618,6 +1647,7 @@ module Google
1618
1647
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1619
1648
  config_attr :quota_project, nil, ::String, nil
1620
1649
  config_attr :universe_domain, nil, ::String, nil
1650
+ config_attr :logger, :default, ::Logger, nil, :default
1621
1651
 
1622
1652
  # @private
1623
1653
  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
@@ -166,8 +166,19 @@ module Google
166
166
  endpoint: @config.endpoint,
167
167
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
168
168
  universe_domain: @config.universe_domain,
169
- credentials: credentials
169
+ credentials: credentials,
170
+ logger: @config.logger
170
171
  )
172
+
173
+ @storage_transfer_service_stub.logger(stub: true)&.info do |entry|
174
+ entry.set_system_name
175
+ entry.set_service
176
+ entry.message = "Created client for #{entry.service}"
177
+ entry.set_credentials_fields credentials
178
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
179
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
180
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
181
+ end
171
182
  end
172
183
 
173
184
  ##
@@ -177,6 +188,15 @@ module Google
177
188
  #
178
189
  attr_reader :operations_client
179
190
 
191
+ ##
192
+ # The logger used for request/response debug logging.
193
+ #
194
+ # @return [Logger]
195
+ #
196
+ def logger
197
+ @storage_transfer_service_stub.logger
198
+ end
199
+
180
200
  # Service calls
181
201
 
182
202
  ##
@@ -260,7 +280,6 @@ module Google
260
280
 
261
281
  @storage_transfer_service_stub.get_google_service_account request, options do |result, operation|
262
282
  yield result, operation if block_given?
263
- return result
264
283
  end
265
284
  rescue ::Gapic::Rest::Error => e
266
285
  raise ::Google::Cloud::Error.from_error(e)
@@ -339,7 +358,6 @@ module Google
339
358
 
340
359
  @storage_transfer_service_stub.create_transfer_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)
@@ -453,7 +471,6 @@ module Google
453
471
 
454
472
  @storage_transfer_service_stub.update_transfer_job request, options do |result, operation|
455
473
  yield result, operation if block_given?
456
- return result
457
474
  end
458
475
  rescue ::Gapic::Rest::Error => e
459
476
  raise ::Google::Cloud::Error.from_error(e)
@@ -535,7 +552,6 @@ module Google
535
552
 
536
553
  @storage_transfer_service_stub.get_transfer_job request, options do |result, operation|
537
554
  yield result, operation if block_given?
538
- return result
539
555
  end
540
556
  rescue ::Gapic::Rest::Error => e
541
557
  raise ::Google::Cloud::Error.from_error(e)
@@ -561,17 +577,32 @@ module Google
561
577
  #
562
578
  # @param filter [::String]
563
579
  # Required. A list of query parameters specified as JSON text in the form of:
564
- # `{"projectId":"my_project_id",
565
- # "jobNames":["jobid1","jobid2",...],
566
- # "jobStatuses":["status1","status2",...]}`
567
- #
568
- # Since `jobNames` and `jobStatuses` support multiple values, their values
569
- # must be specified with array notation. `projectId` is required.
570
- # `jobNames` and `jobStatuses` are optional. The valid values for
571
- # `jobStatuses` are case-insensitive:
572
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED},
573
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}, and
574
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}.
580
+ #
581
+ # ```
582
+ # {
583
+ # "projectId":"my_project_id",
584
+ # "jobNames":["jobid1","jobid2",...],
585
+ # "jobStatuses":["status1","status2",...],
586
+ # "dataBackend":"QUERY_REPLICATION_CONFIGS",
587
+ # "sourceBucket":"source-bucket-name",
588
+ # "sinkBucket":"sink-bucket-name",
589
+ # }
590
+ # ```
591
+ #
592
+ # The JSON formatting in the example is for display only; provide the
593
+ # query parameters without spaces or line breaks.
594
+ #
595
+ # * `projectId` is required.
596
+ # * Since `jobNames` and `jobStatuses` support multiple values, their values
597
+ # must be specified with array notation. `jobNames` and `jobStatuses` are
598
+ # optional. Valid values are case-insensitive:
599
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED}
600
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}
601
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}
602
+ # * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of
603
+ # cross-bucket replication jobs.
604
+ # * Limit the results to jobs from a particular bucket with `sourceBucket`
605
+ # and/or to a particular bucket with `sinkBucket`.
575
606
  # @param page_size [::Integer]
576
607
  # The list page size. The max allowed value is 256.
577
608
  # @param page_token [::String]
@@ -634,7 +665,7 @@ module Google
634
665
  @storage_transfer_service_stub.list_transfer_jobs request, options do |result, operation|
635
666
  result = ::Gapic::Rest::PagedEnumerable.new @storage_transfer_service_stub, :list_transfer_jobs, "transfer_jobs", request, result, options
636
667
  yield result, operation if block_given?
637
- return result
668
+ throw :response, result
638
669
  end
639
670
  rescue ::Gapic::Rest::Error => e
640
671
  raise ::Google::Cloud::Error.from_error(e)
@@ -713,7 +744,6 @@ module Google
713
744
 
714
745
  @storage_transfer_service_stub.pause_transfer_operation request, options do |result, operation|
715
746
  yield result, operation if block_given?
716
- return result
717
747
  end
718
748
  rescue ::Gapic::Rest::Error => e
719
749
  raise ::Google::Cloud::Error.from_error(e)
@@ -792,7 +822,6 @@ module Google
792
822
 
793
823
  @storage_transfer_service_stub.resume_transfer_operation request, options do |result, operation|
794
824
  yield result, operation if block_given?
795
- return result
796
825
  end
797
826
  rescue ::Gapic::Rest::Error => e
798
827
  raise ::Google::Cloud::Error.from_error(e)
@@ -885,7 +914,7 @@ module Google
885
914
  @storage_transfer_service_stub.run_transfer_job request, options do |result, operation|
886
915
  result = ::Gapic::Operation.new result, @operations_client, options: options
887
916
  yield result, operation if block_given?
888
- return result
917
+ throw :response, result
889
918
  end
890
919
  rescue ::Gapic::Rest::Error => e
891
920
  raise ::Google::Cloud::Error.from_error(e)
@@ -968,7 +997,6 @@ module Google
968
997
 
969
998
  @storage_transfer_service_stub.delete_transfer_job request, options do |result, operation|
970
999
  yield result, operation if block_given?
971
- return result
972
1000
  end
973
1001
  rescue ::Gapic::Rest::Error => e
974
1002
  raise ::Google::Cloud::Error.from_error(e)
@@ -1064,7 +1092,6 @@ module Google
1064
1092
 
1065
1093
  @storage_transfer_service_stub.create_agent_pool request, options do |result, operation|
1066
1094
  yield result, operation if block_given?
1067
- return result
1068
1095
  end
1069
1096
  rescue ::Gapic::Rest::Error => e
1070
1097
  raise ::Google::Cloud::Error.from_error(e)
@@ -1161,7 +1188,6 @@ module Google
1161
1188
 
1162
1189
  @storage_transfer_service_stub.update_agent_pool request, options do |result, operation|
1163
1190
  yield result, operation if block_given?
1164
- return result
1165
1191
  end
1166
1192
  rescue ::Gapic::Rest::Error => e
1167
1193
  raise ::Google::Cloud::Error.from_error(e)
@@ -1240,7 +1266,6 @@ module Google
1240
1266
 
1241
1267
  @storage_transfer_service_stub.get_agent_pool request, options do |result, operation|
1242
1268
  yield result, operation if block_given?
1243
- return result
1244
1269
  end
1245
1270
  rescue ::Gapic::Rest::Error => e
1246
1271
  raise ::Google::Cloud::Error.from_error(e)
@@ -1337,7 +1362,7 @@ module Google
1337
1362
  @storage_transfer_service_stub.list_agent_pools request, options do |result, operation|
1338
1363
  result = ::Gapic::Rest::PagedEnumerable.new @storage_transfer_service_stub, :list_agent_pools, "agent_pools", request, result, options
1339
1364
  yield result, operation if block_given?
1340
- return result
1365
+ throw :response, result
1341
1366
  end
1342
1367
  rescue ::Gapic::Rest::Error => e
1343
1368
  raise ::Google::Cloud::Error.from_error(e)
@@ -1416,7 +1441,6 @@ module Google
1416
1441
 
1417
1442
  @storage_transfer_service_stub.delete_agent_pool request, options do |result, operation|
1418
1443
  yield result, operation if block_given?
1419
- return result
1420
1444
  end
1421
1445
  rescue ::Gapic::Rest::Error => e
1422
1446
  raise ::Google::Cloud::Error.from_error(e)
@@ -1496,6 +1520,11 @@ module Google
1496
1520
  # default endpoint URL. The default value of nil uses the environment
1497
1521
  # universe (usually the default "googleapis.com" universe).
1498
1522
  # @return [::String,nil]
1523
+ # @!attribute [rw] logger
1524
+ # A custom logger to use for request/response debug logging, or the value
1525
+ # `:default` (the default) to construct a default logger, or `nil` to
1526
+ # explicitly disable logging.
1527
+ # @return [::Logger,:default,nil]
1499
1528
  #
1500
1529
  class Configuration
1501
1530
  extend ::Gapic::Config
@@ -1517,6 +1546,7 @@ module Google
1517
1546
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1518
1547
  config_attr :quota_project, nil, ::String, nil
1519
1548
  config_attr :universe_domain, nil, ::String, nil
1549
+ config_attr :logger, :default, ::Logger, nil, :default
1520
1550
 
1521
1551
  # @private
1522
1552
  def initialize parent_config = nil