• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/cloud/tasks/v2/task.proto
18 
19 package com.google.cloud.tasks.v2;
20 
21 public interface TaskOrBuilder
22     extends
23     // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2.Task)
24     com.google.protobuf.MessageOrBuilder {
25 
26   /**
27    *
28    *
29    * <pre>
30    * Optionally caller-specified in
31    * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
32    * The task name.
33    * The task name must have the following format:
34    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
35    * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
36    *    hyphens (-), colons (:), or periods (.).
37    *    For more information, see
38    *    [Identifying
39    *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
40    * * `LOCATION_ID` is the canonical ID for the task's location.
41    *    The list of available locations can be obtained by calling
42    *    [ListLocations][google.cloud.location.Locations.ListLocations].
43    *    For more information, see https://cloud.google.com/about/locations/.
44    * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
45    *   hyphens (-). The maximum length is 100 characters.
46    * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
47    *   hyphens (-), or underscores (_). The maximum length is 500 characters.
48    * </pre>
49    *
50    * <code>string name = 1;</code>
51    *
52    * @return The name.
53    */
getName()54   java.lang.String getName();
55   /**
56    *
57    *
58    * <pre>
59    * Optionally caller-specified in
60    * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
61    * The task name.
62    * The task name must have the following format:
63    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
64    * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
65    *    hyphens (-), colons (:), or periods (.).
66    *    For more information, see
67    *    [Identifying
68    *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
69    * * `LOCATION_ID` is the canonical ID for the task's location.
70    *    The list of available locations can be obtained by calling
71    *    [ListLocations][google.cloud.location.Locations.ListLocations].
72    *    For more information, see https://cloud.google.com/about/locations/.
73    * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
74    *   hyphens (-). The maximum length is 100 characters.
75    * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
76    *   hyphens (-), or underscores (_). The maximum length is 500 characters.
77    * </pre>
78    *
79    * <code>string name = 1;</code>
80    *
81    * @return The bytes for name.
82    */
getNameBytes()83   com.google.protobuf.ByteString getNameBytes();
84 
85   /**
86    *
87    *
88    * <pre>
89    * HTTP request that is sent to the App Engine app handler.
90    * An App Engine task is a task that has
91    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
92    * </pre>
93    *
94    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
95    *
96    * @return Whether the appEngineHttpRequest field is set.
97    */
hasAppEngineHttpRequest()98   boolean hasAppEngineHttpRequest();
99   /**
100    *
101    *
102    * <pre>
103    * HTTP request that is sent to the App Engine app handler.
104    * An App Engine task is a task that has
105    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
106    * </pre>
107    *
108    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
109    *
110    * @return The appEngineHttpRequest.
111    */
getAppEngineHttpRequest()112   com.google.cloud.tasks.v2.AppEngineHttpRequest getAppEngineHttpRequest();
113   /**
114    *
115    *
116    * <pre>
117    * HTTP request that is sent to the App Engine app handler.
118    * An App Engine task is a task that has
119    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
120    * </pre>
121    *
122    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
123    */
getAppEngineHttpRequestOrBuilder()124   com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder();
125 
126   /**
127    *
128    *
129    * <pre>
130    * HTTP request that is sent to the worker.
131    * An HTTP task is a task that has
132    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
133    * </pre>
134    *
135    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
136    *
137    * @return Whether the httpRequest field is set.
138    */
hasHttpRequest()139   boolean hasHttpRequest();
140   /**
141    *
142    *
143    * <pre>
144    * HTTP request that is sent to the worker.
145    * An HTTP task is a task that has
146    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
147    * </pre>
148    *
149    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
150    *
151    * @return The httpRequest.
152    */
getHttpRequest()153   com.google.cloud.tasks.v2.HttpRequest getHttpRequest();
154   /**
155    *
156    *
157    * <pre>
158    * HTTP request that is sent to the worker.
159    * An HTTP task is a task that has
160    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
161    * </pre>
162    *
163    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
164    */
getHttpRequestOrBuilder()165   com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder();
166 
167   /**
168    *
169    *
170    * <pre>
171    * The time when the task is scheduled to be attempted or retried.
172    * `schedule_time` will be truncated to the nearest microsecond.
173    * </pre>
174    *
175    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
176    *
177    * @return Whether the scheduleTime field is set.
178    */
hasScheduleTime()179   boolean hasScheduleTime();
180   /**
181    *
182    *
183    * <pre>
184    * The time when the task is scheduled to be attempted or retried.
185    * `schedule_time` will be truncated to the nearest microsecond.
186    * </pre>
187    *
188    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
189    *
190    * @return The scheduleTime.
191    */
getScheduleTime()192   com.google.protobuf.Timestamp getScheduleTime();
193   /**
194    *
195    *
196    * <pre>
197    * The time when the task is scheduled to be attempted or retried.
198    * `schedule_time` will be truncated to the nearest microsecond.
199    * </pre>
200    *
201    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
202    */
getScheduleTimeOrBuilder()203   com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder();
204 
205   /**
206    *
207    *
208    * <pre>
209    * Output only. The time that the task was created.
210    * `create_time` will be truncated to the nearest second.
211    * </pre>
212    *
213    * <code>.google.protobuf.Timestamp create_time = 5;</code>
214    *
215    * @return Whether the createTime field is set.
216    */
hasCreateTime()217   boolean hasCreateTime();
218   /**
219    *
220    *
221    * <pre>
222    * Output only. The time that the task was created.
223    * `create_time` will be truncated to the nearest second.
224    * </pre>
225    *
226    * <code>.google.protobuf.Timestamp create_time = 5;</code>
227    *
228    * @return The createTime.
229    */
getCreateTime()230   com.google.protobuf.Timestamp getCreateTime();
231   /**
232    *
233    *
234    * <pre>
235    * Output only. The time that the task was created.
236    * `create_time` will be truncated to the nearest second.
237    * </pre>
238    *
239    * <code>.google.protobuf.Timestamp create_time = 5;</code>
240    */
getCreateTimeOrBuilder()241   com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder();
242 
243   /**
244    *
245    *
246    * <pre>
247    * The deadline for requests sent to the worker. If the worker does not
248    * respond by this deadline then the request is cancelled and the attempt
249    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
250    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
251    * Note that when the request is cancelled, Cloud Tasks will stop listing for
252    * the response, but whether the worker stops processing depends on the
253    * worker. For example, if the worker is stuck, it may not react to cancelled
254    * requests.
255    * The default and maximum values depend on the type of request:
256    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
257    * minutes. The deadline
258    *   must be in the interval [15 seconds, 30 minutes].
259    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
260    * indicates that the
261    *   request has the default deadline. The default deadline depends on the
262    *   [scaling
263    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
264    *   of the service: 10 minutes for standard apps with automatic scaling, 24
265    *   hours for standard apps with manual and basic scaling, and 60 minutes for
266    *   flex apps. If the request deadline is set, it must be in the interval [15
267    *   seconds, 24 hours 15 seconds]. Regardless of the task's
268    *   `dispatch_deadline`, the app handler will not run for longer than than
269    *   the service's timeout. We recommend setting the `dispatch_deadline` to
270    *   at most a few seconds more than the app handler's timeout. For more
271    *   information see
272    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
273    * `dispatch_deadline` will be truncated to the nearest millisecond. The
274    * deadline is an approximate deadline.
275    * </pre>
276    *
277    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
278    *
279    * @return Whether the dispatchDeadline field is set.
280    */
hasDispatchDeadline()281   boolean hasDispatchDeadline();
282   /**
283    *
284    *
285    * <pre>
286    * The deadline for requests sent to the worker. If the worker does not
287    * respond by this deadline then the request is cancelled and the attempt
288    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
289    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
290    * Note that when the request is cancelled, Cloud Tasks will stop listing for
291    * the response, but whether the worker stops processing depends on the
292    * worker. For example, if the worker is stuck, it may not react to cancelled
293    * requests.
294    * The default and maximum values depend on the type of request:
295    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
296    * minutes. The deadline
297    *   must be in the interval [15 seconds, 30 minutes].
298    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
299    * indicates that the
300    *   request has the default deadline. The default deadline depends on the
301    *   [scaling
302    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
303    *   of the service: 10 minutes for standard apps with automatic scaling, 24
304    *   hours for standard apps with manual and basic scaling, and 60 minutes for
305    *   flex apps. If the request deadline is set, it must be in the interval [15
306    *   seconds, 24 hours 15 seconds]. Regardless of the task's
307    *   `dispatch_deadline`, the app handler will not run for longer than than
308    *   the service's timeout. We recommend setting the `dispatch_deadline` to
309    *   at most a few seconds more than the app handler's timeout. For more
310    *   information see
311    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
312    * `dispatch_deadline` will be truncated to the nearest millisecond. The
313    * deadline is an approximate deadline.
314    * </pre>
315    *
316    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
317    *
318    * @return The dispatchDeadline.
319    */
getDispatchDeadline()320   com.google.protobuf.Duration getDispatchDeadline();
321   /**
322    *
323    *
324    * <pre>
325    * The deadline for requests sent to the worker. If the worker does not
326    * respond by this deadline then the request is cancelled and the attempt
327    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
328    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
329    * Note that when the request is cancelled, Cloud Tasks will stop listing for
330    * the response, but whether the worker stops processing depends on the
331    * worker. For example, if the worker is stuck, it may not react to cancelled
332    * requests.
333    * The default and maximum values depend on the type of request:
334    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
335    * minutes. The deadline
336    *   must be in the interval [15 seconds, 30 minutes].
337    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
338    * indicates that the
339    *   request has the default deadline. The default deadline depends on the
340    *   [scaling
341    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
342    *   of the service: 10 minutes for standard apps with automatic scaling, 24
343    *   hours for standard apps with manual and basic scaling, and 60 minutes for
344    *   flex apps. If the request deadline is set, it must be in the interval [15
345    *   seconds, 24 hours 15 seconds]. Regardless of the task's
346    *   `dispatch_deadline`, the app handler will not run for longer than than
347    *   the service's timeout. We recommend setting the `dispatch_deadline` to
348    *   at most a few seconds more than the app handler's timeout. For more
349    *   information see
350    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
351    * `dispatch_deadline` will be truncated to the nearest millisecond. The
352    * deadline is an approximate deadline.
353    * </pre>
354    *
355    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
356    */
getDispatchDeadlineOrBuilder()357   com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder();
358 
359   /**
360    *
361    *
362    * <pre>
363    * Output only. The number of attempts dispatched.
364    * This count includes attempts which have been dispatched but haven't
365    * received a response.
366    * </pre>
367    *
368    * <code>int32 dispatch_count = 7;</code>
369    *
370    * @return The dispatchCount.
371    */
getDispatchCount()372   int getDispatchCount();
373 
374   /**
375    *
376    *
377    * <pre>
378    * Output only. The number of attempts which have received a response.
379    * </pre>
380    *
381    * <code>int32 response_count = 8;</code>
382    *
383    * @return The responseCount.
384    */
getResponseCount()385   int getResponseCount();
386 
387   /**
388    *
389    *
390    * <pre>
391    * Output only. The status of the task's first attempt.
392    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
393    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
394    * retained by Cloud Tasks.
395    * </pre>
396    *
397    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
398    *
399    * @return Whether the firstAttempt field is set.
400    */
hasFirstAttempt()401   boolean hasFirstAttempt();
402   /**
403    *
404    *
405    * <pre>
406    * Output only. The status of the task's first attempt.
407    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
408    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
409    * retained by Cloud Tasks.
410    * </pre>
411    *
412    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
413    *
414    * @return The firstAttempt.
415    */
getFirstAttempt()416   com.google.cloud.tasks.v2.Attempt getFirstAttempt();
417   /**
418    *
419    *
420    * <pre>
421    * Output only. The status of the task's first attempt.
422    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
423    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
424    * retained by Cloud Tasks.
425    * </pre>
426    *
427    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
428    */
getFirstAttemptOrBuilder()429   com.google.cloud.tasks.v2.AttemptOrBuilder getFirstAttemptOrBuilder();
430 
431   /**
432    *
433    *
434    * <pre>
435    * Output only. The status of the task's last attempt.
436    * </pre>
437    *
438    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
439    *
440    * @return Whether the lastAttempt field is set.
441    */
hasLastAttempt()442   boolean hasLastAttempt();
443   /**
444    *
445    *
446    * <pre>
447    * Output only. The status of the task's last attempt.
448    * </pre>
449    *
450    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
451    *
452    * @return The lastAttempt.
453    */
getLastAttempt()454   com.google.cloud.tasks.v2.Attempt getLastAttempt();
455   /**
456    *
457    *
458    * <pre>
459    * Output only. The status of the task's last attempt.
460    * </pre>
461    *
462    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
463    */
getLastAttemptOrBuilder()464   com.google.cloud.tasks.v2.AttemptOrBuilder getLastAttemptOrBuilder();
465 
466   /**
467    *
468    *
469    * <pre>
470    * Output only. The view specifies which subset of the
471    * [Task][google.cloud.tasks.v2.Task] has been returned.
472    * </pre>
473    *
474    * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
475    *
476    * @return The enum numeric value on the wire for view.
477    */
getViewValue()478   int getViewValue();
479   /**
480    *
481    *
482    * <pre>
483    * Output only. The view specifies which subset of the
484    * [Task][google.cloud.tasks.v2.Task] has been returned.
485    * </pre>
486    *
487    * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
488    *
489    * @return The view.
490    */
getView()491   com.google.cloud.tasks.v2.Task.View getView();
492 
getMessageTypeCase()493   public com.google.cloud.tasks.v2.Task.MessageTypeCase getMessageTypeCase();
494 }
495