google-cloud-tasks-v2beta3 0.1.0

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