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

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

There is a newer version: 0.157
Show newest version
/* Generated SBE (Simple Binary Encoding) message codec. */
package b3.entrypoint.fixp.sbe;

import org.agrona.MutableDirectBuffer;
import org.agrona.DirectBuffer;
import org.agrona.sbe.*;


/**
 * Execution Report – Trade/Trade Bust message is sent with order fills that were traded and processed on Matching Engine. Also, trade bust included on behalf of B3’s desk.
 */
@SuppressWarnings("all")
public final class ExecutionReport_TradeDecoder implements MessageDecoderFlyweight
{
    public static final int BLOCK_LENGTH = 128;
    public static final int TEMPLATE_ID = 203;
    public static final int SCHEMA_ID = 1;
    public static final int SCHEMA_VERSION = 5;
    public static final String SEMANTIC_VERSION = "5.6";
    public static final java.nio.ByteOrder BYTE_ORDER = java.nio.ByteOrder.LITTLE_ENDIAN;

    private final ExecutionReport_TradeDecoder parentMessage = this;
    private DirectBuffer buffer;
    private int offset;
    private int limit;
    int actingBlockLength;
    int actingVersion;

    public int sbeBlockLength()
    {
        return BLOCK_LENGTH;
    }

    public int sbeTemplateId()
    {
        return TEMPLATE_ID;
    }

    public int sbeSchemaId()
    {
        return SCHEMA_ID;
    }

    public int sbeSchemaVersion()
    {
        return SCHEMA_VERSION;
    }

    public String sbeSemanticType()
    {
        return "";
    }

    public DirectBuffer buffer()
    {
        return buffer;
    }

    public int offset()
    {
        return offset;
    }

    public ExecutionReport_TradeDecoder wrap(
        final DirectBuffer buffer,
        final int offset,
        final int actingBlockLength,
        final int actingVersion)
    {
        if (buffer != this.buffer)
        {
            this.buffer = buffer;
        }
        this.offset = offset;
        this.actingBlockLength = actingBlockLength;
        this.actingVersion = actingVersion;
        limit(offset + actingBlockLength);

        return this;
    }

    public ExecutionReport_TradeDecoder wrapAndApplyHeader(
        final DirectBuffer buffer,
        final int offset,
        final MessageHeaderDecoder headerDecoder)
    {
        headerDecoder.wrap(buffer, offset);

        final int templateId = headerDecoder.templateId();
        if (TEMPLATE_ID != templateId)
        {
            throw new IllegalStateException("Invalid TEMPLATE_ID: " + templateId);
        }

        return wrap(
            buffer,
            offset + MessageHeaderDecoder.ENCODED_LENGTH,
            headerDecoder.blockLength(),
            headerDecoder.version());
    }

    public ExecutionReport_TradeDecoder sbeRewind()
    {
        return wrap(buffer, offset, actingBlockLength, actingVersion);
    }

    public int sbeDecodedLength()
    {
        final int currentLimit = limit();
        sbeSkip();
        final int decodedLength = encodedLength();
        limit(currentLimit);

        return decodedLength;
    }

    public int actingVersion()
    {
        return actingVersion;
    }

    public int encodedLength()
    {
        return limit - offset;
    }

    public int limit()
    {
        return limit;
    }

    public void limit(final int limit)
    {
        this.limit = limit;
    }

    public static int messageTypeId()
    {
        return 35;
    }

    public static int messageTypeSinceVersion()
    {
        return 0;
    }

    public static int messageTypeEncodingOffset()
    {
        return 0;
    }

    public static int messageTypeEncodingLength()
    {
        return 1;
    }

