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

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

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

    /**
     * <code>SWITCH_HAND_OP_PROP_TYPE_NONE = 0;</code>
     */
    public static final int SWITCH_HAND_OP_PROP_TYPE_NONE_VALUE = 0;

    /**
     * <code>SWITCH_HAND_OP_PROP_TYPE_CATCH = 1;</code>
     */
    public static final int SWITCH_HAND_OP_PROP_TYPE_CATCH_VALUE = 1;

    /**
     * <code>SWITCH_HAND_OP_PROP_TYPE_LIFT = 2;</code>
     */
    public static final int SWITCH_HAND_OP_PROP_TYPE_LIFT_VALUE = 2;

    private final String name;

    private final int number;

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

    enum SwitchHandOpPropTypeConverter implements ProtoEnum.EnumConverter<SwitchHandOpPropType> {
      INSTANCE;

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

      static {
        lookup[0] = SWITCH_HAND_OP_PROP_TYPE_NONE;
        lookup[1] = SWITCH_HAND_OP_PROP_TYPE_CATCH;
        lookup[2] = SWITCH_HAND_OP_PROP_TYPE_LIFT;
      }

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

      @Override
      public final SwitchHandOpPropType forName(final CharSequence value) {
        if (value.length() == 29) {
          if (ProtoUtil.isEqual("SWITCH_HAND_OP_PROP_TYPE_NONE", value)) {
            return SWITCH_HAND_OP_PROP_TYPE_NONE;
          }
          if (ProtoUtil.isEqual("SWITCH_HAND_OP_PROP_TYPE_LIFT", value)) {
            return SWITCH_HAND_OP_PROP_TYPE_LIFT;
          }
        }
        if (value.length() == 30) {
          if (ProtoUtil.isEqual("SWITCH_HAND_OP_PROP_TYPE_CATCH", value)) {
            return SWITCH_HAND_OP_PROP_TYPE_CATCH;
          }
        }
        return null;
      }
    }
  }
}
