google-cloud-tasks-v2beta2 0.12.1 → 0.14.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: 4a5557934b75667b392e72c0524cd2a025b0e229ce91c45b5b83ed6e487de75a
4
- data.tar.gz: a2d78b7ff4c4403785ab5ea2615f00bbb73ef22b08d71566a91fac3ff10343b8
3
+ metadata.gz: 56bb06f021c91aa640b436ecef6b6abb99ca142a462ddc1b759e5d4e88e7ea1e
4
+ data.tar.gz: 6ae775ec86d102747aee94ec611ba7a9f8c4587ba2148711294054b0d79593ee
5
5
  SHA512:
6
- metadata.gz: 7e7f57fb789f4c2a548d3536a69eb88391021b9c57b34bade00e450291072da4771ac67681d6e5d5b2b0a09b0995560be2a258af712daadde90a35ab7bc1c1dc
7
- data.tar.gz: 315d2342b701b4eb979aabeae4b18c416b52ec4dd92052ca52c487e9680fa427268eff0e65bb1ca9620c79a77446dcab313252bd0961a070c3e7432a2a82fdf9
6
+ metadata.gz: e1da31030e7215c1b3f998c306ad648ebec15fcbe483c34237d7e750f502ceec4809de989f8c3ec0e22b5a1926b3908245637008db501e5219a06fc9dd5a7d37
7
+ data.tar.gz: 682d6f2d79fa7fc859efa7ed3d3c7771649246bcafbf816269352efab92ccaa0ec79db0ba8359fbca160857eceb3121b04d1f0b07d985125f84aff745b826fd7
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/tasks)
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/tasks/v2beta2"
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::Tasks::V2beta2::CloudTasks::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
@@ -225,14 +225,26 @@ module Google
225
225
  universe_domain: @config.universe_domain,
226
226
  channel_args: @config.channel_args,
227
227
  interceptors: @config.interceptors,
228
- channel_pool_config: @config.channel_pool
228
+ channel_pool_config: @config.channel_pool,
229
+ logger: @config.logger
229
230
  )
230
231
 
232
+ @cloud_tasks_stub.stub_logger&.info do |entry|
233
+ entry.set_system_name
234
+ entry.set_service
235
+ entry.message = "Created client for #{entry.service}"
236
+ entry.set_credentials_fields credentials
237
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
238
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
239
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
240
+ end
241
+
231
242
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
232
243
  config.credentials = credentials
233
244
  config.quota_project = @quota_project_id
234
245
  config.endpoint = @cloud_tasks_stub.endpoint
235
246
  config.universe_domain = @cloud_tasks_stub.universe_domain
247
+ config.logger = @cloud_tasks_stub.logger if config.respond_to? :logger=
236
248
  end
237
249
  end
238
250
 
@@ -243,6 +255,15 @@ module Google
243
255
  #
244
256
  attr_reader :location_client
245
257
 
258
+ ##
259
+ # The logger used for request/response debug logging.
260
+ #
261
+ # @return [Logger]
262
+ #
263
+ def logger
264
+ @cloud_tasks_stub.logger
265
+ end
266
+
246
267
  # Service calls
247
268
 
248
269
  ##
@@ -368,7 +389,7 @@ module Google
368
389
  @cloud_tasks_stub.call_rpc :list_queues, request, options: options do |response, operation|
369
390
  response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_queues, request, response, operation, options
370
391
  yield response, operation if block_given?
371
- return response
392
+ throw :response, response
372
393
  end
373
394
  rescue ::GRPC::BadStatus => e
374
395
  raise ::Google::Cloud::Error.from_error(e)
@@ -460,7 +481,6 @@ module Google
460
481
 
461
482
  @cloud_tasks_stub.call_rpc :get_queue, request, options: options do |response, operation|
462
483
  yield response, operation if block_given?
463
- return response
464
484
  end
465
485
  rescue ::GRPC::BadStatus => e
466
486
  raise ::Google::Cloud::Error.from_error(e)
@@ -567,7 +587,6 @@ module Google
567
587
 
568
588
  @cloud_tasks_stub.call_rpc :create_queue, request, options: options do |response, operation|
569
589
  yield response, operation if block_given?
570
- return response
571
590
  end
572
591
  rescue ::GRPC::BadStatus => e
573
592
  raise ::Google::Cloud::Error.from_error(e)
@@ -679,7 +698,6 @@ module Google
679
698
 
680
699
  @cloud_tasks_stub.call_rpc :update_queue, request, options: options do |response, operation|
681
700
  yield response, operation if block_given?
682
- return response
683
701
  end
684
702
  rescue ::GRPC::BadStatus => e
685
703
  raise ::Google::Cloud::Error.from_error(e)
@@ -778,7 +796,6 @@ module Google
778
796
 
779
797
  @cloud_tasks_stub.call_rpc :delete_queue, request, options: options do |response, operation|
780
798
  yield response, operation if block_given?
