google-cloud-tasks-v2beta2 0.2.2 → 0.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: c4455f8400956b2938daa38228109362e25c97b4d1ed7d9d0f224078878a8a29
4
- data.tar.gz: 70be65ba9665e674f4018f0f18359c4a74d816df0678a8ddaf8c829808805661
3
+ metadata.gz: 9cbfadf697cd33ea717c6dcfce8604174c066ad60efb3a593390a9d5ac83e2bd
4
+ data.tar.gz: 0cf8b7c807b4c7ce5c63f2a776d2d917edcdf8262f2ec83269ab84ccb4054e55
5
5
  SHA512:
6
- metadata.gz: 4b53c4a5a0c29884d6164d22c6ae9ff274ebdd49a416fd8f5446d562675a6f6d1a2791c6b710073a0647975f75b05c81b7155729c99047d3cc1c587d05617c3e
7
- data.tar.gz: 83b1e4356608dc020b053d5dbf067e42793d04c765348a17a805d637da047764491b2a40bc5ec6701fe19ce76347d8e93024be06421f6b4001e5551631975ed5
6
+ metadata.gz: 14d375e5e73604a22f055dfa0f82cb648b47ded3d7a75037e02b331f3f3f3b8005dcf5e9ea886ff832cef31defb760e28974fd1bb07845a94bac7eb106d4052d
7
+ data.tar.gz: dacc117f64394076d5c5283a3de6073009d5920fa2db5dd901f7caa6f3189f59baea6f2e51a97774e6ce87363bb07c44b323d8f53fc344c31a556c992edac768
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudtasks.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.list_queues request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-tasks-v2beta2/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/tasks)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v2beta2", "_helpers.rb"
38
+ require "google/cloud/tasks/v2beta2/_helpers" if ::File.file? helper_path
@@ -66,93 +66,93 @@ module Google
66
66
  end
67
67
  default_config = Client::Configuration.new parent_config
68
68
 
69
- default_config.rpcs.list_queues.timeout = 10.0
69
+ default_config.rpcs.list_queues.timeout = 20.0
70
70
  default_config.rpcs.list_queues.retry_policy = {
71
71
  initial_delay: 0.1,
72
72
  max_delay: 10.0,
73
73
  multiplier: 1.3,
74
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
74
+ retry_codes: [14, 4]
75
75
  }
76
76
 
77
- default_config.rpcs.get_queue.timeout = 10.0
77
+ default_config.rpcs.get_queue.timeout = 20.0
78
78
  default_config.rpcs.get_queue.retry_policy = {
79
79
  initial_delay: 0.1,
80
80
  max_delay: 10.0,
81
81
  multiplier: 1.3,
82
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
82
+ retry_codes: [14, 4]
83
83
  }
84
84
 
85
- default_config.rpcs.create_queue.timeout = 10.0
85
+ default_config.rpcs.create_queue.timeout = 20.0
86
86
 
87
- default_config.rpcs.update_queue.timeout = 10.0
87
+ default_config.rpcs.update_queue.timeout = 20.0
88
88
 
89
- default_config.rpcs.delete_queue.timeout = 10.0
89
+ default_config.rpcs.delete_queue.timeout = 20.0
90
90
  default_config.rpcs.delete_queue.retry_policy = {
91
91
  initial_delay: 0.1,
92
92
  max_delay: 10.0,
93
93
  multiplier: 1.3,
94
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
94
+ retry_codes: [14, 4]
95
95
  }
96
96
 
97
- default_config.rpcs.purge_queue.timeout = 10.0
97
+ default_config.rpcs.purge_queue.timeout = 20.0
98
98
 
99
- default_config.rpcs.pause_queue.timeout = 10.0
99
+ default_config.rpcs.pause_queue.timeout = 20.0
100
100
 
101
- default_config.rpcs.resume_queue.timeout = 10.0
101
+ default_config.rpcs.resume_queue.timeout = 20.0
102
102
 
