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

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

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

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

    /**
     * <code>ROGUE_AREA_STATUS_LOCK = 0;</code>
     */
    public static final int ROGUE_AREA_STATUS_LOCK_VALUE = 0;

    /**
     * <code>ROGUE_AREA_STATUS_UNLOCK = 1;</code>
     */
    public static final int ROGUE_AREA_STATUS_UNLOCK_VALUE = 1;

    /**
     * <code>ROGUE_AREA_STATUS_FIRST_PASS = 2;</code>
     */
    public static final int ROGUE_AREA_STATUS_FIRST_PASS_VALUE = 2;

    /**
     * <code>ROGUE_AREA_STATUS_CLOSE = 3;</code>
     */
    public static final int ROGUE_AREA_STATUS_CLOSE_VALUE = 3;

    private final String name;

    private final int number;

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

    enum RogueAreaStatusConverter implements ProtoEnum.EnumConverter<RogueAreaStatus> {
      INSTANCE;

      private static final RogueAreaStatus[] lookup = new RogueAreaStatus[4];

      static {
        lookup[0] = ROGUE_AREA_STATUS_LOCK;
        lookup[1] = ROGUE_AREA_STATUS_UNLOCK;
        lookup[2] = ROGUE_AREA_STATUS_FIRST_PASS;
        lookup[3] = ROGUE_AREA_STATUS_CLOSE;
      }

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

      @Override
      public final RogueAreaStatus forName(final CharSequence value) {
        switch (value.length()) {
          case 22: {
            if (ProtoUtil.isEqual("ROGUE_AREA_STATUS_LOCK", value)) {
              return ROGUE_AREA_STATUS_LOCK;
            }
            break;
          }
          case 23: {
            if (ProtoUtil.isEqual("ROGUE_AREA_STATUS_CLOSE", value)) {
              return ROGUE_AREA_STATUS_CLOSE;
            }
            break;
          }
          case 24: {
            if (ProtoUtil.isEqual("ROGUE_AREA_STATUS_UNLOCK", value)) {
              return ROGUE_AREA_STATUS_UNLOCK;
            }
            break;
          }
          case 28: {
            if (ProtoUtil.isEqual("ROGUE_AREA_STATUS_FIRST_PASS", value)) {
              return ROGUE_AREA_STATUS_FIRST_PASS;
            }
            break;
          }
        }
        return null;
      }
    }
  }
}