    public static String messageTypeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "constant";
        }

        return "";
    }

    public short messageTypeRaw()
    {
        return MessageType.ExecutionReport_Trade.value();
    }


    public MessageType messageType()
    {
        return MessageType.ExecutionReport_Trade;
    }


    public static int execIDId()
    {
        return 17;
    }

    public static int execIDSinceVersion()
    {
        return 0;
    }

    public static int execIDEncodingOffset()
    {
        return 0;
    }

    public static int execIDEncodingLength()
    {
        return 8;
    }

    public static String execIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long execIDNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long execIDMinValue()
    {
        return 0x0L;
    }

    public static long execIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long execID()
    {
        return buffer.getLong(offset + 0, BYTE_ORDER);
    }


    public static int orderIDId()
    {
        return 37;
    }

    public static int orderIDSinceVersion()
    {
        return 0;
    }

    public static int orderIDEncodingOffset()
    {
        return 8;
    }

    public static int orderIDEncodingLength()
    {
        return 8;
    }

    public static String orderIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long orderIDNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long orderIDMinValue()
    {
        return 0x0L;
    }

    public static long orderIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long orderID()
    {
        return buffer.getLong(offset + 8, BYTE_ORDER);
    }


    public static int clOrdIDId()
    {
        return 11;
    }

    public static int clOrdIDSinceVersion()
    {
        return 0;
    }

    public static int clOrdIDEncodingOffset()
    {
        return 16;
    }

    public static int clOrdIDEncodingLength()
    {
        return 8;
    }

    public static String clOrdIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long clOrdIDNullValue()
    {
        return 0x0L;
    }

    public static long clOrdIDMinValue()
    {
        return 0x0L;
    }

    public static long clOrdIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long clOrdID()
    {
        return buffer.getLong(offset + 16, BYTE_ORDER);
    }


    public static int securityIDId()
    {
        return 48;
    }

    public static int securityIDSinceVersion()
    {
        return 0;
    }

    public static int securityIDEncodingOffset()
    {
        return 24;
    }

    public static int securityIDEncodingLength()
    {
        return 8;
    }

    public static String securityIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long securityIDNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long securityIDMinValue()
    {
        return 0x0L;
    }

    public static long securityIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long securityID()
    {
        return buffer.getLong(offset + 24, BYTE_ORDER);
    }


    public static int securityIDSourceId()
    {
        return 22;
    }

    public static int securityIDSourceSinceVersion()
    {
        return 0;
    }

    public static int securityIDSourceEncodingOffset()
    {
        return 32;
    }

    public static int securityIDSourceEncodingLength()
    {
        return 0;
    }

    public static String securityIDSourceMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "constant";
        }

        return "";
    }

    public static byte securityIDSourceNullValue()
    {
        return (byte)0;
    }

    public static byte securityIDSourceMinValue()
    {
        return (byte)32;
    }

    public static byte securityIDSourceMaxValue()
    {
        return (byte)126;
    }


    private static final byte[] SECURITYIDSOURCE_VALUE = { 56 };

    public static int securityIDSourceLength()
    {
        return 1;
    }


    public byte securityIDSource(final int index)
    {
        return SECURITYIDSOURCE_VALUE[index];
    }

    public int getSecurityIDSource(final byte[] dst, final int offset, final int length)
    {
        final int bytesCopied = Math.min(length, 1);
        System.arraycopy(SECURITYIDSOURCE_VALUE, 0, dst, offset, bytesCopied);

        return bytesCopied;
    }

    public byte securityIDSource()
    {
        return (byte)56;
    }


    public static int securityExchangeId()
    {
        return 207;
    }

    public static int securityExchangeSinceVersion()
    {
        return 0;
    }

    public static int securityExchangeEncodingOffset()
    {
        return 32;
    }

    public static int securityExchangeEncodingLength()
    {
        return 0;
    }

    public static String securityExchangeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "constant";
        }

        return "";
    }

    public static byte securityExchangeNullValue()
    {
        return (byte)0;
    }

    public static byte securityExchangeMinValue()
    {
        return (byte)32;
    }

    public static byte securityExchangeMaxValue()
    {
        return (byte)126;
    }


    private static final byte[] SECURITYEXCHANGE_VALUE = { 66, 86, 77, 70 };

    public static int securityExchangeLength()
    {
        return 4;
    }


    public byte securityExchange(final int index)
    {
        return SECURITYEXCHANGE_VALUE[index];
    }

    public int getSecurityExchange(final byte[] dst, final int offset, final int length)
    {
        final int bytesCopied = Math.min(length, 4);
        System.arraycopy(SECURITYEXCHANGE_VALUE, 0, dst, offset, bytesCopied);

        return bytesCopied;
    }

    public String securityExchange()
    {
        return "BVMF";
    }


    public static int secondaryOrderIDId()
    {
        return 198;
    }

    public static int secondaryOrderIDSinceVersion()
    {
        return 0;
    }

    public static int secondaryOrderIDEncodingOffset()
    {
        return 32;
    }

    public static int secondaryOrderIDEncodingLength()
    {
        return 8;
    }

    public static String secondaryOrderIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long secondaryOrderIDNullValue()
    {
        return 0x0L;
    }

    public static long secondaryOrderIDMinValue()
    {
        return 0x0L;
    }

    public static long secondaryOrderIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long secondaryOrderID()
    {
        return buffer.getLong(offset + 32, BYTE_ORDER);
    }


    public static int lastPxId()
    {
        return 31;
    }

    public static int lastPxSinceVersion()
    {
        return 0;
    }

    public static int lastPxEncodingOffset()
    {
        return 40;
    }

    public static int lastPxEncodingLength()
    {
        return 8;
    }

    public static String lastPxMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    private final PriceDecoder lastPx = new PriceDecoder();

    /**
     * Price of last fill.
     *
     * @return PriceDecoder : Price of last fill.
     */
    public PriceDecoder lastPx()
    {
        lastPx.wrap(buffer, offset + 40);
        return lastPx;
    }

    public static int lastQtyId()
    {
        return 33;
    }

    public static int lastQtySinceVersion()
    {
        return 0;
    }

    public static int lastQtyEncodingOffset()
    {
        return 48;
    }

    public static int lastQtyEncodingLength()
    {
        return 8;
    }

    public static String lastQtyMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long lastQtyNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long lastQtyMinValue()
    {
        return 0x0L;
    }

    public static long lastQtyMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long lastQty()
    {
        return buffer.getLong(offset + 48, BYTE_ORDER);
    }


    public static int aggressorIndicatorId()
    {
        return 1057;
    }

    public static int aggressorIndicatorSinceVersion()
    {
        return 0;
    }

    public static int aggressorIndicatorEncodingOffset()
    {
        return 56;
    }

    public static int aggressorIndicatorEncodingLength()
    {
        return 1;
    }

    public static String aggressorIndicatorMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public short aggressorIndicatorRaw()
    {
        return ((short)(buffer.getByte(offset + 56) & 0xFF));
    }

    public Boolean aggressorIndicator()
    {
        return Boolean.get(((short)(buffer.getByte(offset + 56) & 0xFF)));
    }


    public static int ordStatusId()
    {
        return 39;
    }

    public static int ordStatusSinceVersion()
    {
        return 0;
    }

    public static int ordStatusEncodingOffset()
    {
        return 57;
    }

    public static int ordStatusEncodingLength()
    {
        return 1;
    }

    public static String ordStatusMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public byte ordStatusRaw()
    {
        return buffer.getByte(offset + 57);
    }

    public OrdStatus ordStatus()
    {
        return OrdStatus.get(buffer.getByte(offset + 57));
    }


    public static int execTypeId()
    {
        return 150;
    }

    public static int execTypeSinceVersion()
    {
        return 0;
    }

    public static int execTypeEncodingOffset()
    {
        return 58;
    }

    public static int execTypeEncodingLength()
    {
        return 1;
    }

    public static String execTypeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public byte execTypeRaw()
    {
        return buffer.getByte(offset + 58);
    }

    public ExecType execType()
    {
        return ExecType.get(buffer.getByte(offset + 58));
    }


    public static int multiLegReportingTypeId()
    {
        return 442;
    }

    public static int multiLegReportingTypeSinceVersion()
    {
        return 0;
    }

    public static int multiLegReportingTypeEncodingOffset()
    {
        return 59;
    }

    public static int multiLegReportingTypeEncodingLength()
    {
        return 1;
    }

    public static String multiLegReportingTypeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public byte multiLegReportingTypeRaw()
    {
        return buffer.getByte(offset + 59);
    }

    public MultiLegReportingType multiLegReportingType()
    {
        return MultiLegReportingType.get(buffer.getByte(offset + 59));
    }


    public static int leavesQtyId()
    {
        return 151;
    }

    public static int leavesQtySinceVersion()
    {
        return 0;
    }

    public static int leavesQtyEncodingOffset()
    {
        return 60;
    }

    public static int leavesQtyEncodingLength()
    {
        return 8;
    }

    public static String leavesQtyMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long leavesQtyNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long leavesQtyMinValue()
    {
        return 0x0L;
    }

    public static long leavesQtyMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long leavesQty()
    {
        return buffer.getLong(offset + 60, BYTE_ORDER);
    }


    public static int cumQtyId()
    {
        return 14;
    }

    public static int cumQtySinceVersion()
    {
        return 0;
    }

    public static int cumQtyEncodingOffset()
    {
        return 68;
    }

    public static int cumQtyEncodingLength()
    {
        return 8;
    }

    public static String cumQtyMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long cumQtyNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long cumQtyMinValue()
    {
        return 0x0L;
    }

    public static long cumQtyMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long cumQty()
    {
        return buffer.getLong(offset + 68, BYTE_ORDER);
    }


    public static int uniqueTradeIDId()
    {
        return 6032;
    }

    public static int uniqueTradeIDSinceVersion()
    {
        return 0;
    }

    public static int uniqueTradeIDEncodingOffset()
    {
        return 76;
    }

    public static int uniqueTradeIDEncodingLength()
    {
        return 4;
    }

    public static String uniqueTradeIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long uniqueTradeIDNullValue()
    {
        return 0L;
    }

    public static long uniqueTradeIDMinValue()
    {
        return 0L;
    }

    public static long uniqueTradeIDMaxValue()
    {
        return 4294967294L;
    }

    public long uniqueTradeID()
    {
        return (buffer.getInt(offset + 76, BYTE_ORDER) & 0xFFFF_FFFFL);
    }


    public static int contraBrokerId()
    {
        return 375;
    }

    public static int contraBrokerSinceVersion()
    {
        return 0;
    }

    public static int contraBrokerEncodingOffset()
    {
        return 80;
    }

    public static int contraBrokerEncodingLength()
    {
        return 4;
    }

    public static String contraBrokerMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long contraBrokerNullValue()
    {
        return 4294967295L;
    }

    public static long contraBrokerMinValue()
    {
        return 0L;
    }

    public static long contraBrokerMaxValue()
    {
        return 4294967294L;
    }

    public long contraBroker()
    {
        return (buffer.getInt(offset + 80, BYTE_ORDER) & 0xFFFF_FFFFL);
    }


    public static int execRefIDId()
    {
        return 19;
    }

    public static int execRefIDSinceVersion()
    {
        return 0;
    }

    public static int execRefIDEncodingOffset()
    {
        return 84;
    }

    public static int execRefIDEncodingLength()
    {
        return 8;
    }

    public static String execRefIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long execRefIDNullValue()
    {
        return 0x0L;
    }

    public static long execRefIDMinValue()
    {
        return 0x0L;
    }

    public static long execRefIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long execRefID()
    {
        return buffer.getLong(offset + 84, BYTE_ORDER);
    }


    public static int secondaryExecIDId()
    {
        return 8;
    }

    public static int secondaryExecIDSinceVersion()
    {
        return 0;
    }

    public static int secondaryExecIDEncodingOffset()
    {
        return 92;
    }

    public static int secondaryExecIDEncodingLength()
    {
        return 8;
    }

    public static String secondaryExecIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long secondaryExecIDNullValue()
    {
        return 0x0L;
    }

    public static long secondaryExecIDMinValue()
    {
        return 0x0L;
    }

    public static long secondaryExecIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long secondaryExecID()
    {
        return buffer.getLong(offset + 92, BYTE_ORDER);
    }


    public static int crossIDId()
    {
        return 548;
    }

    public static int crossIDSinceVersion()
    {
        return 0;
    }

    public static int crossIDEncodingOffset()
    {
        return 100;
    }

    public static int crossIDEncodingLength()
    {
        return 8;
    }

    public static String crossIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long crossIDNullValue()
    {
        return 0xffffffffffffffffL;
    }

    public static long crossIDMinValue()
    {
        return 0x0L;
    }

    public static long crossIDMaxValue()
    {
        return 0xfffffffffffffffeL;
    }

    public long crossID()
    {
        return buffer.getLong(offset + 100, BYTE_ORDER);
    }


    public static int tradeDateId()
    {
        return 75;
    }

    public static int tradeDateSinceVersion()
    {
        return 0;
    }

    public static int tradeDateEncodingOffset()
    {
        return 108;
    }

    public static int tradeDateEncodingLength()
    {
        return 2;
    }

    public static String tradeDateMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static int tradeDateNullValue()
    {
        return 0;
    }

    public static int tradeDateMinValue()
    {
        return 0;
    }

    public static int tradeDateMaxValue()
    {
        return 65534;
    }

    public int tradeDate()
    {
        return (buffer.getShort(offset + 108, BYTE_ORDER) & 0xFFFF);
    }


    public static int totNoRelatedSymId()
    {
        return 393;
    }

    public static int totNoRelatedSymSinceVersion()
    {
        return 0;
    }

    public static int totNoRelatedSymEncodingOffset()
    {
        return 110;
    }

    public static int totNoRelatedSymEncodingLength()
    {
        return 1;
    }

    public static String totNoRelatedSymMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static short totNoRelatedSymNullValue()
    {
        return (short)0;
    }

    public static short totNoRelatedSymMinValue()
    {
        return (short)0;
    }

    public static short totNoRelatedSymMaxValue()
    {
        return (short)254;
    }

    public short totNoRelatedSym()
    {
        return ((short)(buffer.getByte(offset + 110) & 0xFF));
    }


    public static int orderCategoryId()
    {
        return 1115;
    }

    public static int orderCategorySinceVersion()
    {
        return 0;
    }

    public static int orderCategoryEncodingOffset()
    {
        return 111;
    }

    public static int orderCategoryEncodingLength()
    {
        return 1;
    }

    public static String orderCategoryMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public byte orderCategoryRaw()
    {
        return buffer.getByte(offset + 111);
    }

    public OrderCategory orderCategory()
    {
        return OrderCategory.get(buffer.getByte(offset + 111));
    }


    public static int externalRFQIndicatorId()
    {
        return 35551;
    }

    public static int externalRFQIndicatorSinceVersion()
    {
        return 0;
    }

    public static int externalRFQIndicatorEncodingOffset()
    {
        return 112;
    }

    public static int externalRFQIndicatorEncodingLength()
    {
        return 1;
    }

    public static String externalRFQIndicatorMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short externalRFQIndicatorRaw()
    {
        return ((short)(buffer.getByte(offset + 112) & 0xFF));
    }

    public Boolean externalRFQIndicator()
    {
        return Boolean.get(((short)(buffer.getByte(offset + 112) & 0xFF)));
    }


    public static int possResendId()
    {
        return 97;
    }

    public static int possResendSinceVersion()
    {
        return 0;
    }

    public static int possResendEncodingOffset()
    {
        return 113;
    }

    public static int possResendEncodingLength()
    {
        return 1;
    }

    public static String possResendMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short possResendRaw()
    {
        return ((short)(buffer.getByte(offset + 113) & 0xFF));
    }

    public Boolean possResend()
    {
        return Boolean.get(((short)(buffer.getByte(offset + 113) & 0xFF)));
    }


    public static int transactTimeId()
    {
        return 60;
    }

    public static int transactTimeSinceVersion()
    {
        return 0;
    }

    public static int transactTimeEncodingOffset()
    {
        return 120;
    }

    public static int transactTimeEncodingLength()
    {
        return 8;
    }

    public static String transactTimeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    private final UTCTimestampNanosDecoder transactTime = new UTCTimestampNanosDecoder();

    /**
     * Time of execution/order creation; expressed in UTC.
     *
     * @return UTCTimestampNanosDecoder : Time of execution/order creation; expressed in UTC.
     */
    public UTCTimestampNanosDecoder transactTime()
    {
        transactTime.wrap(buffer, offset + 120);
        return transactTime;
    }

    public static int deskIDId()
    {
        return 35510;
    }

    public static int deskIDSinceVersion()
    {
        return 0;
    }

    public static String deskIDCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.US_ASCII.name();
    }

    public static String deskIDMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }
        if (MetaAttribute.SEMANTIC_TYPE == metaAttribute)
        {
            return "String";
        }

        return "";
    }

    public static int deskIDHeaderLength()
    {
        return 1;
    }

    public int deskIDLength()
    {
        final int limit = parentMessage.limit();
        return ((short)(buffer.getByte(limit) & 0xFF));
    }

    public int skipDeskID()
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getDeskID(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getDeskID(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapDeskID(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String deskID()
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.US_ASCII);
    }

    public int getDeskID(final Appendable appendable)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int dataOffset = limit + headerLength;

        parentMessage.limit(dataOffset + dataLength);
        buffer.getStringWithoutLengthAscii(dataOffset, dataLength, appendable);

        return dataLength;
    }

    public static int memoId()
    {
        return 5149;
    }

    public static int memoSinceVersion()
    {
        return 0;
    }

    public static String memoCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String memoMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }
        if (MetaAttribute.SEMANTIC_TYPE == metaAttribute)
        {
            return "String";
        }

        return "";
    }

    public static int memoHeaderLength()
    {
        return 1;
    }

    public int memoLength()
    {
        final int limit = parentMessage.limit();
        return ((short)(buffer.getByte(limit) & 0xFF));
    }

    public int skipMemo()
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getMemo(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getMemo(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapMemo(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String memo()
    {
        final int headerLength = 1;
        final int limit = parentMessage.limit();
        final int dataLength = ((short)(buffer.getByte(limit) & 0xFF));
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public String toString()
    {
        if (null == buffer)
        {
            return "";
        }

        final ExecutionReport_TradeDecoder decoder = new ExecutionReport_TradeDecoder();
        decoder.wrap(buffer, offset, actingBlockLength, actingVersion);

        return decoder.appendTo(new StringBuilder()).toString();
    }

    public StringBuilder appendTo(final StringBuilder builder)
    {
        if (null == buffer)
        {
            return builder;
        }

        final int originalLimit = limit();
        limit(offset + actingBlockLength);
        builder.append("[ExecutionReport_Trade](sbeTemplateId=");
        builder.append(TEMPLATE_ID);
        builder.append("|sbeSchemaId=");
        builder.append(SCHEMA_ID);
        builder.append("|sbeSchemaVersion=");
        if (parentMessage.actingVersion != SCHEMA_VERSION)
        {
            builder.append(parentMessage.actingVersion);
            builder.append('/');
        }
        builder.append(SCHEMA_VERSION);
        builder.append("|sbeBlockLength=");
        if (actingBlockLength != BLOCK_LENGTH)
        {
            builder.append(actingBlockLength);
            builder.append('/');
        }
        builder.append(BLOCK_LENGTH);
        builder.append("):");
        builder.append("messageType=");
        builder.append(this.messageType());
        builder.append('|');
        builder.append("execID=");
        builder.append(this.execID());
        builder.append('|');
        builder.append("orderID=");
        builder.append(this.orderID());
        builder.append('|');
        builder.append("clOrdID=");
        builder.append(this.clOrdID());
        builder.append('|');
        builder.append("securityID=");
        builder.append(this.securityID());
        builder.append('|');
        builder.append("secondaryOrderID=");
        builder.append(this.secondaryOrderID());
        builder.append('|');
        builder.append("lastPx=");
        final PriceDecoder lastPx = this.lastPx();
        if (null != lastPx)
        {
            lastPx.appendTo(builder);
        }
        else
        {
            builder.append("null");
        }
        builder.append('|');
        builder.append("lastQty=");
        builder.append(this.lastQty());
        builder.append('|');
        builder.append("aggressorIndicator=");
        builder.append(this.aggressorIndicator());
        builder.append('|');
        builder.append("ordStatus=");
        builder.append(this.ordStatus());
        builder.append('|');
        builder.append("execType=");
        builder.append(this.execType());
        builder.append('|');
        builder.append("multiLegReportingType=");
        builder.append(this.multiLegReportingType());
        builder.append('|');
        builder.append("leavesQty=");
        builder.append(this.leavesQty());
        builder.append('|');
        builder.append("cumQty=");
        builder.append(this.cumQty());
        builder.append('|');
        builder.append("uniqueTradeID=");
        builder.append(this.uniqueTradeID());
        builder.append('|');
        builder.append("contraBroker=");
        builder.append(this.contraBroker());
        builder.append('|');
        builder.append("execRefID=");
        builder.append(this.execRefID());
        builder.append('|');
        builder.append("secondaryExecID=");
        builder.append(this.secondaryExecID());
        builder.append('|');
        builder.append("crossID=");
        builder.append(this.crossID());
        builder.append('|');
        builder.append("tradeDate=");
        builder.append(this.tradeDate());
        builder.append('|');
        builder.append("totNoRelatedSym=");
        builder.append(this.totNoRelatedSym());
        builder.append('|');
        builder.append("orderCategory=");
        builder.append(this.orderCategory());
        builder.append('|');
        builder.append("externalRFQIndicator=");
        builder.append(this.externalRFQIndicator());
        builder.append('|');
        builder.append("possResend=");
        builder.append(this.possResend());
        builder.append('|');
        builder.append("transactTime=");
        final UTCTimestampNanosDecoder transactTime = this.transactTime();
        if (null != transactTime)
        {
            transactTime.appendTo(builder);
        }
        else
        {
            builder.append("null");
        }
        builder.append('|');
        builder.append("deskID=");
        builder.append('\'');
        getDeskID(builder);
        builder.append('\'');
        builder.append('|');
        builder.append("memo=");
        builder.append('\'').append(memo()).append('\'');

        limit(originalLimit);

        return builder;
    }
    
    public ExecutionReport_TradeDecoder sbeSkip()
    {
        sbeRewind();
        skipDeskID();
        skipMemo();

        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy