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

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

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

    /**
     * <code>BATTLE_RECORD_NONE = 0;</code>
     */
    public static final int BATTLE_RECORD_NONE_VALUE = 0;

    /**
     * <code>BATTLE_RECORD_CHALLENGE = 1;</code>
     */
    public static final int BATTLE_RECORD_CHALLENGE_VALUE = 1;

    /**
     * <code>BATTLE_RECORD_ROGUE = 2;</code>
     */
    public static final int BATTLE_RECORD_ROGUE_VALUE = 2;

    private final String name;

    private final int number;

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

    enum DisplayRecordTypeConverter implements ProtoEnum.EnumConverter<DisplayRecordType> {
      INSTANCE;

      private static final DisplayRecordType[] lookup = new DisplayRecordType[3];

      static {
        lookup[0] = BATTLE_RECORD_NONE;
        lookup[1] = BATTLE_RECORD_CHALLENGE;
        lookup[2] = BATTLE_RECORD_ROGUE;
      }

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

      @Override
      public final DisplayRecordType forName(final CharSequence value) {
        if (value.length() == 18) {
          if (ProtoUtil.isEqual("BATTLE_RECORD_NONE", value)) {
            return BATTLE_RECORD_NONE;
          }
        }
        if (value.length() == 19) {
          if (ProtoUtil.isEqual("BATTLE_RECORD_ROGUE", value)) {
            return BATTLE_RECORD_ROGUE;
          }
        }
        if (value.length() == 23) {
          if (ProtoUtil.isEqual("BATTLE_RECORD_CHALLENGE", value)) {
            return BATTLE_RECORD_CHALLENGE;
          }
        }
        return null;
      }
    }
  }
}
