uk.co.real_logic.artio.messages.MetaDataStatus Maven / Gradle / Ivy
/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;
@SuppressWarnings("all")
public enum MetaDataStatus
{
OK((short)0),
UNKNOWN_SESSION((short)1),
FILE_ERROR((short)2),
NO_META_DATA((short)4),
INVALID_OFFSET((short)5),
/**
* To be used to represent not present or null.
*/
NULL_VAL((short)255);
private final short value;
MetaDataStatus(final short value)
{
this.value = value;
}
/**
* The raw encoded value in the Java type representation.
*
* @return the raw value encoded.
*/
public short 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 MetaDataStatus get(final short value)
{
switch (value)
{
case 0: return OK;
case 1: return UNKNOWN_SESSION;
case 2: return FILE_ERROR;
case 4: return NO_META_DATA;
case 5: return INVALID_OFFSET;
case 255: return NULL_VAL;
}
throw new IllegalArgumentException("Unknown value: " + value);
}
}