// 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 QuestStatusOuterClass {
  /**
   * Protobuf enum {@code QuestStatus}
   */
  public enum QuestStatus implements ProtoEnum<QuestStatus> {
    /**
     * <code>QUEST_NONE = 0;</code>
     */
    QUEST_NONE("QUEST_NONE", 0),

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

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

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

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

    /**
     * <code>QUEST_NONE = 0;</code>
     */
    public static final int QUEST_NONE_VALUE = 0;

    /**
     * <code>QUEST_DOING = 1;</code>
     */
    public static final int QUEST_DOING_VALUE = 1;

    /**
     * <code>QUEST_FINISH = 2;</code>
     */
    public static final int QUEST_FINISH_VALUE = 2;

    /**
     * <code>QUEST_CLOSE = 3;</code>
     */
    public static final int QUEST_CLOSE_VALUE = 3;

    /**
     * <code>QUEST_DELETE = 4;</code>
     */
    public static final int QUEST_DELETE_VALUE = 4;

    private final String name;

    private final int number;

    private QuestStatus(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<QuestStatus> converter() {
      return QuestStatusConverter.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 QuestStatus forNumber(int value) {
      return QuestStatusConverter.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 QuestStatus forNumberOr(int number, QuestStatus other) {
      QuestStatus value = forNumber(number);
      return value == null ? other : value;
    }

    enum QuestStatusConverter implements ProtoEnum.EnumConverter<QuestStatus> {
      INSTANCE;

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

      static {
        lookup[0] = QUEST_NONE;
        lookup[1] = QUEST_DOING;
        lookup[2] = QUEST_FINISH;
        lookup[3] = QUEST_CLOSE;
        lookup[4] = QUEST_DELETE;
      }

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

      @Override
      public final QuestStatus forName(final CharSequence value) {
        if (value.length() == 10) {
          if (ProtoUtil.isEqual("QUEST_NONE", value)) {
            return QUEST_NONE;
          }
        }
        if (value.length() == 11) {
          if (ProtoUtil.isEqual("QUEST_DOING", value)) {
            return QUEST_DOING;
          }
          if (ProtoUtil.isEqual("QUEST_CLOSE", value)) {
            return QUEST_CLOSE;
          }
        }
        if (value.length() == 12) {
          if (ProtoUtil.isEqual("QUEST_FINISH", value)) {
            return QUEST_FINISH;
          }
          if (ProtoUtil.isEqual("QUEST_DELETE", value)) {
            return QUEST_DELETE;
          }
        }
        return null;
      }
    }
  }
}