103
- default_config.rpcs.get_iam_policy.timeout = 10.0
103
+ default_config.rpcs.get_iam_policy.timeout = 20.0
104
104
  default_config.rpcs.get_iam_policy.retry_policy = {
105
105
  initial_delay: 0.1,
106
106
  max_delay: 10.0,
107
107
  multiplier: 1.3,
108
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
108
+ retry_codes: [14, 4]
109
109
  }
110
110
 
111
- default_config.rpcs.set_iam_policy.timeout = 10.0
111
+ default_config.rpcs.set_iam_policy.timeout = 20.0
112
112
 
113
- default_config.rpcs.test_iam_permissions.timeout = 10.0
113
+ default_config.rpcs.test_iam_permissions.timeout = 20.0
114
114
  default_config.rpcs.test_iam_permissions.retry_policy = {
115
115
  initial_delay: 0.1,
116
116
  max_delay: 10.0,
117
117
  multiplier: 1.3,
118
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
118
+ retry_codes: [14, 4]
119
119
  }
120
120
 
121
- default_config.rpcs.list_tasks.timeout = 10.0
121
+ default_config.rpcs.list_tasks.timeout = 20.0
122
122
  default_config.rpcs.list_tasks.retry_policy = {
123
123
  initial_delay: 0.1,
124
124
  max_delay: 10.0,
125
125
  multiplier: 1.3,
126
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
126
+ retry_codes: [14, 4]
127
127
  }
128
128
 
129
- default_config.rpcs.get_task.timeout = 10.0
129
+ default_config.rpcs.get_task.timeout = 20.0
130
130
  default_config.rpcs.get_task.retry_policy = {
131
131
  initial_delay: 0.1,
132
132
  max_delay: 10.0,
133
133
  multiplier: 1.3,
134
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
134
+ retry_codes: [14, 4]
135
135
  }
136
136
 
137
- default_config.rpcs.create_task.timeout = 10.0
137
+ default_config.rpcs.create_task.timeout = 20.0
138
138
 
139
- default_config.rpcs.delete_task.timeout = 10.0
139
+ default_config.rpcs.delete_task.timeout = 20.0
140
140
  default_config.rpcs.delete_task.retry_policy = {
141
141
  initial_delay: 0.1,
142
142
  max_delay: 10.0,
143
143
  multiplier: 1.3,
144
- retry_codes: ["UNAVAILABLE", "DEADLINE_EXCEEDED"]
144
+ retry_codes: [14, 4]
145
145
  }
146
146
 
147
- default_config.rpcs.lease_tasks.timeout = 10.0
147
+ default_config.rpcs.lease_tasks.timeout = 20.0
148
148
 
149
- default_config.rpcs.acknowledge_task.timeout = 10.0
149
+ default_config.rpcs.acknowledge_task.timeout = 20.0
150
150
 
151
- default_config.rpcs.renew_lease.timeout = 10.0
151
+ default_config.rpcs.renew_lease.timeout = 20.0
152
152
 
153
- default_config.rpcs.cancel_lease.timeout = 10.0
153
+ default_config.rpcs.cancel_lease.timeout = 20.0
154
154
 
155
- default_config.rpcs.run_task.timeout = 10.0
155
+ default_config.rpcs.run_task.timeout = 20.0
156
156
 
157
157
  default_config
158
158
  end
@@ -248,7 +248,7 @@ module Google
248
248
  # @param options [::Gapic::CallOptions, ::Hash]
249
249
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
250
250
  #
251
- # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil)
251
+ # @overload list_queues(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
252
252
  # Pass arguments to `list_queues` via keyword arguments. Note that at
253
253
  # least one keyword argument is required. To specify no parameters, or to keep all
254
254
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -285,6 +285,11 @@ module Google
285
285
  # from the previous call to {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}
286
286
  # method. It is an error to switch the value of the
287
287
  # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while iterating through pages.