781
- return response
782
799
  end
783
800
  rescue ::GRPC::BadStatus => e
784
801
  raise ::Google::Cloud::Error.from_error(e)
@@ -870,7 +887,6 @@ module Google
870
887
 
871
888
  @cloud_tasks_stub.call_rpc :purge_queue, request, options: options do |response, operation|
872
889
  yield response, operation if block_given?
873
- return response
874
890
  end
875
891
  rescue ::GRPC::BadStatus => e
876
892
  raise ::Google::Cloud::Error.from_error(e)
@@ -964,7 +980,6 @@ module Google
964
980
 
965
981
  @cloud_tasks_stub.call_rpc :pause_queue, request, options: options do |response, operation|
966
982
  yield response, operation if block_given?
967
- return response
968
983
  end
969
984
  rescue ::GRPC::BadStatus => e
970
985
  raise ::Google::Cloud::Error.from_error(e)
@@ -1065,7 +1080,6 @@ module Google
1065
1080
 
1066
1081
  @cloud_tasks_stub.call_rpc :resume_queue, request, options: options do |response, operation|
1067
1082
  yield response, operation if block_given?
1068
- return response
1069
1083
  end
1070
1084
  rescue ::GRPC::BadStatus => e
1071
1085
  raise ::Google::Cloud::Error.from_error(e)
@@ -1151,7 +1165,6 @@ module Google
1151
1165
 
1152
1166
  @cloud_tasks_stub.call_rpc :upload_queue_yaml, request, options: options do |response, operation|
1153
1167
  yield response, operation if block_given?
1154
- return response
1155
1168
  end
1156
1169
  rescue ::GRPC::BadStatus => e
1157
1170
  raise ::Google::Cloud::Error.from_error(e)
@@ -1249,7 +1262,6 @@ module Google
1249
1262
 
1250
1263
  @cloud_tasks_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
1251
1264
  yield response, operation if block_given?
1252
- return response
1253
1265
  end
1254
1266
  rescue ::GRPC::BadStatus => e
1255
1267
  raise ::Google::Cloud::Error.from_error(e)
@@ -1357,7 +1369,6 @@ module Google
1357
1369
 
1358
1370
  @cloud_tasks_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
1359
1371
  yield response, operation if block_given?
1360
- return response
1361
1372
  end
1362
1373
  rescue ::GRPC::BadStatus => e
1363
1374
  raise ::Google::Cloud::Error.from_error(e)
@@ -1456,7 +1467,6 @@ module Google
1456
1467
 
1457
1468
  @cloud_tasks_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
1458
1469
  yield response, operation if block_given?
1459
- return response
1460
1470
  end
1461
1471
  rescue ::GRPC::BadStatus => e
1462
1472
  raise ::Google::Cloud::Error.from_error(e)
@@ -1589,7 +1599,7 @@ module Google
1589
1599
  @cloud_tasks_stub.call_rpc :list_tasks, request, options: options do |response, operation|
1590
1600
  response = ::Gapic::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, request, response, operation, options
1591
1601
  yield response, operation if block_given?
1592
- return response
1602
+ throw :response, response
1593
1603
  end
1594
1604
  rescue ::GRPC::BadStatus => e
1595
1605
  raise ::Google::Cloud::Error.from_error(e)
@@ -1690,7 +1700,6 @@ module Google
1690
1700
 
1691
1701
  @cloud_tasks_stub.call_rpc :get_task, request, options: options do |response, operation|
1692
1702
  yield response, operation if block_given?
1693
- return response
1694
1703
  end
1695
1704
  rescue ::GRPC::BadStatus => e
1696
1705
  raise ::Google::Cloud::Error.from_error(e)
@@ -1835,7 +1844,6 @@ module Google
1835
1844
 
1836
1845
  @cloud_tasks_stub.call_rpc :create_task, request, options: options do |response, operation|
1837
1846
  yield response, operation if block_given?
1838
- return response
1839
1847
  end
1840
1848
  rescue ::GRPC::BadStatus => e
1841
1849
  raise ::Google::Cloud::Error.from_error(e)
@@ -1926,7 +1934,6 @@ module Google
1926
1934
 
1927
1935
  @cloud_tasks_stub.call_rpc :delete_task, request, options: options do |response, operation|
1928
1936
  yield response, operation if block_given?
1929
- return response
1930
1937
  end
1931
1938
  rescue ::GRPC::BadStatus => e
1932
1939
  raise ::Google::Cloud::Error.from_error(e)
@@ -2116,7 +2123,6 @@ module Google
2116
2123
 
2117
2124
  @cloud_tasks_stub.call_rpc :lease_tasks, request, options: options do |response, operation|
2118
2125
  yield response, operation if block_given?
2119
- return response
2120
2126
  end
2121
2127
  rescue ::GRPC::BadStatus => e
2122
2128
  raise ::Google::Cloud::Error.from_error(e)
