b3.entrypoint.fixp.sbe.TimeInForce Maven / Gradle / Ivy
/* Generated SBE (Simple Binary Encoding) message codec. */
package b3.entrypoint.fixp.sbe;
/**
* Specifies how long the order remains in effect.
*/
@SuppressWarnings("all")
public enum TimeInForce
{
DAY((byte)48),
GOOD_TILL_CANCEL((byte)49),
IMMEDIATE_OR_CANCEL((byte)51),
FILL_OR_KILL((byte)52),
GOOD_TILL_DATE((byte)54),
AT_THE_CLOSE((byte)55),
GOOD_FOR_AUCTION((byte)65),
/**
* To be used to represent not present or null.
*/
NULL_VAL((byte)0);
private final byte value;
TimeInForce(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 TimeInForce get(final byte value)
{
switch (value)
{
case 48: return DAY;
case 49: return GOOD_TILL_CANCEL;
case 51: return IMMEDIATE_OR_CANCEL;
case 52: return FILL_OR_KILL;
case 54: return GOOD_TILL_DATE;
case 55: return AT_THE_CLOSE;
case 65: return GOOD_FOR_AUCTION;
case 0: return NULL_VAL;
}
throw new IllegalArgumentException("Unknown value: " + value);
}
}