288
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
289
+ # Optional. Read mask is used for a more granular control over what the API returns.
290
+ # If the mask is not present all fields will be returned except
291
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
292
+ # specified in the mask.
288
293
  #
289
294
  # @yield [response, operation] Access the result along with the RPC operation
290
295
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Tasks::V2beta2::Queue>]
@@ -345,7 +350,7 @@ module Google
345
350
  # @param options [::Gapic::CallOptions, ::Hash]
346
351
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
347
352
  #
348
- # @overload get_queue(name: nil)
353
+ # @overload get_queue(name: nil, read_mask: nil)
349
354
  # Pass arguments to `get_queue` via keyword arguments. Note that at
350
355
  # least one keyword argument is required. To specify no parameters, or to keep all
351
356
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -353,6 +358,11 @@ module Google
353
358
  # @param name [::String]
354
359
  # Required. The resource name of the queue. For example:
355
360
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
361
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
362
+ # Optional. Read mask is used for a more granular control over what the API returns.
363
+ # If the mask is not present all fields will be returned except
364
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
365
+ # specified in the mask.
356
366
  #
357
367
  # @yield [response, operation] Access the result along with the RPC operation
358
368
  # @yieldparam response [::Google::Cloud::Tasks::V2beta2::Queue]
@@ -2122,7 +2132,7 @@ module Google
2122
2132
 
2123
2133
  config_attr :endpoint, "cloudtasks.googleapis.com", ::String
2124
2134
  config_attr :credentials, nil do |value|
2125
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2135
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2126
2136
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
2127
2137
  allowed.any? { |klass| klass === value }
2128
2138
  end
@@ -2162,7 +2172,7 @@ module Google
2162
2172
  # Each configuration object is of type `Gapic::Config::Method` and includes
2163
2173
  # the following configuration fields:
2164
2174
  #
2165
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
2175
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2166
2176
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
2167
2177
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2168
2178
  # include the following keys:
@@ -22,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
22
22
  optional :filter, :string, 2
23
23
  optional :page_size, :int32, 3
24
24
  optional :page_token, :string, 4
25
+ optional :read_mask, :message, 5, "google.protobuf.FieldMask"
25
26
  end
26
27
  add_message "google.cloud.tasks.v2beta2.ListQueuesResponse" do
27
28
  repeated :queues, :message, 1, "google.cloud.tasks.v2beta2.Queue"
@@ -29,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
30
  end
30
31
  add_message "google.cloud.tasks.v2beta2.GetQueueRequest" do
31
32
  optional :name, :string, 1
33
+ optional :read_mask, :message, 2, "google.protobuf.FieldMask"
32
34
  end
33
35
  add_message "google.cloud.tasks.v2beta2.CreateQueueRequest" do
34
36
  optional :parent, :string, 1
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/tasks/v2beta2/cloudtasks_pb'
@@ -38,9 +37,9 @@ module Google
38
37
  # Lists queues.
39
38
  #
40
39
  # Queues are returned in lexicographical order.
41
- rpc :ListQueues, ListQueuesRequest, ListQueuesResponse
40
+ rpc :ListQueues, ::Google::Cloud::Tasks::V2beta2::ListQueuesRequest, ::Google::Cloud::Tasks::V2beta2::ListQueuesResponse
42
41
  # Gets a queue.
43
- rpc :GetQueue, GetQueueRequest, Queue
42
+ rpc :GetQueue, ::Google::Cloud::Tasks::V2beta2::GetQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
44
43
  # Creates a queue.
45
44
  #
46
45
  # Queues created with this method allow tasks to live for a maximum of 31
@@ -53,7 +52,7 @@ module Google
53
52
  # [Overview of Queue Management and
54
53
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
55
54
  # this method.
56
- rpc :CreateQueue, CreateQueueRequest, Queue
55
+ rpc :CreateQueue, ::Google::Cloud::Tasks::V2beta2::CreateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
57
56
  # Updates a queue.
58
57
  #
59
58
  # This method creates the queue if it does not exist and updates
