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

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

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

    /**
     * <code>SCENE_GROUP_REFRESH_TYPE_NONE = 0;</code>
     */
    public static final int SCENE_GROUP_REFRESH_TYPE_NONE_VALUE = 0;

    /**
     * <code>SCENE_GROUP_REFRESH_TYPE_LOADED = 1;</code>
     */
    public static final int SCENE_GROUP_REFRESH_TYPE_LOADED_VALUE = 1;

    /**
     * <code>SCENE_GROUP_REFRESH_TYPE_UNLOAD = 2;</code>
     */
    public static final int SCENE_GROUP_REFRESH_TYPE_UNLOAD_VALUE = 2;

    private final String name;

    private final int number;

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

    enum SceneGroupRefreshTypeConverter implements ProtoEnum.EnumConverter<SceneGroupRefreshType> {
      INSTANCE;

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

      static {
        lookup[0] = SCENE_GROUP_REFRESH_TYPE_NONE;
        lookup[1] = SCENE_GROUP_REFRESH_TYPE_LOADED;
        lookup[2] = SCENE_GROUP_REFRESH_TYPE_UNLOAD;
      }

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

      @Override
      public final SceneGroupRefreshType forName(final CharSequence value) {
        if (value.length() == 29) {
          if (ProtoUtil.isEqual("SCENE_GROUP_REFRESH_TYPE_NONE", value)) {
            return SCENE_GROUP_REFRESH_TYPE_NONE;
          }
        }
        if (value.length() == 31) {
          if (ProtoUtil.isEqual("SCENE_GROUP_REFRESH_TYPE_LOADED", value)) {
            return SCENE_GROUP_REFRESH_TYPE_LOADED;
          }
          if (ProtoUtil.isEqual("SCENE_GROUP_REFRESH_TYPE_UNLOAD", value)) {
            return SCENE_GROUP_REFRESH_TYPE_UNLOAD;
          }
        }
        return null;
      }
    }
  }
}