@@ -2222,7 +2228,6 @@ module Google
2222
2228
 
2223
2229
  @cloud_tasks_stub.call_rpc :acknowledge_task, request, options: options do |response, operation|
2224
2230
  yield response, operation if block_given?
2225
- return response
2226
2231
  end
2227
2232
  rescue ::GRPC::BadStatus => e
2228
2233
  raise ::Google::Cloud::Error.from_error(e)
@@ -2340,7 +2345,6 @@ module Google
2340
2345
 
2341
2346
  @cloud_tasks_stub.call_rpc :renew_lease, request, options: options do |response, operation|
2342
2347
  yield response, operation if block_given?
2343
- return response
2344
2348
  end
2345
2349
  rescue ::GRPC::BadStatus => e
2346
2350
  raise ::Google::Cloud::Error.from_error(e)
@@ -2452,7 +2456,6 @@ module Google
2452
2456
 
2453
2457
  @cloud_tasks_stub.call_rpc :cancel_lease, request, options: options do |response, operation|
2454
2458
  yield response, operation if block_given?
2455
- return response
2456
2459
  end
2457
2460
  rescue ::GRPC::BadStatus => e
2458
2461
  raise ::Google::Cloud::Error.from_error(e)
@@ -2582,7 +2585,6 @@ module Google
2582
2585
 
2583
2586
  @cloud_tasks_stub.call_rpc :run_task, request, options: options do |response, operation|
2584
2587
  yield response, operation if block_given?
2585
- return response
2586
2588
  end
2587
2589
  rescue ::GRPC::BadStatus => e
2588
2590
  raise ::Google::Cloud::Error.from_error(e)
@@ -2632,6 +2634,13 @@ module Google
2632
2634
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2633
2635
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2634
2636
  # * (`nil`) indicating no credentials
2637
+ #
2638
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2639
+ # external source for authentication to Google Cloud, you must validate it before
2640
+ # providing it to a Google API client library. Providing an unvalidated credential
2641
+ # configuration to Google APIs can compromise the security of your systems and data.
2642
+ # For more information, refer to [Validate credential configurations from external
2643
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2635
2644
  # @return [::Object]
2636
2645
  # @!attribute [rw] scope
2637
2646
  # The OAuth scopes
@@ -2671,6 +2680,11 @@ module Google
2671
2680
  # default endpoint URL. The default value of nil uses the environment
2672
2681
  # universe (usually the default "googleapis.com" universe).
2673
2682
  # @return [::String,nil]
2683
+ # @!attribute [rw] logger
2684
+ # A custom logger to use for request/response debug logging, or the value
2685
+ # `:default` (the default) to construct a default logger, or `nil` to
2686
+ # explicitly disable logging.
2687
+ # @return [::Logger,:default,nil]
2674
2688
  #
2675
2689
  class Configuration
2676
2690
  extend ::Gapic::Config
@@ -2695,6 +2709,7 @@ module Google
2695
2709
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2696
2710
  config_attr :quota_project, nil, ::String, nil
2697
2711
  config_attr :universe_domain, nil, ::String, nil
2712
+ config_attr :logger, :default, ::Logger, nil, :default
2698
2713
 
2699
2714
  # @private
2700
2715
  def initialize parent_config = nil
@@ -216,15 +216,27 @@ module Google
216
216
  endpoint: @config.endpoint,
217
217
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
218
218
  universe_domain: @config.universe_domain,
219
- credentials: credentials
219
+ credentials: credentials,
220
+ logger: @config.logger
220
221
  )
221
222
 
223
+ @cloud_tasks_stub.logger(stub: true)&.info do |entry|
224
+ entry.set_system_name
225
+ entry.set_service
226
+ entry.message = "Created client for #{entry.service}"
227
+ entry.set_credentials_fields credentials
228
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
229
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
230
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
231
+ end
232
+
222
233
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
223
234
  config.credentials = credentials
224
235
  config.quota_project = @quota_project_id
225
236
  config.endpoint = @cloud_tasks_stub.endpoint
226
237
  config.universe_domain = @cloud_tasks_stub.universe_domain
227
238
  config.bindings_override = @config.bindings_override
239
+ config.logger = @cloud_tasks_stub.logger if config.respond_to? :logger=
228
240
  end
229
241
  end
230
242
 
@@ -235,6 +247,15 @@ module Google
235
247
  #
236
248
  attr_reader :location_client
237
249
 
250
+ ##
251
+ # The logger used for request/response debug logging.
252
+ #
253
+ # @return [Logger]
254
+ #
255
+ def logger
256
+ @cloud_tasks_stub.logger
257
+ end
258
+
238
259
  # Service calls
239
260
 
240
261
  ##
@@ -353,7 +374,7 @@ module Google
353
374
  @cloud_tasks_stub.list_queues request, options do |result, operation|
354
375
  result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_queues, "queues", request, result, options
355
376
  yield result, operation if block_given?
