google-cloud-tasks 1.5.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -54
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +274 -0
  6. data/README.md +37 -24
  7. data/lib/{google/cloud/tasks/v2beta2/doc/google/protobuf/empty.rb → google-cloud-tasks.rb} +4 -14
  8. data/lib/google/cloud/tasks.rb +82 -117
  9. data/lib/google/cloud/tasks/version.rb +6 -2
  10. metadata +104 -113
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/tasks/v2.rb +0 -147
  13. data/lib/google/cloud/tasks/v2/cloud_tasks_client.rb +0 -1233
  14. data/lib/google/cloud/tasks/v2/cloud_tasks_client_config.json +0 -106
  15. data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +0 -100
  16. data/lib/google/cloud/tasks/v2/cloudtasks_services_pb.rb +0 -203
  17. data/lib/google/cloud/tasks/v2/credentials.rb +0 -41
  18. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/cloudtasks.rb +0 -312
  19. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/queue.rb +0 -348
  20. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/target.rb +0 -414
  21. data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/task.rb +0 -175
  22. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/iam_policy.rb +0 -64
  23. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/options.rb +0 -33
  24. data/lib/google/cloud/tasks/v2/doc/google/iam/v1/policy.rb +0 -151
  25. data/lib/google/cloud/tasks/v2/doc/google/protobuf/any.rb +0 -131
  26. data/lib/google/cloud/tasks/v2/doc/google/protobuf/duration.rb +0 -91
  27. data/lib/google/cloud/tasks/v2/doc/google/protobuf/empty.rb +0 -29
  28. data/lib/google/cloud/tasks/v2/doc/google/protobuf/field_mask.rb +0 -222
  29. data/lib/google/cloud/tasks/v2/doc/google/protobuf/timestamp.rb +0 -113
  30. data/lib/google/cloud/tasks/v2/doc/google/rpc/status.rb +0 -39
  31. data/lib/google/cloud/tasks/v2/doc/google/type/expr.rb +0 -45
  32. data/lib/google/cloud/tasks/v2/helpers.rb +0 -49
  33. data/lib/google/cloud/tasks/v2/queue_pb.rb +0 -56
  34. data/lib/google/cloud/tasks/v2/target_pb.rb +0 -66
  35. data/lib/google/cloud/tasks/v2/task_pb.rb +0 -51
  36. data/lib/google/cloud/tasks/v2beta2.rb +0 -147
  37. data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +0 -1605
  38. data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client_config.json +0 -126
  39. data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +0 -133
  40. data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +0 -258
  41. data/lib/google/cloud/tasks/v2beta2/credentials.rb +0 -41
  42. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +0 -483
  43. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +0 -336
  44. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +0 -377
  45. data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +0 -166
  46. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/iam_policy.rb +0 -64
  47. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/options.rb +0 -33
  48. data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/policy.rb +0 -151
  49. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/any.rb +0 -131
  50. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/duration.rb +0 -91
  51. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/field_mask.rb +0 -222
  52. data/lib/google/cloud/tasks/v2beta2/doc/google/protobuf/timestamp.rb +0 -113
  53. data/lib/google/cloud/tasks/v2beta2/doc/google/rpc/status.rb +0 -39
  54. data/lib/google/cloud/tasks/v2beta2/doc/google/type/expr.rb +0 -45
  55. data/lib/google/cloud/tasks/v2beta2/helpers.rb +0 -49
  56. data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +0 -58
  57. data/lib/google/cloud/tasks/v2beta2/target_pb.rb +0 -54
  58. data/lib/google/cloud/tasks/v2beta2/task_pb.rb +0 -54
  59. data/lib/google/cloud/tasks/v2beta3.rb +0 -147
  60. data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client.rb +0 -1233
  61. data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client_config.json +0 -106
  62. data/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +0 -101
  63. data/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb +0 -203
  64. data/lib/google/cloud/tasks/v2beta3/credentials.rb +0 -41
  65. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/cloudtasks.rb +0 -312
  66. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/queue.rb +0 -342
  67. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/target.rb +0 -431
  68. data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/task.rb +0 -177
  69. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/iam_policy.rb +0 -64
  70. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/options.rb +0 -33
  71. data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/policy.rb +0 -151
  72. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/any.rb +0 -131
  73. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/duration.rb +0 -91
  74. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/empty.rb +0 -29
  75. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/field_mask.rb +0 -222
  76. data/lib/google/cloud/tasks/v2beta3/doc/google/protobuf/timestamp.rb +0 -113
  77. data/lib/google/cloud/tasks/v2beta3/doc/google/rpc/status.rb +0 -39
  78. data/lib/google/cloud/tasks/v2beta3/doc/google/type/expr.rb +0 -45
  79. data/lib/google/cloud/tasks/v2beta3/helpers.rb +0 -49
  80. data/lib/google/cloud/tasks/v2beta3/queue_pb.rb +0 -59
  81. data/lib/google/cloud/tasks/v2beta3/target_pb.rb +0 -69
  82. data/lib/google/cloud/tasks/v2beta3/task_pb.rb +0 -52
