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

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

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

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

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

    /**
     * <code>ROGUE_ROOM_STATUS_NONE = 0;</code>
     */
    public static final int ROGUE_ROOM_STATUS_NONE_VALUE = 0;

    /**
     * <code>ROGUE_ROOM_STATUS_LOCK = 1;</code>
     */
    public static final int ROGUE_ROOM_STATUS_LOCK_VALUE = 1;

    /**
     * <code>ROGUE_ROOM_STATUS_UNLOCK = 2;</code>
     */
    public static final int ROGUE_ROOM_STATUS_UNLOCK_VALUE = 2;

    /**
     * <code>ROGUE_ROOM_STATUS_PLAY = 3;</code>
     */
    public static final int ROGUE_ROOM_STATUS_PLAY_VALUE = 3;

    /**
     * <code>ROGUE_ROOM_STATUS_FINISH = 4;</code>
     */
    public static final int ROGUE_ROOM_STATUS_FINISH_VALUE = 4;

    private final String name;

    private final int number;

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

    enum RogueRoomStatusConverter implements ProtoEnum.EnumConverter<RogueRoomStatus> {
      INSTANCE;

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

      static {
        lookup[0] = ROGUE_ROOM_STATUS_NONE;
        lookup[1] = ROGUE_ROOM_STATUS_LOCK;
        lookup[2] = ROGUE_ROOM_STATUS_UNLOCK;
        lookup[3] = ROGUE_ROOM_STATUS_PLAY;
        lookup[4] = ROGUE_ROOM_STATUS_FINISH;
      }

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

      @Override
      public final RogueRoomStatus forName(final CharSequence value) {
        if (value.length() == 22) {
          if (ProtoUtil.isEqual("ROGUE_ROOM_STATUS_NONE", value)) {
            return ROGUE_ROOM_STATUS_NONE;
          }
          if (ProtoUtil.isEqual("ROGUE_ROOM_STATUS_LOCK", value)) {
            return ROGUE_ROOM_STATUS_LOCK;
          }
          if (ProtoUtil.isEqual("ROGUE_ROOM_STATUS_PLAY", value)) {
            return ROGUE_ROOM_STATUS_PLAY;
          }
        }
        if (value.length() == 24) {
          if (ProtoUtil.isEqual("ROGUE_ROOM_STATUS_UNLOCK", value)) {
            return ROGUE_ROOM_STATUS_UNLOCK;
          }
          if (ProtoUtil.isEqual("ROGUE_ROOM_STATUS_FINISH", value)) {
            return ROGUE_ROOM_STATUS_FINISH;
          }
        }
        return null;
      }
    }
  }
}