@@ -69,7 +68,7 @@ module Google
69
68
  # [Overview of Queue Management and
70
69
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
71
70
  # this method.
72
- rpc :UpdateQueue, UpdateQueueRequest, Queue
71
+ rpc :UpdateQueue, ::Google::Cloud::Tasks::V2beta2::UpdateQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
73
72
  # Deletes a queue.
74
73
  #
75
74
  # This command will delete the queue even if it has tasks in it.
@@ -83,14 +82,14 @@ module Google
83
82
  # [Overview of Queue Management and
84
83
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
85
84
  # this method.
86
- rpc :DeleteQueue, DeleteQueueRequest, Google::Protobuf::Empty
85
+ rpc :DeleteQueue, ::Google::Cloud::Tasks::V2beta2::DeleteQueueRequest, ::Google::Protobuf::Empty
87
86
  # Purges a queue by deleting all of its tasks.
88
87
  #
89
88
  # All tasks created before this method is called are permanently deleted.
90
89
  #
91
90
  # Purge operations can take up to one minute to take effect. Tasks
92
91
  # might be dispatched before the purge takes effect. A purge is irreversible.
93
- rpc :PurgeQueue, PurgeQueueRequest, Queue
92
+ rpc :PurgeQueue, ::Google::Cloud::Tasks::V2beta2::PurgeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
94
93
  # Pauses the queue.
95
94
  #
96
95
  # If a queue is paused then the system will stop dispatching tasks
@@ -98,7 +97,7 @@ module Google
98
97
  # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
99
98
  # when the queue is paused. A queue is paused if its
100
99
  # [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
101
- rpc :PauseQueue, PauseQueueRequest, Queue
100
+ rpc :PauseQueue, ::Google::Cloud::Tasks::V2beta2::PauseQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
102
101
  # Resume a queue.
103
102
  #
104
103
  # This method resumes a queue after it has been
@@ -112,7 +111,7 @@ module Google
112
111
  # queues, follow the 500/50/5 pattern described in
113
112
  # [Managing Cloud Tasks Scaling
114
113
  # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
115
- rpc :ResumeQueue, ResumeQueueRequest, Queue
114
+ rpc :ResumeQueue, ::Google::Cloud::Tasks::V2beta2::ResumeQueueRequest, ::Google::Cloud::Tasks::V2beta2::Queue
116
115
  # Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
117
116
  # Returns an empty policy if the resource exists and does not have a policy
118
117
  # set.
@@ -122,7 +121,7 @@ module Google
122
121
  # resource parent:
123
122
  #
124
123
  # * `cloudtasks.queues.getIamPolicy`
125
- rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
124
+ rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
126
125
  # Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
127
126
  # policy.
128
127
  #
@@ -134,7 +133,7 @@ module Google
134
133
  # resource parent:
135
134
  #
136
135
  # * `cloudtasks.queues.setIamPolicy`
137
- rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
136
+ rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
138
137
  # Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
139
138
  # If the resource does not exist, this will return an empty set of
140
139
  # permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
@@ -142,7 +141,7 @@ module Google
142
141
  # Note: This operation is designed to be used for building permission-aware
143
142
  # UIs and command-line tools, not for authorization checking. This operation
144
143
  # may "fail open" without warning.
145
- rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
144
+ rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
146
145
  # Lists the tasks in a queue.
147
146
  #
148
147
  # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
@@ -152,9 +151,9 @@ module Google
152
151
  #
153
152
  # The tasks may be returned in any order. The ordering may change at any
154
153
  # time.
155
- rpc :ListTasks, ListTasksRequest, ListTasksResponse
154
+ rpc :ListTasks, ::Google::Cloud::Tasks::V2beta2::ListTasksRequest, ::Google::Cloud::Tasks::V2beta2::ListTasksResponse
156
155
  # Gets a task.
157
- rpc :GetTask, GetTaskRequest, Task
156
+ rpc :GetTask, ::Google::Cloud::Tasks::V2beta2::GetTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
158
157
  # Creates a task and adds it to a queue.
