text: /* Generated SBE (Simple Binary Encoding) message codec */
  #ifndef _ILINKBINARY_TERMINATE507_H_
  #define _ILINKBINARY_TERMINATE507_H_
  
  #if defined(SBE_HAVE_CMATH)
  /* cmath needed for std::numeric_limits<double>::quiet_NaN() */
  #  include <cmath>
  #  define SBE_FLOAT_NAN std::numeric_limits<float>::quiet_NaN()
  #  define SBE_DOUBLE_NAN std::numeric_limits<double>::quiet_NaN()
  #else
  /* math.h needed for NAN */
  #  include <math.h>
  #  define SBE_FLOAT_NAN NAN
  #  define SBE_DOUBLE_NAN NAN
  #endif
  
  #if __cplusplus >= 201103L
  #  define SBE_CONSTEXPR constexpr
  #  define SBE_NOEXCEPT noexcept
  #else
  #  define SBE_CONSTEXPR
  #  define SBE_NOEXCEPT
  #endif
  
  #if __cplusplus >= 201402L
  #  define SBE_CONSTEXPR_14 constexpr
  #else
  #  define SBE_CONSTEXPR_14
  #endif
  
  #if __cplusplus >= 201703L
  #  include <string_view>
  #  define SBE_NODISCARD [[nodiscard]]
  #else
  #  define SBE_NODISCARD
  #endif
  
  #if !defined(__STDC_LIMIT_MACROS)
  #  define __STDC_LIMIT_MACROS 1
  #endif
  
  #include <cstdint>
  #include <cstring>
  #include <iomanip>
  #include <limits>
  #include <ostream>
  #include <stdexcept>
  #include <sstream>
  #include <string>
  #include <vector>
  
  #if defined(WIN32) || defined(_WIN32)
  #  define SBE_BIG_ENDIAN_ENCODE_16(v) _byteswap_ushort(v)
  #  define SBE_BIG_ENDIAN_ENCODE_32(v) _byteswap_ulong(v)
  #  define SBE_BIG_ENDIAN_ENCODE_64(v) _byteswap_uint64(v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
  #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  #  define SBE_BIG_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
  #  define SBE_BIG_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
  #  define SBE_BIG_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_16(v) (v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_32(v) (v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_64(v) (v)
  #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  #  define SBE_LITTLE_ENDIAN_ENCODE_16(v) __builtin_bswap16(v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_32(v) __builtin_bswap32(v)
  #  define SBE_LITTLE_ENDIAN_ENCODE_64(v) __builtin_bswap64(v)
  #  define SBE_BIG_ENDIAN_ENCODE_16(v) (v)
  #  define SBE_BIG_ENDIAN_ENCODE_32(v) (v)
  #  define SBE_BIG_ENDIAN_ENCODE_64(v) (v)
  #else
  #  error "Byte Ordering of platform not determined. Set __BYTE_ORDER__ manually before including this file."
  #endif
  
  #if defined(SBE_NO_BOUNDS_CHECK)
  #  define SBE_BOUNDS_CHECK_EXPECT(exp,c) (false)
  #elif defined(_MSC_VER)
  #  define SBE_BOUNDS_CHECK_EXPECT(exp,c) (exp)
  #else
  #  define SBE_BOUNDS_CHECK_EXPECT(exp,c) (__builtin_expect(exp,c))
  #endif
  
  #define SBE_NULLVALUE_INT8 (std::numeric_limits<std::int8_t>::min)()
  #define SBE_NULLVALUE_INT16 (std::numeric_limits<std::int16_t>::min)()
  #define SBE_NULLVALUE_INT32 (std::numeric_limits<std::int32_t>::min)()
  #define SBE_NULLVALUE_INT64 (std::numeric_limits<std::int64_t>::min)()
  #define SBE_NULLVALUE_UINT8 (std::numeric_limits<std::uint8_t>::max)()
  #define SBE_NULLVALUE_UINT16 (std::numeric_limits<std::uint16_t>::max)()
  #define SBE_NULLVALUE_UINT32 (std::numeric_limits<std::uint32_t>::max)()
  #define SBE_NULLVALUE_UINT64 (std::numeric_limits<std::uint64_t>::max)()
  
  
  #include "MaturityMonthYear.h"
  #include "Decimal64NULL.h"
  #include "OrderTypeReq.h"
  #include "BooleanNULL.h"
  #include "AvgPxInd.h"
  #include "OrderEventType.h"
  #include "CmtaGiveUpCD.h"
  #include "PRICENULL9.h"
  #include "BooleanFlag.h"
  #include "OrderType.h"
  #include "QuoteCxlStatus.h"
  #include "TimeInForce.h"
  #include "PRICE9.h"
  #include "MassStatusOrdTyp.h"
  #include "ExecInst.h"
  #include "Decimal32NULL.h"
  #include "SplitMsg.h"
  #include "SideReq.h"
  #include "MassActionResponse.h"
  #include "CustOrderCapacity.h"
  #include "SideTimeInForce.h"
  #include "SLEDS.h"
  #include "ReqResult.h"
  #include "ClearingAcctType.h"
  #include "KeepAliveLapsed.h"
  #include "ExecAckStatus.h"
  #include "DATA.h"
  #include "OFMOverrideReq.h"
  #include "SideNULL.h"
  #include "GroupSize.h"
  #include "ListUpdAct.h"
  #include "FTI.h"
  #include "ExecReason.h"
  #include "MassStatusReqTyp.h"
  #include "DKReason.h"
  #include "SecRspTyp.h"
  #include "MassActionOrdTyp.h"
  #include "QuoteAckStatus.h"
  #include "ExpCycle.h"
  #include "MassCancelTIF.h"
  #include "OrderStatus.h"
  #include "ShortSaleType.h"
  #include "PartyDetailRole.h"
  #include "MassActionScope.h"
  #include "RFQSide.h"
  #include "OrdStatusTrdCxl.h"
  #include "TradeAddendum.h"
  #include "MessageHeader.h"
  #include "ManualOrdInd.h"
  #include "QuoteCxlTyp.h"
  #include "MassCxlReqTyp.h"
  #include "ExecTypTrdCxl.h"
  #include "ManualOrdIndReq.h"
  #include "CustOrdHandlInst.h"
  #include "OrdStatusTrd.h"
  #include "MassStatusTIF.h"
  #include "SMPI.h"
  #include "ExecMode.h"
  #include "QuoteTyp.h"
  
  namespace iLinkBinary {
  
  class Terminate507
  {
  private:
      char *m_buffer = nullptr;
      std::uint64_t m_bufferLength = 0;
      std::uint64_t m_offset = 0;
      std::uint64_t m_position = 0;
      std::uint64_t m_actingVersion = 0;
  
      inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
      {
          return &m_position;
      }
  
  public:
      enum MetaAttribute
      {
          EPOCH, TIME_UNIT, SEMANTIC_TYPE, PRESENCE
      };
  
      union sbe_float_as_uint_u
      {
          float fp_value;
          std::uint32_t uint_value;
      };
  
      union sbe_double_as_uint_u
      {
          double fp_value;
          std::uint64_t uint_value;
      };
  
      Terminate507() = default;
  
      Terminate507(
          char *buffer,
          const std::uint64_t offset,
          const std::uint64_t bufferLength,
          const std::uint64_t actingBlockLength,
          const std::uint64_t actingVersion) :
          m_buffer(buffer),
          m_bufferLength(bufferLength),
          m_offset(offset),
          m_position(sbeCheckPosition(offset + actingBlockLength)),
          m_actingVersion(actingVersion)
      {
      }
  
      Terminate507(char *buffer, const std::uint64_t bufferLength) :
          Terminate507(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion())
      {
      }
  
      Terminate507(
          char *buffer,
          const std::uint64_t bufferLength,
          const std::uint64_t actingBlockLength,
          const std::uint64_t actingVersion) :
          Terminate507(buffer, 0, bufferLength, actingBlockLength, actingVersion)
      {
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
      {
          return (std::uint16_t)67;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
      {
          return MessageHeader::encodedLength() + sbeBlockLength();
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
      {
          return (std::uint16_t)507;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
      {
          return (std::uint16_t)8;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
      {
          return (std::uint16_t)5;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR const char * sbeSemanticType() SBE_NOEXCEPT
      {
          return "Terminate";
      }
  
      SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT
      {
          return m_offset;
      }
  
      Terminate507 &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
      {
          return *this = Terminate507(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion());
      }
  
      Terminate507 &wrapAndApplyHeader(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
      {
          MessageHeader hdr(buffer, offset, bufferLength, sbeSchemaVersion());
  
          hdr
              .blockLength(sbeBlockLength())
              .templateId(sbeTemplateId())
              .schemaId(sbeSchemaId())
              .version(sbeSchemaVersion());
  
          return *this = Terminate507(
              buffer,
              offset + MessageHeader::encodedLength(),
              bufferLength,
              sbeBlockLength(),
              sbeSchemaVersion());
      }
  
      Terminate507 &wrapForDecode(
          char *buffer,
          const std::uint64_t offset,
          const std::uint64_t actingBlockLength,
          const std::uint64_t actingVersion,
          const std::uint64_t bufferLength)
      {
          return *this = Terminate507(buffer, offset, bufferLength, actingBlockLength, actingVersion);
      }
  
      SBE_NODISCARD std::uint64_t sbePosition() const SBE_NOEXCEPT
      {
          return m_position;
      }
  
      // NOLINTNEXTLINE(readability-convert-member-functions-to-static)
      std::uint64_t sbeCheckPosition(const std::uint64_t position)
      {
          if (SBE_BOUNDS_CHECK_EXPECT((position > m_bufferLength), false))
          {
              throw std::runtime_error("buffer too short [E100]");
          }
          return position;
      }
  
      void sbePosition(const std::uint64_t position)
      {
          m_position = sbeCheckPosition(position);
      }
  
      SBE_NODISCARD std::uint64_t encodedLength() const SBE_NOEXCEPT
      {
          return sbePosition() - m_offset;
      }
  
      SBE_NODISCARD std::uint64_t decodeLength() const
      {
          Terminate507 skipper(m_buffer, m_offset,
              m_bufferLength, sbeBlockLength(), m_actingVersion);
          skipper.skip();
          return skipper.encodedLength();
      }
  
      SBE_NODISCARD const char * buffer() const SBE_NOEXCEPT
      {
          return m_buffer;
      }
  
      SBE_NODISCARD char * buffer() SBE_NOEXCEPT
      {
          return m_buffer;
      }
  
      SBE_NODISCARD std::uint64_t bufferLength() const SBE_NOEXCEPT
      {
          return m_bufferLength;
      }
  
      SBE_NODISCARD std::uint64_t actingVersion() const SBE_NOEXCEPT
      {
          return m_actingVersion;
      }
  
      SBE_NODISCARD static const char * ReasonMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "String";
              case MetaAttribute::PRESENCE: return "optional";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t reasonId() SBE_NOEXCEPT
      {
          return 39011;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t reasonSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool reasonInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= reasonSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t reasonEncodingOffset() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR char reasonNullValue() SBE_NOEXCEPT
      {
          return (char)0;
      }
  
      static SBE_CONSTEXPR char reasonMinValue() SBE_NOEXCEPT
      {
          return (char)32;
      }
  
      static SBE_CONSTEXPR char reasonMaxValue() SBE_NOEXCEPT
      {
          return (char)126;
      }
  
      static SBE_CONSTEXPR std::size_t reasonEncodingLength() SBE_NOEXCEPT
      {
          return 48;
      }
  
      static SBE_CONSTEXPR std::uint64_t reasonLength() SBE_NOEXCEPT
      {
          return 48;
      }
  
      SBE_NODISCARD const char *reason() const SBE_NOEXCEPT
      {
          return m_buffer + m_offset + 0;
      }
  
      SBE_NODISCARD char *reason() SBE_NOEXCEPT
      {
          return m_buffer + m_offset + 0;
      }
  
      SBE_NODISCARD char reason(const std::uint64_t index) const
      {
          if (index >= 48)
          {
              throw std::runtime_error("index out of range for reason [E104]");
          }
  
          char val;
          std::memcpy(&val, m_buffer + m_offset + 0 + (index * 1), sizeof(char));
          return (val);
      }
  
      Terminate507 &reason(const std::uint64_t index, const char value)
      {
          if (index >= 48)
          {
              throw std::runtime_error("index out of range for reason [E105]");
          }
  
          char val = (value);
          std::memcpy(m_buffer + m_offset + 0 + (index * 1), &val, sizeof(char));
          return *this;
      }
  
      std::uint64_t getReason(char *const dst, const std::uint64_t length) const
      {
          if (length > 48)
          {
              throw std::runtime_error("length too large for getReason [E106]");
          }
  
          std::memcpy(dst, m_buffer + m_offset + 0, sizeof(char) * static_cast<size_t>(length));
          return length;
      }
  
      Terminate507 &putReason(const char *const src) SBE_NOEXCEPT
      {
          std::memcpy(m_buffer + m_offset + 0, src, sizeof(char) * 48);
          return *this;
      }
  
      SBE_NODISCARD std::string getReasonAsString() const
      {
          const char *buffer = m_buffer + m_offset + 0;
          size_t length = 0;
  
          for (; length < 48 && *(buffer + length) != '\0'; ++length);
          std::string result(buffer, length);
  
          return result;
      }
  
      std::string getReasonAsJsonEscapedString()
      {
          std::ostringstream oss;
          std::string s = getReasonAsString();
  
          for (const auto c : s)
          {
              switch (c)
              {
                  case '"': oss << "\\\""; break;
                  case '\\': oss << "\\\\"; break;
                  case '\b': oss << "\\b"; break;
                  case '\f': oss << "\\f"; break;
                  case '\n': oss << "\\n"; break;
                  case '\r': oss << "\\r"; break;
                  case '\t': oss << "\\t"; break;
  
                  default:
                      if ('\x00' <= c && c <= '\x1f')
                      {
                          oss << "\\u" << std::hex << std::setw(4)
                              << std::setfill('0') << (int)(c);
                      }
                      else
                      {
                          oss << c;
                      }
              }
          }
  
          return oss.str();
      }
  
      #if __cplusplus >= 201703L
      SBE_NODISCARD std::string_view getReasonAsStringView() const SBE_NOEXCEPT
      {
          const char *buffer = m_buffer + m_offset + 0;
          size_t length = 0;
  
          for (; length < 48 && *(buffer + length) != '\0'; ++length);
          std::string_view result(buffer, length);
  
          return result;
      }
      #endif
  
      #if __cplusplus >= 201703L
      Terminate507 &putReason(const std::string_view str)
      {
          const size_t srcLength = str.length();
          if (srcLength > 48)
          {
              throw std::runtime_error("string too large for putReason [E106]");
          }
  
          std::memcpy(m_buffer + m_offset + 0, str.data(), srcLength);
          for (size_t start = srcLength; start < 48; ++start)
          {
              m_buffer[m_offset + 0 + start] = 0;
          }
  
          return *this;
      }
      #else
      Terminate507 &putReason(const std::string& str)
      {
          const size_t srcLength = str.length();
          if (srcLength > 48)
          {
              throw std::runtime_error("string too large for putReason [E106]");
          }
  
          std::memcpy(m_buffer + m_offset + 0, str.c_str(), srcLength);
          for (size_t start = srcLength; start < 48; ++start)
          {
              m_buffer[m_offset + 0 + start] = 0;
          }
  
          return *this;
      }
      #endif
  
      SBE_NODISCARD static const char * UUIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "int";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t uUIDId() SBE_NOEXCEPT
      {
          return 39001;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t uUIDSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool uUIDInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= uUIDSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t uUIDEncodingOffset() SBE_NOEXCEPT
      {
          return 48;
      }
  
      static SBE_CONSTEXPR std::uint64_t uUIDNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT64;
      }
  
      static SBE_CONSTEXPR std::uint64_t uUIDMinValue() SBE_NOEXCEPT
      {
          return 0x0L;
      }
  
      static SBE_CONSTEXPR std::uint64_t uUIDMaxValue() SBE_NOEXCEPT
      {
          return 0xfffffffffffffffeL;
      }
  
      static SBE_CONSTEXPR std::size_t uUIDEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD std::uint64_t uUID() const SBE_NOEXCEPT
      {
          std::uint64_t val;
          std::memcpy(&val, m_buffer + m_offset + 48, sizeof(std::uint64_t));
          return SBE_LITTLE_ENDIAN_ENCODE_64(val);
      }
  
      Terminate507 &uUID(const std::uint64_t value) SBE_NOEXCEPT
      {
          std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value);
          std::memcpy(m_buffer + m_offset + 48, &val, sizeof(std::uint64_t));
          return *this;
      }
  
      SBE_NODISCARD static const char * RequestTimestampMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "int";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t requestTimestampId() SBE_NOEXCEPT
      {
          return 39002;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t requestTimestampSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool requestTimestampInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= requestTimestampSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t requestTimestampEncodingOffset() SBE_NOEXCEPT
      {
          return 56;
      }
  
      static SBE_CONSTEXPR std::uint64_t requestTimestampNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT64;
      }
  
      static SBE_CONSTEXPR std::uint64_t requestTimestampMinValue() SBE_NOEXCEPT
      {
          return 0x0L;
      }
  
      static SBE_CONSTEXPR std::uint64_t requestTimestampMaxValue() SBE_NOEXCEPT
      {
          return 0xfffffffffffffffeL;
      }
  
      static SBE_CONSTEXPR std::size_t requestTimestampEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD std::uint64_t requestTimestamp() const SBE_NOEXCEPT
      {
          std::uint64_t val;
          std::memcpy(&val, m_buffer + m_offset + 56, sizeof(std::uint64_t));
          return SBE_LITTLE_ENDIAN_ENCODE_64(val);
      }
  
      Terminate507 &requestTimestamp(const std::uint64_t value) SBE_NOEXCEPT
      {
          std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value);
          std::memcpy(m_buffer + m_offset + 56, &val, sizeof(std::uint64_t));
          return *this;
      }
  
      SBE_NODISCARD static const char * ErrorCodesMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "int";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t errorCodesId() SBE_NOEXCEPT
      {
          return 39012;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t errorCodesSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool errorCodesInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= errorCodesSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t errorCodesEncodingOffset() SBE_NOEXCEPT
      {
          return 64;
      }
  
      static SBE_CONSTEXPR std::uint16_t errorCodesNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT16;
      }
  
      static SBE_CONSTEXPR std::uint16_t errorCodesMinValue() SBE_NOEXCEPT
      {
          return (std::uint16_t)0;
      }
  
      static SBE_CONSTEXPR std::uint16_t errorCodesMaxValue() SBE_NOEXCEPT
      {
          return (std::uint16_t)65534;
      }
  
      static SBE_CONSTEXPR std::size_t errorCodesEncodingLength() SBE_NOEXCEPT
      {
          return 2;
      }
  
      SBE_NODISCARD std::uint16_t errorCodes() const SBE_NOEXCEPT
      {
          std::uint16_t val;
          std::memcpy(&val, m_buffer + m_offset + 64, sizeof(std::uint16_t));
          return SBE_LITTLE_ENDIAN_ENCODE_16(val);
      }
  
      Terminate507 &errorCodes(const std::uint16_t value) SBE_NOEXCEPT
      {
          std::uint16_t val = SBE_LITTLE_ENDIAN_ENCODE_16(value);
          std::memcpy(m_buffer + m_offset + 64, &val, sizeof(std::uint16_t));
          return *this;
      }
  
      SBE_NODISCARD static const char * SplitMsgMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "int";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t splitMsgId() SBE_NOEXCEPT
      {
          return 9553;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t splitMsgSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool splitMsgInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= splitMsgSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingOffset() SBE_NOEXCEPT
      {
          return 66;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t splitMsgEncodingLength() SBE_NOEXCEPT
      {
          return 1;
      }
  
      SBE_NODISCARD SplitMsg::Value splitMsg() const SBE_NOEXCEPT
      {
          std::uint8_t val;
          std::memcpy(&val, m_buffer + m_offset + 66, sizeof(std::uint8_t));
          return SplitMsg::get((val));
      }
  
      Terminate507 &splitMsg(const SplitMsg::Value value) SBE_NOEXCEPT
      {
          std::uint8_t val = (value);
          std::memcpy(m_buffer + m_offset + 66, &val, sizeof(std::uint8_t));
          return *this;
      }
  
  template<typename CharT, typename Traits>
  friend std::basic_ostream<CharT, Traits>& operator << (
      std::basic_ostream<CharT, Traits>& builder, Terminate507 _writer)
  {
      Terminate507 writer(_writer.m_buffer, _writer.m_offset,
          _writer.m_bufferLength, _writer.sbeBlockLength(), _writer.m_actingVersion);
      builder << '{';
      builder << R"("Name": "Terminate507", )";
      builder << R"("sbeTemplateId": )";
      builder << writer.sbeTemplateId();
      builder << ", ";
  
      builder << R"("Reason": )";
      builder << '"' <<
          writer.getReasonAsJsonEscapedString().c_str() << '"';
  
      builder << ", ";
      builder << R"("UUID": )";
      builder << +writer.uUID();
  
      builder << ", ";
      builder << R"("RequestTimestamp": )";
      builder << +writer.requestTimestamp();
  
      builder << ", ";
      builder << R"("ErrorCodes": )";
      builder << +writer.errorCodes();
  
      builder << ", ";
      builder << R"("SplitMsg": )";
      builder << '"' << writer.splitMsg() << '"';
  
      builder << '}';
  
      return builder;
  }
  
  void skip()
  {
  }
  
  SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
  {
      return true;
  }
  
  SBE_NODISCARD static SBE_CONSTEXPR_14 size_t computeLength()
  {
  #if defined(__GNUG__) && !defined(__clang__)
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wtype-limits"
  #endif
      size_t length = sbeBlockLength();
  
      return length;
  #if defined(__GNUG__) && !defined(__clang__)
  #pragma GCC diagnostic pop
  #endif
  }
  };
  }
  #endif
  