356
- return result
377
+ throw :response, result
357
378
  end
358
379
  rescue ::Gapic::Rest::Error => e
359
380
  raise ::Google::Cloud::Error.from_error(e)
@@ -438,7 +459,6 @@ module Google
438
459
 
439
460
  @cloud_tasks_stub.get_queue request, options do |result, operation|
440
461
  yield result, operation if block_given?
441
- return result
442
462
  end
443
463
  rescue ::Gapic::Rest::Error => e
444
464
  raise ::Google::Cloud::Error.from_error(e)
@@ -538,7 +558,6 @@ module Google
538
558
 
539
559
  @cloud_tasks_stub.create_queue request, options do |result, operation|
540
560
  yield result, operation if block_given?
541
- return result
542
561
  end
543
562
  rescue ::Gapic::Rest::Error => e
544
563
  raise ::Google::Cloud::Error.from_error(e)
@@ -643,7 +662,6 @@ module Google
643
662
 
644
663
  @cloud_tasks_stub.update_queue request, options do |result, operation|
645
664
  yield result, operation if block_given?
646
- return result
647
665
  end
648
666
  rescue ::Gapic::Rest::Error => e
649
667
  raise ::Google::Cloud::Error.from_error(e)
@@ -735,7 +753,6 @@ module Google
735
753
 
736
754
  @cloud_tasks_stub.delete_queue request, options do |result, operation|
737
755
  yield result, operation if block_given?
738
- return result
739
756
  end
740
757
  rescue ::Gapic::Rest::Error => e
741
758
  raise ::Google::Cloud::Error.from_error(e)
@@ -820,7 +837,6 @@ module Google
820
837
 
821
838
  @cloud_tasks_stub.purge_queue request, options do |result, operation|
822
839
  yield result, operation if block_given?
823
- return result
824
840
  end
825
841
  rescue ::Gapic::Rest::Error => e
826
842
  raise ::Google::Cloud::Error.from_error(e)
@@ -907,7 +923,6 @@ module Google
907
923
 
908
924
  @cloud_tasks_stub.pause_queue request, options do |result, operation|
909
925
  yield result, operation if block_given?
910
- return result
911
926
  end
912
927
  rescue ::Gapic::Rest::Error => e
913
928
  raise ::Google::Cloud::Error.from_error(e)
@@ -1001,7 +1016,6 @@ module Google
1001
1016
 
1002
1017
  @cloud_tasks_stub.resume_queue request, options do |result, operation|
1003
1018
  yield result, operation if block_given?
1004
- return result
1005
1019
  end
1006
1020
  rescue ::Gapic::Rest::Error => e
1007
1021
  raise ::Google::Cloud::Error.from_error(e)
@@ -1092,7 +1106,6 @@ module Google
1092
1106
 
1093
1107
  @cloud_tasks_stub.get_iam_policy request, options do |result, operation|
1094
1108
  yield result, operation if block_given?
1095
- return result
1096
1109
  end
1097
1110
  rescue ::Gapic::Rest::Error => e
1098
1111
  raise ::Google::Cloud::Error.from_error(e)
@@ -1193,7 +1206,6 @@ module Google
1193
1206
 
1194
1207
  @cloud_tasks_stub.set_iam_policy request, options do |result, operation|
1195
1208
  yield result, operation if block_given?
1196
- return result
1197
1209
  end
1198
1210
  rescue ::Gapic::Rest::Error => e
1199
1211
  raise ::Google::Cloud::Error.from_error(e)
@@ -1285,7 +1297,6 @@ module Google
1285
1297
 
1286
1298
  @cloud_tasks_stub.test_iam_permissions request, options do |result, operation|
1287
1299
  yield result, operation if block_given?
1288
- return result
1289
1300
  end
1290
1301
  rescue ::Gapic::Rest::Error => e
1291
1302
  raise ::Google::Cloud::Error.from_error(e)
@@ -1411,7 +1422,7 @@ module Google
1411
1422
  @cloud_tasks_stub.list_tasks request, options do |result, operation|
1412
1423
  result = ::Gapic::Rest::PagedEnumerable.new @cloud_tasks_stub, :list_tasks, "tasks", request, result, options
1413
1424
  yield result, operation if block_given?
1414
- return result
1425
+ throw :response, result
1415
1426
  end
1416
1427
  rescue ::Gapic::Rest::Error => e
1417
1428
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1516,6 @@ module Google
1505
1516
 
1506
1517
  @cloud_tasks_stub.get_task request, options do |result, operation|
1507
1518
  yield result, operation if block_given?
1508
- return result
1509
1519
  end
1510
1520
  rescue ::Gapic::Rest::Error => e
1511
1521
  raise ::Google::Cloud::Error.from_error(e)
@@ -1643,7 +1653,6 @@ module Google
1643
1653
 
1644
1654
  @cloud_tasks_stub.create_task request, options do |result, operation|
1645
1655
  yield result, operation if block_given?