159
158
  #
160
159
  # Tasks cannot be updated after creation; there is no UpdateTask command.
@@ -162,13 +161,13 @@ module Google
162
161
  # * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum task size is
163
162
  # 100KB.
164
163
  # * For [pull queues][google.cloud.tasks.v2beta2.PullTarget], the maximum task size is 1MB.
165
- rpc :CreateTask, CreateTaskRequest, Task
164
+ rpc :CreateTask, ::Google::Cloud::Tasks::V2beta2::CreateTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
166
165
  # Deletes a task.
167
166
  #
168
167
  # A task can be deleted if it is scheduled or dispatched. A task
169
168
  # cannot be deleted if it has completed successfully or permanently
170
169
  # failed.
171
- rpc :DeleteTask, DeleteTaskRequest, Google::Protobuf::Empty
170
+ rpc :DeleteTask, ::Google::Cloud::Tasks::V2beta2::DeleteTaskRequest, ::Google::Protobuf::Empty
172
171
  # Leases tasks from a pull queue for
173
172
  # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
174
173
  #
@@ -191,7 +190,7 @@ module Google
191
190
  # is also returned when
192
191
  # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
193
192
  # is exceeded.
194
- rpc :LeaseTasks, LeaseTasksRequest, LeaseTasksResponse
193
+ rpc :LeaseTasks, ::Google::Cloud::Tasks::V2beta2::LeaseTasksRequest, ::Google::Cloud::Tasks::V2beta2::LeaseTasksResponse
195
194
  # Acknowledges a pull task.
196
195
  #
197
196
  # The worker, that is, the entity that
@@ -205,20 +204,20 @@ module Google
205
204
  # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
206
205
  # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
207
206
  # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
208
- rpc :AcknowledgeTask, AcknowledgeTaskRequest, Google::Protobuf::Empty
207
+ rpc :AcknowledgeTask, ::Google::Cloud::Tasks::V2beta2::AcknowledgeTaskRequest, ::Google::Protobuf::Empty
209
208
  # Renew the current lease of a pull task.
210
209
  #
211
210
  # The worker can use this method to extend the lease by a new
212
211
  # duration, starting from now. The new task lease will be
213
212
  # returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
214
- rpc :RenewLease, RenewLeaseRequest, Task
213
+ rpc :RenewLease, ::Google::Cloud::Tasks::V2beta2::RenewLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task
215
214
  # Cancel a pull task's lease.
216
215
  #
217
216
  # The worker can use this method to cancel a task's lease by
218
217
  # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
219
218
  # make the task available to be leased to the next caller of
220
219
  # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
221
- rpc :CancelLease, CancelLeaseRequest, Task
220
+ rpc :CancelLease, ::Google::Cloud::Tasks::V2beta2::CancelLeaseRequest, ::Google::Cloud::Tasks::V2beta2::Task
222
221
  # Forces a task to run now.
223
222
  #
224
223
  # When this method is called, Cloud Tasks will dispatch the task, even if
@@ -246,7 +245,7 @@ module Google
246
245
  #
247
246
  # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
248
247
  # [pull task][google.cloud.tasks.v2beta2.PullMessage].
249
- rpc :RunTask, RunTaskRequest, Task
248
+ rpc :RunTask, ::Google::Cloud::Tasks::V2beta2::RunTaskRequest, ::Google::Cloud::Tasks::V2beta2::Task
250
249
  end
251
250
 
252
251
  Stub = Service.rpc_stub_class
@@ -0,0 +1,20 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/tasks/v2beta2/old_target.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/cloud/tasks/v2beta2/target_pb'
7
+ require 'google/api/annotations_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("google/cloud/tasks/v2beta2/old_target.proto", :syntax => :proto3) do
10
+ end
11
+ end
12
+
13
+ module Google
14
+ module Cloud
15
+ module Tasks
16
+ module V2beta2
17
+ end
18
+ end
19
+ end
20
+ end
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/api/field_behavior_pb'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/cloud/tasks/v2beta2/target_pb'
8
9
  require 'google/protobuf/duration_pb'
