• 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 /**
22  *
23  *
24  * <pre>
25  * A unit of scheduled work.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.tasks.v2.Task}
29  */
30 public final class Task extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2.Task)
33     TaskOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Task.newBuilder() to construct.
Task(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Task(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Task()40   private Task() {
41     name_ = "";
42     view_ = 0;
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new Task();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.tasks.v2.TaskProto
58         .internal_static_google_cloud_tasks_v2_Task_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.tasks.v2.TaskProto
65         .internal_static_google_cloud_tasks_v2_Task_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.tasks.v2.Task.class, com.google.cloud.tasks.v2.Task.Builder.class);
68   }
69 
70   /**
71    *
72    *
73    * <pre>
74    * The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data.
75    * When a task is returned in a response, not all
76    * information is retrieved by default because some data, such as
77    * payloads, might be desirable to return only when needed because
78    * of its large size or because of the sensitivity of data that it
79    * contains.
80    * </pre>
81    *
82    * Protobuf enum {@code google.cloud.tasks.v2.Task.View}
83    */
84   public enum View implements com.google.protobuf.ProtocolMessageEnum {
85     /**
86      *
87      *
88      * <pre>
89      * Unspecified. Defaults to BASIC.
90      * </pre>
91      *
92      * <code>VIEW_UNSPECIFIED = 0;</code>
93      */
94     VIEW_UNSPECIFIED(0),
95     /**
96      *
97      *
98      * <pre>
99      * The basic view omits fields which can be large or can contain
100      * sensitive data.
101      * This view does not include the
102      * [body in
103      * AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body].
104      * Bodies are desirable to return only when needed, because they
105      * can be large and because of the sensitivity of the data that you
106      * choose to store in it.
107      * </pre>
108      *
109      * <code>BASIC = 1;</code>
110      */
111     BASIC(1),
112     /**
113      *
114      *
115      * <pre>
116      * All information is returned.
117      * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
118      * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
119      * permission on the [Queue][google.cloud.tasks.v2.Queue] resource.
120      * </pre>
121      *
122      * <code>FULL = 2;</code>
123      */
124     FULL(2),
125     UNRECOGNIZED(-1),
126     ;
127 
128     /**
129      *
130      *
131      * <pre>
132      * Unspecified. Defaults to BASIC.
133      * </pre>
134      *
135      * <code>VIEW_UNSPECIFIED = 0;</code>
136      */
137     public static final int VIEW_UNSPECIFIED_VALUE = 0;
138     /**
139      *
140      *
141      * <pre>
142      * The basic view omits fields which can be large or can contain
143      * sensitive data.
144      * This view does not include the
145      * [body in
146      * AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body].
147      * Bodies are desirable to return only when needed, because they
148      * can be large and because of the sensitivity of the data that you
149      * choose to store in it.
150      * </pre>
151      *
152      * <code>BASIC = 1;</code>
153      */
154     public static final int BASIC_VALUE = 1;
155     /**
156      *
157      *
158      * <pre>
159      * All information is returned.
160      * Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
161      * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
162      * permission on the [Queue][google.cloud.tasks.v2.Queue] resource.
163      * </pre>
164      *
165      * <code>FULL = 2;</code>
166      */
167     public static final int FULL_VALUE = 2;
168 
getNumber()169     public final int getNumber() {
170       if (this == UNRECOGNIZED) {
171         throw new java.lang.IllegalArgumentException(
172             "Can't get the number of an unknown enum value.");
173       }
174       return value;
175     }
176 
177     /**
178      * @param value The numeric wire value of the corresponding enum entry.
179      * @return The enum associated with the given numeric wire value.
180      * @deprecated Use {@link #forNumber(int)} instead.
181      */
182     @java.lang.Deprecated
valueOf(int value)183     public static View valueOf(int value) {
184       return forNumber(value);
185     }
186 
187     /**
188      * @param value The numeric wire value of the corresponding enum entry.
189      * @return The enum associated with the given numeric wire value.
190      */
forNumber(int value)191     public static View forNumber(int value) {
192       switch (value) {
193         case 0:
194           return VIEW_UNSPECIFIED;
195         case 1:
196           return BASIC;
197         case 2:
198           return FULL;
199         default:
200           return null;
201       }
202     }
203 
internalGetValueMap()204     public static com.google.protobuf.Internal.EnumLiteMap<View> internalGetValueMap() {
205       return internalValueMap;
206     }
207 
208     private static final com.google.protobuf.Internal.EnumLiteMap<View> internalValueMap =
209         new com.google.protobuf.Internal.EnumLiteMap<View>() {
210           public View findValueByNumber(int number) {
211             return View.forNumber(number);
212           }
213         };
214 
getValueDescriptor()215     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
216       if (this == UNRECOGNIZED) {
217         throw new java.lang.IllegalStateException(
218             "Can't get the descriptor of an unrecognized enum value.");
219       }
220       return getDescriptor().getValues().get(ordinal());
221     }
222 
getDescriptorForType()223     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
224       return getDescriptor();
225     }
226 
getDescriptor()227     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
228       return com.google.cloud.tasks.v2.Task.getDescriptor().getEnumTypes().get(0);
229     }
230 
231     private static final View[] VALUES = values();
232 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)233     public static View valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
234       if (desc.getType() != getDescriptor()) {
235         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
236       }
237       if (desc.getIndex() == -1) {
238         return UNRECOGNIZED;
239       }
240       return VALUES[desc.getIndex()];
241     }
242 
243     private final int value;
244 
View(int value)245     private View(int value) {
246       this.value = value;
247     }
248 
249     // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2.Task.View)
250   }
251 
252   private int messageTypeCase_ = 0;
253   private java.lang.Object messageType_;
254 
255   public enum MessageTypeCase
256       implements
257           com.google.protobuf.Internal.EnumLite,
258           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
259     APP_ENGINE_HTTP_REQUEST(2),
260     HTTP_REQUEST(3),
261     MESSAGETYPE_NOT_SET(0);
262     private final int value;
263 
MessageTypeCase(int value)264     private MessageTypeCase(int value) {
265       this.value = value;
266     }
267     /**
268      * @param value The number of the enum to look for.
269      * @return The enum associated with the given number.
270      * @deprecated Use {@link #forNumber(int)} instead.
271      */
272     @java.lang.Deprecated
valueOf(int value)273     public static MessageTypeCase valueOf(int value) {
274       return forNumber(value);
275     }
276 
forNumber(int value)277     public static MessageTypeCase forNumber(int value) {
278       switch (value) {
279         case 2:
280           return APP_ENGINE_HTTP_REQUEST;
281         case 3:
282           return HTTP_REQUEST;
283         case 0:
284           return MESSAGETYPE_NOT_SET;
285         default:
286           return null;
287       }
288     }
289 
getNumber()290     public int getNumber() {
291       return this.value;
292     }
293   };
294 
getMessageTypeCase()295   public MessageTypeCase getMessageTypeCase() {
296     return MessageTypeCase.forNumber(messageTypeCase_);
297   }
298 
299   public static final int NAME_FIELD_NUMBER = 1;
300 
301   @SuppressWarnings("serial")
302   private volatile java.lang.Object name_ = "";
303   /**
304    *
305    *
306    * <pre>
307    * Optionally caller-specified in
308    * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
309    * The task name.
310    * The task name must have the following format:
311    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
312    * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
313    *    hyphens (-), colons (:), or periods (.).
314    *    For more information, see
315    *    [Identifying
316    *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
317    * * `LOCATION_ID` is the canonical ID for the task's location.
318    *    The list of available locations can be obtained by calling
319    *    [ListLocations][google.cloud.location.Locations.ListLocations].
320    *    For more information, see https://cloud.google.com/about/locations/.
321    * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
322    *   hyphens (-). The maximum length is 100 characters.
323    * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
324    *   hyphens (-), or underscores (_). The maximum length is 500 characters.
325    * </pre>
326    *
327    * <code>string name = 1;</code>
328    *
329    * @return The name.
330    */
331   @java.lang.Override
getName()332   public java.lang.String getName() {
333     java.lang.Object ref = name_;
334     if (ref instanceof java.lang.String) {
335       return (java.lang.String) ref;
336     } else {
337       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
338       java.lang.String s = bs.toStringUtf8();
339       name_ = s;
340       return s;
341     }
342   }
343   /**
344    *
345    *
346    * <pre>
347    * Optionally caller-specified in
348    * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
349    * The task name.
350    * The task name must have the following format:
351    * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
352    * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
353    *    hyphens (-), colons (:), or periods (.).
354    *    For more information, see
355    *    [Identifying
356    *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
357    * * `LOCATION_ID` is the canonical ID for the task's location.
358    *    The list of available locations can be obtained by calling
359    *    [ListLocations][google.cloud.location.Locations.ListLocations].
360    *    For more information, see https://cloud.google.com/about/locations/.
361    * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
362    *   hyphens (-). The maximum length is 100 characters.
363    * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
364    *   hyphens (-), or underscores (_). The maximum length is 500 characters.
365    * </pre>
366    *
367    * <code>string name = 1;</code>
368    *
369    * @return The bytes for name.
370    */
371   @java.lang.Override
getNameBytes()372   public com.google.protobuf.ByteString getNameBytes() {
373     java.lang.Object ref = name_;
374     if (ref instanceof java.lang.String) {
375       com.google.protobuf.ByteString b =
376           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
377       name_ = b;
378       return b;
379     } else {
380       return (com.google.protobuf.ByteString) ref;
381     }
382   }
383 
384   public static final int APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER = 2;
385   /**
386    *
387    *
388    * <pre>
389    * HTTP request that is sent to the App Engine app handler.
390    * An App Engine task is a task that has
391    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
392    * </pre>
393    *
394    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
395    *
396    * @return Whether the appEngineHttpRequest field is set.
397    */
398   @java.lang.Override
hasAppEngineHttpRequest()399   public boolean hasAppEngineHttpRequest() {
400     return messageTypeCase_ == 2;
401   }
402   /**
403    *
404    *
405    * <pre>
406    * HTTP request that is sent to the App Engine app handler.
407    * An App Engine task is a task that has
408    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
409    * </pre>
410    *
411    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
412    *
413    * @return The appEngineHttpRequest.
414    */
415   @java.lang.Override
getAppEngineHttpRequest()416   public com.google.cloud.tasks.v2.AppEngineHttpRequest getAppEngineHttpRequest() {
417     if (messageTypeCase_ == 2) {
418       return (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_;
419     }
420     return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
421   }
422   /**
423    *
424    *
425    * <pre>
426    * HTTP request that is sent to the App Engine app handler.
427    * An App Engine task is a task that has
428    * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
429    * </pre>
430    *
431    * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
432    */
433   @java.lang.Override
434   public com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder
getAppEngineHttpRequestOrBuilder()435       getAppEngineHttpRequestOrBuilder() {
436     if (messageTypeCase_ == 2) {
437       return (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_;
438     }
439     return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
440   }
441 
442   public static final int HTTP_REQUEST_FIELD_NUMBER = 3;
443   /**
444    *
445    *
446    * <pre>
447    * HTTP request that is sent to the worker.
448    * An HTTP task is a task that has
449    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
450    * </pre>
451    *
452    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
453    *
454    * @return Whether the httpRequest field is set.
455    */
456   @java.lang.Override
hasHttpRequest()457   public boolean hasHttpRequest() {
458     return messageTypeCase_ == 3;
459   }
460   /**
461    *
462    *
463    * <pre>
464    * HTTP request that is sent to the worker.
465    * An HTTP task is a task that has
466    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
467    * </pre>
468    *
469    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
470    *
471    * @return The httpRequest.
472    */
473   @java.lang.Override
getHttpRequest()474   public com.google.cloud.tasks.v2.HttpRequest getHttpRequest() {
475     if (messageTypeCase_ == 3) {
476       return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
477     }
478     return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
479   }
480   /**
481    *
482    *
483    * <pre>
484    * HTTP request that is sent to the worker.
485    * An HTTP task is a task that has
486    * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
487    * </pre>
488    *
489    * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
490    */
491   @java.lang.Override
getHttpRequestOrBuilder()492   public com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder() {
493     if (messageTypeCase_ == 3) {
494       return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
495     }
496     return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
497   }
498 
499   public static final int SCHEDULE_TIME_FIELD_NUMBER = 4;
500   private com.google.protobuf.Timestamp scheduleTime_;
501   /**
502    *
503    *
504    * <pre>
505    * The time when the task is scheduled to be attempted or retried.
506    * `schedule_time` will be truncated to the nearest microsecond.
507    * </pre>
508    *
509    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
510    *
511    * @return Whether the scheduleTime field is set.
512    */
513   @java.lang.Override
hasScheduleTime()514   public boolean hasScheduleTime() {
515     return scheduleTime_ != null;
516   }
517   /**
518    *
519    *
520    * <pre>
521    * The time when the task is scheduled to be attempted or retried.
522    * `schedule_time` will be truncated to the nearest microsecond.
523    * </pre>
524    *
525    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
526    *
527    * @return The scheduleTime.
528    */
529   @java.lang.Override
getScheduleTime()530   public com.google.protobuf.Timestamp getScheduleTime() {
531     return scheduleTime_ == null
532         ? com.google.protobuf.Timestamp.getDefaultInstance()
533         : scheduleTime_;
534   }
535   /**
536    *
537    *
538    * <pre>
539    * The time when the task is scheduled to be attempted or retried.
540    * `schedule_time` will be truncated to the nearest microsecond.
541    * </pre>
542    *
543    * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
544    */
545   @java.lang.Override
getScheduleTimeOrBuilder()546   public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() {
547     return scheduleTime_ == null
548         ? com.google.protobuf.Timestamp.getDefaultInstance()
549         : scheduleTime_;
550   }
551 
552   public static final int CREATE_TIME_FIELD_NUMBER = 5;
553   private com.google.protobuf.Timestamp createTime_;
554   /**
555    *
556    *
557    * <pre>
558    * Output only. The time that the task was created.
559    * `create_time` will be truncated to the nearest second.
560    * </pre>
561    *
562    * <code>.google.protobuf.Timestamp create_time = 5;</code>
563    *
564    * @return Whether the createTime field is set.
565    */
566   @java.lang.Override
hasCreateTime()567   public boolean hasCreateTime() {
568     return createTime_ != null;
569   }
570   /**
571    *
572    *
573    * <pre>
574    * Output only. The time that the task was created.
575    * `create_time` will be truncated to the nearest second.
576    * </pre>
577    *
578    * <code>.google.protobuf.Timestamp create_time = 5;</code>
579    *
580    * @return The createTime.
581    */
582   @java.lang.Override
getCreateTime()583   public com.google.protobuf.Timestamp getCreateTime() {
584     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
585   }
586   /**
587    *
588    *
589    * <pre>
590    * Output only. The time that the task was created.
591    * `create_time` will be truncated to the nearest second.
592    * </pre>
593    *
594    * <code>.google.protobuf.Timestamp create_time = 5;</code>
595    */
596   @java.lang.Override
getCreateTimeOrBuilder()597   public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
598     return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
599   }
600 
601   public static final int DISPATCH_DEADLINE_FIELD_NUMBER = 6;
602   private com.google.protobuf.Duration dispatchDeadline_;
603   /**
604    *
605    *
606    * <pre>
607    * The deadline for requests sent to the worker. If the worker does not
608    * respond by this deadline then the request is cancelled and the attempt
609    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
610    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
611    * Note that when the request is cancelled, Cloud Tasks will stop listing for
612    * the response, but whether the worker stops processing depends on the
613    * worker. For example, if the worker is stuck, it may not react to cancelled
614    * requests.
615    * The default and maximum values depend on the type of request:
616    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
617    * minutes. The deadline
618    *   must be in the interval [15 seconds, 30 minutes].
619    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
620    * indicates that the
621    *   request has the default deadline. The default deadline depends on the
622    *   [scaling
623    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
624    *   of the service: 10 minutes for standard apps with automatic scaling, 24
625    *   hours for standard apps with manual and basic scaling, and 60 minutes for
626    *   flex apps. If the request deadline is set, it must be in the interval [15
627    *   seconds, 24 hours 15 seconds]. Regardless of the task's
628    *   `dispatch_deadline`, the app handler will not run for longer than than
629    *   the service's timeout. We recommend setting the `dispatch_deadline` to
630    *   at most a few seconds more than the app handler's timeout. For more
631    *   information see
632    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
633    * `dispatch_deadline` will be truncated to the nearest millisecond. The
634    * deadline is an approximate deadline.
635    * </pre>
636    *
637    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
638    *
639    * @return Whether the dispatchDeadline field is set.
640    */
641   @java.lang.Override
hasDispatchDeadline()642   public boolean hasDispatchDeadline() {
643     return dispatchDeadline_ != null;
644   }
645   /**
646    *
647    *
648    * <pre>
649    * The deadline for requests sent to the worker. If the worker does not
650    * respond by this deadline then the request is cancelled and the attempt
651    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
652    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
653    * Note that when the request is cancelled, Cloud Tasks will stop listing for
654    * the response, but whether the worker stops processing depends on the
655    * worker. For example, if the worker is stuck, it may not react to cancelled
656    * requests.
657    * The default and maximum values depend on the type of request:
658    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
659    * minutes. The deadline
660    *   must be in the interval [15 seconds, 30 minutes].
661    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
662    * indicates that the
663    *   request has the default deadline. The default deadline depends on the
664    *   [scaling
665    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
666    *   of the service: 10 minutes for standard apps with automatic scaling, 24
667    *   hours for standard apps with manual and basic scaling, and 60 minutes for
668    *   flex apps. If the request deadline is set, it must be in the interval [15
669    *   seconds, 24 hours 15 seconds]. Regardless of the task's
670    *   `dispatch_deadline`, the app handler will not run for longer than than
671    *   the service's timeout. We recommend setting the `dispatch_deadline` to
672    *   at most a few seconds more than the app handler's timeout. For more
673    *   information see
674    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
675    * `dispatch_deadline` will be truncated to the nearest millisecond. The
676    * deadline is an approximate deadline.
677    * </pre>
678    *
679    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
680    *
681    * @return The dispatchDeadline.
682    */
683   @java.lang.Override
getDispatchDeadline()684   public com.google.protobuf.Duration getDispatchDeadline() {
685     return dispatchDeadline_ == null
686         ? com.google.protobuf.Duration.getDefaultInstance()
687         : dispatchDeadline_;
688   }
689   /**
690    *
691    *
692    * <pre>
693    * The deadline for requests sent to the worker. If the worker does not
694    * respond by this deadline then the request is cancelled and the attempt
695    * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
696    * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
697    * Note that when the request is cancelled, Cloud Tasks will stop listing for
698    * the response, but whether the worker stops processing depends on the
699    * worker. For example, if the worker is stuck, it may not react to cancelled
700    * requests.
701    * The default and maximum values depend on the type of request:
702    * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
703    * minutes. The deadline
704    *   must be in the interval [15 seconds, 30 minutes].
705    * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
706    * indicates that the
707    *   request has the default deadline. The default deadline depends on the
708    *   [scaling
709    *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
710    *   of the service: 10 minutes for standard apps with automatic scaling, 24
711    *   hours for standard apps with manual and basic scaling, and 60 minutes for
712    *   flex apps. If the request deadline is set, it must be in the interval [15
713    *   seconds, 24 hours 15 seconds]. Regardless of the task's
714    *   `dispatch_deadline`, the app handler will not run for longer than than
715    *   the service's timeout. We recommend setting the `dispatch_deadline` to
716    *   at most a few seconds more than the app handler's timeout. For more
717    *   information see
718    *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
719    * `dispatch_deadline` will be truncated to the nearest millisecond. The
720    * deadline is an approximate deadline.
721    * </pre>
722    *
723    * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
724    */
725   @java.lang.Override
getDispatchDeadlineOrBuilder()726   public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() {
727     return dispatchDeadline_ == null
728         ? com.google.protobuf.Duration.getDefaultInstance()
729         : dispatchDeadline_;
730   }
731 
732   public static final int DISPATCH_COUNT_FIELD_NUMBER = 7;
733   private int dispatchCount_ = 0;
734   /**
735    *
736    *
737    * <pre>
738    * Output only. The number of attempts dispatched.
739    * This count includes attempts which have been dispatched but haven't
740    * received a response.
741    * </pre>
742    *
743    * <code>int32 dispatch_count = 7;</code>
744    *
745    * @return The dispatchCount.
746    */
747   @java.lang.Override
getDispatchCount()748   public int getDispatchCount() {
749     return dispatchCount_;
750   }
751 
752   public static final int RESPONSE_COUNT_FIELD_NUMBER = 8;
753   private int responseCount_ = 0;
754   /**
755    *
756    *
757    * <pre>
758    * Output only. The number of attempts which have received a response.
759    * </pre>
760    *
761    * <code>int32 response_count = 8;</code>
762    *
763    * @return The responseCount.
764    */
765   @java.lang.Override
getResponseCount()766   public int getResponseCount() {
767     return responseCount_;
768   }
769 
770   public static final int FIRST_ATTEMPT_FIELD_NUMBER = 9;
771   private com.google.cloud.tasks.v2.Attempt firstAttempt_;
772   /**
773    *
774    *
775    * <pre>
776    * Output only. The status of the task's first attempt.
777    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
778    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
779    * retained by Cloud Tasks.
780    * </pre>
781    *
782    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
783    *
784    * @return Whether the firstAttempt field is set.
785    */
786   @java.lang.Override
hasFirstAttempt()787   public boolean hasFirstAttempt() {
788     return firstAttempt_ != null;
789   }
790   /**
791    *
792    *
793    * <pre>
794    * Output only. The status of the task's first attempt.
795    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
796    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
797    * retained by Cloud Tasks.
798    * </pre>
799    *
800    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
801    *
802    * @return The firstAttempt.
803    */
804   @java.lang.Override
getFirstAttempt()805   public com.google.cloud.tasks.v2.Attempt getFirstAttempt() {
806     return firstAttempt_ == null
807         ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
808         : firstAttempt_;
809   }
810   /**
811    *
812    *
813    * <pre>
814    * Output only. The status of the task's first attempt.
815    * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
816    * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
817    * retained by Cloud Tasks.
818    * </pre>
819    *
820    * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
821    */
822   @java.lang.Override
getFirstAttemptOrBuilder()823   public com.google.cloud.tasks.v2.AttemptOrBuilder getFirstAttemptOrBuilder() {
824     return firstAttempt_ == null
825         ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
826         : firstAttempt_;
827   }
828 
829   public static final int LAST_ATTEMPT_FIELD_NUMBER = 10;
830   private com.google.cloud.tasks.v2.Attempt lastAttempt_;
831   /**
832    *
833    *
834    * <pre>
835    * Output only. The status of the task's last attempt.
836    * </pre>
837    *
838    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
839    *
840    * @return Whether the lastAttempt field is set.
841    */
842   @java.lang.Override
hasLastAttempt()843   public boolean hasLastAttempt() {
844     return lastAttempt_ != null;
845   }
846   /**
847    *
848    *
849    * <pre>
850    * Output only. The status of the task's last attempt.
851    * </pre>
852    *
853    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
854    *
855    * @return The lastAttempt.
856    */
857   @java.lang.Override
getLastAttempt()858   public com.google.cloud.tasks.v2.Attempt getLastAttempt() {
859     return lastAttempt_ == null
860         ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
861         : lastAttempt_;
862   }
863   /**
864    *
865    *
866    * <pre>
867    * Output only. The status of the task's last attempt.
868    * </pre>
869    *
870    * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
871    */
872   @java.lang.Override
getLastAttemptOrBuilder()873   public com.google.cloud.tasks.v2.AttemptOrBuilder getLastAttemptOrBuilder() {
874     return lastAttempt_ == null
875         ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
876         : lastAttempt_;
877   }
878 
879   public static final int VIEW_FIELD_NUMBER = 11;
880   private int view_ = 0;
881   /**
882    *
883    *
884    * <pre>
885    * Output only. The view specifies which subset of the
886    * [Task][google.cloud.tasks.v2.Task] has been returned.
887    * </pre>
888    *
889    * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
890    *
891    * @return The enum numeric value on the wire for view.
892    */
893   @java.lang.Override
getViewValue()894   public int getViewValue() {
895     return view_;
896   }
897   /**
898    *
899    *
900    * <pre>
901    * Output only. The view specifies which subset of the
902    * [Task][google.cloud.tasks.v2.Task] has been returned.
903    * </pre>
904    *
905    * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
906    *
907    * @return The view.
908    */
909   @java.lang.Override
getView()910   public com.google.cloud.tasks.v2.Task.View getView() {
911     com.google.cloud.tasks.v2.Task.View result =
912         com.google.cloud.tasks.v2.Task.View.forNumber(view_);
913     return result == null ? com.google.cloud.tasks.v2.Task.View.UNRECOGNIZED : result;
914   }
915 
916   private byte memoizedIsInitialized = -1;
917 
918   @java.lang.Override
isInitialized()919   public final boolean isInitialized() {
920     byte isInitialized = memoizedIsInitialized;
921     if (isInitialized == 1) return true;
922     if (isInitialized == 0) return false;
923 
924     memoizedIsInitialized = 1;
925     return true;
926   }
927 
928   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)929   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
930     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
931       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
932     }
933     if (messageTypeCase_ == 2) {
934       output.writeMessage(2, (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_);
935     }
936     if (messageTypeCase_ == 3) {
937       output.writeMessage(3, (com.google.cloud.tasks.v2.HttpRequest) messageType_);
938     }
939     if (scheduleTime_ != null) {
940       output.writeMessage(4, getScheduleTime());
941     }
942     if (createTime_ != null) {
943       output.writeMessage(5, getCreateTime());
944     }
945     if (dispatchDeadline_ != null) {
946       output.writeMessage(6, getDispatchDeadline());
947     }
948     if (dispatchCount_ != 0) {
949       output.writeInt32(7, dispatchCount_);
950     }
951     if (responseCount_ != 0) {
952       output.writeInt32(8, responseCount_);
953     }
954     if (firstAttempt_ != null) {
955       output.writeMessage(9, getFirstAttempt());
956     }
957     if (lastAttempt_ != null) {
958       output.writeMessage(10, getLastAttempt());
959     }
960     if (view_ != com.google.cloud.tasks.v2.Task.View.VIEW_UNSPECIFIED.getNumber()) {
961       output.writeEnum(11, view_);
962     }
963     getUnknownFields().writeTo(output);
964   }
965 
966   @java.lang.Override
getSerializedSize()967   public int getSerializedSize() {
968     int size = memoizedSize;
969     if (size != -1) return size;
970 
971     size = 0;
972     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
973       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
974     }
975     if (messageTypeCase_ == 2) {
976       size +=
977           com.google.protobuf.CodedOutputStream.computeMessageSize(
978               2, (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_);
979     }
980     if (messageTypeCase_ == 3) {
981       size +=
982           com.google.protobuf.CodedOutputStream.computeMessageSize(
983               3, (com.google.cloud.tasks.v2.HttpRequest) messageType_);
984     }
985     if (scheduleTime_ != null) {
986       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getScheduleTime());
987     }
988     if (createTime_ != null) {
989       size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime());
990     }
991     if (dispatchDeadline_ != null) {
992       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDispatchDeadline());
993     }
994     if (dispatchCount_ != 0) {
995       size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, dispatchCount_);
996     }
997     if (responseCount_ != 0) {
998       size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, responseCount_);
999     }
1000     if (firstAttempt_ != null) {
1001       size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getFirstAttempt());
1002     }
1003     if (lastAttempt_ != null) {
1004       size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLastAttempt());
1005     }
1006     if (view_ != com.google.cloud.tasks.v2.Task.View.VIEW_UNSPECIFIED.getNumber()) {
1007       size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, view_);
1008     }
1009     size += getUnknownFields().getSerializedSize();
1010     memoizedSize = size;
1011     return size;
1012   }
1013 
1014   @java.lang.Override
equals(final java.lang.Object obj)1015   public boolean equals(final java.lang.Object obj) {
1016     if (obj == this) {
1017       return true;
1018     }
1019     if (!(obj instanceof com.google.cloud.tasks.v2.Task)) {
1020       return super.equals(obj);
1021     }
1022     com.google.cloud.tasks.v2.Task other = (com.google.cloud.tasks.v2.Task) obj;
1023 
1024     if (!getName().equals(other.getName())) return false;
1025     if (hasScheduleTime() != other.hasScheduleTime()) return false;
1026     if (hasScheduleTime()) {
1027       if (!getScheduleTime().equals(other.getScheduleTime())) return false;
1028     }
1029     if (hasCreateTime() != other.hasCreateTime()) return false;
1030     if (hasCreateTime()) {
1031       if (!getCreateTime().equals(other.getCreateTime())) return false;
1032     }
1033     if (hasDispatchDeadline() != other.hasDispatchDeadline()) return false;
1034     if (hasDispatchDeadline()) {
1035       if (!getDispatchDeadline().equals(other.getDispatchDeadline())) return false;
1036     }
1037     if (getDispatchCount() != other.getDispatchCount()) return false;
1038     if (getResponseCount() != other.getResponseCount()) return false;
1039     if (hasFirstAttempt() != other.hasFirstAttempt()) return false;
1040     if (hasFirstAttempt()) {
1041       if (!getFirstAttempt().equals(other.getFirstAttempt())) return false;
1042     }
1043     if (hasLastAttempt() != other.hasLastAttempt()) return false;
1044     if (hasLastAttempt()) {
1045       if (!getLastAttempt().equals(other.getLastAttempt())) return false;
1046     }
1047     if (view_ != other.view_) return false;
1048     if (!getMessageTypeCase().equals(other.getMessageTypeCase())) return false;
1049     switch (messageTypeCase_) {
1050       case 2:
1051         if (!getAppEngineHttpRequest().equals(other.getAppEngineHttpRequest())) return false;
1052         break;
1053       case 3:
1054         if (!getHttpRequest().equals(other.getHttpRequest())) return false;
1055         break;
1056       case 0:
1057       default:
1058     }
1059     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1060     return true;
1061   }
1062 
1063   @java.lang.Override
hashCode()1064   public int hashCode() {
1065     if (memoizedHashCode != 0) {
1066       return memoizedHashCode;
1067     }
1068     int hash = 41;
1069     hash = (19 * hash) + getDescriptor().hashCode();
1070     hash = (37 * hash) + NAME_FIELD_NUMBER;
1071     hash = (53 * hash) + getName().hashCode();
1072     if (hasScheduleTime()) {
1073       hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER;
1074       hash = (53 * hash) + getScheduleTime().hashCode();
1075     }
1076     if (hasCreateTime()) {
1077       hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
1078       hash = (53 * hash) + getCreateTime().hashCode();
1079     }
1080     if (hasDispatchDeadline()) {
1081       hash = (37 * hash) + DISPATCH_DEADLINE_FIELD_NUMBER;
1082       hash = (53 * hash) + getDispatchDeadline().hashCode();
1083     }
1084     hash = (37 * hash) + DISPATCH_COUNT_FIELD_NUMBER;
1085     hash = (53 * hash) + getDispatchCount();
1086     hash = (37 * hash) + RESPONSE_COUNT_FIELD_NUMBER;
1087     hash = (53 * hash) + getResponseCount();
1088     if (hasFirstAttempt()) {
1089       hash = (37 * hash) + FIRST_ATTEMPT_FIELD_NUMBER;
1090       hash = (53 * hash) + getFirstAttempt().hashCode();
1091     }
1092     if (hasLastAttempt()) {
1093       hash = (37 * hash) + LAST_ATTEMPT_FIELD_NUMBER;
1094       hash = (53 * hash) + getLastAttempt().hashCode();
1095     }
1096     hash = (37 * hash) + VIEW_FIELD_NUMBER;
1097     hash = (53 * hash) + view_;
1098     switch (messageTypeCase_) {
1099       case 2:
1100         hash = (37 * hash) + APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER;
1101         hash = (53 * hash) + getAppEngineHttpRequest().hashCode();
1102         break;
1103       case 3:
1104         hash = (37 * hash) + HTTP_REQUEST_FIELD_NUMBER;
1105         hash = (53 * hash) + getHttpRequest().hashCode();
1106         break;
1107       case 0:
1108       default:
1109     }
1110     hash = (29 * hash) + getUnknownFields().hashCode();
1111     memoizedHashCode = hash;
1112     return hash;
1113   }
1114 
parseFrom(java.nio.ByteBuffer data)1115   public static com.google.cloud.tasks.v2.Task parseFrom(java.nio.ByteBuffer data)
1116       throws com.google.protobuf.InvalidProtocolBufferException {
1117     return PARSER.parseFrom(data);
1118   }
1119 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1120   public static com.google.cloud.tasks.v2.Task parseFrom(
1121       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1122       throws com.google.protobuf.InvalidProtocolBufferException {
1123     return PARSER.parseFrom(data, extensionRegistry);
1124   }
1125 
parseFrom(com.google.protobuf.ByteString data)1126   public static com.google.cloud.tasks.v2.Task parseFrom(com.google.protobuf.ByteString data)
1127       throws com.google.protobuf.InvalidProtocolBufferException {
1128     return PARSER.parseFrom(data);
1129   }
1130 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1131   public static com.google.cloud.tasks.v2.Task parseFrom(
1132       com.google.protobuf.ByteString data,
1133       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1134       throws com.google.protobuf.InvalidProtocolBufferException {
1135     return PARSER.parseFrom(data, extensionRegistry);
1136   }
1137 
parseFrom(byte[] data)1138   public static com.google.cloud.tasks.v2.Task parseFrom(byte[] data)
1139       throws com.google.protobuf.InvalidProtocolBufferException {
1140     return PARSER.parseFrom(data);
1141   }
1142 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1143   public static com.google.cloud.tasks.v2.Task parseFrom(
1144       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1145       throws com.google.protobuf.InvalidProtocolBufferException {
1146     return PARSER.parseFrom(data, extensionRegistry);
1147   }
1148 
parseFrom(java.io.InputStream input)1149   public static com.google.cloud.tasks.v2.Task parseFrom(java.io.InputStream input)
1150       throws java.io.IOException {
1151     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1152   }
1153 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1154   public static com.google.cloud.tasks.v2.Task parseFrom(
1155       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1156       throws java.io.IOException {
1157     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1158         PARSER, input, extensionRegistry);
1159   }
1160 
parseDelimitedFrom(java.io.InputStream input)1161   public static com.google.cloud.tasks.v2.Task parseDelimitedFrom(java.io.InputStream input)
1162       throws java.io.IOException {
1163     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1164   }
1165 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1166   public static com.google.cloud.tasks.v2.Task parseDelimitedFrom(
1167       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1168       throws java.io.IOException {
1169     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1170         PARSER, input, extensionRegistry);
1171   }
1172 
parseFrom(com.google.protobuf.CodedInputStream input)1173   public static com.google.cloud.tasks.v2.Task parseFrom(com.google.protobuf.CodedInputStream input)
1174       throws java.io.IOException {
1175     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1176   }
1177 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1178   public static com.google.cloud.tasks.v2.Task parseFrom(
1179       com.google.protobuf.CodedInputStream input,
1180       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1181       throws java.io.IOException {
1182     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1183         PARSER, input, extensionRegistry);
1184   }
1185 
1186   @java.lang.Override
newBuilderForType()1187   public Builder newBuilderForType() {
1188     return newBuilder();
1189   }
1190 
newBuilder()1191   public static Builder newBuilder() {
1192     return DEFAULT_INSTANCE.toBuilder();
1193   }
1194 
newBuilder(com.google.cloud.tasks.v2.Task prototype)1195   public static Builder newBuilder(com.google.cloud.tasks.v2.Task prototype) {
1196     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1197   }
1198 
1199   @java.lang.Override
toBuilder()1200   public Builder toBuilder() {
1201     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1202   }
1203 
1204   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1205   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1206     Builder builder = new Builder(parent);
1207     return builder;
1208   }
1209   /**
1210    *
1211    *
1212    * <pre>
1213    * A unit of scheduled work.
1214    * </pre>
1215    *
1216    * Protobuf type {@code google.cloud.tasks.v2.Task}
1217    */
1218   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1219       implements
1220       // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2.Task)
1221       com.google.cloud.tasks.v2.TaskOrBuilder {
getDescriptor()1222     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1223       return com.google.cloud.tasks.v2.TaskProto
1224           .internal_static_google_cloud_tasks_v2_Task_descriptor;
1225     }
1226 
1227     @java.lang.Override
1228     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1229         internalGetFieldAccessorTable() {
1230       return com.google.cloud.tasks.v2.TaskProto
1231           .internal_static_google_cloud_tasks_v2_Task_fieldAccessorTable
1232           .ensureFieldAccessorsInitialized(
1233               com.google.cloud.tasks.v2.Task.class, com.google.cloud.tasks.v2.Task.Builder.class);
1234     }
1235 
1236     // Construct using com.google.cloud.tasks.v2.Task.newBuilder()
Builder()1237     private Builder() {}
1238 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1239     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1240       super(parent);
1241     }
1242 
1243     @java.lang.Override
clear()1244     public Builder clear() {
1245       super.clear();
1246       bitField0_ = 0;
1247       name_ = "";
1248       if (appEngineHttpRequestBuilder_ != null) {
1249         appEngineHttpRequestBuilder_.clear();
1250       }
1251       if (httpRequestBuilder_ != null) {
1252         httpRequestBuilder_.clear();
1253       }
1254       scheduleTime_ = null;
1255       if (scheduleTimeBuilder_ != null) {
1256         scheduleTimeBuilder_.dispose();
1257         scheduleTimeBuilder_ = null;
1258       }
1259       createTime_ = null;
1260       if (createTimeBuilder_ != null) {
1261         createTimeBuilder_.dispose();
1262         createTimeBuilder_ = null;
1263       }
1264       dispatchDeadline_ = null;
1265       if (dispatchDeadlineBuilder_ != null) {
1266         dispatchDeadlineBuilder_.dispose();
1267         dispatchDeadlineBuilder_ = null;
1268       }
1269       dispatchCount_ = 0;
1270       responseCount_ = 0;
1271       firstAttempt_ = null;
1272       if (firstAttemptBuilder_ != null) {
1273         firstAttemptBuilder_.dispose();
1274         firstAttemptBuilder_ = null;
1275       }
1276       lastAttempt_ = null;
1277       if (lastAttemptBuilder_ != null) {
1278         lastAttemptBuilder_.dispose();
1279         lastAttemptBuilder_ = null;
1280       }
1281       view_ = 0;
1282       messageTypeCase_ = 0;
1283       messageType_ = null;
1284       return this;
1285     }
1286 
1287     @java.lang.Override
getDescriptorForType()1288     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1289       return com.google.cloud.tasks.v2.TaskProto
1290           .internal_static_google_cloud_tasks_v2_Task_descriptor;
1291     }
1292 
1293     @java.lang.Override
getDefaultInstanceForType()1294     public com.google.cloud.tasks.v2.Task getDefaultInstanceForType() {
1295       return com.google.cloud.tasks.v2.Task.getDefaultInstance();
1296     }
1297 
1298     @java.lang.Override
build()1299     public com.google.cloud.tasks.v2.Task build() {
1300       com.google.cloud.tasks.v2.Task result = buildPartial();
1301       if (!result.isInitialized()) {
1302         throw newUninitializedMessageException(result);
1303       }
1304       return result;
1305     }
1306 
1307     @java.lang.Override
buildPartial()1308     public com.google.cloud.tasks.v2.Task buildPartial() {
1309       com.google.cloud.tasks.v2.Task result = new com.google.cloud.tasks.v2.Task(this);
1310       if (bitField0_ != 0) {
1311         buildPartial0(result);
1312       }
1313       buildPartialOneofs(result);
1314       onBuilt();
1315       return result;
1316     }
1317 
buildPartial0(com.google.cloud.tasks.v2.Task result)1318     private void buildPartial0(com.google.cloud.tasks.v2.Task result) {
1319       int from_bitField0_ = bitField0_;
1320       if (((from_bitField0_ & 0x00000001) != 0)) {
1321         result.name_ = name_;
1322       }
1323       if (((from_bitField0_ & 0x00000008) != 0)) {
1324         result.scheduleTime_ =
1325             scheduleTimeBuilder_ == null ? scheduleTime_ : scheduleTimeBuilder_.build();
1326       }
1327       if (((from_bitField0_ & 0x00000010) != 0)) {
1328         result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
1329       }
1330       if (((from_bitField0_ & 0x00000020) != 0)) {
1331         result.dispatchDeadline_ =
1332             dispatchDeadlineBuilder_ == null ? dispatchDeadline_ : dispatchDeadlineBuilder_.build();
1333       }
1334       if (((from_bitField0_ & 0x00000040) != 0)) {
1335         result.dispatchCount_ = dispatchCount_;
1336       }
1337       if (((from_bitField0_ & 0x00000080) != 0)) {
1338         result.responseCount_ = responseCount_;
1339       }
1340       if (((from_bitField0_ & 0x00000100) != 0)) {
1341         result.firstAttempt_ =
1342             firstAttemptBuilder_ == null ? firstAttempt_ : firstAttemptBuilder_.build();
1343       }
1344       if (((from_bitField0_ & 0x00000200) != 0)) {
1345         result.lastAttempt_ =
1346             lastAttemptBuilder_ == null ? lastAttempt_ : lastAttemptBuilder_.build();
1347       }
1348       if (((from_bitField0_ & 0x00000400) != 0)) {
1349         result.view_ = view_;
1350       }
1351     }
1352 
buildPartialOneofs(com.google.cloud.tasks.v2.Task result)1353     private void buildPartialOneofs(com.google.cloud.tasks.v2.Task result) {
1354       result.messageTypeCase_ = messageTypeCase_;
1355       result.messageType_ = this.messageType_;
1356       if (messageTypeCase_ == 2 && appEngineHttpRequestBuilder_ != null) {
1357         result.messageType_ = appEngineHttpRequestBuilder_.build();
1358       }
1359       if (messageTypeCase_ == 3 && httpRequestBuilder_ != null) {
1360         result.messageType_ = httpRequestBuilder_.build();
1361       }
1362     }
1363 
1364     @java.lang.Override
clone()1365     public Builder clone() {
1366       return super.clone();
1367     }
1368 
1369     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1370     public Builder setField(
1371         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1372       return super.setField(field, value);
1373     }
1374 
1375     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1376     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1377       return super.clearField(field);
1378     }
1379 
1380     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1381     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1382       return super.clearOneof(oneof);
1383     }
1384 
1385     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1386     public Builder setRepeatedField(
1387         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1388       return super.setRepeatedField(field, index, value);
1389     }
1390 
1391     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1392     public Builder addRepeatedField(
1393         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1394       return super.addRepeatedField(field, value);
1395     }
1396 
1397     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1398     public Builder mergeFrom(com.google.protobuf.Message other) {
1399       if (other instanceof com.google.cloud.tasks.v2.Task) {
1400         return mergeFrom((com.google.cloud.tasks.v2.Task) other);
1401       } else {
1402         super.mergeFrom(other);
1403         return this;
1404       }
1405     }
1406 
mergeFrom(com.google.cloud.tasks.v2.Task other)1407     public Builder mergeFrom(com.google.cloud.tasks.v2.Task other) {
1408       if (other == com.google.cloud.tasks.v2.Task.getDefaultInstance()) return this;
1409       if (!other.getName().isEmpty()) {
1410         name_ = other.name_;
1411         bitField0_ |= 0x00000001;
1412         onChanged();
1413       }
1414       if (other.hasScheduleTime()) {
1415         mergeScheduleTime(other.getScheduleTime());
1416       }
1417       if (other.hasCreateTime()) {
1418         mergeCreateTime(other.getCreateTime());
1419       }
1420       if (other.hasDispatchDeadline()) {
1421         mergeDispatchDeadline(other.getDispatchDeadline());
1422       }
1423       if (other.getDispatchCount() != 0) {
1424         setDispatchCount(other.getDispatchCount());
1425       }
1426       if (other.getResponseCount() != 0) {
1427         setResponseCount(other.getResponseCount());
1428       }
1429       if (other.hasFirstAttempt()) {
1430         mergeFirstAttempt(other.getFirstAttempt());
1431       }
1432       if (other.hasLastAttempt()) {
1433         mergeLastAttempt(other.getLastAttempt());
1434       }
1435       if (other.view_ != 0) {
1436         setViewValue(other.getViewValue());
1437       }
1438       switch (other.getMessageTypeCase()) {
1439         case APP_ENGINE_HTTP_REQUEST:
1440           {
1441             mergeAppEngineHttpRequest(other.getAppEngineHttpRequest());
1442             break;
1443           }
1444         case HTTP_REQUEST:
1445           {
1446             mergeHttpRequest(other.getHttpRequest());
1447             break;
1448           }
1449         case MESSAGETYPE_NOT_SET:
1450           {
1451             break;
1452           }
1453       }
1454       this.mergeUnknownFields(other.getUnknownFields());
1455       onChanged();
1456       return this;
1457     }
1458 
1459     @java.lang.Override
isInitialized()1460     public final boolean isInitialized() {
1461       return true;
1462     }
1463 
1464     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1465     public Builder mergeFrom(
1466         com.google.protobuf.CodedInputStream input,
1467         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1468         throws java.io.IOException {
1469       if (extensionRegistry == null) {
1470         throw new java.lang.NullPointerException();
1471       }
1472       try {
1473         boolean done = false;
1474         while (!done) {
1475           int tag = input.readTag();
1476           switch (tag) {
1477             case 0:
1478               done = true;
1479               break;
1480             case 10:
1481               {
1482                 name_ = input.readStringRequireUtf8();
1483                 bitField0_ |= 0x00000001;
1484                 break;
1485               } // case 10
1486             case 18:
1487               {
1488                 input.readMessage(
1489                     getAppEngineHttpRequestFieldBuilder().getBuilder(), extensionRegistry);
1490                 messageTypeCase_ = 2;
1491                 break;
1492               } // case 18
1493             case 26:
1494               {
1495                 input.readMessage(getHttpRequestFieldBuilder().getBuilder(), extensionRegistry);
1496                 messageTypeCase_ = 3;
1497                 break;
1498               } // case 26
1499             case 34:
1500               {
1501                 input.readMessage(getScheduleTimeFieldBuilder().getBuilder(), extensionRegistry);
1502                 bitField0_ |= 0x00000008;
1503                 break;
1504               } // case 34
1505             case 42:
1506               {
1507                 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
1508                 bitField0_ |= 0x00000010;
1509                 break;
1510               } // case 42
1511             case 50:
1512               {
1513                 input.readMessage(
1514                     getDispatchDeadlineFieldBuilder().getBuilder(), extensionRegistry);
1515                 bitField0_ |= 0x00000020;
1516                 break;
1517               } // case 50
1518             case 56:
1519               {
1520                 dispatchCount_ = input.readInt32();
1521                 bitField0_ |= 0x00000040;
1522                 break;
1523               } // case 56
1524             case 64:
1525               {
1526                 responseCount_ = input.readInt32();
1527                 bitField0_ |= 0x00000080;
1528                 break;
1529               } // case 64
1530             case 74:
1531               {
1532                 input.readMessage(getFirstAttemptFieldBuilder().getBuilder(), extensionRegistry);
1533                 bitField0_ |= 0x00000100;
1534                 break;
1535               } // case 74
1536             case 82:
1537               {
1538                 input.readMessage(getLastAttemptFieldBuilder().getBuilder(), extensionRegistry);
1539                 bitField0_ |= 0x00000200;
1540                 break;
1541               } // case 82
1542             case 88:
1543               {
1544                 view_ = input.readEnum();
1545                 bitField0_ |= 0x00000400;
1546                 break;
1547               } // case 88
1548             default:
1549               {
1550                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1551                   done = true; // was an endgroup tag
1552                 }
1553                 break;
1554               } // default:
1555           } // switch (tag)
1556         } // while (!done)
1557       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1558         throw e.unwrapIOException();
1559       } finally {
1560         onChanged();
1561       } // finally
1562       return this;
1563     }
1564 
1565     private int messageTypeCase_ = 0;
1566     private java.lang.Object messageType_;
1567 
getMessageTypeCase()1568     public MessageTypeCase getMessageTypeCase() {
1569       return MessageTypeCase.forNumber(messageTypeCase_);
1570     }
1571 
clearMessageType()1572     public Builder clearMessageType() {
1573       messageTypeCase_ = 0;
1574       messageType_ = null;
1575       onChanged();
1576       return this;
1577     }
1578 
1579     private int bitField0_;
1580 
1581     private java.lang.Object name_ = "";
1582     /**
1583      *
1584      *
1585      * <pre>
1586      * Optionally caller-specified in
1587      * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
1588      * The task name.
1589      * The task name must have the following format:
1590      * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1591      * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1592      *    hyphens (-), colons (:), or periods (.).
1593      *    For more information, see
1594      *    [Identifying
1595      *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1596      * * `LOCATION_ID` is the canonical ID for the task's location.
1597      *    The list of available locations can be obtained by calling
1598      *    [ListLocations][google.cloud.location.Locations.ListLocations].
1599      *    For more information, see https://cloud.google.com/about/locations/.
1600      * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1601      *   hyphens (-). The maximum length is 100 characters.
1602      * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1603      *   hyphens (-), or underscores (_). The maximum length is 500 characters.
1604      * </pre>
1605      *
1606      * <code>string name = 1;</code>
1607      *
1608      * @return The name.
1609      */
getName()1610     public java.lang.String getName() {
1611       java.lang.Object ref = name_;
1612       if (!(ref instanceof java.lang.String)) {
1613         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1614         java.lang.String s = bs.toStringUtf8();
1615         name_ = s;
1616         return s;
1617       } else {
1618         return (java.lang.String) ref;
1619       }
1620     }
1621     /**
1622      *
1623      *
1624      * <pre>
1625      * Optionally caller-specified in
1626      * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
1627      * The task name.
1628      * The task name must have the following format:
1629      * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1630      * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1631      *    hyphens (-), colons (:), or periods (.).
1632      *    For more information, see
1633      *    [Identifying
1634      *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1635      * * `LOCATION_ID` is the canonical ID for the task's location.
1636      *    The list of available locations can be obtained by calling
1637      *    [ListLocations][google.cloud.location.Locations.ListLocations].
1638      *    For more information, see https://cloud.google.com/about/locations/.
1639      * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1640      *   hyphens (-). The maximum length is 100 characters.
1641      * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1642      *   hyphens (-), or underscores (_). The maximum length is 500 characters.
1643      * </pre>
1644      *
1645      * <code>string name = 1;</code>
1646      *
1647      * @return The bytes for name.
1648      */
getNameBytes()1649     public com.google.protobuf.ByteString getNameBytes() {
1650       java.lang.Object ref = name_;
1651       if (ref instanceof String) {
1652         com.google.protobuf.ByteString b =
1653             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1654         name_ = b;
1655         return b;
1656       } else {
1657         return (com.google.protobuf.ByteString) ref;
1658       }
1659     }
1660     /**
1661      *
1662      *
1663      * <pre>
1664      * Optionally caller-specified in
1665      * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
1666      * The task name.
1667      * The task name must have the following format:
1668      * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1669      * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1670      *    hyphens (-), colons (:), or periods (.).
1671      *    For more information, see
1672      *    [Identifying
1673      *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1674      * * `LOCATION_ID` is the canonical ID for the task's location.
1675      *    The list of available locations can be obtained by calling
1676      *    [ListLocations][google.cloud.location.Locations.ListLocations].
1677      *    For more information, see https://cloud.google.com/about/locations/.
1678      * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1679      *   hyphens (-). The maximum length is 100 characters.
1680      * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1681      *   hyphens (-), or underscores (_). The maximum length is 500 characters.
1682      * </pre>
1683      *
1684      * <code>string name = 1;</code>
1685      *
1686      * @param value The name to set.
1687      * @return This builder for chaining.
1688      */
setName(java.lang.String value)1689     public Builder setName(java.lang.String value) {
1690       if (value == null) {
1691         throw new NullPointerException();
1692       }
1693       name_ = value;
1694       bitField0_ |= 0x00000001;
1695       onChanged();
1696       return this;
1697     }
1698     /**
1699      *
1700      *
1701      * <pre>
1702      * Optionally caller-specified in
1703      * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
1704      * The task name.
1705      * The task name must have the following format:
1706      * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1707      * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1708      *    hyphens (-), colons (:), or periods (.).
1709      *    For more information, see
1710      *    [Identifying
1711      *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1712      * * `LOCATION_ID` is the canonical ID for the task's location.
1713      *    The list of available locations can be obtained by calling
1714      *    [ListLocations][google.cloud.location.Locations.ListLocations].
1715      *    For more information, see https://cloud.google.com/about/locations/.
1716      * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1717      *   hyphens (-). The maximum length is 100 characters.
1718      * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1719      *   hyphens (-), or underscores (_). The maximum length is 500 characters.
1720      * </pre>
1721      *
1722      * <code>string name = 1;</code>
1723      *
1724      * @return This builder for chaining.
1725      */
clearName()1726     public Builder clearName() {
1727       name_ = getDefaultInstance().getName();
1728       bitField0_ = (bitField0_ & ~0x00000001);
1729       onChanged();
1730       return this;
1731     }
1732     /**
1733      *
1734      *
1735      * <pre>
1736      * Optionally caller-specified in
1737      * [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
1738      * The task name.
1739      * The task name must have the following format:
1740      * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
1741      * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1742      *    hyphens (-), colons (:), or periods (.).
1743      *    For more information, see
1744      *    [Identifying
1745      *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1746      * * `LOCATION_ID` is the canonical ID for the task's location.
1747      *    The list of available locations can be obtained by calling
1748      *    [ListLocations][google.cloud.location.Locations.ListLocations].
1749      *    For more information, see https://cloud.google.com/about/locations/.
1750      * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1751      *   hyphens (-). The maximum length is 100 characters.
1752      * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
1753      *   hyphens (-), or underscores (_). The maximum length is 500 characters.
1754      * </pre>
1755      *
1756      * <code>string name = 1;</code>
1757      *
1758      * @param value The bytes for name to set.
1759      * @return This builder for chaining.
1760      */
setNameBytes(com.google.protobuf.ByteString value)1761     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1762       if (value == null) {
1763         throw new NullPointerException();
1764       }
1765       checkByteStringIsUtf8(value);
1766       name_ = value;
1767       bitField0_ |= 0x00000001;
1768       onChanged();
1769       return this;
1770     }
1771 
1772     private com.google.protobuf.SingleFieldBuilderV3<
1773             com.google.cloud.tasks.v2.AppEngineHttpRequest,
1774             com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder,
1775             com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder>
1776         appEngineHttpRequestBuilder_;
1777     /**
1778      *
1779      *
1780      * <pre>
1781      * HTTP request that is sent to the App Engine app handler.
1782      * An App Engine task is a task that has
1783      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1784      * </pre>
1785      *
1786      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1787      *
1788      * @return Whether the appEngineHttpRequest field is set.
1789      */
1790     @java.lang.Override
hasAppEngineHttpRequest()1791     public boolean hasAppEngineHttpRequest() {
1792       return messageTypeCase_ == 2;
1793     }
1794     /**
1795      *
1796      *
1797      * <pre>
1798      * HTTP request that is sent to the App Engine app handler.
1799      * An App Engine task is a task that has
1800      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1801      * </pre>
1802      *
1803      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1804      *
1805      * @return The appEngineHttpRequest.
1806      */
1807     @java.lang.Override
getAppEngineHttpRequest()1808     public com.google.cloud.tasks.v2.AppEngineHttpRequest getAppEngineHttpRequest() {
1809       if (appEngineHttpRequestBuilder_ == null) {
1810         if (messageTypeCase_ == 2) {
1811           return (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_;
1812         }
1813         return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
1814       } else {
1815         if (messageTypeCase_ == 2) {
1816           return appEngineHttpRequestBuilder_.getMessage();
1817         }
1818         return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
1819       }
1820     }
1821     /**
1822      *
1823      *
1824      * <pre>
1825      * HTTP request that is sent to the App Engine app handler.
1826      * An App Engine task is a task that has
1827      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1828      * </pre>
1829      *
1830      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1831      */
setAppEngineHttpRequest(com.google.cloud.tasks.v2.AppEngineHttpRequest value)1832     public Builder setAppEngineHttpRequest(com.google.cloud.tasks.v2.AppEngineHttpRequest value) {
1833       if (appEngineHttpRequestBuilder_ == null) {
1834         if (value == null) {
1835           throw new NullPointerException();
1836         }
1837         messageType_ = value;
1838         onChanged();
1839       } else {
1840         appEngineHttpRequestBuilder_.setMessage(value);
1841       }
1842       messageTypeCase_ = 2;
1843       return this;
1844     }
1845     /**
1846      *
1847      *
1848      * <pre>
1849      * HTTP request that is sent to the App Engine app handler.
1850      * An App Engine task is a task that has
1851      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1852      * </pre>
1853      *
1854      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1855      */
setAppEngineHttpRequest( com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder builderForValue)1856     public Builder setAppEngineHttpRequest(
1857         com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder builderForValue) {
1858       if (appEngineHttpRequestBuilder_ == null) {
1859         messageType_ = builderForValue.build();
1860         onChanged();
1861       } else {
1862         appEngineHttpRequestBuilder_.setMessage(builderForValue.build());
1863       }
1864       messageTypeCase_ = 2;
1865       return this;
1866     }
1867     /**
1868      *
1869      *
1870      * <pre>
1871      * HTTP request that is sent to the App Engine app handler.
1872      * An App Engine task is a task that has
1873      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1874      * </pre>
1875      *
1876      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1877      */
mergeAppEngineHttpRequest(com.google.cloud.tasks.v2.AppEngineHttpRequest value)1878     public Builder mergeAppEngineHttpRequest(com.google.cloud.tasks.v2.AppEngineHttpRequest value) {
1879       if (appEngineHttpRequestBuilder_ == null) {
1880         if (messageTypeCase_ == 2
1881             && messageType_
1882                 != com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance()) {
1883           messageType_ =
1884               com.google.cloud.tasks.v2.AppEngineHttpRequest.newBuilder(
1885                       (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_)
1886                   .mergeFrom(value)
1887                   .buildPartial();
1888         } else {
1889           messageType_ = value;
1890         }
1891         onChanged();
1892       } else {
1893         if (messageTypeCase_ == 2) {
1894           appEngineHttpRequestBuilder_.mergeFrom(value);
1895         } else {
1896           appEngineHttpRequestBuilder_.setMessage(value);
1897         }
1898       }
1899       messageTypeCase_ = 2;
1900       return this;
1901     }
1902     /**
1903      *
1904      *
1905      * <pre>
1906      * HTTP request that is sent to the App Engine app handler.
1907      * An App Engine task is a task that has
1908      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1909      * </pre>
1910      *
1911      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1912      */
clearAppEngineHttpRequest()1913     public Builder clearAppEngineHttpRequest() {
1914       if (appEngineHttpRequestBuilder_ == null) {
1915         if (messageTypeCase_ == 2) {
1916           messageTypeCase_ = 0;
1917           messageType_ = null;
1918           onChanged();
1919         }
1920       } else {
1921         if (messageTypeCase_ == 2) {
1922           messageTypeCase_ = 0;
1923           messageType_ = null;
1924         }
1925         appEngineHttpRequestBuilder_.clear();
1926       }
1927       return this;
1928     }
1929     /**
1930      *
1931      *
1932      * <pre>
1933      * HTTP request that is sent to the App Engine app handler.
1934      * An App Engine task is a task that has
1935      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1936      * </pre>
1937      *
1938      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1939      */
getAppEngineHttpRequestBuilder()1940     public com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder getAppEngineHttpRequestBuilder() {
1941       return getAppEngineHttpRequestFieldBuilder().getBuilder();
1942     }
1943     /**
1944      *
1945      *
1946      * <pre>
1947      * HTTP request that is sent to the App Engine app handler.
1948      * An App Engine task is a task that has
1949      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1950      * </pre>
1951      *
1952      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1953      */
1954     @java.lang.Override
1955     public com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder
getAppEngineHttpRequestOrBuilder()1956         getAppEngineHttpRequestOrBuilder() {
1957       if ((messageTypeCase_ == 2) && (appEngineHttpRequestBuilder_ != null)) {
1958         return appEngineHttpRequestBuilder_.getMessageOrBuilder();
1959       } else {
1960         if (messageTypeCase_ == 2) {
1961           return (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_;
1962         }
1963         return com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
1964       }
1965     }
1966     /**
1967      *
1968      *
1969      * <pre>
1970      * HTTP request that is sent to the App Engine app handler.
1971      * An App Engine task is a task that has
1972      * [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] set.
1973      * </pre>
1974      *
1975      * <code>.google.cloud.tasks.v2.AppEngineHttpRequest app_engine_http_request = 2;</code>
1976      */
1977     private com.google.protobuf.SingleFieldBuilderV3<
1978             com.google.cloud.tasks.v2.AppEngineHttpRequest,
1979             com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder,
1980             com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder>
getAppEngineHttpRequestFieldBuilder()1981         getAppEngineHttpRequestFieldBuilder() {
1982       if (appEngineHttpRequestBuilder_ == null) {
1983         if (!(messageTypeCase_ == 2)) {
1984           messageType_ = com.google.cloud.tasks.v2.AppEngineHttpRequest.getDefaultInstance();
1985         }
1986         appEngineHttpRequestBuilder_ =
1987             new com.google.protobuf.SingleFieldBuilderV3<
1988                 com.google.cloud.tasks.v2.AppEngineHttpRequest,
1989                 com.google.cloud.tasks.v2.AppEngineHttpRequest.Builder,
1990                 com.google.cloud.tasks.v2.AppEngineHttpRequestOrBuilder>(
1991                 (com.google.cloud.tasks.v2.AppEngineHttpRequest) messageType_,
1992                 getParentForChildren(),
1993                 isClean());
1994         messageType_ = null;
1995       }
1996       messageTypeCase_ = 2;
1997       onChanged();
1998       return appEngineHttpRequestBuilder_;
1999     }
2000 
2001     private com.google.protobuf.SingleFieldBuilderV3<
2002             com.google.cloud.tasks.v2.HttpRequest,
2003             com.google.cloud.tasks.v2.HttpRequest.Builder,
2004             com.google.cloud.tasks.v2.HttpRequestOrBuilder>
2005         httpRequestBuilder_;
2006     /**
2007      *
2008      *
2009      * <pre>
2010      * HTTP request that is sent to the worker.
2011      * An HTTP task is a task that has
2012      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2013      * </pre>
2014      *
2015      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2016      *
2017      * @return Whether the httpRequest field is set.
2018      */
2019     @java.lang.Override
hasHttpRequest()2020     public boolean hasHttpRequest() {
2021       return messageTypeCase_ == 3;
2022     }
2023     /**
2024      *
2025      *
2026      * <pre>
2027      * HTTP request that is sent to the worker.
2028      * An HTTP task is a task that has
2029      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2030      * </pre>
2031      *
2032      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2033      *
2034      * @return The httpRequest.
2035      */
2036     @java.lang.Override
getHttpRequest()2037     public com.google.cloud.tasks.v2.HttpRequest getHttpRequest() {
2038       if (httpRequestBuilder_ == null) {
2039         if (messageTypeCase_ == 3) {
2040           return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
2041         }
2042         return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
2043       } else {
2044         if (messageTypeCase_ == 3) {
2045           return httpRequestBuilder_.getMessage();
2046         }
2047         return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
2048       }
2049     }
2050     /**
2051      *
2052      *
2053      * <pre>
2054      * HTTP request that is sent to the worker.
2055      * An HTTP task is a task that has
2056      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2057      * </pre>
2058      *
2059      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2060      */
setHttpRequest(com.google.cloud.tasks.v2.HttpRequest value)2061     public Builder setHttpRequest(com.google.cloud.tasks.v2.HttpRequest value) {
2062       if (httpRequestBuilder_ == null) {
2063         if (value == null) {
2064           throw new NullPointerException();
2065         }
2066         messageType_ = value;
2067         onChanged();
2068       } else {
2069         httpRequestBuilder_.setMessage(value);
2070       }
2071       messageTypeCase_ = 3;
2072       return this;
2073     }
2074     /**
2075      *
2076      *
2077      * <pre>
2078      * HTTP request that is sent to the worker.
2079      * An HTTP task is a task that has
2080      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2081      * </pre>
2082      *
2083      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2084      */
setHttpRequest(com.google.cloud.tasks.v2.HttpRequest.Builder builderForValue)2085     public Builder setHttpRequest(com.google.cloud.tasks.v2.HttpRequest.Builder builderForValue) {
2086       if (httpRequestBuilder_ == null) {
2087         messageType_ = builderForValue.build();
2088         onChanged();
2089       } else {
2090         httpRequestBuilder_.setMessage(builderForValue.build());
2091       }
2092       messageTypeCase_ = 3;
2093       return this;
2094     }
2095     /**
2096      *
2097      *
2098      * <pre>
2099      * HTTP request that is sent to the worker.
2100      * An HTTP task is a task that has
2101      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2102      * </pre>
2103      *
2104      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2105      */
mergeHttpRequest(com.google.cloud.tasks.v2.HttpRequest value)2106     public Builder mergeHttpRequest(com.google.cloud.tasks.v2.HttpRequest value) {
2107       if (httpRequestBuilder_ == null) {
2108         if (messageTypeCase_ == 3
2109             && messageType_ != com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance()) {
2110           messageType_ =
2111               com.google.cloud.tasks.v2.HttpRequest.newBuilder(
2112                       (com.google.cloud.tasks.v2.HttpRequest) messageType_)
2113                   .mergeFrom(value)
2114                   .buildPartial();
2115         } else {
2116           messageType_ = value;
2117         }
2118         onChanged();
2119       } else {
2120         if (messageTypeCase_ == 3) {
2121           httpRequestBuilder_.mergeFrom(value);
2122         } else {
2123           httpRequestBuilder_.setMessage(value);
2124         }
2125       }
2126       messageTypeCase_ = 3;
2127       return this;
2128     }
2129     /**
2130      *
2131      *
2132      * <pre>
2133      * HTTP request that is sent to the worker.
2134      * An HTTP task is a task that has
2135      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2136      * </pre>
2137      *
2138      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2139      */
clearHttpRequest()2140     public Builder clearHttpRequest() {
2141       if (httpRequestBuilder_ == null) {
2142         if (messageTypeCase_ == 3) {
2143           messageTypeCase_ = 0;
2144           messageType_ = null;
2145           onChanged();
2146         }
2147       } else {
2148         if (messageTypeCase_ == 3) {
2149           messageTypeCase_ = 0;
2150           messageType_ = null;
2151         }
2152         httpRequestBuilder_.clear();
2153       }
2154       return this;
2155     }
2156     /**
2157      *
2158      *
2159      * <pre>
2160      * HTTP request that is sent to the worker.
2161      * An HTTP task is a task that has
2162      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2163      * </pre>
2164      *
2165      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2166      */
getHttpRequestBuilder()2167     public com.google.cloud.tasks.v2.HttpRequest.Builder getHttpRequestBuilder() {
2168       return getHttpRequestFieldBuilder().getBuilder();
2169     }
2170     /**
2171      *
2172      *
2173      * <pre>
2174      * HTTP request that is sent to the worker.
2175      * An HTTP task is a task that has
2176      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2177      * </pre>
2178      *
2179      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2180      */
2181     @java.lang.Override
getHttpRequestOrBuilder()2182     public com.google.cloud.tasks.v2.HttpRequestOrBuilder getHttpRequestOrBuilder() {
2183       if ((messageTypeCase_ == 3) && (httpRequestBuilder_ != null)) {
2184         return httpRequestBuilder_.getMessageOrBuilder();
2185       } else {
2186         if (messageTypeCase_ == 3) {
2187           return (com.google.cloud.tasks.v2.HttpRequest) messageType_;
2188         }
2189         return com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
2190       }
2191     }
2192     /**
2193      *
2194      *
2195      * <pre>
2196      * HTTP request that is sent to the worker.
2197      * An HTTP task is a task that has
2198      * [HttpRequest][google.cloud.tasks.v2.HttpRequest] set.
2199      * </pre>
2200      *
2201      * <code>.google.cloud.tasks.v2.HttpRequest http_request = 3;</code>
2202      */
2203     private com.google.protobuf.SingleFieldBuilderV3<
2204             com.google.cloud.tasks.v2.HttpRequest,
2205             com.google.cloud.tasks.v2.HttpRequest.Builder,
2206             com.google.cloud.tasks.v2.HttpRequestOrBuilder>
getHttpRequestFieldBuilder()2207         getHttpRequestFieldBuilder() {
2208       if (httpRequestBuilder_ == null) {
2209         if (!(messageTypeCase_ == 3)) {
2210           messageType_ = com.google.cloud.tasks.v2.HttpRequest.getDefaultInstance();
2211         }
2212         httpRequestBuilder_ =
2213             new com.google.protobuf.SingleFieldBuilderV3<
2214                 com.google.cloud.tasks.v2.HttpRequest,
2215                 com.google.cloud.tasks.v2.HttpRequest.Builder,
2216                 com.google.cloud.tasks.v2.HttpRequestOrBuilder>(
2217                 (com.google.cloud.tasks.v2.HttpRequest) messageType_,
2218                 getParentForChildren(),
2219                 isClean());
2220         messageType_ = null;
2221       }
2222       messageTypeCase_ = 3;
2223       onChanged();
2224       return httpRequestBuilder_;
2225     }
2226 
2227     private com.google.protobuf.Timestamp scheduleTime_;
2228     private com.google.protobuf.SingleFieldBuilderV3<
2229             com.google.protobuf.Timestamp,
2230             com.google.protobuf.Timestamp.Builder,
2231             com.google.protobuf.TimestampOrBuilder>
2232         scheduleTimeBuilder_;
2233     /**
2234      *
2235      *
2236      * <pre>
2237      * The time when the task is scheduled to be attempted or retried.
2238      * `schedule_time` will be truncated to the nearest microsecond.
2239      * </pre>
2240      *
2241      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2242      *
2243      * @return Whether the scheduleTime field is set.
2244      */
hasScheduleTime()2245     public boolean hasScheduleTime() {
2246       return ((bitField0_ & 0x00000008) != 0);
2247     }
2248     /**
2249      *
2250      *
2251      * <pre>
2252      * The time when the task is scheduled to be attempted or retried.
2253      * `schedule_time` will be truncated to the nearest microsecond.
2254      * </pre>
2255      *
2256      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2257      *
2258      * @return The scheduleTime.
2259      */
getScheduleTime()2260     public com.google.protobuf.Timestamp getScheduleTime() {
2261       if (scheduleTimeBuilder_ == null) {
2262         return scheduleTime_ == null
2263             ? com.google.protobuf.Timestamp.getDefaultInstance()
2264             : scheduleTime_;
2265       } else {
2266         return scheduleTimeBuilder_.getMessage();
2267       }
2268     }
2269     /**
2270      *
2271      *
2272      * <pre>
2273      * The time when the task is scheduled to be attempted or retried.
2274      * `schedule_time` will be truncated to the nearest microsecond.
2275      * </pre>
2276      *
2277      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2278      */
setScheduleTime(com.google.protobuf.Timestamp value)2279     public Builder setScheduleTime(com.google.protobuf.Timestamp value) {
2280       if (scheduleTimeBuilder_ == null) {
2281         if (value == null) {
2282           throw new NullPointerException();
2283         }
2284         scheduleTime_ = value;
2285       } else {
2286         scheduleTimeBuilder_.setMessage(value);
2287       }
2288       bitField0_ |= 0x00000008;
2289       onChanged();
2290       return this;
2291     }
2292     /**
2293      *
2294      *
2295      * <pre>
2296      * The time when the task is scheduled to be attempted or retried.
2297      * `schedule_time` will be truncated to the nearest microsecond.
2298      * </pre>
2299      *
2300      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2301      */
setScheduleTime(com.google.protobuf.Timestamp.Builder builderForValue)2302     public Builder setScheduleTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2303       if (scheduleTimeBuilder_ == null) {
2304         scheduleTime_ = builderForValue.build();
2305       } else {
2306         scheduleTimeBuilder_.setMessage(builderForValue.build());
2307       }
2308       bitField0_ |= 0x00000008;
2309       onChanged();
2310       return this;
2311     }
2312     /**
2313      *
2314      *
2315      * <pre>
2316      * The time when the task is scheduled to be attempted or retried.
2317      * `schedule_time` will be truncated to the nearest microsecond.
2318      * </pre>
2319      *
2320      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2321      */
mergeScheduleTime(com.google.protobuf.Timestamp value)2322     public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) {
2323       if (scheduleTimeBuilder_ == null) {
2324         if (((bitField0_ & 0x00000008) != 0)
2325             && scheduleTime_ != null
2326             && scheduleTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2327           getScheduleTimeBuilder().mergeFrom(value);
2328         } else {
2329           scheduleTime_ = value;
2330         }
2331       } else {
2332         scheduleTimeBuilder_.mergeFrom(value);
2333       }
2334       bitField0_ |= 0x00000008;
2335       onChanged();
2336       return this;
2337     }
2338     /**
2339      *
2340      *
2341      * <pre>
2342      * The time when the task is scheduled to be attempted or retried.
2343      * `schedule_time` will be truncated to the nearest microsecond.
2344      * </pre>
2345      *
2346      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2347      */
clearScheduleTime()2348     public Builder clearScheduleTime() {
2349       bitField0_ = (bitField0_ & ~0x00000008);
2350       scheduleTime_ = null;
2351       if (scheduleTimeBuilder_ != null) {
2352         scheduleTimeBuilder_.dispose();
2353         scheduleTimeBuilder_ = null;
2354       }
2355       onChanged();
2356       return this;
2357     }
2358     /**
2359      *
2360      *
2361      * <pre>
2362      * The time when the task is scheduled to be attempted or retried.
2363      * `schedule_time` will be truncated to the nearest microsecond.
2364      * </pre>
2365      *
2366      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2367      */
getScheduleTimeBuilder()2368     public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() {
2369       bitField0_ |= 0x00000008;
2370       onChanged();
2371       return getScheduleTimeFieldBuilder().getBuilder();
2372     }
2373     /**
2374      *
2375      *
2376      * <pre>
2377      * The time when the task is scheduled to be attempted or retried.
2378      * `schedule_time` will be truncated to the nearest microsecond.
2379      * </pre>
2380      *
2381      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2382      */
getScheduleTimeOrBuilder()2383     public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() {
2384       if (scheduleTimeBuilder_ != null) {
2385         return scheduleTimeBuilder_.getMessageOrBuilder();
2386       } else {
2387         return scheduleTime_ == null
2388             ? com.google.protobuf.Timestamp.getDefaultInstance()
2389             : scheduleTime_;
2390       }
2391     }
2392     /**
2393      *
2394      *
2395      * <pre>
2396      * The time when the task is scheduled to be attempted or retried.
2397      * `schedule_time` will be truncated to the nearest microsecond.
2398      * </pre>
2399      *
2400      * <code>.google.protobuf.Timestamp schedule_time = 4;</code>
2401      */
2402     private com.google.protobuf.SingleFieldBuilderV3<
2403             com.google.protobuf.Timestamp,
2404             com.google.protobuf.Timestamp.Builder,
2405             com.google.protobuf.TimestampOrBuilder>
getScheduleTimeFieldBuilder()2406         getScheduleTimeFieldBuilder() {
2407       if (scheduleTimeBuilder_ == null) {
2408         scheduleTimeBuilder_ =
2409             new com.google.protobuf.SingleFieldBuilderV3<
2410                 com.google.protobuf.Timestamp,
2411                 com.google.protobuf.Timestamp.Builder,
2412                 com.google.protobuf.TimestampOrBuilder>(
2413                 getScheduleTime(), getParentForChildren(), isClean());
2414         scheduleTime_ = null;
2415       }
2416       return scheduleTimeBuilder_;
2417     }
2418 
2419     private com.google.protobuf.Timestamp createTime_;
2420     private com.google.protobuf.SingleFieldBuilderV3<
2421             com.google.protobuf.Timestamp,
2422             com.google.protobuf.Timestamp.Builder,
2423             com.google.protobuf.TimestampOrBuilder>
2424         createTimeBuilder_;
2425     /**
2426      *
2427      *
2428      * <pre>
2429      * Output only. The time that the task was created.
2430      * `create_time` will be truncated to the nearest second.
2431      * </pre>
2432      *
2433      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2434      *
2435      * @return Whether the createTime field is set.
2436      */
hasCreateTime()2437     public boolean hasCreateTime() {
2438       return ((bitField0_ & 0x00000010) != 0);
2439     }
2440     /**
2441      *
2442      *
2443      * <pre>
2444      * Output only. The time that the task was created.
2445      * `create_time` will be truncated to the nearest second.
2446      * </pre>
2447      *
2448      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2449      *
2450      * @return The createTime.
2451      */
getCreateTime()2452     public com.google.protobuf.Timestamp getCreateTime() {
2453       if (createTimeBuilder_ == null) {
2454         return createTime_ == null
2455             ? com.google.protobuf.Timestamp.getDefaultInstance()
2456             : createTime_;
2457       } else {
2458         return createTimeBuilder_.getMessage();
2459       }
2460     }
2461     /**
2462      *
2463      *
2464      * <pre>
2465      * Output only. The time that the task was created.
2466      * `create_time` will be truncated to the nearest second.
2467      * </pre>
2468      *
2469      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2470      */
setCreateTime(com.google.protobuf.Timestamp value)2471     public Builder setCreateTime(com.google.protobuf.Timestamp value) {
2472       if (createTimeBuilder_ == null) {
2473         if (value == null) {
2474           throw new NullPointerException();
2475         }
2476         createTime_ = value;
2477       } else {
2478         createTimeBuilder_.setMessage(value);
2479       }
2480       bitField0_ |= 0x00000010;
2481       onChanged();
2482       return this;
2483     }
2484     /**
2485      *
2486      *
2487      * <pre>
2488      * Output only. The time that the task was created.
2489      * `create_time` will be truncated to the nearest second.
2490      * </pre>
2491      *
2492      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2493      */
setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)2494     public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
2495       if (createTimeBuilder_ == null) {
2496         createTime_ = builderForValue.build();
2497       } else {
2498         createTimeBuilder_.setMessage(builderForValue.build());
2499       }
2500       bitField0_ |= 0x00000010;
2501       onChanged();
2502       return this;
2503     }
2504     /**
2505      *
2506      *
2507      * <pre>
2508      * Output only. The time that the task was created.
2509      * `create_time` will be truncated to the nearest second.
2510      * </pre>
2511      *
2512      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2513      */
mergeCreateTime(com.google.protobuf.Timestamp value)2514     public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
2515       if (createTimeBuilder_ == null) {
2516         if (((bitField0_ & 0x00000010) != 0)
2517             && createTime_ != null
2518             && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
2519           getCreateTimeBuilder().mergeFrom(value);
2520         } else {
2521           createTime_ = value;
2522         }
2523       } else {
2524         createTimeBuilder_.mergeFrom(value);
2525       }
2526       bitField0_ |= 0x00000010;
2527       onChanged();
2528       return this;
2529     }
2530     /**
2531      *
2532      *
2533      * <pre>
2534      * Output only. The time that the task was created.
2535      * `create_time` will be truncated to the nearest second.
2536      * </pre>
2537      *
2538      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2539      */
clearCreateTime()2540     public Builder clearCreateTime() {
2541       bitField0_ = (bitField0_ & ~0x00000010);
2542       createTime_ = null;
2543       if (createTimeBuilder_ != null) {
2544         createTimeBuilder_.dispose();
2545         createTimeBuilder_ = null;
2546       }
2547       onChanged();
2548       return this;
2549     }
2550     /**
2551      *
2552      *
2553      * <pre>
2554      * Output only. The time that the task was created.
2555      * `create_time` will be truncated to the nearest second.
2556      * </pre>
2557      *
2558      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2559      */
getCreateTimeBuilder()2560     public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
2561       bitField0_ |= 0x00000010;
2562       onChanged();
2563       return getCreateTimeFieldBuilder().getBuilder();
2564     }
2565     /**
2566      *
2567      *
2568      * <pre>
2569      * Output only. The time that the task was created.
2570      * `create_time` will be truncated to the nearest second.
2571      * </pre>
2572      *
2573      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2574      */
getCreateTimeOrBuilder()2575     public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
2576       if (createTimeBuilder_ != null) {
2577         return createTimeBuilder_.getMessageOrBuilder();
2578       } else {
2579         return createTime_ == null
2580             ? com.google.protobuf.Timestamp.getDefaultInstance()
2581             : createTime_;
2582       }
2583     }
2584     /**
2585      *
2586      *
2587      * <pre>
2588      * Output only. The time that the task was created.
2589      * `create_time` will be truncated to the nearest second.
2590      * </pre>
2591      *
2592      * <code>.google.protobuf.Timestamp create_time = 5;</code>
2593      */
2594     private com.google.protobuf.SingleFieldBuilderV3<
2595             com.google.protobuf.Timestamp,
2596             com.google.protobuf.Timestamp.Builder,
2597             com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder()2598         getCreateTimeFieldBuilder() {
2599       if (createTimeBuilder_ == null) {
2600         createTimeBuilder_ =
2601             new com.google.protobuf.SingleFieldBuilderV3<
2602                 com.google.protobuf.Timestamp,
2603                 com.google.protobuf.Timestamp.Builder,
2604                 com.google.protobuf.TimestampOrBuilder>(
2605                 getCreateTime(), getParentForChildren(), isClean());
2606         createTime_ = null;
2607       }
2608       return createTimeBuilder_;
2609     }
2610 
2611     private com.google.protobuf.Duration dispatchDeadline_;
2612     private com.google.protobuf.SingleFieldBuilderV3<
2613             com.google.protobuf.Duration,
2614             com.google.protobuf.Duration.Builder,
2615             com.google.protobuf.DurationOrBuilder>
2616         dispatchDeadlineBuilder_;
2617     /**
2618      *
2619      *
2620      * <pre>
2621      * The deadline for requests sent to the worker. If the worker does not
2622      * respond by this deadline then the request is cancelled and the attempt
2623      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2624      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2625      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2626      * the response, but whether the worker stops processing depends on the
2627      * worker. For example, if the worker is stuck, it may not react to cancelled
2628      * requests.
2629      * The default and maximum values depend on the type of request:
2630      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2631      * minutes. The deadline
2632      *   must be in the interval [15 seconds, 30 minutes].
2633      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2634      * indicates that the
2635      *   request has the default deadline. The default deadline depends on the
2636      *   [scaling
2637      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2638      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2639      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2640      *   flex apps. If the request deadline is set, it must be in the interval [15
2641      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2642      *   `dispatch_deadline`, the app handler will not run for longer than than
2643      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2644      *   at most a few seconds more than the app handler's timeout. For more
2645      *   information see
2646      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2647      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2648      * deadline is an approximate deadline.
2649      * </pre>
2650      *
2651      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2652      *
2653      * @return Whether the dispatchDeadline field is set.
2654      */
hasDispatchDeadline()2655     public boolean hasDispatchDeadline() {
2656       return ((bitField0_ & 0x00000020) != 0);
2657     }
2658     /**
2659      *
2660      *
2661      * <pre>
2662      * The deadline for requests sent to the worker. If the worker does not
2663      * respond by this deadline then the request is cancelled and the attempt
2664      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2665      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2666      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2667      * the response, but whether the worker stops processing depends on the
2668      * worker. For example, if the worker is stuck, it may not react to cancelled
2669      * requests.
2670      * The default and maximum values depend on the type of request:
2671      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2672      * minutes. The deadline
2673      *   must be in the interval [15 seconds, 30 minutes].
2674      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2675      * indicates that the
2676      *   request has the default deadline. The default deadline depends on the
2677      *   [scaling
2678      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2679      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2680      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2681      *   flex apps. If the request deadline is set, it must be in the interval [15
2682      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2683      *   `dispatch_deadline`, the app handler will not run for longer than than
2684      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2685      *   at most a few seconds more than the app handler's timeout. For more
2686      *   information see
2687      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2688      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2689      * deadline is an approximate deadline.
2690      * </pre>
2691      *
2692      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2693      *
2694      * @return The dispatchDeadline.
2695      */
getDispatchDeadline()2696     public com.google.protobuf.Duration getDispatchDeadline() {
2697       if (dispatchDeadlineBuilder_ == null) {
2698         return dispatchDeadline_ == null
2699             ? com.google.protobuf.Duration.getDefaultInstance()
2700             : dispatchDeadline_;
2701       } else {
2702         return dispatchDeadlineBuilder_.getMessage();
2703       }
2704     }
2705     /**
2706      *
2707      *
2708      * <pre>
2709      * The deadline for requests sent to the worker. If the worker does not
2710      * respond by this deadline then the request is cancelled and the attempt
2711      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2712      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2713      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2714      * the response, but whether the worker stops processing depends on the
2715      * worker. For example, if the worker is stuck, it may not react to cancelled
2716      * requests.
2717      * The default and maximum values depend on the type of request:
2718      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2719      * minutes. The deadline
2720      *   must be in the interval [15 seconds, 30 minutes].
2721      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2722      * indicates that the
2723      *   request has the default deadline. The default deadline depends on the
2724      *   [scaling
2725      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2726      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2727      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2728      *   flex apps. If the request deadline is set, it must be in the interval [15
2729      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2730      *   `dispatch_deadline`, the app handler will not run for longer than than
2731      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2732      *   at most a few seconds more than the app handler's timeout. For more
2733      *   information see
2734      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2735      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2736      * deadline is an approximate deadline.
2737      * </pre>
2738      *
2739      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2740      */
setDispatchDeadline(com.google.protobuf.Duration value)2741     public Builder setDispatchDeadline(com.google.protobuf.Duration value) {
2742       if (dispatchDeadlineBuilder_ == null) {
2743         if (value == null) {
2744           throw new NullPointerException();
2745         }
2746         dispatchDeadline_ = value;
2747       } else {
2748         dispatchDeadlineBuilder_.setMessage(value);
2749       }
2750       bitField0_ |= 0x00000020;
2751       onChanged();
2752       return this;
2753     }
2754     /**
2755      *
2756      *
2757      * <pre>
2758      * The deadline for requests sent to the worker. If the worker does not
2759      * respond by this deadline then the request is cancelled and the attempt
2760      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2761      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2762      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2763      * the response, but whether the worker stops processing depends on the
2764      * worker. For example, if the worker is stuck, it may not react to cancelled
2765      * requests.
2766      * The default and maximum values depend on the type of request:
2767      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2768      * minutes. The deadline
2769      *   must be in the interval [15 seconds, 30 minutes].
2770      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2771      * indicates that the
2772      *   request has the default deadline. The default deadline depends on the
2773      *   [scaling
2774      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2775      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2776      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2777      *   flex apps. If the request deadline is set, it must be in the interval [15
2778      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2779      *   `dispatch_deadline`, the app handler will not run for longer than than
2780      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2781      *   at most a few seconds more than the app handler's timeout. For more
2782      *   information see
2783      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2784      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2785      * deadline is an approximate deadline.
2786      * </pre>
2787      *
2788      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2789      */
setDispatchDeadline(com.google.protobuf.Duration.Builder builderForValue)2790     public Builder setDispatchDeadline(com.google.protobuf.Duration.Builder builderForValue) {
2791       if (dispatchDeadlineBuilder_ == null) {
2792         dispatchDeadline_ = builderForValue.build();
2793       } else {
2794         dispatchDeadlineBuilder_.setMessage(builderForValue.build());
2795       }
2796       bitField0_ |= 0x00000020;
2797       onChanged();
2798       return this;
2799     }
2800     /**
2801      *
2802      *
2803      * <pre>
2804      * The deadline for requests sent to the worker. If the worker does not
2805      * respond by this deadline then the request is cancelled and the attempt
2806      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2807      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2808      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2809      * the response, but whether the worker stops processing depends on the
2810      * worker. For example, if the worker is stuck, it may not react to cancelled
2811      * requests.
2812      * The default and maximum values depend on the type of request:
2813      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2814      * minutes. The deadline
2815      *   must be in the interval [15 seconds, 30 minutes].
2816      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2817      * indicates that the
2818      *   request has the default deadline. The default deadline depends on the
2819      *   [scaling
2820      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2821      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2822      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2823      *   flex apps. If the request deadline is set, it must be in the interval [15
2824      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2825      *   `dispatch_deadline`, the app handler will not run for longer than than
2826      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2827      *   at most a few seconds more than the app handler's timeout. For more
2828      *   information see
2829      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2830      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2831      * deadline is an approximate deadline.
2832      * </pre>
2833      *
2834      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2835      */
mergeDispatchDeadline(com.google.protobuf.Duration value)2836     public Builder mergeDispatchDeadline(com.google.protobuf.Duration value) {
2837       if (dispatchDeadlineBuilder_ == null) {
2838         if (((bitField0_ & 0x00000020) != 0)
2839             && dispatchDeadline_ != null
2840             && dispatchDeadline_ != com.google.protobuf.Duration.getDefaultInstance()) {
2841           getDispatchDeadlineBuilder().mergeFrom(value);
2842         } else {
2843           dispatchDeadline_ = value;
2844         }
2845       } else {
2846         dispatchDeadlineBuilder_.mergeFrom(value);
2847       }
2848       bitField0_ |= 0x00000020;
2849       onChanged();
2850       return this;
2851     }
2852     /**
2853      *
2854      *
2855      * <pre>
2856      * The deadline for requests sent to the worker. If the worker does not
2857      * respond by this deadline then the request is cancelled and the attempt
2858      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2859      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2860      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2861      * the response, but whether the worker stops processing depends on the
2862      * worker. For example, if the worker is stuck, it may not react to cancelled
2863      * requests.
2864      * The default and maximum values depend on the type of request:
2865      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2866      * minutes. The deadline
2867      *   must be in the interval [15 seconds, 30 minutes].
2868      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2869      * indicates that the
2870      *   request has the default deadline. The default deadline depends on the
2871      *   [scaling
2872      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2873      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2874      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2875      *   flex apps. If the request deadline is set, it must be in the interval [15
2876      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2877      *   `dispatch_deadline`, the app handler will not run for longer than than
2878      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2879      *   at most a few seconds more than the app handler's timeout. For more
2880      *   information see
2881      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2882      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2883      * deadline is an approximate deadline.
2884      * </pre>
2885      *
2886      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2887      */
clearDispatchDeadline()2888     public Builder clearDispatchDeadline() {
2889       bitField0_ = (bitField0_ & ~0x00000020);
2890       dispatchDeadline_ = null;
2891       if (dispatchDeadlineBuilder_ != null) {
2892         dispatchDeadlineBuilder_.dispose();
2893         dispatchDeadlineBuilder_ = null;
2894       }
2895       onChanged();
2896       return this;
2897     }
2898     /**
2899      *
2900      *
2901      * <pre>
2902      * The deadline for requests sent to the worker. If the worker does not
2903      * respond by this deadline then the request is cancelled and the attempt
2904      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2905      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2906      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2907      * the response, but whether the worker stops processing depends on the
2908      * worker. For example, if the worker is stuck, it may not react to cancelled
2909      * requests.
2910      * The default and maximum values depend on the type of request:
2911      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2912      * minutes. The deadline
2913      *   must be in the interval [15 seconds, 30 minutes].
2914      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2915      * indicates that the
2916      *   request has the default deadline. The default deadline depends on the
2917      *   [scaling
2918      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2919      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2920      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2921      *   flex apps. If the request deadline is set, it must be in the interval [15
2922      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2923      *   `dispatch_deadline`, the app handler will not run for longer than than
2924      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2925      *   at most a few seconds more than the app handler's timeout. For more
2926      *   information see
2927      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2928      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2929      * deadline is an approximate deadline.
2930      * </pre>
2931      *
2932      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2933      */
getDispatchDeadlineBuilder()2934     public com.google.protobuf.Duration.Builder getDispatchDeadlineBuilder() {
2935       bitField0_ |= 0x00000020;
2936       onChanged();
2937       return getDispatchDeadlineFieldBuilder().getBuilder();
2938     }
2939     /**
2940      *
2941      *
2942      * <pre>
2943      * The deadline for requests sent to the worker. If the worker does not
2944      * respond by this deadline then the request is cancelled and the attempt
2945      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2946      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2947      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2948      * the response, but whether the worker stops processing depends on the
2949      * worker. For example, if the worker is stuck, it may not react to cancelled
2950      * requests.
2951      * The default and maximum values depend on the type of request:
2952      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2953      * minutes. The deadline
2954      *   must be in the interval [15 seconds, 30 minutes].
2955      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
2956      * indicates that the
2957      *   request has the default deadline. The default deadline depends on the
2958      *   [scaling
2959      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
2960      *   of the service: 10 minutes for standard apps with automatic scaling, 24
2961      *   hours for standard apps with manual and basic scaling, and 60 minutes for
2962      *   flex apps. If the request deadline is set, it must be in the interval [15
2963      *   seconds, 24 hours 15 seconds]. Regardless of the task's
2964      *   `dispatch_deadline`, the app handler will not run for longer than than
2965      *   the service's timeout. We recommend setting the `dispatch_deadline` to
2966      *   at most a few seconds more than the app handler's timeout. For more
2967      *   information see
2968      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
2969      * `dispatch_deadline` will be truncated to the nearest millisecond. The
2970      * deadline is an approximate deadline.
2971      * </pre>
2972      *
2973      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
2974      */
getDispatchDeadlineOrBuilder()2975     public com.google.protobuf.DurationOrBuilder getDispatchDeadlineOrBuilder() {
2976       if (dispatchDeadlineBuilder_ != null) {
2977         return dispatchDeadlineBuilder_.getMessageOrBuilder();
2978       } else {
2979         return dispatchDeadline_ == null
2980             ? com.google.protobuf.Duration.getDefaultInstance()
2981             : dispatchDeadline_;
2982       }
2983     }
2984     /**
2985      *
2986      *
2987      * <pre>
2988      * The deadline for requests sent to the worker. If the worker does not
2989      * respond by this deadline then the request is cancelled and the attempt
2990      * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
2991      * task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
2992      * Note that when the request is cancelled, Cloud Tasks will stop listing for
2993      * the response, but whether the worker stops processing depends on the
2994      * worker. For example, if the worker is stuck, it may not react to cancelled
2995      * requests.
2996      * The default and maximum values depend on the type of request:
2997      * * For [HTTP tasks][google.cloud.tasks.v2.HttpRequest], the default is 10
2998      * minutes. The deadline
2999      *   must be in the interval [15 seconds, 30 minutes].
3000      * * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0
3001      * indicates that the
3002      *   request has the default deadline. The default deadline depends on the
3003      *   [scaling
3004      *   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
3005      *   of the service: 10 minutes for standard apps with automatic scaling, 24
3006      *   hours for standard apps with manual and basic scaling, and 60 minutes for
3007      *   flex apps. If the request deadline is set, it must be in the interval [15
3008      *   seconds, 24 hours 15 seconds]. Regardless of the task's
3009      *   `dispatch_deadline`, the app handler will not run for longer than than
3010      *   the service's timeout. We recommend setting the `dispatch_deadline` to
3011      *   at most a few seconds more than the app handler's timeout. For more
3012      *   information see
3013      *   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
3014      * `dispatch_deadline` will be truncated to the nearest millisecond. The
3015      * deadline is an approximate deadline.
3016      * </pre>
3017      *
3018      * <code>.google.protobuf.Duration dispatch_deadline = 6;</code>
3019      */
3020     private com.google.protobuf.SingleFieldBuilderV3<
3021             com.google.protobuf.Duration,
3022             com.google.protobuf.Duration.Builder,
3023             com.google.protobuf.DurationOrBuilder>
getDispatchDeadlineFieldBuilder()3024         getDispatchDeadlineFieldBuilder() {
3025       if (dispatchDeadlineBuilder_ == null) {
3026         dispatchDeadlineBuilder_ =
3027             new com.google.protobuf.SingleFieldBuilderV3<
3028                 com.google.protobuf.Duration,
3029                 com.google.protobuf.Duration.Builder,
3030                 com.google.protobuf.DurationOrBuilder>(
3031                 getDispatchDeadline(), getParentForChildren(), isClean());
3032         dispatchDeadline_ = null;
3033       }
3034       return dispatchDeadlineBuilder_;
3035     }
3036 
3037     private int dispatchCount_;
3038     /**
3039      *
3040      *
3041      * <pre>
3042      * Output only. The number of attempts dispatched.
3043      * This count includes attempts which have been dispatched but haven't
3044      * received a response.
3045      * </pre>
3046      *
3047      * <code>int32 dispatch_count = 7;</code>
3048      *
3049      * @return The dispatchCount.
3050      */
3051     @java.lang.Override
getDispatchCount()3052     public int getDispatchCount() {
3053       return dispatchCount_;
3054     }
3055     /**
3056      *
3057      *
3058      * <pre>
3059      * Output only. The number of attempts dispatched.
3060      * This count includes attempts which have been dispatched but haven't
3061      * received a response.
3062      * </pre>
3063      *
3064      * <code>int32 dispatch_count = 7;</code>
3065      *
3066      * @param value The dispatchCount to set.
3067      * @return This builder for chaining.
3068      */
setDispatchCount(int value)3069     public Builder setDispatchCount(int value) {
3070 
3071       dispatchCount_ = value;
3072       bitField0_ |= 0x00000040;
3073       onChanged();
3074       return this;
3075     }
3076     /**
3077      *
3078      *
3079      * <pre>
3080      * Output only. The number of attempts dispatched.
3081      * This count includes attempts which have been dispatched but haven't
3082      * received a response.
3083      * </pre>
3084      *
3085      * <code>int32 dispatch_count = 7;</code>
3086      *
3087      * @return This builder for chaining.
3088      */
clearDispatchCount()3089     public Builder clearDispatchCount() {
3090       bitField0_ = (bitField0_ & ~0x00000040);
3091       dispatchCount_ = 0;
3092       onChanged();
3093       return this;
3094     }
3095 
3096     private int responseCount_;
3097     /**
3098      *
3099      *
3100      * <pre>
3101      * Output only. The number of attempts which have received a response.
3102      * </pre>
3103      *
3104      * <code>int32 response_count = 8;</code>
3105      *
3106      * @return The responseCount.
3107      */
3108     @java.lang.Override
getResponseCount()3109     public int getResponseCount() {
3110       return responseCount_;
3111     }
3112     /**
3113      *
3114      *
3115      * <pre>
3116      * Output only. The number of attempts which have received a response.
3117      * </pre>
3118      *
3119      * <code>int32 response_count = 8;</code>
3120      *
3121      * @param value The responseCount to set.
3122      * @return This builder for chaining.
3123      */
setResponseCount(int value)3124     public Builder setResponseCount(int value) {
3125 
3126       responseCount_ = value;
3127       bitField0_ |= 0x00000080;
3128       onChanged();
3129       return this;
3130     }
3131     /**
3132      *
3133      *
3134      * <pre>
3135      * Output only. The number of attempts which have received a response.
3136      * </pre>
3137      *
3138      * <code>int32 response_count = 8;</code>
3139      *
3140      * @return This builder for chaining.
3141      */
clearResponseCount()3142     public Builder clearResponseCount() {
3143       bitField0_ = (bitField0_ & ~0x00000080);
3144       responseCount_ = 0;
3145       onChanged();
3146       return this;
3147     }
3148 
3149     private com.google.cloud.tasks.v2.Attempt firstAttempt_;
3150     private com.google.protobuf.SingleFieldBuilderV3<
3151             com.google.cloud.tasks.v2.Attempt,
3152             com.google.cloud.tasks.v2.Attempt.Builder,
3153             com.google.cloud.tasks.v2.AttemptOrBuilder>
3154         firstAttemptBuilder_;
3155     /**
3156      *
3157      *
3158      * <pre>
3159      * Output only. The status of the task's first attempt.
3160      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3161      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3162      * retained by Cloud Tasks.
3163      * </pre>
3164      *
3165      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3166      *
3167      * @return Whether the firstAttempt field is set.
3168      */
hasFirstAttempt()3169     public boolean hasFirstAttempt() {
3170       return ((bitField0_ & 0x00000100) != 0);
3171     }
3172     /**
3173      *
3174      *
3175      * <pre>
3176      * Output only. The status of the task's first attempt.
3177      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3178      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3179      * retained by Cloud Tasks.
3180      * </pre>
3181      *
3182      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3183      *
3184      * @return The firstAttempt.
3185      */
getFirstAttempt()3186     public com.google.cloud.tasks.v2.Attempt getFirstAttempt() {
3187       if (firstAttemptBuilder_ == null) {
3188         return firstAttempt_ == null
3189             ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
3190             : firstAttempt_;
3191       } else {
3192         return firstAttemptBuilder_.getMessage();
3193       }
3194     }
3195     /**
3196      *
3197      *
3198      * <pre>
3199      * Output only. The status of the task's first attempt.
3200      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3201      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3202      * retained by Cloud Tasks.
3203      * </pre>
3204      *
3205      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3206      */
setFirstAttempt(com.google.cloud.tasks.v2.Attempt value)3207     public Builder setFirstAttempt(com.google.cloud.tasks.v2.Attempt value) {
3208       if (firstAttemptBuilder_ == null) {
3209         if (value == null) {
3210           throw new NullPointerException();
3211         }
3212         firstAttempt_ = value;
3213       } else {
3214         firstAttemptBuilder_.setMessage(value);
3215       }
3216       bitField0_ |= 0x00000100;
3217       onChanged();
3218       return this;
3219     }
3220     /**
3221      *
3222      *
3223      * <pre>
3224      * Output only. The status of the task's first attempt.
3225      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3226      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3227      * retained by Cloud Tasks.
3228      * </pre>
3229      *
3230      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3231      */
setFirstAttempt(com.google.cloud.tasks.v2.Attempt.Builder builderForValue)3232     public Builder setFirstAttempt(com.google.cloud.tasks.v2.Attempt.Builder builderForValue) {
3233       if (firstAttemptBuilder_ == null) {
3234         firstAttempt_ = builderForValue.build();
3235       } else {
3236         firstAttemptBuilder_.setMessage(builderForValue.build());
3237       }
3238       bitField0_ |= 0x00000100;
3239       onChanged();
3240       return this;
3241     }
3242     /**
3243      *
3244      *
3245      * <pre>
3246      * Output only. The status of the task's first attempt.
3247      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3248      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3249      * retained by Cloud Tasks.
3250      * </pre>
3251      *
3252      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3253      */
mergeFirstAttempt(com.google.cloud.tasks.v2.Attempt value)3254     public Builder mergeFirstAttempt(com.google.cloud.tasks.v2.Attempt value) {
3255       if (firstAttemptBuilder_ == null) {
3256         if (((bitField0_ & 0x00000100) != 0)
3257             && firstAttempt_ != null
3258             && firstAttempt_ != com.google.cloud.tasks.v2.Attempt.getDefaultInstance()) {
3259           getFirstAttemptBuilder().mergeFrom(value);
3260         } else {
3261           firstAttempt_ = value;
3262         }
3263       } else {
3264         firstAttemptBuilder_.mergeFrom(value);
3265       }
3266       bitField0_ |= 0x00000100;
3267       onChanged();
3268       return this;
3269     }
3270     /**
3271      *
3272      *
3273      * <pre>
3274      * Output only. The status of the task's first attempt.
3275      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3276      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3277      * retained by Cloud Tasks.
3278      * </pre>
3279      *
3280      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3281      */
clearFirstAttempt()3282     public Builder clearFirstAttempt() {
3283       bitField0_ = (bitField0_ & ~0x00000100);
3284       firstAttempt_ = null;
3285       if (firstAttemptBuilder_ != null) {
3286         firstAttemptBuilder_.dispose();
3287         firstAttemptBuilder_ = null;
3288       }
3289       onChanged();
3290       return this;
3291     }
3292     /**
3293      *
3294      *
3295      * <pre>
3296      * Output only. The status of the task's first attempt.
3297      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3298      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3299      * retained by Cloud Tasks.
3300      * </pre>
3301      *
3302      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3303      */
getFirstAttemptBuilder()3304     public com.google.cloud.tasks.v2.Attempt.Builder getFirstAttemptBuilder() {
3305       bitField0_ |= 0x00000100;
3306       onChanged();
3307       return getFirstAttemptFieldBuilder().getBuilder();
3308     }
3309     /**
3310      *
3311      *
3312      * <pre>
3313      * Output only. The status of the task's first attempt.
3314      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3315      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3316      * retained by Cloud Tasks.
3317      * </pre>
3318      *
3319      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3320      */
getFirstAttemptOrBuilder()3321     public com.google.cloud.tasks.v2.AttemptOrBuilder getFirstAttemptOrBuilder() {
3322       if (firstAttemptBuilder_ != null) {
3323         return firstAttemptBuilder_.getMessageOrBuilder();
3324       } else {
3325         return firstAttempt_ == null
3326             ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
3327             : firstAttempt_;
3328       }
3329     }
3330     /**
3331      *
3332      *
3333      * <pre>
3334      * Output only. The status of the task's first attempt.
3335      * Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be
3336      * set. The other [Attempt][google.cloud.tasks.v2.Attempt] information is not
3337      * retained by Cloud Tasks.
3338      * </pre>
3339      *
3340      * <code>.google.cloud.tasks.v2.Attempt first_attempt = 9;</code>
3341      */
3342     private com.google.protobuf.SingleFieldBuilderV3<
3343             com.google.cloud.tasks.v2.Attempt,
3344             com.google.cloud.tasks.v2.Attempt.Builder,
3345             com.google.cloud.tasks.v2.AttemptOrBuilder>
getFirstAttemptFieldBuilder()3346         getFirstAttemptFieldBuilder() {
3347       if (firstAttemptBuilder_ == null) {
3348         firstAttemptBuilder_ =
3349             new com.google.protobuf.SingleFieldBuilderV3<
3350                 com.google.cloud.tasks.v2.Attempt,
3351                 com.google.cloud.tasks.v2.Attempt.Builder,
3352                 com.google.cloud.tasks.v2.AttemptOrBuilder>(
3353                 getFirstAttempt(), getParentForChildren(), isClean());
3354         firstAttempt_ = null;
3355       }
3356       return firstAttemptBuilder_;
3357     }
3358 
3359     private com.google.cloud.tasks.v2.Attempt lastAttempt_;
3360     private com.google.protobuf.SingleFieldBuilderV3<
3361             com.google.cloud.tasks.v2.Attempt,
3362             com.google.cloud.tasks.v2.Attempt.Builder,
3363             com.google.cloud.tasks.v2.AttemptOrBuilder>
3364         lastAttemptBuilder_;
3365     /**
3366      *
3367      *
3368      * <pre>
3369      * Output only. The status of the task's last attempt.
3370      * </pre>
3371      *
3372      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3373      *
3374      * @return Whether the lastAttempt field is set.
3375      */
hasLastAttempt()3376     public boolean hasLastAttempt() {
3377       return ((bitField0_ & 0x00000200) != 0);
3378     }
3379     /**
3380      *
3381      *
3382      * <pre>
3383      * Output only. The status of the task's last attempt.
3384      * </pre>
3385      *
3386      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3387      *
3388      * @return The lastAttempt.
3389      */
getLastAttempt()3390     public com.google.cloud.tasks.v2.Attempt getLastAttempt() {
3391       if (lastAttemptBuilder_ == null) {
3392         return lastAttempt_ == null
3393             ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
3394             : lastAttempt_;
3395       } else {
3396         return lastAttemptBuilder_.getMessage();
3397       }
3398     }
3399     /**
3400      *
3401      *
3402      * <pre>
3403      * Output only. The status of the task's last attempt.
3404      * </pre>
3405      *
3406      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3407      */
setLastAttempt(com.google.cloud.tasks.v2.Attempt value)3408     public Builder setLastAttempt(com.google.cloud.tasks.v2.Attempt value) {
3409       if (lastAttemptBuilder_ == null) {
3410         if (value == null) {
3411           throw new NullPointerException();
3412         }
3413         lastAttempt_ = value;
3414       } else {
3415         lastAttemptBuilder_.setMessage(value);
3416       }
3417       bitField0_ |= 0x00000200;
3418       onChanged();
3419       return this;
3420     }
3421     /**
3422      *
3423      *
3424      * <pre>
3425      * Output only. The status of the task's last attempt.
3426      * </pre>
3427      *
3428      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3429      */
setLastAttempt(com.google.cloud.tasks.v2.Attempt.Builder builderForValue)3430     public Builder setLastAttempt(com.google.cloud.tasks.v2.Attempt.Builder builderForValue) {
3431       if (lastAttemptBuilder_ == null) {
3432         lastAttempt_ = builderForValue.build();
3433       } else {
3434         lastAttemptBuilder_.setMessage(builderForValue.build());
3435       }
3436       bitField0_ |= 0x00000200;
3437       onChanged();
3438       return this;
3439     }
3440     /**
3441      *
3442      *
3443      * <pre>
3444      * Output only. The status of the task's last attempt.
3445      * </pre>
3446      *
3447      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3448      */
mergeLastAttempt(com.google.cloud.tasks.v2.Attempt value)3449     public Builder mergeLastAttempt(com.google.cloud.tasks.v2.Attempt value) {
3450       if (lastAttemptBuilder_ == null) {
3451         if (((bitField0_ & 0x00000200) != 0)
3452             && lastAttempt_ != null
3453             && lastAttempt_ != com.google.cloud.tasks.v2.Attempt.getDefaultInstance()) {
3454           getLastAttemptBuilder().mergeFrom(value);
3455         } else {
3456           lastAttempt_ = value;
3457         }
3458       } else {
3459         lastAttemptBuilder_.mergeFrom(value);
3460       }
3461       bitField0_ |= 0x00000200;
3462       onChanged();
3463       return this;
3464     }
3465     /**
3466      *
3467      *
3468      * <pre>
3469      * Output only. The status of the task's last attempt.
3470      * </pre>
3471      *
3472      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3473      */
clearLastAttempt()3474     public Builder clearLastAttempt() {
3475       bitField0_ = (bitField0_ & ~0x00000200);
3476       lastAttempt_ = null;
3477       if (lastAttemptBuilder_ != null) {
3478         lastAttemptBuilder_.dispose();
3479         lastAttemptBuilder_ = null;
3480       }
3481       onChanged();
3482       return this;
3483     }
3484     /**
3485      *
3486      *
3487      * <pre>
3488      * Output only. The status of the task's last attempt.
3489      * </pre>
3490      *
3491      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3492      */
getLastAttemptBuilder()3493     public com.google.cloud.tasks.v2.Attempt.Builder getLastAttemptBuilder() {
3494       bitField0_ |= 0x00000200;
3495       onChanged();
3496       return getLastAttemptFieldBuilder().getBuilder();
3497     }
3498     /**
3499      *
3500      *
3501      * <pre>
3502      * Output only. The status of the task's last attempt.
3503      * </pre>
3504      *
3505      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3506      */
getLastAttemptOrBuilder()3507     public com.google.cloud.tasks.v2.AttemptOrBuilder getLastAttemptOrBuilder() {
3508       if (lastAttemptBuilder_ != null) {
3509         return lastAttemptBuilder_.getMessageOrBuilder();
3510       } else {
3511         return lastAttempt_ == null
3512             ? com.google.cloud.tasks.v2.Attempt.getDefaultInstance()
3513             : lastAttempt_;
3514       }
3515     }
3516     /**
3517      *
3518      *
3519      * <pre>
3520      * Output only. The status of the task's last attempt.
3521      * </pre>
3522      *
3523      * <code>.google.cloud.tasks.v2.Attempt last_attempt = 10;</code>
3524      */
3525     private com.google.protobuf.SingleFieldBuilderV3<
3526             com.google.cloud.tasks.v2.Attempt,
3527             com.google.cloud.tasks.v2.Attempt.Builder,
3528             com.google.cloud.tasks.v2.AttemptOrBuilder>
getLastAttemptFieldBuilder()3529         getLastAttemptFieldBuilder() {
3530       if (lastAttemptBuilder_ == null) {
3531         lastAttemptBuilder_ =
3532             new com.google.protobuf.SingleFieldBuilderV3<
3533                 com.google.cloud.tasks.v2.Attempt,
3534                 com.google.cloud.tasks.v2.Attempt.Builder,
3535                 com.google.cloud.tasks.v2.AttemptOrBuilder>(
3536                 getLastAttempt(), getParentForChildren(), isClean());
3537         lastAttempt_ = null;
3538       }
3539       return lastAttemptBuilder_;
3540     }
3541 
3542     private int view_ = 0;
3543     /**
3544      *
3545      *
3546      * <pre>
3547      * Output only. The view specifies which subset of the
3548      * [Task][google.cloud.tasks.v2.Task] has been returned.
3549      * </pre>
3550      *
3551      * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
3552      *
3553      * @return The enum numeric value on the wire for view.
3554      */
3555     @java.lang.Override
getViewValue()3556     public int getViewValue() {
3557       return view_;
3558     }
3559     /**
3560      *
3561      *
3562      * <pre>
3563      * Output only. The view specifies which subset of the
3564      * [Task][google.cloud.tasks.v2.Task] has been returned.
3565      * </pre>
3566      *
3567      * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
3568      *
3569      * @param value The enum numeric value on the wire for view to set.
3570      * @return This builder for chaining.
3571      */
setViewValue(int value)3572     public Builder setViewValue(int value) {
3573       view_ = value;
3574       bitField0_ |= 0x00000400;
3575       onChanged();
3576       return this;
3577     }
3578     /**
3579      *
3580      *
3581      * <pre>
3582      * Output only. The view specifies which subset of the
3583      * [Task][google.cloud.tasks.v2.Task] has been returned.
3584      * </pre>
3585      *
3586      * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
3587      *
3588      * @return The view.
3589      */
3590     @java.lang.Override
getView()3591     public com.google.cloud.tasks.v2.Task.View getView() {
3592       com.google.cloud.tasks.v2.Task.View result =
3593           com.google.cloud.tasks.v2.Task.View.forNumber(view_);
3594       return result == null ? com.google.cloud.tasks.v2.Task.View.UNRECOGNIZED : result;
3595     }
3596     /**
3597      *
3598      *
3599      * <pre>
3600      * Output only. The view specifies which subset of the
3601      * [Task][google.cloud.tasks.v2.Task] has been returned.
3602      * </pre>
3603      *
3604      * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
3605      *
3606      * @param value The view to set.
3607      * @return This builder for chaining.
3608      */
setView(com.google.cloud.tasks.v2.Task.View value)3609     public Builder setView(com.google.cloud.tasks.v2.Task.View value) {
3610       if (value == null) {
3611         throw new NullPointerException();
3612       }
3613       bitField0_ |= 0x00000400;
3614       view_ = value.getNumber();
3615       onChanged();
3616       return this;
3617     }
3618     /**
3619      *
3620      *
3621      * <pre>
3622      * Output only. The view specifies which subset of the
3623      * [Task][google.cloud.tasks.v2.Task] has been returned.
3624      * </pre>
3625      *
3626      * <code>.google.cloud.tasks.v2.Task.View view = 11;</code>
3627      *
3628      * @return This builder for chaining.
3629      */
clearView()3630     public Builder clearView() {
3631       bitField0_ = (bitField0_ & ~0x00000400);
3632       view_ = 0;
3633       onChanged();
3634       return this;
3635     }
3636 
3637     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3638     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3639       return super.setUnknownFields(unknownFields);
3640     }
3641 
3642     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3643     public final Builder mergeUnknownFields(
3644         final com.google.protobuf.UnknownFieldSet unknownFields) {
3645       return super.mergeUnknownFields(unknownFields);
3646     }
3647 
3648     // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2.Task)
3649   }
3650 
3651   // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.Task)
3652   private static final com.google.cloud.tasks.v2.Task DEFAULT_INSTANCE;
3653 
3654   static {
3655     DEFAULT_INSTANCE = new com.google.cloud.tasks.v2.Task();
3656   }
3657 
getDefaultInstance()3658   public static com.google.cloud.tasks.v2.Task getDefaultInstance() {
3659     return DEFAULT_INSTANCE;
3660   }
3661 
3662   private static final com.google.protobuf.Parser<Task> PARSER =
3663       new com.google.protobuf.AbstractParser<Task>() {
3664         @java.lang.Override
3665         public Task parsePartialFrom(
3666             com.google.protobuf.CodedInputStream input,
3667             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3668             throws com.google.protobuf.InvalidProtocolBufferException {
3669           Builder builder = newBuilder();
3670           try {
3671             builder.mergeFrom(input, extensionRegistry);
3672           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3673             throw e.setUnfinishedMessage(builder.buildPartial());
3674           } catch (com.google.protobuf.UninitializedMessageException e) {
3675             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3676           } catch (java.io.IOException e) {
3677             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3678                 .setUnfinishedMessage(builder.buildPartial());
3679           }
3680           return builder.buildPartial();
3681         }
3682       };
3683 
parser()3684   public static com.google.protobuf.Parser<Task> parser() {
3685     return PARSER;
3686   }
3687 
3688   @java.lang.Override
getParserForType()3689   public com.google.protobuf.Parser<Task> getParserForType() {
3690     return PARSER;
3691   }
3692 
3693   @java.lang.Override
getDefaultInstanceForType()3694   public com.google.cloud.tasks.v2.Task getDefaultInstanceForType() {
3695     return DEFAULT_INSTANCE;
3696   }
3697 }
3698