@@ -1,312 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Tasks
19
- module V2beta3
20
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::ListQueues ListQueues}.
21
- # @!attribute [rw] parent
22
- # @return [String]
23
- # Required. The location name.
24
- # For example: `projects/PROJECT_ID/locations/LOCATION_ID`
25
- # @!attribute [rw] filter
26
- # @return [String]
27
- # `filter` can be used to specify a subset of queues. Any {Google::Cloud::Tasks::V2beta3::Queue Queue}
28
- # field can be used as a filter and several operators as supported.
29
- # For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
30
- # described in
31
- # [Stackdriver's Advanced Logs
32
- # Filters](https://cloud.google.com/logging/docs/view/advanced_filters).
33
- #
34
- # Sample filter "state: PAUSED".
35
- #
36
- # Note that using filters might cause fewer queues than the
37
- # requested page_size to be returned.
38
- # @!attribute [rw] page_size
39
- # @return [Integer]
40
- # Requested page size.
41
- #
42
- # The maximum page size is 9800. If unspecified, the page size will
43
- # be the maximum. Fewer queues than requested might be returned,
44
- # even if more queues exist; use the
45
- # {Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} in the
46
- # response to determine if more queues exist.
47
- # @!attribute [rw] page_token
48
- # @return [String]
49
- # A token identifying the page of results to return.
50
- #
51
- # To request the first page results, page_token must be empty. To
52
- # request the next page of results, page_token must be the value of
53
- # {Google::Cloud::Tasks::V2beta3::ListQueuesResponse#next_page_token next_page_token} returned
54
- # from the previous call to {Google::Cloud::Tasks::V2beta3::CloudTasks::ListQueues ListQueues}
55
- # method. It is an error to switch the value of the
56
- # {Google::Cloud::Tasks::V2beta3::ListQueuesRequest#filter filter} while iterating through pages.
57
- class ListQueuesRequest; end
58
-
59
- # Response message for {Google::Cloud::Tasks::V2beta3::CloudTasks::ListQueues ListQueues}.
60
- # @!attribute [rw] queues
61
- # @return [Array<Google::Cloud::Tasks::V2beta3::Queue>]
62
- # The list of queues.
63
- # @!attribute [rw] next_page_token
64
- # @return [String]
65
- # A token to retrieve next page of results.
66
- #
67
- # To return the next page of results, call
68
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::ListQueues ListQueues} with this value as the
69
- # {Google::Cloud::Tasks::V2beta3::ListQueuesRequest#page_token page_token}.
70
- #
71
- # If the next_page_token is empty, there are no more results.
72
- #
73
- # The page token is valid for only 2 hours.
74
- class ListQueuesResponse; end
75
-
76
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::GetQueue GetQueue}.
77
- # @!attribute [rw] name
78
- # @return [String]
79
- # Required. The resource name of the queue. For example:
80
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
81
- class GetQueueRequest; end
82
-
83
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateQueue CreateQueue}.
84
- # @!attribute [rw] parent
85
- # @return [String]
86
- # Required. The location name in which the queue will be created.
87
- # For example: `projects/PROJECT_ID/locations/LOCATION_ID`
88
- #
89
- # The list of allowed locations can be obtained by calling Cloud
90
- # Tasks' implementation of
91
- # {Google::Cloud::Location::Locations::ListLocations ListLocations}.
92
- # @!attribute [rw] queue
93
- # @return [Google::Cloud::Tasks::V2beta3::Queue]
94
- # Required. The queue to create.
95
- #
96
- # {Google::Cloud::Tasks::V2beta3::Queue#name Queue's name} cannot be the same as an existing queue.
97
- class CreateQueueRequest; end
98
-
99
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::UpdateQueue UpdateQueue}.
100
- # @!attribute [rw] queue
101
- # @return [Google::Cloud::Tasks::V2beta3::Queue]
102
- # Required. The queue to create or update.
103
- #
104
- # The queue's {Google::Cloud::Tasks::V2beta3::Queue#name name} must be specified.
105
- #
106
- # Output only fields cannot be modified using UpdateQueue.
107
- # Any value specified for an output only field will be ignored.
108
- # The queue's {Google::Cloud::Tasks::V2beta3::Queue#name name} cannot be changed.
109
- # @!attribute [rw] update_mask
110
- # @return [Google::Protobuf::FieldMask]
111
- # A mask used to specify which fields of the queue are being updated.
112
- #
113
- # If empty, then all fields will be updated.
114
- class UpdateQueueRequest; end
115
-
116
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::DeleteQueue DeleteQueue}.
117
- # @!attribute [rw] name
118
- # @return [String]
119
- # Required. The queue name. For example:
120
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
121
- class DeleteQueueRequest; end
122
-
123
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::PurgeQueue PurgeQueue}.
124
- # @!attribute [rw] name
125
- # @return [String]
126
- # Required. The queue name. For example:
127
- # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
128
- class PurgeQueueRequest; end
129
-
130
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::PauseQueue PauseQueue}.
131
- # @!attribute [rw] name
132
- # @return [String]
133
- # Required. The queue name. For example:
134
- # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
135
- class PauseQueueRequest; end
136
-
137
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::ResumeQueue ResumeQueue}.
138
- # @!attribute [rw] name
139
- # @return [String]
140
- # Required. The queue name. For example:
141
- # `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
142
- class ResumeQueueRequest; end
143
-
144
- # Request message for listing tasks using {Google::Cloud::Tasks::V2beta3::CloudTasks::ListTasks ListTasks}.
145
- # @!attribute [rw] parent
146
- # @return [String]
147
- # Required. The queue name. For example:
148
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
149
- # @!attribute [rw] response_view
150
- # @return [Google::Cloud::Tasks::V2beta3::Task::View]
151
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta3::Task Task} will be
152
- # returned.
153
- #
154
- # By default response_view is {Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all
155
- # information is retrieved by default because some data, such as
156
- # payloads, might be desirable to return only when needed because
157
- # of its large size or because of the sensitivity of data that it
158
- # contains.
159
- #
160
- # Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} requires
161
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
162
- # permission on the {Google::Cloud::Tasks::V2beta3::Task Task} resource.
163
- # @!attribute [rw] page_size
164
- # @return [Integer]
165
- # Maximum page size.
166
- #
167
- # Fewer tasks than requested might be returned, even if more tasks exist; use
168
- # {Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} in the response to
169
- # determine if more tasks exist.
170
- #
171
- # The maximum page size is 1000. If unspecified, the page size will be the
172
- # maximum.
173
- # @!attribute [rw] page_token
174
- # @return [String]
175
- # A token identifying the page of results to return.
176
- #
177
- # To request the first page results, page_token must be empty. To
178
- # request the next page of results, page_token must be the value of
179
- # {Google::Cloud::Tasks::V2beta3::ListTasksResponse#next_page_token next_page_token} returned
180
- # from the previous call to {Google::Cloud::Tasks::V2beta3::CloudTasks::ListTasks ListTasks}
181
- # method.
182
- #
183
- # The page token is valid for only 2 hours.
184
- class ListTasksRequest; end
185
-
186
- # Response message for listing tasks using {Google::Cloud::Tasks::V2beta3::CloudTasks::ListTasks ListTasks}.
187
- # @!attribute [rw] tasks
188
- # @return [Array<Google::Cloud::Tasks::V2beta3::Task>]
189
- # The list of tasks.
190
- # @!attribute [rw] next_page_token
191
- # @return [String]
192
- # A token to retrieve next page of results.
193
- #
194
- # To return the next page of results, call
195
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::ListTasks ListTasks} with this value as the
196
- # {Google::Cloud::Tasks::V2beta3::ListTasksRequest#page_token page_token}.
197
- #
198
- # If the next_page_token is empty, there are no more results.
199
- class ListTasksResponse; end
200
-
201
- # Request message for getting a task using {Google::Cloud::Tasks::V2beta3::CloudTasks::GetTask GetTask}.
202
- # @!attribute [rw] name
203
- # @return [String]
204
- # Required. The task name. For example:
205
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
206
- # @!attribute [rw] response_view
207
- # @return [Google::Cloud::Tasks::V2beta3::Task::View]
208
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta3::Task Task} will be
209
- # returned.
210
- #
211
- # By default response_view is {Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all
212
- # information is retrieved by default because some data, such as
213
- # payloads, might be desirable to return only when needed because
214
- # of its large size or because of the sensitivity of data that it
215
- # contains.
216
- #
217
- # Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} requires
218
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
219
- # permission on the {Google::Cloud::Tasks::V2beta3::Task Task} resource.
220
- class GetTaskRequest; end
221
-
222
- # Request message for {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask CreateTask}.
223
- # @!attribute [rw] parent
224
- # @return [String]
225
- # Required. The queue name. For example:
226
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
227
- #
228
- # The queue must already exist.
229
- # @!attribute [rw] task
230
- # @return [Google::Cloud::Tasks::V2beta3::Task]
231
- # Required. The task to add.
232
- #
233
- # Task names have the following format:
234
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
235
- # The user can optionally specify a task {Google::Cloud::Tasks::V2beta3::Task#name name}. If a
236
- # name is not specified then the system will generate a random
237
- # unique task id, which will be set in the task returned in the
238
- # {Google::Cloud::Tasks::V2beta3::Task#name response}.
239
- #
240
- # If {Google::Cloud::Tasks::V2beta3::Task#schedule_time schedule_time} is not set or is in the
241
- # past then Cloud Tasks will set it to the current time.
242
- #
243
- # Task De-duplication:
244
- #
245
- # Explicitly specifying a task ID enables task de-duplication. If
246
- # a task's ID is identical to that of an existing task or a task
247
- # that was deleted or executed recently then the call will fail
248
- # with {Google::Rpc::Code::ALREADY_EXISTS ALREADY_EXISTS}.
249
- # If the task's queue was created using Cloud Tasks, then another task with
250
- # the same name can't be created for ~1hour after the original task was
251
- # deleted or executed. If the task's queue was created using queue.yaml or
252
- # queue.xml, then another task with the same name can't be created
253
- # for ~9days after the original task was deleted or executed.
254
- #
255
- # Because there is an extra lookup cost to identify duplicate task
256
- # names, these {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask CreateTask} calls have significantly
257
- # increased latency. Using hashed strings for the task id or for
258
- # the prefix of the task id is recommended. Choosing task ids that
259
- # are sequential or have sequential prefixes, for example using a
260
- # timestamp, causes an increase in latency and error rates in all
261
- # task commands. The infrastructure relies on an approximately
262
- # uniform distribution of task ids to store and serve tasks
263
- # efficiently.
264
- # @!attribute [rw] response_view
265
- # @return [Google::Cloud::Tasks::V2beta3::Task::View]
266
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta3::Task Task} will be
267
- # returned.
268
- #
269
- # By default response_view is {Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all
270
- # information is retrieved by default because some data, such as
271
- # payloads, might be desirable to return only when needed because
272
- # of its large size or because of the sensitivity of data that it
273
- # contains.
274
- #
275
- # Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} requires
276
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
277
- # permission on the {Google::Cloud::Tasks::V2beta3::Task Task} resource.
278
- class CreateTaskRequest; end
279
-
280
- # Request message for deleting a task using
281
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::DeleteTask DeleteTask}.
282
- # @!attribute [rw] name
283
- # @return [String]
284
- # Required. The task name. For example:
285
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
286
- class DeleteTaskRequest; end
287
-
288
- # Request message for forcing a task to run now using
289
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::RunTask RunTask}.
290
- # @!attribute [rw] name
291
- # @return [String]
292
- # Required. The task name. For example:
293
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
294
- # @!attribute [rw] response_view
295
- # @return [Google::Cloud::Tasks::V2beta3::Task::View]
296
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta3::Task Task} will be
297
- # returned.
298
- #
299
- # By default response_view is {Google::Cloud::Tasks::V2beta3::Task::View::BASIC BASIC}; not all
300
- # information is retrieved by default because some data, such as
301
- # payloads, might be desirable to return only when needed because
302
- # of its large size or because of the sensitivity of data that it
303
- # contains.
304
- #
305
- # Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL} requires
306
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
307
- # permission on the {Google::Cloud::Tasks::V2beta3::Task Task} resource.
308
- class RunTaskRequest; end
309
- end
310
- end
311
- end
312
- end
@@ -1,342 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Tasks
19
- module V2beta3
20
- # A queue is a container of related tasks. Queues are configured to manage
21
- # how those tasks are dispatched. Configurable properties include rate limits,
22
- # retry options, queue types, and others.
23
- # @!attribute [rw] name
24
- # @return [String]
25
- # Caller-specified and required in {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateQueue CreateQueue},
26
- # after which it becomes output only.
27
- #
28
- # The queue name.
29
- #
30
- # The queue name must have the following format:
31
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
32
- #
33
- # * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
34
- # hyphens (-), colons (:), or periods (.).
35
- # For more information, see
36
- # [Identifying
37
- # projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
38
- # * `LOCATION_ID` is the canonical ID for the queue's location.
39
- # The list of available locations can be obtained by calling
40
- # {Google::Cloud::Location::Locations::ListLocations ListLocations}.
41
- # For more information, see https://cloud.google.com/about/locations/.
42
- # * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
43
- # hyphens (-). The maximum length is 100 characters.
44
- # @!attribute [rw] app_engine_http_queue
45
- # @return [Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue]
46
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue AppEngineHttpQueue} settings apply only to
47
- # {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks} in this queue.
48
- # {Google::Cloud::Tasks::V2beta3::HttpRequest Http tasks} are not affected by this proto.
49
- # @!attribute [rw] rate_limits
50
- # @return [Google::Cloud::Tasks::V2beta3::RateLimits]
51
- # Rate limits for task dispatches.
52
- #
53
- # {Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} and {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} are
54
- # related because they both control task attempts. However they control task
55
- # attempts in different ways:
56
- #
57
- # * {Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits} controls the total rate of
58
- # dispatches from a queue (i.e. all traffic dispatched from the
59
- # queue, regardless of whether the dispatch is from a first
60
- # attempt or a retry).
61
- # * {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls what happens to
62
- # particular a task after its first attempt fails. That is,
63
- # {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config} controls task retries (the
64
- # second attempt, third attempt, etc).
65
- #
66
- # The queue's actual dispatch rate is the result of:
67
- #
68
- # * Number of tasks in the queue
69
- # * User-specified throttling: {Google::Cloud::Tasks::V2beta3::Queue#rate_limits rate_limits},
70
- # {Google::Cloud::Tasks::V2beta3::Queue#retry_config retry_config}, and the
71
- # {Google::Cloud::Tasks::V2beta3::Queue#state queue's state}.
72
- # * System throttling due to `429` (Too Many Requests) or `503` (Service
73
- # Unavailable) responses from the worker, high error rates, or to smooth
74
- # sudden large traffic spikes.
75
- # @!attribute [rw] retry_config
76
- # @return [Google::Cloud::Tasks::V2beta3::RetryConfig]
77
- # Settings that determine the retry behavior.
78
- #
79
- # * For tasks created using Cloud Tasks: the queue-level retry settings
80
- # apply to all tasks in the queue that were created using Cloud Tasks.
81
- # Retry settings cannot be set on individual tasks.
82
- # * For tasks created using the App Engine SDK: the queue-level retry
83
- # settings apply to all tasks in the queue which do not have retry settings
84
- # explicitly set on the task and were created by the App Engine SDK. See
85
- # [App Engine
86
- # documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
87
- # @!attribute [rw] state
88
- # @return [Google::Cloud::Tasks::V2beta3::Queue::State]
89
- # Output only. The state of the queue.
90
- #
91
- # `state` can only be changed by called
92
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::PauseQueue PauseQueue},
93
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::ResumeQueue ResumeQueue}, or uploading
94
- # [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
95
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::UpdateQueue UpdateQueue} cannot be used to change `state`.
96
- # @!attribute [rw] purge_time
97
- # @return [Google::Protobuf::Timestamp]
98
- # Output only. The last time this queue was purged.
99
- #
100
- # All tasks that were {Google::Cloud::Tasks::V2beta3::Task#create_time created} before this time
101
- # were purged.
102
- #
103
- # A queue can be purged using {Google::Cloud::Tasks::V2beta3::CloudTasks::PurgeQueue PurgeQueue}, the
104
- # [App Engine Task Queue SDK, or the Cloud
105
- # Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
106
- #
107
- # Purge time will be truncated to the nearest microsecond. Purge
108
- # time will be unset if the queue has never been purged.
109
- # @!attribute [rw] stackdriver_logging_config
110
- # @return [Google::Cloud::Tasks::V2beta3::StackdriverLoggingConfig]
111
- # Configuration options for writing logs to
112
- # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
113
- # field is unset, then no logs are written.
114
- class Queue
115
- # State of the queue.
116
- module State
117
- # Unspecified state.
118
- STATE_UNSPECIFIED = 0
119
-
120
- # The queue is running. Tasks can be dispatched.
121
- #
122
- # If the queue was created using Cloud Tasks and the queue has
123
- # had no activity (method calls or task dispatches) for 30 days,
124
- # the queue may take a few minutes to re-activate. Some method
125
- # calls may return {Google::Rpc::Code::NOT_FOUND NOT_FOUND} and
126
- # tasks may not be dispatched for a few minutes until the queue
127
- # has been re-activated.
128
- RUNNING = 1
129
-
130
- # Tasks are paused by the user. If the queue is paused then Cloud
131
- # Tasks will stop delivering tasks from it, but more tasks can
132
- # still be added to it by the user.
133
- PAUSED = 2
134
-
135
- # The queue is disabled.
136
- #
137
- # A queue becomes `DISABLED` when
138
- # [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
139
- # or
140
- # [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
141
- # is uploaded which does not contain the queue. You cannot directly disable
142
- # a queue.
143
- #
144
- # When a queue is disabled, tasks can still be added to a queue
145
- # but the tasks are not dispatched.
146
- #
147
- # To permanently delete this queue and all of its tasks, call
148
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::DeleteQueue DeleteQueue}.
149
- DISABLED = 3
150
- end
151
- end
152
-
153
- # Rate limits.
154
- #
155
- # This message determines the maximum rate that tasks can be dispatched by a
156
- # queue, regardless of whether the dispatch is a first task attempt or a retry.
157
- #
158
- # Note: The debugging command, {Google::Cloud::Tasks::V2beta3::CloudTasks::RunTask RunTask}, will run a task
159
- # even if the queue has reached its {Google::Cloud::Tasks::V2beta3::RateLimits RateLimits}.
160
- # @!attribute [rw] max_dispatches_per_second
161
- # @return [Float]
162
- # The maximum rate at which tasks are dispatched from this queue.
163
- #
164
- # If unspecified when the queue is created, Cloud Tasks will pick the
165
- # default.
166
- #
167
- # * For {Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue App Engine queues}, the maximum allowed value
168
- # is 500.
169
- #
170
- #
171
- # This field has the same meaning as
172
- # [rate in
173
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
174
- # @!attribute [rw] max_burst_size
175
- # @return [Integer]
176
- # Output only. The max burst size.
177
- #
178
- # Max burst size limits how fast tasks in queue are processed when
179
- # many tasks are in the queue and the rate is high. This field
180
- # allows the queue to have a high rate so processing starts shortly
181
- # after a task is enqueued, but still limits resource usage when
182
- # many tasks are enqueued in a short period of time.
183
- #
184
- # The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
185
- # algorithm is used to control the rate of task dispatches. Each
186
- # queue has a token bucket that holds tokens, up to the maximum
187
- # specified by `max_burst_size`. Each time a task is dispatched, a
188
- # token is removed from the bucket. Tasks will be dispatched until
189
- # the queue's bucket runs out of tokens. The bucket will be
190
- # continuously refilled with new tokens based on
191
- # {Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}.
192
- #
193
- # Cloud Tasks will pick the value of `max_burst_size` based on the
194
- # value of
195
- # {Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}.
196
- #
197
- # For App Engine queues that were created or updated using
198
- # `queue.yaml/xml`, `max_burst_size` is equal to
199
- # [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
200
- # Since `max_burst_size` is output only, if
201
- # {Google::Cloud::Tasks::V2beta3::CloudTasks::UpdateQueue UpdateQueue} is called on a queue
202
- # created by `queue.yaml/xml`, `max_burst_size` will be reset based
203
- # on the value of
204
- # {Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second},
205
- # regardless of whether
206
- # {Google::Cloud::Tasks::V2beta3::RateLimits#max_dispatches_per_second max_dispatches_per_second}
207
- # is updated.
208
- # @!attribute [rw] max_concurrent_dispatches
209
- # @return [Integer]
210
- # The maximum number of concurrent tasks that Cloud Tasks allows
211
- # to be dispatched for this queue. After this threshold has been
212
- # reached, Cloud Tasks stops dispatching tasks until the number of
213
- # concurrent requests decreases.
214
- #
215
- # If unspecified when the queue is created, Cloud Tasks will pick the
216
- # default.
217
- #
218
- #
219
- # The maximum allowed value is 5,000.
220
- #
221
- #
222
- # This field has the same meaning as
223
- # [max_concurrent_requests in
224
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
225
- class RateLimits; end
226
-
227
- # Retry config.
228
- #
229
- # These settings determine when a failed task attempt is retried.
230
- # @!attribute [rw] max_attempts
231
- # @return [Integer]
232
- # Number of attempts per task.
233
- #
234
- # Cloud Tasks will attempt the task `max_attempts` times (that is, if the
235
- # first attempt fails, then there will be `max_attempts - 1` retries). Must
236
- # be >= -1.
237
- #
238
- # If unspecified when the queue is created, Cloud Tasks will pick the
239
- # default.
240
- #
241
- # -1 indicates unlimited attempts.
242
- #
243
- # This field has the same meaning as
244
- # [task_retry_limit in
245
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
246
- # @!attribute [rw] max_retry_duration
247
- # @return [Google::Protobuf::Duration]
248
- # If positive, `max_retry_duration` specifies the time limit for
249
- # retrying a failed task, measured from when the task was first
250
- # attempted. Once `max_retry_duration` time has passed *and* the
251
- # task has been attempted {Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts}
252
- # times, no further attempts will be made and the task will be
253
- # deleted.
254
- #
255
- # If zero, then the task age is unlimited.
256
- #
257
- # If unspecified when the queue is created, Cloud Tasks will pick the
258
- # default.
259
- #
260
- #
261
- # `max_retry_duration` will be truncated to the nearest second.
262
- #
263
- # This field has the same meaning as
264
- # [task_age_limit in
265
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
266
- # @!attribute [rw] min_backoff
267
- # @return [Google::Protobuf::Duration]
268
- # A task will be {Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} for retry between
269
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and
270
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration after it fails,
271
- # if the queue's {Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the task should be
272
- # retried.
273
- #
274
- # If unspecified when the queue is created, Cloud Tasks will pick the
275
- # default.
276
- #
277
- #
278
- # `min_backoff` will be truncated to the nearest second.
279
- #
280
- # This field has the same meaning as
281
- # [min_backoff_seconds in
282
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
283
- # @!attribute [rw] max_backoff
284
- # @return [Google::Protobuf::Duration]
285
- # A task will be {Google::Cloud::Tasks::V2beta3::Task#schedule_time scheduled} for retry between
286
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} and
287
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} duration after it fails,
288
- # if the queue's {Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig} specifies that the task should be
289
- # retried.
290
- #
291
- # If unspecified when the queue is created, Cloud Tasks will pick the
292
- # default.
293
- #
294
- #
295
- # `max_backoff` will be truncated to the nearest second.
296
- #
297
- # This field has the same meaning as
298
- # [max_backoff_seconds in
299
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
300
- # @!attribute [rw] max_doublings
301
- # @return [Integer]
302
- # The time between retries will double `max_doublings` times.
303
- #
304
- # A task's retry interval starts at
305
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then doubles
306
- # `max_doublings` times, then increases linearly, and finally
307
- # retries retries at intervals of
308
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to
309
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times.
310
- #
311
- # For example, if {Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff} is 10s,
312
- # {Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} is 300s, and
313
- # `max_doublings` is 3, then the a task will first be retried in
314
- # 10s. The retry interval will double three times, and then
315
- # increase linearly by 2^3 * 10s. Finally, the task will retry at
316
- # intervals of {Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} until the
317
- # task has been attempted {Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts}
318
- # times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
319
- # 240s, 300s, 300s, ....
320
- #
321
- # If unspecified when the queue is created, Cloud Tasks will pick the
322
- # default.
323
- #
324
- #
325
- # This field has the same meaning as
326
- # [max_doublings in
327
- # queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
328
- class RetryConfig; end
329
-
330
- # Configuration options for writing logs to
331
- # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
332
- # @!attribute [rw] sampling_ratio
333
- # @return [Float]
334
- # Specifies the fraction of operations to write to
335
- # [Stackdriver Logging](https://cloud.google.com/logging/docs/).
336
- # This field may contain any value between 0.0 and 1.0, inclusive.
337
- # 0.0 is the default and means that no operations are logged.
338
- class StackdriverLoggingConfig; end
339
- end
340
- end
341
- end
342
- end