@@ -16,6 +17,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
16
17
  optional :retry_config, :message, 6, "google.cloud.tasks.v2beta2.RetryConfig"
17
18
  optional :state, :enum, 7, "google.cloud.tasks.v2beta2.Queue.State"
18
19
  optional :purge_time, :message, 8, "google.protobuf.Timestamp"
20
+ optional :task_ttl, :message, 9, "google.protobuf.Duration"
21
+ optional :tombstone_ttl, :message, 10, "google.protobuf.Duration"
22
+ optional :stats, :message, 16, "google.cloud.tasks.v2beta2.QueueStats"
19
23
  oneof :target_type do
20
24
  optional :app_engine_http_target, :message, 3, "google.cloud.tasks.v2beta2.AppEngineHttpTarget"
21
25
  optional :pull_target, :message, 4, "google.cloud.tasks.v2beta2.PullTarget"
@@ -42,6 +46,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
42
46
  optional :unlimited_attempts, :bool, 2
43
47
  end
44
48
  end
49
+ add_message "google.cloud.tasks.v2beta2.QueueStats" do
50
+ optional :tasks_count, :int64, 1
51
+ optional :oldest_estimated_arrival_time, :message, 2, "google.protobuf.Timestamp"
52
+ optional :executed_last_minute_count, :int64, 3
53
+ optional :concurrent_dispatches_count, :int64, 4
54
+ optional :effective_execution_rate, :double, 5
55
+ end
45
56
  end
46
57
  end
47
58
 
@@ -53,6 +64,7 @@ module Google
53
64
  Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.Queue.State").enummodule
54
65
  RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RateLimits").msgclass
55
66
  RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RetryConfig").msgclass
67
+ QueueStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.QueueStats").msgclass
56
68
  end
57
69
  end
58
70
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tasks
23
23
  module V2beta2
24
- VERSION = "0.2.2"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -58,6 +58,12 @@ module Google
58
58
  # from the previous call to {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#list_queues ListQueues}
59
59
  # method. It is an error to switch the value of the
60
60
  # {::Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while iterating through pages.
61
+ # @!attribute [rw] read_mask
62
+ # @return [::Google::Protobuf::FieldMask]
63
+ # Optional. Read mask is used for a more granular control over what the API returns.
64
+ # If the mask is not present all fields will be returned except
65
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
66
+ # specified in the mask.
61
67
  class ListQueuesRequest
62
68
  include ::Google::Protobuf::MessageExts
63
69
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -88,6 +94,12 @@ module Google
88
94
  # @return [::String]
89
95
  # Required. The resource name of the queue. For example:
90
96
  # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
97
+ # @!attribute [rw] read_mask
98
+ # @return [::Google::Protobuf::FieldMask]
99
+ # Optional. Read mask is used for a more granular control over what the API returns.
100
+ # If the mask is not present all fields will be returned except
101
+ # [Queue.stats]. [Queue.stats] will be returned only if it was explicitly
102
+ # specified in the mask.
91
103
  class GetQueueRequest
92
104
  include ::Google::Protobuf::MessageExts
93
105
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -106,6 +106,37 @@ module Google
106
106
  #
107
107
  # Purge time will be truncated to the nearest microsecond. Purge
108
108
  # time will be unset if the queue has never been purged.
109
+ # @!attribute [rw] task_ttl
110
+ # @return [::Google::Protobuf::Duration]
111
+ # The maximum amount of time that a task will be retained in
112
+ # this queue.
113
+ #
114
+ # Queues created by Cloud Tasks have a default `task_ttl` of 31 days.
115
+ # After a task has lived for `task_ttl`, the task will be deleted
116
+ # regardless of whether it was dispatched or not.
117
+ #
118
+ # The `task_ttl` for queues created via queue.yaml/xml is equal to the
119
+ # maximum duration because there is a
120
+ # [storage quota](https://cloud.google.com/appengine/quotas#Task_Queue) for
121
+ # these queues. To view the maximum valid duration, see the documentation for
122
+ # {::Google::Protobuf::Duration Duration}.
123
+ # @!attribute [rw] tombstone_ttl
124
+ # @return [::Google::Protobuf::Duration]
125
+ # The task tombstone time to live (TTL).
126
+ #
127
+ # After a task is deleted or completed, the task's tombstone is
128
+ # retained for the length of time specified by `tombstone_ttl`.
129
+ # The tombstone is used by task de-duplication; another task with the same
130
+ # name can't be created until the tombstone has expired. For more information
131
+ # about task de-duplication, see the documentation for
132
+ # {::Google::Cloud::Tasks::V2beta2::CreateTaskRequest#task CreateTaskRequest}.
133
+ #
134
+ # Queues created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
135
+ # @!attribute [r] stats
136
+ # @return [::Google::Cloud::Tasks::V2beta2::QueueStats]
137
+ # Output only. The realtime, informational statistics for a queue. In order
138
+ # to receive the statistics the caller should include this field in the
139
+ # FieldMask.
109
140
  class Queue
110
141
  include ::Google::Protobuf::MessageExts
111
142
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -178,7 +209,7 @@ module Google
178
209
  # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
179
210
  # @!attribute [rw] max_burst_size
180
211
  # @return [::Integer]
181
- # Output only. The max burst size.
212
+ # The max burst size.
182
213
  #
183
214
  # Max burst size limits how fast tasks in queue are processed when
184
215
  # many tasks are in the queue and the rate is high. This field
@@ -193,23 +224,23 @@ module Google
193
224
  # token is removed from the bucket. Tasks will be dispatched until
194
225
  # the queue's bucket runs out of tokens. The bucket will be
195
226
  # continuously refilled with new tokens based on
196
- # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second}.
227
+ # [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
228
+ #
229
+ # The default value of `max_burst_size` is picked by Cloud Tasks
230
+ # based on the value of
231
+ # [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
197
232
  #
198
- # Cloud Tasks will pick the value of `max_burst_size` based on the
199
- # value of
200
- # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second}.
233
+ # The maximum value of `max_burst_size` is 500.
201
234
  #
202
235
  # For App Engine queues that were created or updated using
203
236
  # `queue.yaml/xml`, `max_burst_size` is equal to
204
237
  # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
205
- # Since `max_burst_size` is output only, if
206
- # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called on a queue
207
- # created by `queue.yaml/xml`, `max_burst_size` will be reset based
208
- # on the value of
209
- # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second},
210
- # regardless of whether
211
- # {::Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second}
212
- # is updated.
238
+ # If
239
+ # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is called on a queue without
240
+ # explicitly setting a value for `max_burst_size`,
241
+ # `max_burst_size` value will get updated if
242
+ # {::Google::Cloud::Tasks::V2beta2::CloudTasks::Client#update_queue UpdateQueue} is updating
243
+ # [max_dispatches_per_second][RateLimits.max_dispatches_per_second].
213
244
  # @!attribute [rw] max_concurrent_tasks
214
245
  # @return [::Integer]
215
246
  # The maximum number of concurrent tasks that Cloud Tasks allows
@@ -316,7 +347,7 @@ module Google
316
347
  # A task's retry interval starts at
317
348
  # {::Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then doubles
318
349
  # `max_doublings` times, then increases linearly, and finally
319
- # retries retries at intervals of
350
+ # retries at intervals of
320
351
  # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} up to
321
352
  # {::Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times.
322
353
  #
@@ -343,6 +374,37 @@ module Google
343
374
  include ::Google::Protobuf::MessageExts
344
375
  extend ::Google::Protobuf::MessageExts::ClassMethods
345
376
  end
377
+
378
+ # Statistics for a queue.
379
+ # @!attribute [r] tasks_count
380
+ # @return [::Integer]
381
+ # Output only. An estimation of the number of tasks in the queue, that is, the tasks in
382
+ # the queue that haven't been executed, the tasks in the queue which the
383
+ # queue has dispatched but has not yet received a reply for, and the failed
384
+ # tasks that the queue is retrying.
385
+ # @!attribute [r] oldest_estimated_arrival_time
386
+ # @return [::Google::Protobuf::Timestamp]
387
+ # Output only. An estimation of the nearest time in the future where a task in the queue
388
+ # is scheduled to be executed.
389
+ # @!attribute [r] executed_last_minute_count
390
+ # @return [::Integer]
391
+ # Output only. The number of tasks that the queue has dispatched and received a reply for
392
+ # during the last minute. This variable counts both successful and
393
+ # non-successful executions.
394
+ # @!attribute [r] concurrent_dispatches_count
395
+ # @return [::Integer]
396
+ # Output only. The number of requests that the queue has dispatched but has not received
397
+ # a reply for yet.
398
+ # @!attribute [r] effective_execution_rate
399
+ # @return [::Float]
400
+ # Output only. The current maximum number of tasks per second executed by the queue.
401
+ # The maximum value of this variable is controlled by the RateLimits of the
402
+ # Queue. However, this value could be less to avoid overloading the endpoints
403
+ # tasks in the queue are targeting.
404
+ class QueueStats
405
+ include ::Google::Protobuf::MessageExts
406
+ extend ::Google::Protobuf::MessageExts::ClassMethods
407
+ end
346
408
  end
347
409
  end
348
410
  end
@@ -119,10 +119,10 @@ module Google
119
119
  # delivered to can be set at the queue-level or task-level:
120
120
  #
121
121
  # * If set,
122
- # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
123
- # is used for all tasks in the queue, no matter what the setting
124
- # is for the
125
- # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
122
+ # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
123
+ # is used for all tasks in the queue, no matter what the setting
124
+ # is for the
125
+ # {::Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
126
126
  #
127
127
  #
128
128
  # The `url` that the task will be sent to is:
@@ -156,14 +156,11 @@ module Google
156
156
  # The HTTP method to use for the request. The default is POST.
157
157
  #
158
158
  # The app's request handler for the task's target URL must be able to handle
159
- # HTTP requests with this http_method, otherwise the task attempt will fail
160
- # with error code 405 (Method Not Allowed). See
161
- # [Writing a push task request
159
+ # HTTP requests with this http_method, otherwise the task attempt fails with
160
+ # error code 405 (Method Not Allowed). See [Writing a push task request
162
161
  # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
163
- # and the documentation for the request handlers in the language your app is
164
- # written in e.g.
165
- # [Python Request
166
- # Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
162
+ # and the App Engine documentation for your runtime on [How Requests are
163
+ # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
167
164
  # @!attribute [rw] app_engine_routing
168
165
  # @return [::Google::Cloud::Tasks::V2beta2::AppEngineRouting]
169
166
  # Task-level setting for App Engine routing.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks-v2beta2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-06 00:00:00.000000000 Z
11
+ date: 2021-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -191,6 +191,7 @@ files:
191
191
  - lib/google/cloud/tasks/v2beta2/cloud_tasks/paths.rb
192
192
  - lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb
193
193
  - lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb
194
+ - lib/google/cloud/tasks/v2beta2/old_target_pb.rb
194
195
  - lib/google/cloud/tasks/v2beta2/queue_pb.rb
195
196
  - lib/google/cloud/tasks/v2beta2/target_pb.rb
196
197
  - lib/google/cloud/tasks/v2beta2/task_pb.rb
@@ -231,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
232
  - !ruby/object:Gem::Version
232
233
  version: '0'
233
234
  requirements: []
234
- rubygems_version: 3.1.3
235
+ rubygems_version: 3.2.6
235
236
  signing_key:
236
237
  specification_version: 4
237
238
  summary: API Client library for the Cloud Tasks V2beta2 API