// 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>
 * The digest function used for converting values into keys for CAS and Action
 * Cache.
 * </pre>
 *
 * Protobuf enum {@code build.bazel.remote.execution.v2.DigestFunction}
 */
public enum DigestFunction
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * <code>UNKNOWN = 0;</code>
   */
  UNKNOWN(0),
  /**
   * <code>SHA256 = 1;</code>
   */
  SHA256(1),
  /**
   * <code>SHA1 = 2;</code>
   */
  SHA1(2),
  /**
   * <code>MD5 = 3;</code>
   */
  MD5(3),
  UNRECOGNIZED(-1),
  ;

  /**
   * <code>UNKNOWN = 0;</code>
   */
  public static final int UNKNOWN_VALUE = 0;
  /**
   * <code>SHA256 = 1;</code>
   */
  public static final int SHA256_VALUE = 1;
  /**
   * <code>SHA1 = 2;</code>
   */
  public static final int SHA1_VALUE = 2;
  /**
   * <code>MD5 = 3;</code>
   */
  public static final int MD5_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 DigestFunction valueOf(int value) {
    return forNumber(value);
  }

  public static DigestFunction forNumber(int value) {
    switch (value) {
      case 0: return UNKNOWN;
      case 1: return SHA256;
      case 2: return SHA1;
      case 3: return MD5;
      default: return null;
    }
  }

  public static com.google.protobuf.Internal.EnumLiteMap<DigestFunction>
      internalGetValueMap() {
    return internalValueMap;
  }
  private static final com.google.protobuf.Internal.EnumLiteMap<
      DigestFunction> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<DigestFunction>() {
          public DigestFunction findValueByNumber(int number) {
            return DigestFunction.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.RemoteExecutionProto.getDescriptor().getEnumTypes().get(0);
  }

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

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

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

