// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;

import us.hebi.quickbuf.ProtoEnum;
import us.hebi.quickbuf.ProtoUtil;

public final class RogueStatusOuterClass {
  /**
   * Protobuf enum {@code RogueStatus}
   */
  public enum RogueStatus implements ProtoEnum<RogueStatus> {
    /**
     * <code>ROGUE_STATUS_NONE = 0;</code>
     */
    ROGUE_STATUS_NONE("ROGUE_STATUS_NONE", 0),

    /**
     * <code>ROGUE_STATUS_DOING = 1;</code>
     */
    ROGUE_STATUS_DOING("ROGUE_STATUS_DOING", 1),

    /**
     * <code>ROGUE_STATUS_PENDING = 2;</code>
     */
    ROGUE_STATUS_PENDING("ROGUE_STATUS_PENDING", 2),

    /**
     * <code>ROGUE_STATUS_ENDLESS = 3;</code>
     */
    ROGUE_STATUS_ENDLESS("ROGUE_STATUS_ENDLESS", 3),

    /**
     * <code>ROGUE_STATUS_FINISH = 4;</code>
     */
    ROGUE_STATUS_FINISH("ROGUE_STATUS_FINISH", 4);

    /**
     * <code>ROGUE_STATUS_NONE = 0;</code>
     */
    public static final int ROGUE_STATUS_NONE_VALUE = 0;

    /**
     * <code>ROGUE_STATUS_DOING = 1;</code>
     */
    public static final int ROGUE_STATUS_DOING_VALUE = 1;

    /**
     * <code>ROGUE_STATUS_PENDING = 2;</code>
     */
    public static final int ROGUE_STATUS_PENDING_VALUE = 2;

    /**
     * <code>ROGUE_STATUS_ENDLESS = 3;</code>
     */
    public static final int ROGUE_STATUS_ENDLESS_VALUE = 3;

    /**
     * <code>ROGUE_STATUS_FINISH = 4;</code>
     */
    public static final int ROGUE_STATUS_FINISH_VALUE = 4;

    private final String name;

    private final int number;

    private RogueStatus(String name, int number) {
      this.name = name;
      this.number = number;
    }

    /**
     * @return the string representation of enum entry
     */
    @Override
    public String getName() {
      return name;
    }

    /**
     * @return the numeric wire value of this enum entry
     */
    @Override
    public int getNumber() {
      return number;
    }

    /**
     * @return a converter that maps between this enum's numeric and text representations
     */
    public static ProtoEnum.EnumConverter<RogueStatus> converter() {
      return RogueStatusConverter.INSTANCE;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value, or null if unknown.
     */
    public static RogueStatus forNumber(int value) {
      return RogueStatusConverter.INSTANCE.forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @param other Fallback value in case the value is not known.
     * @return The enum associated with the given numeric wire value, or the fallback value if unknown.
     */
    public static RogueStatus forNumberOr(int number, RogueStatus other) {
      RogueStatus value = forNumber(number);
      return value == null ? other : value;
    }

    enum RogueStatusConverter implements ProtoEnum.EnumConverter<RogueStatus> {
      INSTANCE;

      private static final RogueStatus[] lookup = new RogueStatus[5];

      static {
        lookup[0] = ROGUE_STATUS_NONE;
        lookup[1] = ROGUE_STATUS_DOING;
        lookup[2] = ROGUE_STATUS_PENDING;
        lookup[3] = ROGUE_STATUS_ENDLESS;
        lookup[4] = ROGUE_STATUS_FINISH;
      }

      @Override
      public final RogueStatus forNumber(final int value) {
        if (value >= 0 && value < lookup.length) {
          return lookup[value];
        }
        return null;
      }

      @Override
      public final RogueStatus forName(final CharSequence value) {
        switch (value.length()) {
          case 17: {
            if (ProtoUtil.isEqual("ROGUE_STATUS_NONE", value)) {
              return ROGUE_STATUS_NONE;
            }
            break;
          }
          case 18: {
            if (ProtoUtil.isEqual("ROGUE_STATUS_DOING", value)) {
              return ROGUE_STATUS_DOING;
            }
            break;
          }
          case 19: {
            if (ProtoUtil.isEqual("ROGUE_STATUS_FINISH", value)) {
              return ROGUE_STATUS_FINISH;
            }
            break;
          }
          case 20: {
            if (ProtoUtil.isEqual("ROGUE_STATUS_PENDING", value)) {
              return ROGUE_STATUS_PENDING;
            }
            if (ProtoUtil.isEqual("ROGUE_STATUS_ENDLESS", value)) {
              return ROGUE_STATUS_ENDLESS;
            }
            break;
          }
        }
        return null;
      }
    }
  }
}
