text: /* Generated SBE (Simple Binary Encoding) message codec */
  #ifndef _FINSLICE_MD_ORDERUPDATE_H_
  #define _FINSLICE_MD_ORDERUPDATE_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 >= 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>
  #include <tuple>
  
  #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 "MessageHeader.h"
  #include "OrderActionType.h"
  #include "SideType.h"
  
  namespace finslice_md {
  
  class OrderUpdate
  {
  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_actingBlockLength = 0;
      std::uint64_t m_actingVersion = 0;
  
      inline std::uint64_t *sbePositionPtr() SBE_NOEXCEPT
      {
          return &m_position;
      }
  
  public:
      static const std::uint16_t SBE_BLOCK_LENGTH = static_cast<std::uint16_t>(76);
      static const std::uint16_t SBE_TEMPLATE_ID = static_cast<std::uint16_t>(20);
      static const std::uint16_t SBE_SCHEMA_ID = static_cast<std::uint16_t>(1);
      static const std::uint16_t SBE_SCHEMA_VERSION = static_cast<std::uint16_t>(1);
  
      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;
      };
  
      using messageHeader = MessageHeader;
  
      OrderUpdate() = default;
  
      OrderUpdate(
          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_actingBlockLength(actingBlockLength),
          m_actingVersion(actingVersion)
      {
      }
  
      OrderUpdate(char *buffer, const std::uint64_t bufferLength) :
          OrderUpdate(buffer, 0, bufferLength, sbeBlockLength(), sbeSchemaVersion())
      {
      }
  
      OrderUpdate(
          char *buffer,
          const std::uint64_t bufferLength,
          const std::uint64_t actingBlockLength,
          const std::uint64_t actingVersion) :
          OrderUpdate(buffer, 0, bufferLength, actingBlockLength, actingVersion)
      {
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeBlockLength() SBE_NOEXCEPT
      {
          return static_cast<std::uint16_t>(76);
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sbeBlockAndHeaderLength() SBE_NOEXCEPT
      {
          return messageHeader::encodedLength() + sbeBlockLength();
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeTemplateId() SBE_NOEXCEPT
      {
          return static_cast<std::uint16_t>(20);
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaId() SBE_NOEXCEPT
      {
          return static_cast<std::uint16_t>(1);
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint16_t sbeSchemaVersion() SBE_NOEXCEPT
      {
          return static_cast<std::uint16_t>(1);
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR const char *sbeSemanticType() SBE_NOEXCEPT
      {
          return "D";
      }
  
      SBE_NODISCARD std::uint64_t offset() const SBE_NOEXCEPT
      {
          return m_offset;
      }
  
      OrderUpdate &wrapForEncode(char *buffer, const std::uint64_t offset, const std::uint64_t bufferLength)
      {
          return *this = OrderUpdate(buffer, offset, bufferLength, sbeBlockLength(), sbeSchemaVersion());
      }
  
      OrderUpdate &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 = OrderUpdate(
              buffer,
              offset + messageHeader::encodedLength(),
              bufferLength,
              sbeBlockLength(),
              sbeSchemaVersion());
      }
  
      OrderUpdate &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 = OrderUpdate(buffer, offset, bufferLength, actingBlockLength, actingVersion);
      }
  
      OrderUpdate &sbeRewind()
      {
          return wrapForDecode(m_buffer, m_offset, m_actingBlockLength, m_actingVersion, m_bufferLength);
      }
  
      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
      {
          OrderUpdate 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 *TransactTimeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "UTCTimestamp";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t transactTimeId() SBE_NOEXCEPT
      {
          return 60;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t transactTimeSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool transactTimeInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= transactTimeSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t transactTimeEncodingOffset() SBE_NOEXCEPT
      {
          return 0;
      }
  
      static SBE_CONSTEXPR std::uint64_t transactTimeNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT64;
      }
  
      static SBE_CONSTEXPR std::uint64_t transactTimeMinValue() SBE_NOEXCEPT
      {
          return UINT64_C(0x0);
      }
  
      static SBE_CONSTEXPR std::uint64_t transactTimeMaxValue() SBE_NOEXCEPT
      {
          return UINT64_C(0xfffffffffffffffe);
      }
  
      static SBE_CONSTEXPR std::size_t transactTimeEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD std::uint64_t transactTime() const SBE_NOEXCEPT
      {
          std::uint64_t val;
          std::memcpy(&val, m_buffer + m_offset + 0, sizeof(std::uint64_t));
          return SBE_LITTLE_ENDIAN_ENCODE_64(val);
      }
  
      OrderUpdate &transactTime(const std::uint64_t value) SBE_NOEXCEPT
      {
          std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value);
          std::memcpy(m_buffer + m_offset + 0, &val, sizeof(std::uint64_t));
          return *this;
      }
  
      SBE_NODISCARD static const char *SecurityIDMetaAttribute(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 securityIDId() SBE_NOEXCEPT
      {
          return 48;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securityIDSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool securityIDInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= securityIDSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t securityIDEncodingOffset() SBE_NOEXCEPT
      {
          return 8;
      }
  
      static SBE_CONSTEXPR std::uint32_t securityIDNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT32;
      }
  
      static SBE_CONSTEXPR std::uint32_t securityIDMinValue() SBE_NOEXCEPT
      {
          return UINT32_C(0x0);
      }
  
      static SBE_CONSTEXPR std::uint32_t securityIDMaxValue() SBE_NOEXCEPT
      {
          return UINT32_C(0xfffffffe);
      }
  
      static SBE_CONSTEXPR std::size_t securityIDEncodingLength() SBE_NOEXCEPT
      {
          return 4;
      }
  
      SBE_NODISCARD std::uint32_t securityID() const SBE_NOEXCEPT
      {
          std::uint32_t val;
          std::memcpy(&val, m_buffer + m_offset + 8, sizeof(std::uint32_t));
          return SBE_LITTLE_ENDIAN_ENCODE_32(val);
      }
  
      OrderUpdate &securityID(const std::uint32_t value) SBE_NOEXCEPT
      {
          std::uint32_t val = SBE_LITTLE_ENDIAN_ENCODE_32(value);
          std::memcpy(m_buffer + m_offset + 8, &val, sizeof(std::uint32_t));
          return *this;
      }
  
      SBE_NODISCARD static const char *OrderActionMetaAttribute(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 orderActionId() SBE_NOEXCEPT
      {
          return 279;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderActionSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool orderActionInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderActionSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderActionEncodingOffset() SBE_NOEXCEPT
      {
          return 12;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderActionEncodingLength() SBE_NOEXCEPT
      {
          return 1;
      }
  
      SBE_NODISCARD std::uint8_t orderActionRaw() const SBE_NOEXCEPT
      {
          std::uint8_t val;
          std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t));
          return (val);
      }
  
      SBE_NODISCARD OrderActionType::Value orderAction() const
      {
          std::uint8_t val;
          std::memcpy(&val, m_buffer + m_offset + 12, sizeof(std::uint8_t));
          return OrderActionType::get((val));
      }
  
      OrderUpdate &orderAction(const OrderActionType::Value value) SBE_NOEXCEPT
      {
          std::uint8_t val = (value);
          std::memcpy(m_buffer + m_offset + 12, &val, sizeof(std::uint8_t));
          return *this;
      }
  
      SBE_NODISCARD static const char *SideMetaAttribute(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 sideId() SBE_NOEXCEPT
      {
          return 54;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sideSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool sideInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= sideSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingOffset() SBE_NOEXCEPT
      {
          return 13;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t sideEncodingLength() SBE_NOEXCEPT
      {
          return 1;
      }
  
      SBE_NODISCARD std::uint8_t sideRaw() const SBE_NOEXCEPT
      {
          std::uint8_t val;
          std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint8_t));
          return (val);
      }
  
      SBE_NODISCARD SideType::Value side() const
      {
          std::uint8_t val;
          std::memcpy(&val, m_buffer + m_offset + 13, sizeof(std::uint8_t));
          return SideType::get((val));
      }
  
      OrderUpdate &side(const SideType::Value value) SBE_NOEXCEPT
      {
          std::uint8_t val = (value);
          std::memcpy(m_buffer + m_offset + 13, &val, sizeof(std::uint8_t));
          return *this;
      }
  
      SBE_NODISCARD static const char *PriceMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "double";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t priceId() SBE_NOEXCEPT
      {
          return 270;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t priceSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool priceInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= priceSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t priceEncodingOffset() SBE_NOEXCEPT
      {
          return 16;
      }
  
      static SBE_CONSTEXPR double priceNullValue() SBE_NOEXCEPT
      {
          return SBE_DOUBLE_NAN;
      }
  
      static SBE_CONSTEXPR double priceMinValue() SBE_NOEXCEPT
      {
          return 4.9E-324;
      }
  
      static SBE_CONSTEXPR double priceMaxValue() SBE_NOEXCEPT
      {
          return 1.7976931348623157E308;
      }
  
      static SBE_CONSTEXPR std::size_t priceEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD double price() const SBE_NOEXCEPT
      {
          union sbe_double_as_uint_u val;
          std::memcpy(&val, m_buffer + m_offset + 16, sizeof(double));
          val.uint_value = SBE_LITTLE_ENDIAN_ENCODE_64(val.uint_value);
          return val.fp_value;
      }
  
      OrderUpdate &price(const double value) SBE_NOEXCEPT
      {
          union sbe_double_as_uint_u val;
          val.fp_value = value;
          val.uint_value = SBE_LITTLE_ENDIAN_ENCODE_64(val.uint_value);
          std::memcpy(m_buffer + m_offset + 16, &val, sizeof(double));
          return *this;
      }
  
      SBE_NODISCARD static const char *SizeMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "double";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t sizeId() SBE_NOEXCEPT
      {
          return 271;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t sizeSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool sizeInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= sizeSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t sizeEncodingOffset() SBE_NOEXCEPT
      {
          return 24;
      }
  
      static SBE_CONSTEXPR double sizeNullValue() SBE_NOEXCEPT
      {
          return SBE_DOUBLE_NAN;
      }
  
      static SBE_CONSTEXPR double sizeMinValue() SBE_NOEXCEPT
      {
          return 4.9E-324;
      }
  
      static SBE_CONSTEXPR double sizeMaxValue() SBE_NOEXCEPT
      {
          return 1.7976931348623157E308;
      }
  
      static SBE_CONSTEXPR std::size_t sizeEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD double size() const SBE_NOEXCEPT
      {
          union sbe_double_as_uint_u val;
          std::memcpy(&val, m_buffer + m_offset + 24, sizeof(double));
          val.uint_value = SBE_LITTLE_ENDIAN_ENCODE_64(val.uint_value);
          return val.fp_value;
      }
  
      OrderUpdate &size(const double value) SBE_NOEXCEPT
      {
          union sbe_double_as_uint_u val;
          val.fp_value = value;
          val.uint_value = SBE_LITTLE_ENDIAN_ENCODE_64(val.uint_value);
          std::memcpy(m_buffer + m_offset + 24, &val, sizeof(double));
          return *this;
      }
  
      SBE_NODISCARD static const char *SecuritySequenceMetaAttribute(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 securitySequenceId() SBE_NOEXCEPT
      {
          return 83;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t securitySequenceSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool securitySequenceInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= securitySequenceSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t securitySequenceEncodingOffset() SBE_NOEXCEPT
      {
          return 32;
      }
  
      static SBE_CONSTEXPR std::uint64_t securitySequenceNullValue() SBE_NOEXCEPT
      {
          return SBE_NULLVALUE_UINT64;
      }
  
      static SBE_CONSTEXPR std::uint64_t securitySequenceMinValue() SBE_NOEXCEPT
      {
          return UINT64_C(0x0);
      }
  
      static SBE_CONSTEXPR std::uint64_t securitySequenceMaxValue() SBE_NOEXCEPT
      {
          return UINT64_C(0xfffffffffffffffe);
      }
  
      static SBE_CONSTEXPR std::size_t securitySequenceEncodingLength() SBE_NOEXCEPT
      {
          return 8;
      }
  
      SBE_NODISCARD std::uint64_t securitySequence() const SBE_NOEXCEPT
      {
          std::uint64_t val;
          std::memcpy(&val, m_buffer + m_offset + 32, sizeof(std::uint64_t));
          return SBE_LITTLE_ENDIAN_ENCODE_64(val);
      }
  
      OrderUpdate &securitySequence(const std::uint64_t value) SBE_NOEXCEPT
      {
          std::uint64_t val = SBE_LITTLE_ENDIAN_ENCODE_64(value);
          std::memcpy(m_buffer + m_offset + 32, &val, sizeof(std::uint64_t));
          return *this;
      }
  
      SBE_NODISCARD static const char *OrderIDMetaAttribute(const MetaAttribute metaAttribute) SBE_NOEXCEPT
      {
          switch (metaAttribute)
          {
              case MetaAttribute::SEMANTIC_TYPE: return "String";
              case MetaAttribute::PRESENCE: return "required";
              default: return "";
          }
      }
  
      static SBE_CONSTEXPR std::uint16_t orderIDId() SBE_NOEXCEPT
      {
          return 37;
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::uint64_t orderIDSinceVersion() SBE_NOEXCEPT
      {
          return 0;
      }
  
      SBE_NODISCARD bool orderIDInActingVersion() SBE_NOEXCEPT
      {
  #if defined(__clang__)
  #pragma clang diagnostic push
  #pragma clang diagnostic ignored "-Wtautological-compare"
  #endif
          return m_actingVersion >= orderIDSinceVersion();
  #if defined(__clang__)
  #pragma clang diagnostic pop
  #endif
      }
  
      SBE_NODISCARD static SBE_CONSTEXPR std::size_t orderIDEncodingOffset() SBE_NOEXCEPT
      {
          return 40;
      }
  
      static SBE_CONSTEXPR char orderIDNullValue() SBE_NOEXCEPT
      {
          return static_cast<char>(0);
      }
  
      static SBE_CONSTEXPR char orderIDMinValue() SBE_NOEXCEPT
      {
          return static_cast<char>(32);
      }
  
      static SBE_CONSTEXPR char orderIDMaxValue() SBE_NOEXCEPT
      {
          return static_cast<char>(126);
      }
  
      static SBE_CONSTEXPR std::size_t orderIDEncodingLength() SBE_NOEXCEPT
      {
          return 36;
      }
  
      static SBE_CONSTEXPR std::uint64_t orderIDLength() SBE_NOEXCEPT
      {
          return 36;
      }
  
      SBE_NODISCARD const char *orderID() const SBE_NOEXCEPT
      {
          return m_buffer + m_offset + 40;
      }
  
      SBE_NODISCARD char *orderID() SBE_NOEXCEPT
      {
          return m_buffer + m_offset + 40;
      }
  
      SBE_NODISCARD char orderID(const std::uint64_t index) const
      {
          if (index >= 36)
          {
              throw std::runtime_error("index out of range for orderID [E104]");
          }
  
          char val;
          std::memcpy(&val, m_buffer + m_offset + 40 + (index * 1), sizeof(char));
          return (val);
      }
  
      OrderUpdate &orderID(const std::uint64_t index, const char value)
      {
          if (index >= 36)
          {
              throw std::runtime_error("index out of range for orderID [E105]");
          }
  
          char val = (value);
          std::memcpy(m_buffer + m_offset + 40 + (index * 1), &val, sizeof(char));
          return *this;
      }
  
      std::uint64_t getOrderID(char *const dst, const std::uint64_t length) const
      {
          if (length > 36)
          {
              throw std::runtime_error("length too large for getOrderID [E106]");
          }
  
          std::memcpy(dst, m_buffer + m_offset + 40, sizeof(char) * static_cast<std::size_t>(length));
          return length;
      }
  
      OrderUpdate &putOrderID(const char *const src) SBE_NOEXCEPT
      {
          std::memcpy(m_buffer + m_offset + 40, src, sizeof(char) * 36);
          return *this;
      }
  
      SBE_NODISCARD std::string getOrderIDAsString() const
      {
          const char *buffer = m_buffer + m_offset + 40;
          std::size_t length = 0;
  
          for (; length < 36 && *(buffer + length) != '\0'; ++length);
          std::string result(buffer, length);
  
          return result;
      }
  
      std::string getOrderIDAsJsonEscapedString()
      {
          std::ostringstream oss;
          std::string s = getOrderIDAsString();
  
          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 getOrderIDAsStringView() const SBE_NOEXCEPT
      {
          const char *buffer = m_buffer + m_offset + 40;
          std::size_t length = 0;
  
          for (; length < 36 && *(buffer + length) != '\0'; ++length);
          std::string_view result(buffer, length);
  
          return result;
      }
      #endif
  
      #if __cplusplus >= 201703L
      OrderUpdate &putOrderID(const std::string_view str)
      {
          const std::size_t srcLength = str.length();
          if (srcLength > 36)
          {
              throw std::runtime_error("string too large for putOrderID [E106]");
          }
  
          std::memcpy(m_buffer + m_offset + 40, str.data(), srcLength);
          for (std::size_t start = srcLength; start < 36; ++start)
          {
              m_buffer[m_offset + 40 + start] = 0;
          }
  
          return *this;
      }
      #else
      OrderUpdate &putOrderID(const std::string &str)
      {
          const std::size_t srcLength = str.length();
          if (srcLength > 36)
          {
              throw std::runtime_error("string too large for putOrderID [E106]");
          }
  
          std::memcpy(m_buffer + m_offset + 40, str.c_str(), srcLength);
          for (std::size_t start = srcLength; start < 36; ++start)
          {
              m_buffer[m_offset + 40 + start] = 0;
          }
  
          return *this;
      }
      #endif
  
  template<typename CharT, typename Traits>
  friend std::basic_ostream<CharT, Traits> & operator << (
      std::basic_ostream<CharT, Traits> &builder, OrderUpdate _writer)
  {
      OrderUpdate writer(
          _writer.m_buffer,
          _writer.m_offset,
          _writer.m_bufferLength,
          _writer.m_actingBlockLength,
          _writer.m_actingVersion);
  
      builder << '{';
      builder << R"("Name": "OrderUpdate", )";
      builder << R"("sbeTemplateId": )";
      builder << writer.sbeTemplateId();
      builder << ", ";
  
      builder << R"("TransactTime": )";
      builder << +writer.transactTime();
  
      builder << ", ";
      builder << R"("SecurityID": )";
      builder << +writer.securityID();
  
      builder << ", ";
      builder << R"("OrderAction": )";
      builder << '"' << writer.orderAction() << '"';
  
      builder << ", ";
      builder << R"("Side": )";
      builder << '"' << writer.side() << '"';
  
      builder << ", ";
      builder << R"("Price": )";
      builder << +writer.price();
  
      builder << ", ";
      builder << R"("Size": )";
      builder << +writer.size();
  
      builder << ", ";
      builder << R"("SecuritySequence": )";
      builder << +writer.securitySequence();
  
      builder << ", ";
      builder << R"("OrderID": )";
      builder << '"' <<
          writer.getOrderIDAsJsonEscapedString().c_str() << '"';
  
      builder << '}';
  
      return builder;
  }
  
  void skip()
  {
  }
  
  SBE_NODISCARD static SBE_CONSTEXPR bool isConstLength() SBE_NOEXCEPT
  {
      return true;
  }
  
  SBE_NODISCARD static std::size_t computeLength()
  {
  #if defined(__GNUG__) && !defined(__clang__)
  #pragma GCC diagnostic push
  #pragma GCC diagnostic ignored "-Wtype-limits"
  #endif
      std::size_t length = sbeBlockLength();
  
      return length;
  #if defined(__GNUG__) && !defined(__clang__)
  #pragma GCC diagnostic pop
  #endif
  }
  };
  }
  #endif
  