google-cloud-tasks 1.5.0 → 2.1.2

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 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +320 -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 +88 -117
  9. data/lib/google/cloud/tasks/version.rb +6 -2
  10. metadata +78 -115
  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,41 +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
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Tasks
21
- module V2beta2
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform"
25
- ].freeze
26
- PATH_ENV_VARS = %w(TASKS_CREDENTIALS
27
- TASKS_KEYFILE
28
- GOOGLE_CLOUD_CREDENTIALS
29
- GOOGLE_CLOUD_KEYFILE
30
- GCLOUD_KEYFILE)
31
- JSON_ENV_VARS = %w(TASKS_CREDENTIALS_JSON
32
- TASKS_KEYFILE_JSON
33
- GOOGLE_CLOUD_CREDENTIALS_JSON
34
- GOOGLE_CLOUD_KEYFILE_JSON
35
- GCLOUD_KEYFILE_JSON)
36
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,483 +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 V2beta2
20
- # Request message for {Google::Cloud::Tasks::V2beta2::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::V2beta2::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 "app_engine_http_target: *".
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::V2beta2::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::V2beta2::ListQueuesResponse#next_page_token next_page_token} returned
54
- # from the previous call to {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues}
55
- # method. It is an error to switch the value of the
56
- # {Google::Cloud::Tasks::V2beta2::ListQueuesRequest#filter filter} while iterating through pages.
57
- class ListQueuesRequest; end
58
-
59
- # Response message for {Google::Cloud::Tasks::V2beta2::CloudTasks::ListQueues ListQueues}.
60
- # @!attribute [rw] queues
61
- # @return [Array<Google::Cloud::Tasks::V2beta2::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::V2beta2::CloudTasks::ListQueues ListQueues} with this value as the
69
- # {Google::Cloud::Tasks::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::Queue]
94
- # Required. The queue to create.
95
- #
96
- # {Google::Cloud::Tasks::V2beta2::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::V2beta2::CloudTasks::UpdateQueue UpdateQueue}.
100
- # @!attribute [rw] queue
101
- # @return [Google::Cloud::Tasks::V2beta2::Queue]
102
- # Required. The queue to create or update.
103
- #
104
- # The queue's {Google::Cloud::Tasks::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::Task::View]
151
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
152
- # returned.
153
- #
154
- # By default response_view is {Google::Cloud::Tasks::V2beta2::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::V2beta2::Task::View::FULL FULL} requires
161
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
162
- # permission on the {Google::Cloud::Tasks::V2beta2::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::V2beta2::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::V2beta2::ListTasksResponse#next_page_token next_page_token} returned
180
- # from the previous call to {Google::Cloud::Tasks::V2beta2::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::V2beta2::CloudTasks::ListTasks ListTasks}.
187
- # @!attribute [rw] tasks
188
- # @return [Array<Google::Cloud::Tasks::V2beta2::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::V2beta2::CloudTasks::ListTasks ListTasks} with this value as the
196
- # {Google::Cloud::Tasks::V2beta2::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::V2beta2::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::V2beta2::Task::View]
208
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
209
- # returned.
210
- #
211
- # By default response_view is {Google::Cloud::Tasks::V2beta2::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::V2beta2::Task::View::FULL FULL} requires
218
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
219
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
220
- class GetTaskRequest; end
221
-
222
- # Request message for {Google::Cloud::Tasks::V2beta2::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::V2beta2::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::V2beta2::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::V2beta2::Task#name response}.
239
- #
240
- # If {Google::Cloud::Tasks::V2beta2::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 completed 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 completed. 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 completed.
254
- #
255
- # Because there is an extra lookup cost to identify duplicate task
256
- # names, these {Google::Cloud::Tasks::V2beta2::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::V2beta2::Task::View]
266
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
267
- # returned.
268
- #
269
- # By default response_view is {Google::Cloud::Tasks::V2beta2::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::V2beta2::Task::View::FULL FULL} requires
276
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
277
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
278
- class CreateTaskRequest; end
279
-
280
- # Request message for deleting a task using
281
- # {Google::Cloud::Tasks::V2beta2::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 leasing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
289
- # @!attribute [rw] parent
290
- # @return [String]
291
- # Required. The queue name. For example:
292
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
293
- # @!attribute [rw] max_tasks
294
- # @return [Integer]
295
- # The maximum number of tasks to lease.
296
- #
297
- # The system will make a best effort to return as close to as
298
- # `max_tasks` as possible.
299
- #
300
- # The largest that `max_tasks` can be is 1000.
301
- #
302
- # The maximum total size of a {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse lease tasks response} is
303
- # 32 MB. If the sum of all task sizes requested reaches this limit,
304
- # fewer tasks than requested are returned.
305
- # @!attribute [rw] lease_duration
306
- # @return [Google::Protobuf::Duration]
307
- # Required. The duration of the lease.
308
- #
309
- # Each task returned in the {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will
310
- # have its {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} set to the current
311
- # time plus the `lease_duration`. The task is leased until its
312
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}; thus, the task will not be
313
- # returned to another {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} call
314
- # before its {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}.
315
- #
316
- #
317
- # After the worker has successfully finished the work associated
318
- # with the task, the worker must call via
319
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask} before the
320
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time}. Otherwise the task will be
321
- # returned to a later {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} call so
322
- # that another worker can retry it.
323
- #
324
- # The maximum lease duration is 1 week.
325
- # `lease_duration` will be truncated to the nearest second.
326
- # @!attribute [rw] response_view
327
- # @return [Google::Cloud::Tasks::V2beta2::Task::View]
328
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
329
- # returned.
330
- #
331
- # By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
332
- # information is retrieved by default because some data, such as
333
- # payloads, might be desirable to return only when needed because
334
- # of its large size or because of the sensitivity of data that it
335
- # contains.
336
- #
337
- # Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
338
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
339
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
340
- # @!attribute [rw] filter
341
- # @return [String]
342
- # `filter` can be used to specify a subset of tasks to lease.
343
- #
344
- # When `filter` is set to `tag=<my-tag>` then the
345
- # {Google::Cloud::Tasks::V2beta2::LeaseTasksResponse response} will contain only tasks whose
346
- # {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} is equal to `<my-tag>`. `<my-tag>` must be
347
- # less than 500 characters.
348
- #
349
- # When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
350
- # the same tag as the task with the oldest
351
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} will be returned.
352
- #
353
- # Grammar Syntax:
354
- #
355
- # * `filter = "tag=" tag | "tag_function=" function`
356
- #
357
- # * `tag = string`
358
- #
359
- # * `function = "oldest_tag()"`
360
- #
361
- # The `oldest_tag()` function returns tasks which have the same tag as the
362
- # oldest task (ordered by schedule time).
363
- #
364
- # SDK compatibility: Although the SDK allows tags to be either
365
- # string or
366
- # [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
367
- # only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
368
- # aren't UTF-8 encoded can't be used in the
369
- # {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter} and the task's
370
- # {Google::Cloud::Tasks::V2beta2::PullMessage#tag tag} will be displayed as empty in Cloud Tasks.
371
- class LeaseTasksRequest; end
372
-
373
- # Response message for leasing tasks using {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks}.
374
- # @!attribute [rw] tasks
375
- # @return [Array<Google::Cloud::Tasks::V2beta2::Task>]
376
- # The leased tasks.
377
- class LeaseTasksResponse; end
378
-
379
- # Request message for acknowledging a task using
380
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::AcknowledgeTask AcknowledgeTask}.
381
- # @!attribute [rw] name
382
- # @return [String]
383
- # Required. The task name. For example:
384
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
385
- # @!attribute [rw] schedule_time
386
- # @return [Google::Protobuf::Timestamp]
387
- # Required. The task's current schedule time, available in the
388
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
389
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
390
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
391
- # to ensure that your worker currently holds the lease.
392
- class AcknowledgeTaskRequest; end
393
-
394
- # Request message for renewing a lease using
395
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease}.
396
- # @!attribute [rw] name
397
- # @return [String]
398
- # Required. The task name. For example:
399
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
400
- # @!attribute [rw] schedule_time
401
- # @return [Google::Protobuf::Timestamp]
402
- # Required. The task's current schedule time, available in the
403
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
404
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
405
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
406
- # to ensure that your worker currently holds the lease.
407
- # @!attribute [rw] lease_duration
408
- # @return [Google::Protobuf::Duration]
409
- # Required. The desired new lease duration, starting from now.
410
- #
411
- #
412
- # The maximum lease duration is 1 week.
413
- # `lease_duration` will be truncated to the nearest second.
414
- # @!attribute [rw] response_view
415
- # @return [Google::Cloud::Tasks::V2beta2::Task::View]
416
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
417
- # returned.
418
- #
419
- # By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
420
- # information is retrieved by default because some data, such as
421
- # payloads, might be desirable to return only when needed because
422
- # of its large size or because of the sensitivity of data that it
423
- # contains.
424
- #
425
- # Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
426
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
427
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
428
- class RenewLeaseRequest; end
429
-
430
- # Request message for canceling a lease using
431
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::CancelLease CancelLease}.
432
- # @!attribute [rw] name
433
- # @return [String]
434
- # Required. The task name. For example:
435
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
436
- # @!attribute [rw] schedule_time
437
- # @return [Google::Protobuf::Timestamp]
438
- # Required. The task's current schedule time, available in the
439
- # {Google::Cloud::Tasks::V2beta2::Task#schedule_time schedule_time} returned by
440
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} response or
441
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::RenewLease RenewLease} response. This restriction is
442
- # to ensure that your worker currently holds the lease.
443
- # @!attribute [rw] response_view
444
- # @return [Google::Cloud::Tasks::V2beta2::Task::View]
445
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
446
- # returned.
447
- #
448
- # By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
449
- # information is retrieved by default because some data, such as
450
- # payloads, might be desirable to return only when needed because
451
- # of its large size or because of the sensitivity of data that it
452
- # contains.
453
- #
454
- # Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
455
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
456
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
457
- class CancelLeaseRequest; end
458
-
459
- # Request message for forcing a task to run now using
460
- # {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask}.
461
- # @!attribute [rw] name
462
- # @return [String]
463
- # Required. The task name. For example:
464
- # `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
465
- # @!attribute [rw] response_view
466
- # @return [Google::Cloud::Tasks::V2beta2::Task::View]
467
- # The response_view specifies which subset of the {Google::Cloud::Tasks::V2beta2::Task Task} will be
468
- # returned.
469
- #
470
- # By default response_view is {Google::Cloud::Tasks::V2beta2::Task::View::BASIC BASIC}; not all
471
- # information is retrieved by default because some data, such as
472
- # payloads, might be desirable to return only when needed because
473
- # of its large size or because of the sensitivity of data that it
474
- # contains.
475
- #
476
- # Authorization for {Google::Cloud::Tasks::V2beta2::Task::View::FULL FULL} requires
477
- # `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
478
- # permission on the {Google::Cloud::Tasks::V2beta2::Task Task} resource.
479
- class RunTaskRequest; end
480
- end
481
- end
482
- end
483
- end