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

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

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

    /**
     * <code>ROGUE_TALENT_STATUS_LOCK = 0;</code>
     */
    public static final int ROGUE_TALENT_STATUS_LOCK_VALUE = 0;

    /**
     * <code>ROGUE_TALENT_STATUS_UNLOCK = 1;</code>
     */
    public static final int ROGUE_TALENT_STATUS_UNLOCK_VALUE = 1;

    /**
     * <code>ROGUE_TALENT_STATUS_ENABLE = 2;</code>
     */
    public static final int ROGUE_TALENT_STATUS_ENABLE_VALUE = 2;

    private final String name;

    private final int number;

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

    enum RogueTalentStatusConverter implements ProtoEnum.EnumConverter<RogueTalentStatus> {
      INSTANCE;

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

      static {
        lookup[0] = ROGUE_TALENT_STATUS_LOCK;
        lookup[1] = ROGUE_TALENT_STATUS_UNLOCK;
        lookup[2] = ROGUE_TALENT_STATUS_ENABLE;
      }

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

      @Override
      public final RogueTalentStatus forName(final CharSequence value) {
        if (value.length() == 24) {
          if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_LOCK", value)) {
            return ROGUE_TALENT_STATUS_LOCK;
          }
        }
        if (value.length() == 26) {
          if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_UNLOCK", value)) {
            return ROGUE_TALENT_STATUS_UNLOCK;
          }
          if (ProtoUtil.isEqual("ROGUE_TALENT_STATUS_ENABLE", value)) {
            return ROGUE_TALENT_STATUS_ENABLE;
          }
        }
        return null;
      }
    }
  }
}
