// Path: iextrading4j-hist-api/src/main/java/pl/zankowski/iextrading4j/hist/api/IEXByteEnum.java
// public interface IEXByteEnum {
// 
//     byte getCode();
// 
// }
// 
// Path: iextrading4j-hist-api/src/main/java/pl/zankowski/iextrading4j/hist/api/util/IEXByteEnumLookupUtil.java
// public static <E extends Enum<E> & IEXByteEnum> E lookup(final Class<E> clazz, final Map<Byte, E> lookup,
//         byte code) {
//     final E value = lookup.get(code);
//     if (value == null) {
//         throw new IllegalArgumentException("Unknown value: " + code + " for enum " + clazz.getSimpleName());
//     }
//     return value;
// }


import pl.zankowski.iextrading4j.hist.api.IEXByteEnum;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import static pl.zankowski.iextrading4j.hist.api.util.IEXByteEnumLookupUtil.lookup;
package pl.zankowski.iextrading4j.hist.api.message.administrative.field;




public enum IEXOperationalHaltStatus implements IEXByteEnum {

    OPERATIONAL_TRADING_HALt((byte) 0x4f),
    NOT_OPERATIONAL_HALTED((byte) 0x4e);

    private static final Map<Byte, IEXOperationalHaltStatus> LOOKUP = new HashMap<>();

    static {
        for (final IEXOperationalHaltStatus value : EnumSet.allOf(IEXOperationalHaltStatus.class))
            LOOKUP.put(value.getCode(), value);
    }

    private final byte code;

    IEXOperationalHaltStatus(final byte code) {
        this.code = code;
    }

    public static IEXOperationalHaltStatus getOperationalHaltStatus(final byte code) {
// Path: iextrading4j-hist-api/src/main/java/pl/zankowski/iextrading4j/hist/api/IEXByteEnum.java
// public interface IEXByteEnum {
// 
//     byte getCode();
// 
// }
// 
// Path: iextrading4j-hist-api/src/main/java/pl/zankowski/iextrading4j/hist/api/util/IEXByteEnumLookupUtil.java
// public static <E extends Enum<E> & IEXByteEnum> E lookup(final Class<E> clazz, final Map<Byte, E> lookup,
//         byte code) {
//     final E value = lookup.get(code);
//     if (value == null) {
//         throw new IllegalArgumentException("Unknown value: " + code + " for enum " + clazz.getSimpleName());
//     }
//     return value;
// }


// Path: iextrading4j-hist-api/src/main/java/pl/zankowski/iextrading4j/hist/api/message/administrative/field/IEXOperationalHaltStatus.java
import pl.zankowski.iextrading4j.hist.api.IEXByteEnum;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import static pl.zankowski.iextrading4j.hist.api.util.IEXByteEnumLookupUtil.lookup;

package pl.zankowski.iextrading4j.hist.api.message.administrative.field;




public enum IEXOperationalHaltStatus implements IEXByteEnum {

    OPERATIONAL_TRADING_HALt((byte) 0x4f),
    NOT_OPERATIONAL_HALTED((byte) 0x4e);

    private static final Map<Byte, IEXOperationalHaltStatus> LOOKUP = new HashMap<>();

    static {
        for (final IEXOperationalHaltStatus value : EnumSet.allOf(IEXOperationalHaltStatus.class))
            LOOKUP.put(value.getCode(), value);
    }

    private final byte code;

    IEXOperationalHaltStatus(final byte code) {
        this.code = code;
    }

    public static IEXOperationalHaltStatus getOperationalHaltStatus(final byte code) {
        return lookup(IEXOperationalHaltStatus.class, LOOKUP, code);