All Downloads are FREE. Search and download functionalities are using the official Maven repository.

b3.entrypoint.fixp.sbe.SelfTradePreventionInstruction Maven / Gradle / Ivy

/* Generated SBE (Simple Binary Encoding) message codec. */
package b3.entrypoint.fixp.sbe;


/**
 * Indicates which order should be canceled due to self-trade prevention.
 */
@SuppressWarnings("all")
public enum SelfTradePreventionInstruction
{
    CANCEL_AGGRESSOR_ORDER((byte)49),

    CANCEL_RESTING_ORDER((byte)50),

    CANCEL_BOTH_ORDERS((byte)51),

    /**
     * To be used to represent not present or null.
     */
    NULL_VAL((byte)0);

    private final byte value;

    SelfTradePreventionInstruction(final byte value)
    {
        this.value = value;
    }

    /**
     * The raw encoded value in the Java type representation.
     *
     * @return the raw value encoded.
     */
    public byte value()
    {
        return value;
    }

    /**
     * Lookup the enum value representing the value.
     *
     * @param value encoded to be looked up.
     * @return the enum value representing the value.
     */
    public static SelfTradePreventionInstruction get(final byte value)
    {
        switch (value)
        {
            case 49: return CANCEL_AGGRESSOR_ORDER;
            case 50: return CANCEL_RESTING_ORDER;
            case 51: return CANCEL_BOTH_ORDERS;
            case 0: return NULL_VAL;
        }

        throw new IllegalArgumentException("Unknown value: " + value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy