// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/tasks/v2beta3/queue.proto

package com.google.cloud.tasks.v2beta3;

/**
 *
 *
 * <pre>
 * A queue is a container of related tasks. Queues are configured to manage
 * how those tasks are dispatched. Configurable properties include rate limits,
 * retry options, queue types, and others.
 * </pre>
 *
 * Protobuf type {@code google.cloud.tasks.v2beta3.Queue}
 */
public final class Queue extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta3.Queue)
    QueueOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Queue.newBuilder() to construct.
  private Queue(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Queue() {
    name_ = "";
    state_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  private Queue(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10:
            {
              java.lang.String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
          case 26:
            {
              com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder subBuilder = null;
              if (queueTypeCase_ == 3) {
                subBuilder =
                    ((com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_).toBuilder();
              }
              queueType_ =
                  input.readMessage(
                      com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(
                    (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_);
                queueType_ = subBuilder.buildPartial();
              }
              queueTypeCase_ = 3;
              break;
            }
          case 34:
            {
              com.google.cloud.tasks.v2beta3.RateLimits.Builder subBuilder = null;
              if (rateLimits_ != null) {
                subBuilder = rateLimits_.toBuilder();
              }
              rateLimits_ =
                  input.readMessage(
                      com.google.cloud.tasks.v2beta3.RateLimits.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(rateLimits_);
                rateLimits_ = subBuilder.buildPartial();
              }

              break;
            }
          case 42:
            {
              com.google.cloud.tasks.v2beta3.RetryConfig.Builder subBuilder = null;
              if (retryConfig_ != null) {
                subBuilder = retryConfig_.toBuilder();
              }
              retryConfig_ =
                  input.readMessage(
                      com.google.cloud.tasks.v2beta3.RetryConfig.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(retryConfig_);
                retryConfig_ = subBuilder.buildPartial();
              }

              break;
            }
          case 48:
            {
              int rawValue = input.readEnum();

              state_ = rawValue;
              break;
            }
          case 58:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (purgeTime_ != null) {
                subBuilder = purgeTime_.toBuilder();
              }
              purgeTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(purgeTime_);
                purgeTime_ = subBuilder.buildPartial();
              }

              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.tasks.v2beta3.QueueProto
        .internal_static_google_cloud_tasks_v2beta3_Queue_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.tasks.v2beta3.QueueProto
        .internal_static_google_cloud_tasks_v2beta3_Queue_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.tasks.v2beta3.Queue.class,
            com.google.cloud.tasks.v2beta3.Queue.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * State of the queue.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.tasks.v2beta3.Queue.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Unspecified state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The queue is running. Tasks can be dispatched.
     * If the queue was created using Cloud Tasks and the queue has
     * had no activity (method calls or task dispatches) for 30 days,
     * the queue may take a few minutes to re-activate. Some method
     * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
     * tasks may not be dispatched for a few minutes until the queue
     * has been re-activated.
     * </pre>
     *
     * <code>RUNNING = 1;</code>
     */
    RUNNING(1),
    /**
     *
     *
     * <pre>
     * Tasks are paused by the user. If the queue is paused then Cloud
     * Tasks will stop delivering tasks from it, but more tasks can
     * still be added to it by the user.
     * </pre>
     *
     * <code>PAUSED = 2;</code>
     */
    PAUSED(2),
    /**
     *
     *
     * <pre>
     * The queue is disabled.
     * A queue becomes `DISABLED` when
     * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
     * or
     * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
     * is uploaded which does not contain the queue. You cannot directly disable
     * a queue.
     * When a queue is disabled, tasks can still be added to a queue
     * but the tasks are not dispatched.
     * To permanently delete this queue and all of its tasks, call
     * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
     * </pre>
     *
     * <code>DISABLED = 3;</code>
     */
    DISABLED(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Unspecified state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The queue is running. Tasks can be dispatched.
     * If the queue was created using Cloud Tasks and the queue has
     * had no activity (method calls or task dispatches) for 30 days,
     * the queue may take a few minutes to re-activate. Some method
     * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
     * tasks may not be dispatched for a few minutes until the queue
     * has been re-activated.
     * </pre>
     *
     * <code>RUNNING = 1;</code>
     */
    public static final int RUNNING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Tasks are paused by the user. If the queue is paused then Cloud
     * Tasks will stop delivering tasks from it, but more tasks can
     * still be added to it by the user.
     * </pre>
     *
     * <code>PAUSED = 2;</code>
     */
    public static final int PAUSED_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The queue is disabled.
     * A queue becomes `DISABLED` when
     * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref)
     * or
     * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref)
     * is uploaded which does not contain the queue. You cannot directly disable
     * a queue.
     * When a queue is disabled, tasks can still be added to a queue
     * but the tasks are not dispatched.
     * To permanently delete this queue and all of its tasks, call
     * [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
     * </pre>
     *
     * <code>DISABLED = 3;</code>
     */
    public static final int DISABLED_VALUE = 3;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /** @deprecated Use {@link #forNumber(int)} instead. */
    @java.lang.Deprecated
    public static State valueOf(int value) {
      return forNumber(value);
    }

    public static State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return RUNNING;
        case 2:
          return PAUSED;
        case 3:
          return DISABLED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<State>() {
          public State findValueByNumber(int number) {
            return State.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.tasks.v2beta3.Queue.getDescriptor().getEnumTypes().get(0);
    }

    private static final State[] VALUES = values();

    public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta3.Queue.State)
  }

  private int queueTypeCase_ = 0;
  private java.lang.Object queueType_;

  public enum QueueTypeCase implements com.google.protobuf.Internal.EnumLite {
    APP_ENGINE_HTTP_QUEUE(3),
    QUEUETYPE_NOT_SET(0);
    private final int value;

    private QueueTypeCase(int value) {
      this.value = value;
    }
    /** @deprecated Use {@link #forNumber(int)} instead. */
    @java.lang.Deprecated
    public static QueueTypeCase valueOf(int value) {
      return forNumber(value);
    }

    public static QueueTypeCase forNumber(int value) {
      switch (value) {
        case 3:
          return APP_ENGINE_HTTP_QUEUE;
        case 0:
          return QUEUETYPE_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public QueueTypeCase getQueueTypeCase() {
    return QueueTypeCase.forNumber(queueTypeCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   * <pre>
   * Caller-specified and required in
   * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
   * which it becomes output only.
   * The queue name.
   * The queue name must have the following format:
   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
   *    hyphens (-), colons (:), or periods (.).
   *    For more information, see
   *    [Identifying
   *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
   * * `LOCATION_ID` is the canonical ID for the queue's location.
   *    The list of available locations can be obtained by calling
   *    [ListLocations][google.cloud.location.Locations.ListLocations].
   *    For more information, see https://cloud.google.com/about/locations/.
   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
   *   hyphens (-). The maximum length is 100 characters.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Caller-specified and required in
   * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
   * which it becomes output only.
   * The queue name.
   * The queue name must have the following format:
   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
   *    hyphens (-), colons (:), or periods (.).
   *    For more information, see
   *    [Identifying
   *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
   * * `LOCATION_ID` is the canonical ID for the queue's location.
   *    The list of available locations can be obtained by calling
   *    [ListLocations][google.cloud.location.Locations.ListLocations].
   *    For more information, see https://cloud.google.com/about/locations/.
   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
   *   hyphens (-). The maximum length is 100 characters.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int APP_ENGINE_HTTP_QUEUE_FIELD_NUMBER = 3;
  /**
   *
   *
   * <pre>
   * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
   * settings apply only to [App Engine
   * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
   * this proto.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
   */
  public boolean hasAppEngineHttpQueue() {
    return queueTypeCase_ == 3;
  }
  /**
   *
   *
   * <pre>
   * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
   * settings apply only to [App Engine
   * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
   * this proto.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
   */
  public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue getAppEngineHttpQueue() {
    if (queueTypeCase_ == 3) {
      return (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_;
    }
    return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
   * settings apply only to [App Engine
   * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
   * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
   * this proto.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
   */
  public com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder
      getAppEngineHttpQueueOrBuilder() {
    if (queueTypeCase_ == 3) {
      return (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_;
    }
    return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
  }

  public static final int RATE_LIMITS_FIELD_NUMBER = 4;
  private com.google.cloud.tasks.v2beta3.RateLimits rateLimits_;
  /**
   *
   *
   * <pre>
   * Rate limits for task dispatches.
   * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
   * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
   * because they both control task attempts. However they control task attempts
   * in different ways:
   * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
   * total rate of
   *   dispatches from a queue (i.e. all traffic dispatched from the
   *   queue, regardless of whether the dispatch is from a first
   *   attempt or a retry).
   * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   * what happens to
   *   particular a task after its first attempt fails. That is,
   *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   *   task retries (the second attempt, third attempt, etc).
   * The queue's actual dispatch rate is the result of:
   * * Number of tasks in the queue
   * * User-specified throttling: [rate limits][Queue.RateLimits]
   *   [retry configuration][Queue.RetryConfig], and the
   *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
   * * System throttling due to `429` (Too Many Requests) or `503` (Service
   *   Unavailable) responses from the worker, high error rates, or to smooth
   *   sudden large traffic spikes.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
   */
  public boolean hasRateLimits() {
    return rateLimits_ != null;
  }
  /**
   *
   *
   * <pre>
   * Rate limits for task dispatches.
   * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
   * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
   * because they both control task attempts. However they control task attempts
   * in different ways:
   * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
   * total rate of
   *   dispatches from a queue (i.e. all traffic dispatched from the
   *   queue, regardless of whether the dispatch is from a first
   *   attempt or a retry).
   * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   * what happens to
   *   particular a task after its first attempt fails. That is,
   *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   *   task retries (the second attempt, third attempt, etc).
   * The queue's actual dispatch rate is the result of:
   * * Number of tasks in the queue
   * * User-specified throttling: [rate limits][Queue.RateLimits]
   *   [retry configuration][Queue.RetryConfig], and the
   *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
   * * System throttling due to `429` (Too Many Requests) or `503` (Service
   *   Unavailable) responses from the worker, high error rates, or to smooth
   *   sudden large traffic spikes.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
   */
  public com.google.cloud.tasks.v2beta3.RateLimits getRateLimits() {
    return rateLimits_ == null
        ? com.google.cloud.tasks.v2beta3.RateLimits.getDefaultInstance()
        : rateLimits_;
  }
  /**
   *
   *
   * <pre>
   * Rate limits for task dispatches.
   * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
   * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
   * because they both control task attempts. However they control task attempts
   * in different ways:
   * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
   * total rate of
   *   dispatches from a queue (i.e. all traffic dispatched from the
   *   queue, regardless of whether the dispatch is from a first
   *   attempt or a retry).
   * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   * what happens to
   *   particular a task after its first attempt fails. That is,
   *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
   *   task retries (the second attempt, third attempt, etc).
   * The queue's actual dispatch rate is the result of:
   * * Number of tasks in the queue
   * * User-specified throttling: [rate limits][Queue.RateLimits]
   *   [retry configuration][Queue.RetryConfig], and the
   *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
   * * System throttling due to `429` (Too Many Requests) or `503` (Service
   *   Unavailable) responses from the worker, high error rates, or to smooth
   *   sudden large traffic spikes.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
   */
  public com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder getRateLimitsOrBuilder() {
    return getRateLimits();
  }

  public static final int RETRY_CONFIG_FIELD_NUMBER = 5;
  private com.google.cloud.tasks.v2beta3.RetryConfig retryConfig_;
  /**
   *
   *
   * <pre>
   * Settings that determine the retry behavior.
   * * For tasks created using Cloud Tasks: the queue-level retry settings
   *   apply to all tasks in the queue that were created using Cloud Tasks.
   *   Retry settings cannot be set on individual tasks.
   * * For tasks created using the App Engine SDK: the queue-level retry
   *   settings apply to all tasks in the queue which do not have retry settings
   *   explicitly set on the task and were created by the App Engine SDK. See
   *   [App Engine
   *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
   */
  public boolean hasRetryConfig() {
    return retryConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings that determine the retry behavior.
   * * For tasks created using Cloud Tasks: the queue-level retry settings
   *   apply to all tasks in the queue that were created using Cloud Tasks.
   *   Retry settings cannot be set on individual tasks.
   * * For tasks created using the App Engine SDK: the queue-level retry
   *   settings apply to all tasks in the queue which do not have retry settings
   *   explicitly set on the task and were created by the App Engine SDK. See
   *   [App Engine
   *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
   */
  public com.google.cloud.tasks.v2beta3.RetryConfig getRetryConfig() {
    return retryConfig_ == null
        ? com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance()
        : retryConfig_;
  }
  /**
   *
   *
   * <pre>
   * Settings that determine the retry behavior.
   * * For tasks created using Cloud Tasks: the queue-level retry settings
   *   apply to all tasks in the queue that were created using Cloud Tasks.
   *   Retry settings cannot be set on individual tasks.
   * * For tasks created using the App Engine SDK: the queue-level retry
   *   settings apply to all tasks in the queue which do not have retry settings
   *   explicitly set on the task and were created by the App Engine SDK. See
   *   [App Engine
   *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
   */
  public com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder getRetryConfigOrBuilder() {
    return getRetryConfig();
  }

  public static final int STATE_FIELD_NUMBER = 6;
  private int state_;
  /**
   *
   *
   * <pre>
   * Output only. The state of the queue.
   * `state` can only be changed by called
   * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
   * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
   * uploading
   * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
   * used to change `state`.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
   */
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The state of the queue.
   * `state` can only be changed by called
   * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
   * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
   * uploading
   * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
   * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
   * used to change `state`.
   * </pre>
   *
   * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
   */
  public com.google.cloud.tasks.v2beta3.Queue.State getState() {
    @SuppressWarnings("deprecation")
    com.google.cloud.tasks.v2beta3.Queue.State result =
        com.google.cloud.tasks.v2beta3.Queue.State.valueOf(state_);
    return result == null ? com.google.cloud.tasks.v2beta3.Queue.State.UNRECOGNIZED : result;
  }

  public static final int PURGE_TIME_FIELD_NUMBER = 7;
  private com.google.protobuf.Timestamp purgeTime_;
  /**
   *
   *
   * <pre>
   * Output only. The last time this queue was purged.
   * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
   * before this time were purged.
   * A queue can be purged using
   * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
   * Engine Task Queue SDK, or the Cloud
   * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
   * Purge time will be truncated to the nearest microsecond. Purge
   * time will be unset if the queue has never been purged.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp purge_time = 7;</code>
   */
  public boolean hasPurgeTime() {
    return purgeTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. The last time this queue was purged.
   * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
   * before this time were purged.
   * A queue can be purged using
   * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
   * Engine Task Queue SDK, or the Cloud
   * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
   * Purge time will be truncated to the nearest microsecond. Purge
   * time will be unset if the queue has never been purged.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp purge_time = 7;</code>
   */
  public com.google.protobuf.Timestamp getPurgeTime() {
    return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The last time this queue was purged.
   * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
   * before this time were purged.
   * A queue can be purged using
   * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
   * Engine Task Queue SDK, or the Cloud
   * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
   * Purge time will be truncated to the nearest microsecond. Purge
   * time will be unset if the queue has never been purged.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp purge_time = 7;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() {
    return getPurgeTime();
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (queueTypeCase_ == 3) {
      output.writeMessage(3, (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_);
    }
    if (rateLimits_ != null) {
      output.writeMessage(4, getRateLimits());
    }
    if (retryConfig_ != null) {
      output.writeMessage(5, getRetryConfig());
    }
    if (state_ != com.google.cloud.tasks.v2beta3.Queue.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(6, state_);
    }
    if (purgeTime_ != null) {
      output.writeMessage(7, getPurgeTime());
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (queueTypeCase_ == 3) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_);
    }
    if (rateLimits_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRateLimits());
    }
    if (retryConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRetryConfig());
    }
    if (state_ != com.google.cloud.tasks.v2beta3.Queue.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
    }
    if (purgeTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPurgeTime());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.tasks.v2beta3.Queue)) {
      return super.equals(obj);
    }
    com.google.cloud.tasks.v2beta3.Queue other = (com.google.cloud.tasks.v2beta3.Queue) obj;

    if (!getName().equals(other.getName())) return false;
    if (hasRateLimits() != other.hasRateLimits()) return false;
    if (hasRateLimits()) {
      if (!getRateLimits().equals(other.getRateLimits())) return false;
    }
    if (hasRetryConfig() != other.hasRetryConfig()) return false;
    if (hasRetryConfig()) {
      if (!getRetryConfig().equals(other.getRetryConfig())) return false;
    }
    if (state_ != other.state_) return false;
    if (hasPurgeTime() != other.hasPurgeTime()) return false;
    if (hasPurgeTime()) {
      if (!getPurgeTime().equals(other.getPurgeTime())) return false;
    }
    if (!getQueueTypeCase().equals(other.getQueueTypeCase())) return false;
    switch (queueTypeCase_) {
      case 3:
        if (!getAppEngineHttpQueue().equals(other.getAppEngineHttpQueue())) return false;
        break;
      case 0:
      default:
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasRateLimits()) {
      hash = (37 * hash) + RATE_LIMITS_FIELD_NUMBER;
      hash = (53 * hash) + getRateLimits().hashCode();
    }
    if (hasRetryConfig()) {
      hash = (37 * hash) + RETRY_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getRetryConfig().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    if (hasPurgeTime()) {
      hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getPurgeTime().hashCode();
    }
    switch (queueTypeCase_) {
      case 3:
        hash = (37 * hash) + APP_ENGINE_HTTP_QUEUE_FIELD_NUMBER;
        hash = (53 * hash) + getAppEngineHttpQueue().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.tasks.v2beta3.Queue parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.tasks.v2beta3.Queue prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * A queue is a container of related tasks. Queues are configured to manage
   * how those tasks are dispatched. Configurable properties include rate limits,
   * retry options, queue types, and others.
   * </pre>
   *
   * Protobuf type {@code google.cloud.tasks.v2beta3.Queue}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta3.Queue)
      com.google.cloud.tasks.v2beta3.QueueOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.tasks.v2beta3.QueueProto
          .internal_static_google_cloud_tasks_v2beta3_Queue_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.tasks.v2beta3.QueueProto
          .internal_static_google_cloud_tasks_v2beta3_Queue_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.tasks.v2beta3.Queue.class,
              com.google.cloud.tasks.v2beta3.Queue.Builder.class);
    }

    // Construct using com.google.cloud.tasks.v2beta3.Queue.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      if (rateLimitsBuilder_ == null) {
        rateLimits_ = null;
      } else {
        rateLimits_ = null;
        rateLimitsBuilder_ = null;
      }
      if (retryConfigBuilder_ == null) {
        retryConfig_ = null;
      } else {
        retryConfig_ = null;
        retryConfigBuilder_ = null;
      }
      state_ = 0;

      if (purgeTimeBuilder_ == null) {
        purgeTime_ = null;
      } else {
        purgeTime_ = null;
        purgeTimeBuilder_ = null;
      }
      queueTypeCase_ = 0;
      queueType_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.tasks.v2beta3.QueueProto
          .internal_static_google_cloud_tasks_v2beta3_Queue_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.tasks.v2beta3.Queue getDefaultInstanceForType() {
      return com.google.cloud.tasks.v2beta3.Queue.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.tasks.v2beta3.Queue build() {
      com.google.cloud.tasks.v2beta3.Queue result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.tasks.v2beta3.Queue buildPartial() {
      com.google.cloud.tasks.v2beta3.Queue result = new com.google.cloud.tasks.v2beta3.Queue(this);
      result.name_ = name_;
      if (queueTypeCase_ == 3) {
        if (appEngineHttpQueueBuilder_ == null) {
          result.queueType_ = queueType_;
        } else {
          result.queueType_ = appEngineHttpQueueBuilder_.build();
        }
      }
      if (rateLimitsBuilder_ == null) {
        result.rateLimits_ = rateLimits_;
      } else {
        result.rateLimits_ = rateLimitsBuilder_.build();
      }
      if (retryConfigBuilder_ == null) {
        result.retryConfig_ = retryConfig_;
      } else {
        result.retryConfig_ = retryConfigBuilder_.build();
      }
      result.state_ = state_;
      if (purgeTimeBuilder_ == null) {
        result.purgeTime_ = purgeTime_;
      } else {
        result.purgeTime_ = purgeTimeBuilder_.build();
      }
      result.queueTypeCase_ = queueTypeCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.tasks.v2beta3.Queue) {
        return mergeFrom((com.google.cloud.tasks.v2beta3.Queue) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.tasks.v2beta3.Queue other) {
      if (other == com.google.cloud.tasks.v2beta3.Queue.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasRateLimits()) {
        mergeRateLimits(other.getRateLimits());
      }
      if (other.hasRetryConfig()) {
        mergeRetryConfig(other.getRetryConfig());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.hasPurgeTime()) {
        mergePurgeTime(other.getPurgeTime());
      }
      switch (other.getQueueTypeCase()) {
        case APP_ENGINE_HTTP_QUEUE:
          {
            mergeAppEngineHttpQueue(other.getAppEngineHttpQueue());
            break;
          }
        case QUEUETYPE_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.tasks.v2beta3.Queue parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.tasks.v2beta3.Queue) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int queueTypeCase_ = 0;
    private java.lang.Object queueType_;

    public QueueTypeCase getQueueTypeCase() {
      return QueueTypeCase.forNumber(queueTypeCase_);
    }

    public Builder clearQueueType() {
      queueTypeCase_ = 0;
      queueType_ = null;
      onChanged();
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Caller-specified and required in
     * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
     * which it becomes output only.
     * The queue name.
     * The queue name must have the following format:
     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
     *    hyphens (-), colons (:), or periods (.).
     *    For more information, see
     *    [Identifying
     *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
     * * `LOCATION_ID` is the canonical ID for the queue's location.
     *    The list of available locations can be obtained by calling
     *    [ListLocations][google.cloud.location.Locations.ListLocations].
     *    For more information, see https://cloud.google.com/about/locations/.
     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
     *   hyphens (-). The maximum length is 100 characters.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Caller-specified and required in
     * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
     * which it becomes output only.
     * The queue name.
     * The queue name must have the following format:
     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
     *    hyphens (-), colons (:), or periods (.).
     *    For more information, see
     *    [Identifying
     *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
     * * `LOCATION_ID` is the canonical ID for the queue's location.
     *    The list of available locations can be obtained by calling
     *    [ListLocations][google.cloud.location.Locations.ListLocations].
     *    For more information, see https://cloud.google.com/about/locations/.
     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
     *   hyphens (-). The maximum length is 100 characters.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Caller-specified and required in
     * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
     * which it becomes output only.
     * The queue name.
     * The queue name must have the following format:
     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
     *    hyphens (-), colons (:), or periods (.).
     *    For more information, see
     *    [Identifying
     *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
     * * `LOCATION_ID` is the canonical ID for the queue's location.
     *    The list of available locations can be obtained by calling
     *    [ListLocations][google.cloud.location.Locations.ListLocations].
     *    For more information, see https://cloud.google.com/about/locations/.
     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
     *   hyphens (-). The maximum length is 100 characters.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Caller-specified and required in
     * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
     * which it becomes output only.
     * The queue name.
     * The queue name must have the following format:
     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
     *    hyphens (-), colons (:), or periods (.).
     *    For more information, see
     *    [Identifying
     *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
     * * `LOCATION_ID` is the canonical ID for the queue's location.
     *    The list of available locations can be obtained by calling
     *    [ListLocations][google.cloud.location.Locations.ListLocations].
     *    For more information, see https://cloud.google.com/about/locations/.
     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
     *   hyphens (-). The maximum length is 100 characters.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Caller-specified and required in
     * [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue], after
     * which it becomes output only.
     * The queue name.
     * The queue name must have the following format:
     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
     *    hyphens (-), colons (:), or periods (.).
     *    For more information, see
     *    [Identifying
     *    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
     * * `LOCATION_ID` is the canonical ID for the queue's location.
     *    The list of available locations can be obtained by calling
     *    [ListLocations][google.cloud.location.Locations.ListLocations].
     *    For more information, see https://cloud.google.com/about/locations/.
     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
     *   hyphens (-). The maximum length is 100 characters.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      name_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueue,
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder,
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder>
        appEngineHttpQueueBuilder_;
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public boolean hasAppEngineHttpQueue() {
      return queueTypeCase_ == 3;
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue getAppEngineHttpQueue() {
      if (appEngineHttpQueueBuilder_ == null) {
        if (queueTypeCase_ == 3) {
          return (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_;
        }
        return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
      } else {
        if (queueTypeCase_ == 3) {
          return appEngineHttpQueueBuilder_.getMessage();
        }
        return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public Builder setAppEngineHttpQueue(com.google.cloud.tasks.v2beta3.AppEngineHttpQueue value) {
      if (appEngineHttpQueueBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        queueType_ = value;
        onChanged();
      } else {
        appEngineHttpQueueBuilder_.setMessage(value);
      }
      queueTypeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public Builder setAppEngineHttpQueue(
        com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder builderForValue) {
      if (appEngineHttpQueueBuilder_ == null) {
        queueType_ = builderForValue.build();
        onChanged();
      } else {
        appEngineHttpQueueBuilder_.setMessage(builderForValue.build());
      }
      queueTypeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public Builder mergeAppEngineHttpQueue(
        com.google.cloud.tasks.v2beta3.AppEngineHttpQueue value) {
      if (appEngineHttpQueueBuilder_ == null) {
        if (queueTypeCase_ == 3
            && queueType_
                != com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance()) {
          queueType_ =
              com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.newBuilder(
                      (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          queueType_ = value;
        }
        onChanged();
      } else {
        if (queueTypeCase_ == 3) {
          appEngineHttpQueueBuilder_.mergeFrom(value);
        }
        appEngineHttpQueueBuilder_.setMessage(value);
      }
      queueTypeCase_ = 3;
      return this;
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public Builder clearAppEngineHttpQueue() {
      if (appEngineHttpQueueBuilder_ == null) {
        if (queueTypeCase_ == 3) {
          queueTypeCase_ = 0;
          queueType_ = null;
          onChanged();
        }
      } else {
        if (queueTypeCase_ == 3) {
          queueTypeCase_ = 0;
          queueType_ = null;
        }
        appEngineHttpQueueBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder
        getAppEngineHttpQueueBuilder() {
      return getAppEngineHttpQueueFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    public com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder
        getAppEngineHttpQueueOrBuilder() {
      if ((queueTypeCase_ == 3) && (appEngineHttpQueueBuilder_ != null)) {
        return appEngineHttpQueueBuilder_.getMessageOrBuilder();
      } else {
        if (queueTypeCase_ == 3) {
          return (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_;
        }
        return com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue]
     * settings apply only to [App Engine
     * tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue.
     * [Http tasks][google.cloud.tasks.v2beta3.HttpRequest] are not affected by
     * this proto.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.AppEngineHttpQueue app_engine_http_queue = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueue,
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder,
            com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder>
        getAppEngineHttpQueueFieldBuilder() {
      if (appEngineHttpQueueBuilder_ == null) {
        if (!(queueTypeCase_ == 3)) {
          queueType_ = com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.getDefaultInstance();
        }
        appEngineHttpQueueBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.tasks.v2beta3.AppEngineHttpQueue,
                com.google.cloud.tasks.v2beta3.AppEngineHttpQueue.Builder,
                com.google.cloud.tasks.v2beta3.AppEngineHttpQueueOrBuilder>(
                (com.google.cloud.tasks.v2beta3.AppEngineHttpQueue) queueType_,
                getParentForChildren(),
                isClean());
        queueType_ = null;
      }
      queueTypeCase_ = 3;
      onChanged();
      ;
      return appEngineHttpQueueBuilder_;
    }

    private com.google.cloud.tasks.v2beta3.RateLimits rateLimits_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.RateLimits,
            com.google.cloud.tasks.v2beta3.RateLimits.Builder,
            com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder>
        rateLimitsBuilder_;
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public boolean hasRateLimits() {
      return rateLimitsBuilder_ != null || rateLimits_ != null;
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public com.google.cloud.tasks.v2beta3.RateLimits getRateLimits() {
      if (rateLimitsBuilder_ == null) {
        return rateLimits_ == null
            ? com.google.cloud.tasks.v2beta3.RateLimits.getDefaultInstance()
            : rateLimits_;
      } else {
        return rateLimitsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public Builder setRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) {
      if (rateLimitsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        rateLimits_ = value;
        onChanged();
      } else {
        rateLimitsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public Builder setRateLimits(
        com.google.cloud.tasks.v2beta3.RateLimits.Builder builderForValue) {
      if (rateLimitsBuilder_ == null) {
        rateLimits_ = builderForValue.build();
        onChanged();
      } else {
        rateLimitsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public Builder mergeRateLimits(com.google.cloud.tasks.v2beta3.RateLimits value) {
      if (rateLimitsBuilder_ == null) {
        if (rateLimits_ != null) {
          rateLimits_ =
              com.google.cloud.tasks.v2beta3.RateLimits.newBuilder(rateLimits_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          rateLimits_ = value;
        }
        onChanged();
      } else {
        rateLimitsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public Builder clearRateLimits() {
      if (rateLimitsBuilder_ == null) {
        rateLimits_ = null;
        onChanged();
      } else {
        rateLimits_ = null;
        rateLimitsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public com.google.cloud.tasks.v2beta3.RateLimits.Builder getRateLimitsBuilder() {

      onChanged();
      return getRateLimitsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    public com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder getRateLimitsOrBuilder() {
      if (rateLimitsBuilder_ != null) {
        return rateLimitsBuilder_.getMessageOrBuilder();
      } else {
        return rateLimits_ == null
            ? com.google.cloud.tasks.v2beta3.RateLimits.getDefaultInstance()
            : rateLimits_;
      }
    }
    /**
     *
     *
     * <pre>
     * Rate limits for task dispatches.
     * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
     * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related
     * because they both control task attempts. However they control task attempts
     * in different ways:
     * * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the
     * total rate of
     *   dispatches from a queue (i.e. all traffic dispatched from the
     *   queue, regardless of whether the dispatch is from a first
     *   attempt or a retry).
     * * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     * what happens to
     *   particular a task after its first attempt fails. That is,
     *   [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls
     *   task retries (the second attempt, third attempt, etc).
     * The queue's actual dispatch rate is the result of:
     * * Number of tasks in the queue
     * * User-specified throttling: [rate limits][Queue.RateLimits]
     *   [retry configuration][Queue.RetryConfig], and the
     *   [queue's state][google.cloud.tasks.v2beta3.Queue.state].
     * * System throttling due to `429` (Too Many Requests) or `503` (Service
     *   Unavailable) responses from the worker, high error rates, or to smooth
     *   sudden large traffic spikes.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RateLimits rate_limits = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.RateLimits,
            com.google.cloud.tasks.v2beta3.RateLimits.Builder,
            com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder>
        getRateLimitsFieldBuilder() {
      if (rateLimitsBuilder_ == null) {
        rateLimitsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.tasks.v2beta3.RateLimits,
                com.google.cloud.tasks.v2beta3.RateLimits.Builder,
                com.google.cloud.tasks.v2beta3.RateLimitsOrBuilder>(
                getRateLimits(), getParentForChildren(), isClean());
        rateLimits_ = null;
      }
      return rateLimitsBuilder_;
    }

    private com.google.cloud.tasks.v2beta3.RetryConfig retryConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.RetryConfig,
            com.google.cloud.tasks.v2beta3.RetryConfig.Builder,
            com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder>
        retryConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public boolean hasRetryConfig() {
      return retryConfigBuilder_ != null || retryConfig_ != null;
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public com.google.cloud.tasks.v2beta3.RetryConfig getRetryConfig() {
      if (retryConfigBuilder_ == null) {
        return retryConfig_ == null
            ? com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance()
            : retryConfig_;
      } else {
        return retryConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public Builder setRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value) {
      if (retryConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        retryConfig_ = value;
        onChanged();
      } else {
        retryConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public Builder setRetryConfig(
        com.google.cloud.tasks.v2beta3.RetryConfig.Builder builderForValue) {
      if (retryConfigBuilder_ == null) {
        retryConfig_ = builderForValue.build();
        onChanged();
      } else {
        retryConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta3.RetryConfig value) {
      if (retryConfigBuilder_ == null) {
        if (retryConfig_ != null) {
          retryConfig_ =
              com.google.cloud.tasks.v2beta3.RetryConfig.newBuilder(retryConfig_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          retryConfig_ = value;
        }
        onChanged();
      } else {
        retryConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public Builder clearRetryConfig() {
      if (retryConfigBuilder_ == null) {
        retryConfig_ = null;
        onChanged();
      } else {
        retryConfig_ = null;
        retryConfigBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public com.google.cloud.tasks.v2beta3.RetryConfig.Builder getRetryConfigBuilder() {

      onChanged();
      return getRetryConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    public com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder getRetryConfigOrBuilder() {
      if (retryConfigBuilder_ != null) {
        return retryConfigBuilder_.getMessageOrBuilder();
      } else {
        return retryConfig_ == null
            ? com.google.cloud.tasks.v2beta3.RetryConfig.getDefaultInstance()
            : retryConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings that determine the retry behavior.
     * * For tasks created using Cloud Tasks: the queue-level retry settings
     *   apply to all tasks in the queue that were created using Cloud Tasks.
     *   Retry settings cannot be set on individual tasks.
     * * For tasks created using the App Engine SDK: the queue-level retry
     *   settings apply to all tasks in the queue which do not have retry settings
     *   explicitly set on the task and were created by the App Engine SDK. See
     *   [App Engine
     *   documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.RetryConfig retry_config = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.tasks.v2beta3.RetryConfig,
            com.google.cloud.tasks.v2beta3.RetryConfig.Builder,
            com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder>
        getRetryConfigFieldBuilder() {
      if (retryConfigBuilder_ == null) {
        retryConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.tasks.v2beta3.RetryConfig,
                com.google.cloud.tasks.v2beta3.RetryConfig.Builder,
                com.google.cloud.tasks.v2beta3.RetryConfigOrBuilder>(
                getRetryConfig(), getParentForChildren(), isClean());
        retryConfig_ = null;
      }
      return retryConfigBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The state of the queue.
     * `state` can only be changed by called
     * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
     * uploading
     * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
     * used to change `state`.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
     */
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of the queue.
     * `state` can only be changed by called
     * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
     * uploading
     * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
     * used to change `state`.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
     */
    public Builder setStateValue(int value) {
      state_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of the queue.
     * `state` can only be changed by called
     * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
     * uploading
     * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
     * used to change `state`.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
     */
    public com.google.cloud.tasks.v2beta3.Queue.State getState() {
      @SuppressWarnings("deprecation")
      com.google.cloud.tasks.v2beta3.Queue.State result =
          com.google.cloud.tasks.v2beta3.Queue.State.valueOf(state_);
      return result == null ? com.google.cloud.tasks.v2beta3.Queue.State.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of the queue.
     * `state` can only be changed by called
     * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
     * uploading
     * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
     * used to change `state`.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
     */
    public Builder setState(com.google.cloud.tasks.v2beta3.Queue.State value) {
      if (value == null) {
        throw new NullPointerException();
      }

      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The state of the queue.
     * `state` can only be changed by called
     * [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
     * [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or
     * uploading
     * [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
     * [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be
     * used to change `state`.
     * </pre>
     *
     * <code>.google.cloud.tasks.v2beta3.Queue.State state = 6;</code>
     */
    public Builder clearState() {

      state_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp purgeTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        purgeTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public boolean hasPurgeTime() {
      return purgeTimeBuilder_ != null || purgeTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public com.google.protobuf.Timestamp getPurgeTime() {
      if (purgeTimeBuilder_ == null) {
        return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_;
      } else {
        return purgeTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public Builder setPurgeTime(com.google.protobuf.Timestamp value) {
      if (purgeTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        purgeTime_ = value;
        onChanged();
      } else {
        purgeTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public Builder setPurgeTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (purgeTimeBuilder_ == null) {
        purgeTime_ = builderForValue.build();
        onChanged();
      } else {
        purgeTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public Builder mergePurgeTime(com.google.protobuf.Timestamp value) {
      if (purgeTimeBuilder_ == null) {
        if (purgeTime_ != null) {
          purgeTime_ =
              com.google.protobuf.Timestamp.newBuilder(purgeTime_).mergeFrom(value).buildPartial();
        } else {
          purgeTime_ = value;
        }
        onChanged();
      } else {
        purgeTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public Builder clearPurgeTime() {
      if (purgeTimeBuilder_ == null) {
        purgeTime_ = null;
        onChanged();
      } else {
        purgeTime_ = null;
        purgeTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() {

      onChanged();
      return getPurgeTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() {
      if (purgeTimeBuilder_ != null) {
        return purgeTimeBuilder_.getMessageOrBuilder();
      } else {
        return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The last time this queue was purged.
     * All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time]
     * before this time were purged.
     * A queue can be purged using
     * [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the [App
     * Engine Task Queue SDK, or the Cloud
     * Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
     * Purge time will be truncated to the nearest microsecond. Purge
     * time will be unset if the queue has never been purged.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp purge_time = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getPurgeTimeFieldBuilder() {
      if (purgeTimeBuilder_ == null) {
        purgeTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getPurgeTime(), getParentForChildren(), isClean());
        purgeTime_ = null;
      }
      return purgeTimeBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta3.Queue)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta3.Queue)
  private static final com.google.cloud.tasks.v2beta3.Queue DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta3.Queue();
  }

  public static com.google.cloud.tasks.v2beta3.Queue getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Queue> PARSER =
      new com.google.protobuf.AbstractParser<Queue>() {
        @java.lang.Override
        public Queue parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new Queue(input, extensionRegistry);
        }
      };

  public static com.google.protobuf.Parser<Queue> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Queue> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.tasks.v2beta3.Queue getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
