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

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

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

    /**
     * <code>TUTORIAL_NONE = 0;</code>
     */
    public static final int TUTORIAL_NONE_VALUE = 0;

    /**
     * <code>TUTORIAL_UNLOCK = 1;</code>
     */
    public static final int TUTORIAL_UNLOCK_VALUE = 1;

    /**
     * <code>TUTORIAL_FINISH = 2;</code>
     */
    public static final int TUTORIAL_FINISH_VALUE = 2;

    private final String name;

    private final int number;

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

    enum TutorialStatusConverter implements ProtoEnum.EnumConverter<TutorialStatus> {
      INSTANCE;

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

      static {
        lookup[0] = TUTORIAL_NONE;
        lookup[1] = TUTORIAL_UNLOCK;
        lookup[2] = TUTORIAL_FINISH;
      }

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

      @Override
      public final TutorialStatus forName(final CharSequence value) {
        if (value.length() == 13) {
          if (ProtoUtil.isEqual("TUTORIAL_NONE", value)) {
            return TUTORIAL_NONE;
          }
        }
        if (value.length() == 15) {
          if (ProtoUtil.isEqual("TUTORIAL_UNLOCK", value)) {
            return TUTORIAL_UNLOCK;
          }
          if (ProtoUtil.isEqual("TUTORIAL_FINISH", value)) {
            return TUTORIAL_FINISH;
          }
        }
        return null;
      }
    }
  }
}
