// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: build/bazel/remote/execution/v2/remote_execution.proto

package build.bazel.remote.execution.v2;

/**
 * <pre>
 * Capabilities of the remote cache system.
 * </pre>
 *
 * Protobuf type {@code build.bazel.remote.execution.v2.CacheCapabilities}
 */
public  final class CacheCapabilities extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:build.bazel.remote.execution.v2.CacheCapabilities)
    CacheCapabilitiesOrBuilder {
private static final long serialVersionUID = 0L;
  // Use CacheCapabilities.newBuilder() to construct.
  private CacheCapabilities(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private CacheCapabilities() {
    digestFunction_ = java.util.Collections.emptyList();
    maxBatchTotalSizeBytes_ = 0L;
    symlinkAbsolutePathStrategy_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CacheCapabilities(
      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 8: {
            int rawValue = input.readEnum();
            if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
              digestFunction_ = new java.util.ArrayList<java.lang.Integer>();
              mutable_bitField0_ |= 0x00000001;
            }
            digestFunction_.add(rawValue);
            break;
          }
          case 10: {
            int length = input.readRawVarint32();
            int oldLimit = input.pushLimit(length);
            while(input.getBytesUntilLimit() > 0) {
              int rawValue = input.readEnum();
              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
                digestFunction_ = new java.util.ArrayList<java.lang.Integer>();
                mutable_bitField0_ |= 0x00000001;
              }
              digestFunction_.add(rawValue);
            }
            input.popLimit(oldLimit);
            break;
          }
          case 18: {
            build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder subBuilder = null;
            if (actionCacheUpdateCapabilities_ != null) {
              subBuilder = actionCacheUpdateCapabilities_.toBuilder();
            }
            actionCacheUpdateCapabilities_ = input.readMessage(build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(actionCacheUpdateCapabilities_);
              actionCacheUpdateCapabilities_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            build.bazel.remote.execution.v2.PriorityCapabilities.Builder subBuilder = null;
            if (cachePriorityCapabilities_ != null) {
              subBuilder = cachePriorityCapabilities_.toBuilder();
            }
            cachePriorityCapabilities_ = input.readMessage(build.bazel.remote.execution.v2.PriorityCapabilities.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(cachePriorityCapabilities_);
              cachePriorityCapabilities_ = subBuilder.buildPartial();
            }

            break;
          }
          case 32: {

            maxBatchTotalSizeBytes_ = input.readInt64();
            break;
          }
          case 40: {
            int rawValue = input.readEnum();

            symlinkAbsolutePathStrategy_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                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 {
      if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
        digestFunction_ = java.util.Collections.unmodifiableList(digestFunction_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_CacheCapabilities_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_CacheCapabilities_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            build.bazel.remote.execution.v2.CacheCapabilities.class, build.bazel.remote.execution.v2.CacheCapabilities.Builder.class);
  }

  /**
   * <pre>
   * Describes how the server treats absolute symlink targets.
   * </pre>
   *
   * Protobuf enum {@code build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy}
   */
  public enum SymlinkAbsolutePathStrategy
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>UNKNOWN = 0;</code>
     */
    UNKNOWN(0),
    /**
     * <pre>
     * Server will return an INVALID_ARGUMENT on input symlinks with absolute targets.
     * If an action tries to create an output symlink with an absolute target, a
     * FAILED_PRECONDITION will be returned.
     * </pre>
     *
     * <code>DISALLOWED = 1;</code>
     */
    DISALLOWED(1),
    /**
     * <pre>
     * Server will allow symlink targets to escape the input root tree, possibly
     * resulting in non-hermetic builds.
     * </pre>
     *
     * <code>ALLOWED = 2;</code>
     */
    ALLOWED(2),
    UNRECOGNIZED(-1),
    ;

    /**
     * <code>UNKNOWN = 0;</code>
     */
    public static final int UNKNOWN_VALUE = 0;
    /**
     * <pre>
     * Server will return an INVALID_ARGUMENT on input symlinks with absolute targets.
     * If an action tries to create an output symlink with an absolute target, a
     * FAILED_PRECONDITION will be returned.
     * </pre>
     *
     * <code>DISALLOWED = 1;</code>
     */
    public static final int DISALLOWED_VALUE = 1;
    /**
     * <pre>
     * Server will allow symlink targets to escape the input root tree, possibly
     * resulting in non-hermetic builds.
     * </pre>
     *
     * <code>ALLOWED = 2;</code>
     */
    public static final int ALLOWED_VALUE = 2;


    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 SymlinkAbsolutePathStrategy valueOf(int value) {
      return forNumber(value);
    }

    public static SymlinkAbsolutePathStrategy forNumber(int value) {
      switch (value) {
        case 0: return UNKNOWN;
        case 1: return DISALLOWED;
        case 2: return ALLOWED;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<SymlinkAbsolutePathStrategy>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        SymlinkAbsolutePathStrategy> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<SymlinkAbsolutePathStrategy>() {
            public SymlinkAbsolutePathStrategy findValueByNumber(int number) {
              return SymlinkAbsolutePathStrategy.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 build.bazel.remote.execution.v2.CacheCapabilities.getDescriptor().getEnumTypes().get(0);
    }

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

    public static SymlinkAbsolutePathStrategy 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 SymlinkAbsolutePathStrategy(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy)
  }

  private int bitField0_;
  public static final int DIGEST_FUNCTION_FIELD_NUMBER = 1;
  private java.util.List<java.lang.Integer> digestFunction_;
  private static final com.google.protobuf.Internal.ListAdapter.Converter<
      java.lang.Integer, build.bazel.remote.execution.v2.DigestFunction> digestFunction_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer, build.bazel.remote.execution.v2.DigestFunction>() {
            public build.bazel.remote.execution.v2.DigestFunction convert(java.lang.Integer from) {
              @SuppressWarnings("deprecation")
              build.bazel.remote.execution.v2.DigestFunction result = build.bazel.remote.execution.v2.DigestFunction.valueOf(from);
              return result == null ? build.bazel.remote.execution.v2.DigestFunction.UNRECOGNIZED : result;
            }
          };
  /**
   * <pre>
   * All the digest functions supported by the remote cache.
   * Remote cache may support multiple digest functions simultaneously.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
   */
  public java.util.List<build.bazel.remote.execution.v2.DigestFunction> getDigestFunctionList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, build.bazel.remote.execution.v2.DigestFunction>(digestFunction_, digestFunction_converter_);
  }
  /**
   * <pre>
   * All the digest functions supported by the remote cache.
   * Remote cache may support multiple digest functions simultaneously.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
   */
  public int getDigestFunctionCount() {
    return digestFunction_.size();
  }
  /**
   * <pre>
   * All the digest functions supported by the remote cache.
   * Remote cache may support multiple digest functions simultaneously.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
   */
  public build.bazel.remote.execution.v2.DigestFunction getDigestFunction(int index) {
    return digestFunction_converter_.convert(digestFunction_.get(index));
  }
  /**
   * <pre>
   * All the digest functions supported by the remote cache.
   * Remote cache may support multiple digest functions simultaneously.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
   */
  public java.util.List<java.lang.Integer>
  getDigestFunctionValueList() {
    return digestFunction_;
  }
  /**
   * <pre>
   * All the digest functions supported by the remote cache.
   * Remote cache may support multiple digest functions simultaneously.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
   */
  public int getDigestFunctionValue(int index) {
    return digestFunction_.get(index);
  }
  private int digestFunctionMemoizedSerializedSize;

  public static final int ACTION_CACHE_UPDATE_CAPABILITIES_FIELD_NUMBER = 2;
  private build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities actionCacheUpdateCapabilities_;
  /**
   * <pre>
   * Capabilities for updating the action cache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
   */
  public boolean hasActionCacheUpdateCapabilities() {
    return actionCacheUpdateCapabilities_ != null;
  }
  /**
   * <pre>
   * Capabilities for updating the action cache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
   */
  public build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities getActionCacheUpdateCapabilities() {
    return actionCacheUpdateCapabilities_ == null ? build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.getDefaultInstance() : actionCacheUpdateCapabilities_;
  }
  /**
   * <pre>
   * Capabilities for updating the action cache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
   */
  public build.bazel.remote.execution.v2.ActionCacheUpdateCapabilitiesOrBuilder getActionCacheUpdateCapabilitiesOrBuilder() {
    return getActionCacheUpdateCapabilities();
  }

  public static final int CACHE_PRIORITY_CAPABILITIES_FIELD_NUMBER = 3;
  private build.bazel.remote.execution.v2.PriorityCapabilities cachePriorityCapabilities_;
  /**
   * <pre>
   * Supported cache priority range for both CAS and ActionCache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
   */
  public boolean hasCachePriorityCapabilities() {
    return cachePriorityCapabilities_ != null;
  }
  /**
   * <pre>
   * Supported cache priority range for both CAS and ActionCache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
   */
  public build.bazel.remote.execution.v2.PriorityCapabilities getCachePriorityCapabilities() {
    return cachePriorityCapabilities_ == null ? build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance() : cachePriorityCapabilities_;
  }
  /**
   * <pre>
   * Supported cache priority range for both CAS and ActionCache.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
   */
  public build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder getCachePriorityCapabilitiesOrBuilder() {
    return getCachePriorityCapabilities();
  }

  public static final int MAX_BATCH_TOTAL_SIZE_BYTES_FIELD_NUMBER = 4;
  private long maxBatchTotalSizeBytes_;
  /**
   * <pre>
   * Maximum total size of blobs to be uploaded/downloaded using
   * batch methods. A value of 0 means no limit is set, although
   * in practice there will always be a message size limitation
   * of the protocol in use, e.g. GRPC.
   * </pre>
   *
   * <code>int64 max_batch_total_size_bytes = 4;</code>
   */
  public long getMaxBatchTotalSizeBytes() {
    return maxBatchTotalSizeBytes_;
  }

  public static final int SYMLINK_ABSOLUTE_PATH_STRATEGY_FIELD_NUMBER = 5;
  private int symlinkAbsolutePathStrategy_;
  /**
   * <pre>
   * Whether absolute symlink targets are supported.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
   */
  public int getSymlinkAbsolutePathStrategyValue() {
    return symlinkAbsolutePathStrategy_;
  }
  /**
   * <pre>
   * Whether absolute symlink targets are supported.
   * </pre>
   *
   * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
   */
  public build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy getSymlinkAbsolutePathStrategy() {
    @SuppressWarnings("deprecation")
    build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy result = build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.valueOf(symlinkAbsolutePathStrategy_);
    return result == null ? build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.UNRECOGNIZED : result;
  }

  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 {
    getSerializedSize();
    if (getDigestFunctionList().size() > 0) {
      output.writeUInt32NoTag(10);
      output.writeUInt32NoTag(digestFunctionMemoizedSerializedSize);
    }
    for (int i = 0; i < digestFunction_.size(); i++) {
      output.writeEnumNoTag(digestFunction_.get(i));
    }
    if (actionCacheUpdateCapabilities_ != null) {
      output.writeMessage(2, getActionCacheUpdateCapabilities());
    }
    if (cachePriorityCapabilities_ != null) {
      output.writeMessage(3, getCachePriorityCapabilities());
    }
    if (maxBatchTotalSizeBytes_ != 0L) {
      output.writeInt64(4, maxBatchTotalSizeBytes_);
    }
    if (symlinkAbsolutePathStrategy_ != build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.UNKNOWN.getNumber()) {
      output.writeEnum(5, symlinkAbsolutePathStrategy_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < digestFunction_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeEnumSizeNoTag(digestFunction_.get(i));
      }
      size += dataSize;
      if (!getDigestFunctionList().isEmpty()) {  size += 1;
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32SizeNoTag(dataSize);
      }digestFunctionMemoizedSerializedSize = dataSize;
    }
    if (actionCacheUpdateCapabilities_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getActionCacheUpdateCapabilities());
    }
    if (cachePriorityCapabilities_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getCachePriorityCapabilities());
    }
    if (maxBatchTotalSizeBytes_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(4, maxBatchTotalSizeBytes_);
    }
    if (symlinkAbsolutePathStrategy_ != build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(5, symlinkAbsolutePathStrategy_);
    }
    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 build.bazel.remote.execution.v2.CacheCapabilities)) {
      return super.equals(obj);
    }
    build.bazel.remote.execution.v2.CacheCapabilities other = (build.bazel.remote.execution.v2.CacheCapabilities) obj;

    boolean result = true;
    result = result && digestFunction_.equals(other.digestFunction_);
    result = result && (hasActionCacheUpdateCapabilities() == other.hasActionCacheUpdateCapabilities());
    if (hasActionCacheUpdateCapabilities()) {
      result = result && getActionCacheUpdateCapabilities()
          .equals(other.getActionCacheUpdateCapabilities());
    }
    result = result && (hasCachePriorityCapabilities() == other.hasCachePriorityCapabilities());
    if (hasCachePriorityCapabilities()) {
      result = result && getCachePriorityCapabilities()
          .equals(other.getCachePriorityCapabilities());
    }
    result = result && (getMaxBatchTotalSizeBytes()
        == other.getMaxBatchTotalSizeBytes());
    result = result && symlinkAbsolutePathStrategy_ == other.symlinkAbsolutePathStrategy_;
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getDigestFunctionCount() > 0) {
      hash = (37 * hash) + DIGEST_FUNCTION_FIELD_NUMBER;
      hash = (53 * hash) + digestFunction_.hashCode();
    }
    if (hasActionCacheUpdateCapabilities()) {
      hash = (37 * hash) + ACTION_CACHE_UPDATE_CAPABILITIES_FIELD_NUMBER;
      hash = (53 * hash) + getActionCacheUpdateCapabilities().hashCode();
    }
    if (hasCachePriorityCapabilities()) {
      hash = (37 * hash) + CACHE_PRIORITY_CAPABILITIES_FIELD_NUMBER;
      hash = (53 * hash) + getCachePriorityCapabilities().hashCode();
    }
    hash = (37 * hash) + MAX_BATCH_TOTAL_SIZE_BYTES_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getMaxBatchTotalSizeBytes());
    hash = (37 * hash) + SYMLINK_ABSOLUTE_PATH_STRATEGY_FIELD_NUMBER;
    hash = (53 * hash) + symlinkAbsolutePathStrategy_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities 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 build.bazel.remote.execution.v2.CacheCapabilities parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities 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 build.bazel.remote.execution.v2.CacheCapabilities parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.CacheCapabilities 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(build.bazel.remote.execution.v2.CacheCapabilities 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>
   * Capabilities of the remote cache system.
   * </pre>
   *
   * Protobuf type {@code build.bazel.remote.execution.v2.CacheCapabilities}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:build.bazel.remote.execution.v2.CacheCapabilities)
      build.bazel.remote.execution.v2.CacheCapabilitiesOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_CacheCapabilities_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_CacheCapabilities_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              build.bazel.remote.execution.v2.CacheCapabilities.class, build.bazel.remote.execution.v2.CacheCapabilities.Builder.class);
    }

    // Construct using build.bazel.remote.execution.v2.CacheCapabilities.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();
      digestFunction_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000001);
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        actionCacheUpdateCapabilities_ = null;
      } else {
        actionCacheUpdateCapabilities_ = null;
        actionCacheUpdateCapabilitiesBuilder_ = null;
      }
      if (cachePriorityCapabilitiesBuilder_ == null) {
        cachePriorityCapabilities_ = null;
      } else {
        cachePriorityCapabilities_ = null;
        cachePriorityCapabilitiesBuilder_ = null;
      }
      maxBatchTotalSizeBytes_ = 0L;

      symlinkAbsolutePathStrategy_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_CacheCapabilities_descriptor;
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.CacheCapabilities getDefaultInstanceForType() {
      return build.bazel.remote.execution.v2.CacheCapabilities.getDefaultInstance();
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.CacheCapabilities build() {
      build.bazel.remote.execution.v2.CacheCapabilities result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.CacheCapabilities buildPartial() {
      build.bazel.remote.execution.v2.CacheCapabilities result = new build.bazel.remote.execution.v2.CacheCapabilities(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        digestFunction_ = java.util.Collections.unmodifiableList(digestFunction_);
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.digestFunction_ = digestFunction_;
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        result.actionCacheUpdateCapabilities_ = actionCacheUpdateCapabilities_;
      } else {
        result.actionCacheUpdateCapabilities_ = actionCacheUpdateCapabilitiesBuilder_.build();
      }
      if (cachePriorityCapabilitiesBuilder_ == null) {
        result.cachePriorityCapabilities_ = cachePriorityCapabilities_;
      } else {
        result.cachePriorityCapabilities_ = cachePriorityCapabilitiesBuilder_.build();
      }
      result.maxBatchTotalSizeBytes_ = maxBatchTotalSizeBytes_;
      result.symlinkAbsolutePathStrategy_ = symlinkAbsolutePathStrategy_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return (Builder) super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof build.bazel.remote.execution.v2.CacheCapabilities) {
        return mergeFrom((build.bazel.remote.execution.v2.CacheCapabilities)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(build.bazel.remote.execution.v2.CacheCapabilities other) {
      if (other == build.bazel.remote.execution.v2.CacheCapabilities.getDefaultInstance()) return this;
      if (!other.digestFunction_.isEmpty()) {
        if (digestFunction_.isEmpty()) {
          digestFunction_ = other.digestFunction_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureDigestFunctionIsMutable();
          digestFunction_.addAll(other.digestFunction_);
        }
        onChanged();
      }
      if (other.hasActionCacheUpdateCapabilities()) {
        mergeActionCacheUpdateCapabilities(other.getActionCacheUpdateCapabilities());
      }
      if (other.hasCachePriorityCapabilities()) {
        mergeCachePriorityCapabilities(other.getCachePriorityCapabilities());
      }
      if (other.getMaxBatchTotalSizeBytes() != 0L) {
        setMaxBatchTotalSizeBytes(other.getMaxBatchTotalSizeBytes());
      }
      if (other.symlinkAbsolutePathStrategy_ != 0) {
        setSymlinkAbsolutePathStrategyValue(other.getSymlinkAbsolutePathStrategyValue());
      }
      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 {
      build.bazel.remote.execution.v2.CacheCapabilities parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (build.bazel.remote.execution.v2.CacheCapabilities) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.util.List<java.lang.Integer> digestFunction_ =
      java.util.Collections.emptyList();
    private void ensureDigestFunctionIsMutable() {
      if (!((bitField0_ & 0x00000001) == 0x00000001)) {
        digestFunction_ = new java.util.ArrayList<java.lang.Integer>(digestFunction_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public java.util.List<build.bazel.remote.execution.v2.DigestFunction> getDigestFunctionList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, build.bazel.remote.execution.v2.DigestFunction>(digestFunction_, digestFunction_converter_);
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public int getDigestFunctionCount() {
      return digestFunction_.size();
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public build.bazel.remote.execution.v2.DigestFunction getDigestFunction(int index) {
      return digestFunction_converter_.convert(digestFunction_.get(index));
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder setDigestFunction(
        int index, build.bazel.remote.execution.v2.DigestFunction value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDigestFunctionIsMutable();
      digestFunction_.set(index, value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder addDigestFunction(build.bazel.remote.execution.v2.DigestFunction value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDigestFunctionIsMutable();
      digestFunction_.add(value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder addAllDigestFunction(
        java.lang.Iterable<? extends build.bazel.remote.execution.v2.DigestFunction> values) {
      ensureDigestFunctionIsMutable();
      for (build.bazel.remote.execution.v2.DigestFunction value : values) {
        digestFunction_.add(value.getNumber());
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder clearDigestFunction() {
      digestFunction_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public java.util.List<java.lang.Integer>
    getDigestFunctionValueList() {
      return java.util.Collections.unmodifiableList(digestFunction_);
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public int getDigestFunctionValue(int index) {
      return digestFunction_.get(index);
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder setDigestFunctionValue(
        int index, int value) {
      ensureDigestFunctionIsMutable();
      digestFunction_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder addDigestFunctionValue(int value) {
      ensureDigestFunctionIsMutable();
      digestFunction_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * All the digest functions supported by the remote cache.
     * Remote cache may support multiple digest functions simultaneously.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.DigestFunction digest_function = 1;</code>
     */
    public Builder addAllDigestFunctionValue(
        java.lang.Iterable<java.lang.Integer> values) {
      ensureDigestFunctionIsMutable();
      for (int value : values) {
        digestFunction_.add(value);
      }
      onChanged();
      return this;
    }

    private build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities actionCacheUpdateCapabilities_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilitiesOrBuilder> actionCacheUpdateCapabilitiesBuilder_;
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public boolean hasActionCacheUpdateCapabilities() {
      return actionCacheUpdateCapabilitiesBuilder_ != null || actionCacheUpdateCapabilities_ != null;
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities getActionCacheUpdateCapabilities() {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        return actionCacheUpdateCapabilities_ == null ? build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.getDefaultInstance() : actionCacheUpdateCapabilities_;
      } else {
        return actionCacheUpdateCapabilitiesBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public Builder setActionCacheUpdateCapabilities(build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities value) {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        actionCacheUpdateCapabilities_ = value;
        onChanged();
      } else {
        actionCacheUpdateCapabilitiesBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public Builder setActionCacheUpdateCapabilities(
        build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder builderForValue) {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        actionCacheUpdateCapabilities_ = builderForValue.build();
        onChanged();
      } else {
        actionCacheUpdateCapabilitiesBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public Builder mergeActionCacheUpdateCapabilities(build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities value) {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        if (actionCacheUpdateCapabilities_ != null) {
          actionCacheUpdateCapabilities_ =
            build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.newBuilder(actionCacheUpdateCapabilities_).mergeFrom(value).buildPartial();
        } else {
          actionCacheUpdateCapabilities_ = value;
        }
        onChanged();
      } else {
        actionCacheUpdateCapabilitiesBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public Builder clearActionCacheUpdateCapabilities() {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        actionCacheUpdateCapabilities_ = null;
        onChanged();
      } else {
        actionCacheUpdateCapabilities_ = null;
        actionCacheUpdateCapabilitiesBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder getActionCacheUpdateCapabilitiesBuilder() {
      
      onChanged();
      return getActionCacheUpdateCapabilitiesFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    public build.bazel.remote.execution.v2.ActionCacheUpdateCapabilitiesOrBuilder getActionCacheUpdateCapabilitiesOrBuilder() {
      if (actionCacheUpdateCapabilitiesBuilder_ != null) {
        return actionCacheUpdateCapabilitiesBuilder_.getMessageOrBuilder();
      } else {
        return actionCacheUpdateCapabilities_ == null ?
            build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.getDefaultInstance() : actionCacheUpdateCapabilities_;
      }
    }
    /**
     * <pre>
     * Capabilities for updating the action cache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities action_cache_update_capabilities = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilitiesOrBuilder> 
        getActionCacheUpdateCapabilitiesFieldBuilder() {
      if (actionCacheUpdateCapabilitiesBuilder_ == null) {
        actionCacheUpdateCapabilitiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilities.Builder, build.bazel.remote.execution.v2.ActionCacheUpdateCapabilitiesOrBuilder>(
                getActionCacheUpdateCapabilities(),
                getParentForChildren(),
                isClean());
        actionCacheUpdateCapabilities_ = null;
      }
      return actionCacheUpdateCapabilitiesBuilder_;
    }

    private build.bazel.remote.execution.v2.PriorityCapabilities cachePriorityCapabilities_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder> cachePriorityCapabilitiesBuilder_;
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public boolean hasCachePriorityCapabilities() {
      return cachePriorityCapabilitiesBuilder_ != null || cachePriorityCapabilities_ != null;
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public build.bazel.remote.execution.v2.PriorityCapabilities getCachePriorityCapabilities() {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        return cachePriorityCapabilities_ == null ? build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance() : cachePriorityCapabilities_;
      } else {
        return cachePriorityCapabilitiesBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public Builder setCachePriorityCapabilities(build.bazel.remote.execution.v2.PriorityCapabilities value) {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        cachePriorityCapabilities_ = value;
        onChanged();
      } else {
        cachePriorityCapabilitiesBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public Builder setCachePriorityCapabilities(
        build.bazel.remote.execution.v2.PriorityCapabilities.Builder builderForValue) {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        cachePriorityCapabilities_ = builderForValue.build();
        onChanged();
      } else {
        cachePriorityCapabilitiesBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public Builder mergeCachePriorityCapabilities(build.bazel.remote.execution.v2.PriorityCapabilities value) {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        if (cachePriorityCapabilities_ != null) {
          cachePriorityCapabilities_ =
            build.bazel.remote.execution.v2.PriorityCapabilities.newBuilder(cachePriorityCapabilities_).mergeFrom(value).buildPartial();
        } else {
          cachePriorityCapabilities_ = value;
        }
        onChanged();
      } else {
        cachePriorityCapabilitiesBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public Builder clearCachePriorityCapabilities() {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        cachePriorityCapabilities_ = null;
        onChanged();
      } else {
        cachePriorityCapabilities_ = null;
        cachePriorityCapabilitiesBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public build.bazel.remote.execution.v2.PriorityCapabilities.Builder getCachePriorityCapabilitiesBuilder() {
      
      onChanged();
      return getCachePriorityCapabilitiesFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    public build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder getCachePriorityCapabilitiesOrBuilder() {
      if (cachePriorityCapabilitiesBuilder_ != null) {
        return cachePriorityCapabilitiesBuilder_.getMessageOrBuilder();
      } else {
        return cachePriorityCapabilities_ == null ?
            build.bazel.remote.execution.v2.PriorityCapabilities.getDefaultInstance() : cachePriorityCapabilities_;
      }
    }
    /**
     * <pre>
     * Supported cache priority range for both CAS and ActionCache.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.PriorityCapabilities cache_priority_capabilities = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder> 
        getCachePriorityCapabilitiesFieldBuilder() {
      if (cachePriorityCapabilitiesBuilder_ == null) {
        cachePriorityCapabilitiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            build.bazel.remote.execution.v2.PriorityCapabilities, build.bazel.remote.execution.v2.PriorityCapabilities.Builder, build.bazel.remote.execution.v2.PriorityCapabilitiesOrBuilder>(
                getCachePriorityCapabilities(),
                getParentForChildren(),
                isClean());
        cachePriorityCapabilities_ = null;
      }
      return cachePriorityCapabilitiesBuilder_;
    }

    private long maxBatchTotalSizeBytes_ ;
    /**
     * <pre>
     * Maximum total size of blobs to be uploaded/downloaded using
     * batch methods. A value of 0 means no limit is set, although
     * in practice there will always be a message size limitation
     * of the protocol in use, e.g. GRPC.
     * </pre>
     *
     * <code>int64 max_batch_total_size_bytes = 4;</code>
     */
    public long getMaxBatchTotalSizeBytes() {
      return maxBatchTotalSizeBytes_;
    }
    /**
     * <pre>
     * Maximum total size of blobs to be uploaded/downloaded using
     * batch methods. A value of 0 means no limit is set, although
     * in practice there will always be a message size limitation
     * of the protocol in use, e.g. GRPC.
     * </pre>
     *
     * <code>int64 max_batch_total_size_bytes = 4;</code>
     */
    public Builder setMaxBatchTotalSizeBytes(long value) {
      
      maxBatchTotalSizeBytes_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Maximum total size of blobs to be uploaded/downloaded using
     * batch methods. A value of 0 means no limit is set, although
     * in practice there will always be a message size limitation
     * of the protocol in use, e.g. GRPC.
     * </pre>
     *
     * <code>int64 max_batch_total_size_bytes = 4;</code>
     */
    public Builder clearMaxBatchTotalSizeBytes() {
      
      maxBatchTotalSizeBytes_ = 0L;
      onChanged();
      return this;
    }

    private int symlinkAbsolutePathStrategy_ = 0;
    /**
     * <pre>
     * Whether absolute symlink targets are supported.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
     */
    public int getSymlinkAbsolutePathStrategyValue() {
      return symlinkAbsolutePathStrategy_;
    }
    /**
     * <pre>
     * Whether absolute symlink targets are supported.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
     */
    public Builder setSymlinkAbsolutePathStrategyValue(int value) {
      symlinkAbsolutePathStrategy_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether absolute symlink targets are supported.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
     */
    public build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy getSymlinkAbsolutePathStrategy() {
      @SuppressWarnings("deprecation")
      build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy result = build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.valueOf(symlinkAbsolutePathStrategy_);
      return result == null ? build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Whether absolute symlink targets are supported.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
     */
    public Builder setSymlinkAbsolutePathStrategy(build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      symlinkAbsolutePathStrategy_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Whether absolute symlink targets are supported.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.CacheCapabilities.SymlinkAbsolutePathStrategy symlink_absolute_path_strategy = 5;</code>
     */
    public Builder clearSymlinkAbsolutePathStrategy() {
      
      symlinkAbsolutePathStrategy_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:build.bazel.remote.execution.v2.CacheCapabilities)
  }

  // @@protoc_insertion_point(class_scope:build.bazel.remote.execution.v2.CacheCapabilities)
  private static final build.bazel.remote.execution.v2.CacheCapabilities DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new build.bazel.remote.execution.v2.CacheCapabilities();
  }

  public static build.bazel.remote.execution.v2.CacheCapabilities getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public build.bazel.remote.execution.v2.CacheCapabilities getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

