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

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

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

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

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

    /**
     * <code>AVATAR_AETHER_DIVIDE_TYPE = 5;</code>
     */
    AVATAR_AETHER_DIVIDE_TYPE("AVATAR_AETHER_DIVIDE_TYPE", 5),

    /**
     * <code>AVATAR_UPGRADE_AVAILABLE_TYPE = 6;</code>
     */
    AVATAR_UPGRADE_AVAILABLE_TYPE("AVATAR_UPGRADE_AVAILABLE_TYPE", 6),

    /**
     * <code>AVATAR_GRID_FIGHT_TYPE = 7;</code>
     */
    AVATAR_GRID_FIGHT_TYPE("AVATAR_GRID_FIGHT_TYPE", 7),

    /**
     * <code>AVATAR_UNKNOWN_TYPE_1 = 8;</code>
     */
    AVATAR_UNKNOWN_TYPE_1("AVATAR_UNKNOWN_TYPE_1", 8);

    /**
     * <code>AVATAR_TYPE_NONE = 0;</code>
     */
    public static final int AVATAR_TYPE_NONE_VALUE = 0;

    /**
     * <code>AVATAR_TRIAL_TYPE = 1;</code>
     */
    public static final int AVATAR_TRIAL_TYPE_VALUE = 1;

    /**
     * <code>AVATAR_LIMIT_TYPE = 2;</code>
     */
    public static final int AVATAR_LIMIT_TYPE_VALUE = 2;

    /**
     * <code>AVATAR_FORMAL_TYPE = 3;</code>
     */
    public static final int AVATAR_FORMAL_TYPE_VALUE = 3;

    /**
     * <code>AVATAR_ASSIST_TYPE = 4;</code>
     */
    public static final int AVATAR_ASSIST_TYPE_VALUE = 4;

    /**
     * <code>AVATAR_AETHER_DIVIDE_TYPE = 5;</code>
     */
    public static final int AVATAR_AETHER_DIVIDE_TYPE_VALUE = 5;

    /**
     * <code>AVATAR_UPGRADE_AVAILABLE_TYPE = 6;</code>
     */
    public static final int AVATAR_UPGRADE_AVAILABLE_TYPE_VALUE = 6;

    /**
     * <code>AVATAR_GRID_FIGHT_TYPE = 7;</code>
     */
    public static final int AVATAR_GRID_FIGHT_TYPE_VALUE = 7;

    /**
     * <code>AVATAR_UNKNOWN_TYPE_1 = 8;</code>
     */
    public static final int AVATAR_UNKNOWN_TYPE_1_VALUE = 8;

    private final String name;

    private final int number;

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

    enum AvatarTypeConverter implements ProtoEnum.EnumConverter<AvatarType> {
      INSTANCE;

      private static final AvatarType[] lookup = new AvatarType[9];

      static {
        lookup[0] = AVATAR_TYPE_NONE;
        lookup[1] = AVATAR_TRIAL_TYPE;
        lookup[2] = AVATAR_LIMIT_TYPE;
        lookup[3] = AVATAR_FORMAL_TYPE;
        lookup[4] = AVATAR_ASSIST_TYPE;
        lookup[5] = AVATAR_AETHER_DIVIDE_TYPE;
        lookup[6] = AVATAR_UPGRADE_AVAILABLE_TYPE;
        lookup[7] = AVATAR_GRID_FIGHT_TYPE;
        lookup[8] = AVATAR_UNKNOWN_TYPE_1;
      }

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

      @Override
      public final AvatarType forName(final CharSequence value) {
        switch (value.length()) {
          case 16: {
            if (ProtoUtil.isEqual("AVATAR_TYPE_NONE", value)) {
              return AVATAR_TYPE_NONE;
            }
            break;
          }
          case 17: {
            if (ProtoUtil.isEqual("AVATAR_TRIAL_TYPE", value)) {
              return AVATAR_TRIAL_TYPE;
            }
            if (ProtoUtil.isEqual("AVATAR_LIMIT_TYPE", value)) {
              return AVATAR_LIMIT_TYPE;
            }
            break;
          }
          case 18: {
            if (ProtoUtil.isEqual("AVATAR_FORMAL_TYPE", value)) {
              return AVATAR_FORMAL_TYPE;
            }
            if (ProtoUtil.isEqual("AVATAR_ASSIST_TYPE", value)) {
              return AVATAR_ASSIST_TYPE;
            }
            break;
          }
          case 21: {
            if (ProtoUtil.isEqual("AVATAR_UNKNOWN_TYPE_1", value)) {
              return AVATAR_UNKNOWN_TYPE_1;
            }
            break;
          }
          case 22: {
            if (ProtoUtil.isEqual("AVATAR_GRID_FIGHT_TYPE", value)) {
              return AVATAR_GRID_FIGHT_TYPE;
            }
            break;
          }
          case 25: {
            if (ProtoUtil.isEqual("AVATAR_AETHER_DIVIDE_TYPE", value)) {
              return AVATAR_AETHER_DIVIDE_TYPE;
            }
            break;
          }
          case 29: {
            if (ProtoUtil.isEqual("AVATAR_UPGRADE_AVAILABLE_TYPE", value)) {
              return AVATAR_UPGRADE_AVAILABLE_TYPE;
            }
            break;
          }
        }
        return null;
      }
    }
  }
}