1646
- return result
1647
1656
  end
1648
1657
  rescue ::Gapic::Rest::Error => e
1649
1658
  raise ::Google::Cloud::Error.from_error(e)
@@ -1727,7 +1736,6 @@ module Google
1727
1736
 
1728
1737
  @cloud_tasks_stub.delete_task request, options do |result, operation|
1729
1738
  yield result, operation if block_given?
1730
- return result
1731
1739
  end
1732
1740
  rescue ::Gapic::Rest::Error => e
1733
1741
  raise ::Google::Cloud::Error.from_error(e)
@@ -1910,7 +1918,6 @@ module Google
1910
1918
 
1911
1919
  @cloud_tasks_stub.lease_tasks request, options do |result, operation|
1912
1920
  yield result, operation if block_given?
1913
- return result
1914
1921
  end
1915
1922
  rescue ::Gapic::Rest::Error => e
1916
1923
  raise ::Google::Cloud::Error.from_error(e)
@@ -2009,7 +2016,6 @@ module Google
2009
2016
 
2010
2017
  @cloud_tasks_stub.acknowledge_task request, options do |result, operation|
2011
2018
  yield result, operation if block_given?
2012
- return result
2013
2019
  end
2014
2020
  rescue ::Gapic::Rest::Error => e
2015
2021
  raise ::Google::Cloud::Error.from_error(e)
@@ -2120,7 +2126,6 @@ module Google
2120
2126
 
2121
2127
  @cloud_tasks_stub.renew_lease request, options do |result, operation|
2122
2128
  yield result, operation if block_given?
2123
- return result
2124
2129
  end
2125
2130
  rescue ::Gapic::Rest::Error => e
2126
2131
  raise ::Google::Cloud::Error.from_error(e)
@@ -2225,7 +2230,6 @@ module Google
2225
2230
 
2226
2231
  @cloud_tasks_stub.cancel_lease request, options do |result, operation|
2227
2232
  yield result, operation if block_given?
2228
- return result
2229
2233
  end
2230
2234
  rescue ::Gapic::Rest::Error => e
2231
2235
  raise ::Google::Cloud::Error.from_error(e)
@@ -2348,7 +2352,6 @@ module Google
2348
2352
 
2349
2353
  @cloud_tasks_stub.run_task request, options do |result, operation|
2350
2354
  yield result, operation if block_given?
2351
- return result
2352
2355
  end
2353
2356
  rescue ::Gapic::Rest::Error => e
2354
2357
  raise ::Google::Cloud::Error.from_error(e)
@@ -2396,6 +2399,13 @@ module Google
2396
2399
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2397
2400
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2398
2401
  # * (`nil`) indicating no credentials
2402
+ #
2403
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2404
+ # external source for authentication to Google Cloud, you must validate it before
2405
+ # providing it to a Google API client library. Providing an unvalidated credential
2406
+ # configuration to Google APIs can compromise the security of your systems and data.
2407
+ # For more information, refer to [Validate credential configurations from external
2408
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2399
2409
  # @return [::Object]
2400
2410
  # @!attribute [rw] scope
2401
2411
  # The OAuth scopes
@@ -2428,6 +2438,11 @@ module Google
2428
2438
  # default endpoint URL. The default value of nil uses the environment
2429
2439
  # universe (usually the default "googleapis.com" universe).
2430
2440
  # @return [::String,nil]
2441
+ # @!attribute [rw] logger
2442
+ # A custom logger to use for request/response debug logging, or the value
2443
+ # `:default` (the default) to construct a default logger, or `nil` to
2444
+ # explicitly disable logging.
2445
+ # @return [::Logger,:default,nil]
2431
2446
  #
2432
2447
  class Configuration
2433
2448
  extend ::Gapic::Config
@@ -2456,6 +2471,7 @@ module Google
2456
2471
  # by the host service.
2457
2472
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2458
2473
  config_attr :bindings_override, {}, ::Hash, nil
2474
+ config_attr :logger, :default, ::Logger, nil, :default
2459
2475
 
2460
2476
  # @private
2461
2477
  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 list_queues 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: "list_queues",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse.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
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_queue",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "create_queue",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "update_queue",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "delete_queue",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "purge_queue",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "pause_queue",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "resume_queue",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Cloud::Tasks::V2beta2::Queue.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -391,16 +419,18 @@ module Google
391
419
 
392
420
  response = @client_stub.make_http_request(
393
421
  verb,
394
- uri: uri,
395
- body: body || "",
396
- params: query_string_params,
422
+ uri: uri,
423
+ body: body || "",
424
+ params: query_string_params,
425
+ method_name: "get_iam_policy",
397
426
  options: options
398
427
  )
399
428
  operation = ::Gapic::Rest::TransportOperation.new response
400
429
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
401
-
402
- yield result, operation if block_given?
403
- result
430
+ catch :response do
431
+ yield result, operation if block_given?
432
+ result
433
+ end
404
434
  end
