PublicKeyAlgorithm.java

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: fulcio.proto
// Protobuf Java Version: 4.30.2

package dev.sigstore.fulcio.v2;

/**
 * Protobuf enum {@code dev.sigstore.fulcio.v2.PublicKeyAlgorithm}
 */
@javax.annotation.Generated(value="protoc", comments="annotations:PublicKeyAlgorithm.java.pb.meta")
public enum PublicKeyAlgorithm
    implements com.google.protobuf.ProtocolMessageEnum {
  /**
   * <code>PUBLIC_KEY_ALGORITHM_UNSPECIFIED = 0;</code>
   */
  PUBLIC_KEY_ALGORITHM_UNSPECIFIED(0),
  /**
   * <code>RSA_PSS = 1;</code>
   */
  RSA_PSS(1),
  /**
   * <code>ECDSA = 2;</code>
   */
  ECDSA(2),
  /**
   * <code>ED25519 = 3;</code>
   */
  ED25519(3),
  UNRECOGNIZED(-1),
  ;

  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 30,
      /* patch= */ 2,
      /* suffix= */ "",
      PublicKeyAlgorithm.class.getName());
  }
  /**
   * <code>PUBLIC_KEY_ALGORITHM_UNSPECIFIED = 0;</code>
   */
  public static final int PUBLIC_KEY_ALGORITHM_UNSPECIFIED_VALUE = 0;
  /**
   * <code>RSA_PSS = 1;</code>
   */
  public static final int RSA_PSS_VALUE = 1;
  /**
   * <code>ECDSA = 2;</code>
   */
  public static final int ECDSA_VALUE = 2;
  /**
   * <code>ED25519 = 3;</code>
   */
  public static final int ED25519_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;
  }

  /**
   * @param value The numeric wire value of the corresponding enum entry.
   * @return The enum associated with the given numeric wire value.
   * @deprecated Use {@link #forNumber(int)} instead.
   */
  @java.lang.Deprecated
  public static PublicKeyAlgorithm valueOf(int value) {
    return forNumber(value);
  }

  /**
   * @param value The numeric wire value of the corresponding enum entry.
   * @return The enum associated with the given numeric wire value.
   */
  public static PublicKeyAlgorithm forNumber(int value) {
    switch (value) {
      case 0: return PUBLIC_KEY_ALGORITHM_UNSPECIFIED;
      case 1: return RSA_PSS;
      case 2: return ECDSA;
      case 3: return ED25519;
      default: return null;
    }
  }

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

  public final com.google.protobuf.Descriptors.EnumValueDescriptor
      getValueDescriptor() {
    if (this == UNRECOGNIZED) {
      throw new java.lang.IllegalStateException(
          "Can't get the descriptor of an unrecognized enum value.");
    }
    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 dev.sigstore.fulcio.v2.FulcioProto.getDescriptor().getEnumTypes().get(0);
  }

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

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

  // @@protoc_insertion_point(enum_scope:dev.sigstore.fulcio.v2.PublicKeyAlgorithm)
}