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