405
435
 
406
436
  ##
@@ -429,16 +459,18 @@ module Google
429
459
 
430
460
  response = @client_stub.make_http_request(
431
461
  verb,
432
- uri: uri,
433
- body: body || "",
434
- params: query_string_params,
462
+ uri: uri,
463
+ body: body || "",
464
+ params: query_string_params,
465
+ method_name: "set_iam_policy",
435
466
  options: options
436
467
  )
437
468
  operation = ::Gapic::Rest::TransportOperation.new response
438
469
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
439
-
440
- yield result, operation if block_given?
441
- result
470
+ catch :response do
471
+ yield result, operation if block_given?
472
+ result
473
+ end
442
474
  end
443
475
 
444
476
  ##
@@ -467,16 +499,18 @@ module Google
467
499
 
468
500
  response = @client_stub.make_http_request(
469
501
  verb,
470
- uri: uri,
471
- body: body || "",
472
- params: query_string_params,
502
+ uri: uri,
503
+ body: body || "",
504
+ params: query_string_params,
505
+ method_name: "test_iam_permissions",
473
506
  options: options
474
507
  )
475
508
  operation = ::Gapic::Rest::TransportOperation.new response
476
509
  result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
477
-
478
- yield result, operation if block_given?
479
- result
510
+ catch :response do
511
+ yield result, operation if block_given?
512
+ result
513
+ end
480
514
  end
481
515
 
482
516
  ##
@@ -505,16 +539,18 @@ module Google
505
539
 
506
540
  response = @client_stub.make_http_request(
507
541
  verb,
508
- uri: uri,
509
- body: body || "",
510
- params: query_string_params,
542
+ uri: uri,
543
+ body: body || "",
544
+ params: query_string_params,
545
+ method_name: "list_tasks",
511
546
  options: options
512
547
  )
513
548
  operation = ::Gapic::Rest::TransportOperation.new response
514
549
  result = ::Google::Cloud::Tasks::V2beta2::ListTasksResponse.decode_json response.body, ignore_unknown_fields: true
515
-
516
- yield result, operation if block_given?
517
- result
550
+ catch :response do
551
+ yield result, operation if block_given?
552
+ result
553
+ end
518
554
  end
519
555
 
520
556
  ##
@@ -543,16 +579,18 @@ module Google
543
579
 
544
580
  response = @client_stub.make_http_request(
545
581
  verb,
546
- uri: uri,
547
- body: body || "",
548
- params: query_string_params,
582
+ uri: uri,
583
+ body: body || "",
584
+ params: query_string_params,
585
+ method_name: "get_task",
549
586
  options: options
550
587
  )
551
588
  operation = ::Gapic::Rest::TransportOperation.new response
552
589
  result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true
553
-
554
- yield result, operation if block_given?
555
- result
590
+ catch :response do
591
+ yield result, operation if block_given?
592
+ result
593
+ end
556
594
  end
557
595
 
558
596
  ##
@@ -581,16 +619,18 @@ module Google
581
619
 
582
620
  response = @client_stub.make_http_request(
583
621
  verb,
584
- uri: uri,
585
- body: body || "",
586
- params: query_string_params,
622
+ uri: uri,
623
+ body: body || "",
624
+ params: query_string_params,
625
+ method_name: "create_task",
587
626
  options: options
588
627
  )
589
628
  operation = ::Gapic::Rest::TransportOperation.new response
590
629
  result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true
591
-
592
- yield result, operation if block_given?
593
- result
630
+ catch :response do
631
+ yield result, operation if block_given?
632
+ result
633
+ end
594
634
  end
595
635
 
596
636
  ##
@@ -619,16 +659,18 @@ module Google
619
659
 
620
660
  response = @client_stub.make_http_request(
621
661
  verb,
622
- uri: uri,
623
- body: body || "",
624
- params: query_string_params,
662
+ uri: uri,
663
+ body: body || "",
664
+ params: query_string_params,
665
+ method_name: "delete_task",
625
666
  options: options
626
667
  )
627
668
  operation = ::Gapic::Rest::TransportOperation.new response
628
669
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
629
-
630
- yield result, operation if block_given?
631
- result
670
+ catch :response do
671
+ yield result, operation if block_given?
672
+ result
673
+ end
632
674
  end
633
675
 
634
676
  ##
@@ -657,16 +699,18 @@ module Google
657
699
 
658
700
  response = @client_stub.make_http_request(
659
701
  verb,
660
- uri: uri,
661
- body: body || "",
662
- params: query_string_params,
702
+ uri: uri,
703
+ body: body || "",
704
+ params: query_string_params,
705
+ method_name: "lease_tasks",
663
706
  options: options
664
707
  )
665
708
  operation = ::Gapic::Rest::TransportOperation.new response
666
709
  result = ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse.decode_json response.body, ignore_unknown_fields: true
667
-
668
- yield result, operation if block_given?
669
- result
710
+ catch :response do
711
+ yield result, operation if block_given?
712
+ result
713
+ end
670
714
  end
671
715
 
672
716
  ##
@@ -695,16 +739,18 @@ module Google
695
739
 
696
740
  response = @client_stub.make_http_request(
697
741
  verb,
698
- uri: uri,
699
- body: body || "",
700
- params: query_string_params,
742
+ uri: uri,
743
+ body: body || "",
744
+ params: query_string_params,
745
+ method_name: "acknowledge_task",
701
746
  options: options
702
747
  )
703
748
  operation = ::Gapic::Rest::TransportOperation.new response
704
749
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
705
-
706
- yield result, operation if block_given?
707
- result
750
+ catch :response do
751
+ yield result, operation if block_given?
752
+ result
753
+ end
708
754
  end
709
755
 
710
756
  ##
@@ -733,16 +779,18 @@ module Google
733
779
 
734
780
  response = @client_stub.make_http_request(
735
781
  verb,
736
- uri: uri,
737
- body: body || "",
738
- params: query_string_params,
782
+ uri: uri,
783
+ body: body || "",
784
+ params: query_string_params,
785
+ method_name: "renew_lease",
739
786
  options: options
740
787
  )
741
788
  operation = ::Gapic::Rest::TransportOperation.new response
742
789
  result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true
743
-
744
- yield result, operation if block_given?
745
- result
790
+ catch :response do
791
+ yield result, operation if block_given?
792
+ result
793
+ end
746
794
  end
747
795
 
748
796
  ##
@@ -771,16 +819,18 @@ module Google
771
819
 
772
820
  response = @client_stub.make_http_request(
773
821
  verb,
774
- uri: uri,
775
- body: body || "",
776
- params: query_string_params,
822
+ uri: uri,
823
+ body: body || "",
824
+ params: query_string_params,
825
+ method_name: "cancel_lease",
777
826
  options: options
778
827
  )
779
828
  operation = ::Gapic::Rest::TransportOperation.new response
780
829
  result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true
781
-
782
- yield result, operation if block_given?
783
- result
830
+ catch :response do
831
+ yield result, operation if block_given?
832
+ result
833
+ end
784
834
  end
785
835
 
786
836
  ##
@@ -809,16 +859,18 @@ module Google
809
859
 
810
860
  response = @client_stub.make_http_request(
811
861
  verb,
812
- uri: uri,
813
- body: body || "",
814
- params: query_string_params,
862
+ uri: uri,
863
+ body: body || "",
864
+ params: query_string_params,
865
+ method_name: "run_task",
815
866
  options: options
816
867
  )
817
868
  operation = ::Gapic::Rest::TransportOperation.new response
818
869
  result = ::Google::Cloud::Tasks::V2beta2::Task.decode_json response.body, ignore_unknown_fields: true
819
-
820
- yield result, operation if block_given?
821
- result
870
+ catch :response do
871
+ yield result, operation if block_given?
872
+ result
873
+ end
822
874
  end
823
875
 
824
876
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tasks
23
23
  module V2beta2
24
- VERSION = "0.12.1"
24
+ VERSION = "0.14.0"
25
25
  end
26
26
  end
27
27
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
217
  # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization
@@ -52,15 +52,21 @@ module Google
52
52
  #
53
53
  # An App Engine queue is a queue that has an
54
54
  # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}.
55
+ #
56
+ # Note: The following fields are mutually exclusive: `app_engine_http_target`, `pull_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared.
55
57
  # @!attribute [rw] pull_target
56
58
  # @return [::Google::Cloud::Tasks::V2beta2::PullTarget]
57
59
  # Pull target.
58
60
  #
59
61
  # A pull queue is a queue that has a
60
62
  # {::Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}.
63
+ #
64
+ # Note: The following fields are mutually exclusive: `pull_target`, `app_engine_http_target`, `http_target`. If a field in that set is populated, all other fields in the set will automatically be cleared.
61
65
  # @!attribute [rw] http_target
62
66
  # @return [::Google::Cloud::Tasks::V2beta2::HttpTarget]
63
67
  # An http_target is used to override the target values for HTTP tasks.
68
+ #
69
+ # Note: The following fields are mutually exclusive: `http_target`, `app_engine_http_target`, `pull_target`. If a field in that set is populated, all other fields in the set will automatically be cleared.
64
70
  # @!attribute [rw] rate_limits
65
71
  # @return [::Google::Cloud::Tasks::V2beta2::RateLimits]
66
72
  # Rate limits for task dispatches.
@@ -294,9 +300,13 @@ module Google
294
300
  # Cloud Tasks will attempt the task `max_attempts` times (that
295
301
  # is, if the first attempt fails, then there will be
296
302
  # `max_attempts - 1` retries). Must be > 0.
303
+ #
304
+ # Note: The following fields are mutually exclusive: `max_attempts`, `unlimited_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared.
297
305
  # @!attribute [rw] unlimited_attempts
298
306
  # @return [::Boolean]
299
307
  # If true, then the number of attempts is unlimited.
308
+ #
309
+ # Note: The following fields are mutually exclusive: `unlimited_attempts`, `max_attempts`. If a field in that set is populated, all other fields in the set will automatically be cleared.
300
310
  # @!attribute [rw] max_retry_duration
301
311
  # @return [::Google::Protobuf::Duration]
302
312
  # If positive, `max_retry_duration` specifies the time limit for
@@ -471,6 +471,8 @@ module Google
471
471
  #
472
472
  # This type of authorization should generally only be used when calling
473
473
  # Google APIs hosted on *.googleapis.com.
474
+ #
475
+ # Note: The following fields are mutually exclusive: `oauth_token`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
474
476
  # @!attribute [rw] oidc_token
475
477
  # @return [::Google::Cloud::Tasks::V2beta2::OidcToken]
476
478
  # If specified, an
@@ -481,6 +483,8 @@ module Google
481
483
  # This type of authorization can be used for many scenarios, including
482
484
  # calling Cloud Run, or endpoints where you intend to validate the token
483
485
  # yourself.
486
+ #
487
+ # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
484
488
  class HttpRequest
485
489
  include ::Google::Protobuf::MessageExts
486
490
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -656,6 +660,8 @@ module Google
656
660
  #
657
661
  # This type of authorization should generally only be used when calling
658
662
  # Google APIs hosted on *.googleapis.com.
663
+ #
664
+ # Note: The following fields are mutually exclusive: `oauth_token`, `oidc_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
659
665
  # @!attribute [rw] oidc_token
660
666
  # @return [::Google::Cloud::Tasks::V2beta2::OidcToken]
661
667
  # If specified, an
@@ -666,6 +672,8 @@ module Google
666
672
  # This type of authorization can be used for many scenarios, including
667
673
  # calling Cloud Run, or endpoints where you intend to validate the token
668
674
  # yourself.
675
+ #
676
+ # Note: The following fields are mutually exclusive: `oidc_token`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared.
669
677
  class HttpTarget
670
678
  include ::Google::Protobuf::MessageExts
671
679
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -55,6 +55,8 @@ module Google
55
55
  # An App Engine task is a task that has
56
56
  # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}
57
57
  # set.
58
+ #
59
+ # Note: The following fields are mutually exclusive: `app_engine_http_request`, `pull_message`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
58
60
  # @!attribute [rw] pull_message
59
61
  # @return [::Google::Cloud::Tasks::V2beta2::PullMessage]
60
62
  # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#lease_tasks LeaseTasks} to process
@@ -64,12 +66,16 @@ module Google
64
66
  #
65
67
  # A pull task is a task that has
66
68
  # {::Google::Cloud::Tasks::V2beta2::PullMessage PullMessage} set.
69
+ #
70
+ # Note: The following fields are mutually exclusive: `pull_message`, `app_engine_http_request`, `http_request`. If a field in that set is populated, all other fields in the set will automatically be cleared.
67
71
  # @!attribute [rw] http_request
68
72
  # @return [::Google::Cloud::Tasks::V2beta2::HttpRequest]
69
73
  # HTTP request that is sent to the task's target.
70
74
  #
71
75
  # An HTTP task is a task that has
72
76
  # {::Google::Cloud::Tasks::V2beta2::HttpRequest HttpRequest} set.
77
+ #
78
+ # Note: The following fields are mutually exclusive: `http_request`, `app_engine_http_request`, `pull_message`. If a field in that set is populated, all other fields in the set will automatically be cleared.
73
79
  # @!attribute [rw] schedule_time
74
80
  # @return [::Google::Protobuf::Timestamp]
75
81
  # The time when the task is scheduled to be attempted.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks-v2beta2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gapic-common
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.1
18
+ version: 0.25.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.a
@@ -26,7 +25,7 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 0.21.1
28
+ version: 0.25.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: 2.a
@@ -135,7 +134,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
135
134
  licenses:
136
135
  - Apache-2.0
137
136
  metadata: {}
138
- post_install_message:
139
137
  rdoc_options: []
140
138
  require_paths:
141
139
  - lib
@@ -143,15 +141,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
141
  requirements:
144
142
  - - ">="
145
143
  - !ruby/object:Gem::Version
146
- version: '2.7'
144
+ version: '3.0'
147
145
  required_rubygems_version: !ruby/object:Gem::Requirement
148
146
  requirements:
149
147
  - - ">="
150
148
  - !ruby/object:Gem::Version
151
149
  version: '0'
152
150
  requirements: []
153
- rubygems_version: 3.5.6
154
- signing_key:
151
+ rubygems_version: 3.6.2
155
152
  specification_version: 4
156
153
  summary: Manages the execution of large numbers of distributed requests.
157
154
  test_files: []