/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_id.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once


/**
 * This header file includes the tcc files of the corresponding header file
 * and the header files of its dependent types. Include this header file
 * only when you need to use custom protocols (e.g. DebugProtocol,
 * VirtualProtocol) to read/write thrift structs.
 */

#include "thrift/lib/thrift/gen-cpp2/type_id_types.tcc"



namespace apache {
namespace thrift {
namespace detail {

template <>
struct TccStructTraits<::apache::thrift::type_system::ListTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::SetTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::MapTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::BoolTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::ByteTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::I16TypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::I32TypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::I64TypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::FloatTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::DoubleTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::StringTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::BinaryTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::AnyTypeIdStruct> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};
template <>
struct TccStructTraits<::apache::thrift::type_system::TypeIdUnion> {
  static void translateFieldName(
      std::string_view _fname,
      int16_t& fid,
      apache::thrift::protocol::TType& _ftype) noexcept;
};

} // namespace detail
} // namespace thrift
} // namespace apache

namespace apache::thrift::type_system {

template <class Protocol_>
void ListTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_elementType:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type_system::TypeId>>();
    ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*iprot, *ptr);
    this->__fbthrift_field_elementType = std::move(ptr);
    _readState.afterSubobject(iprot);
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ListTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_elementType;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ListTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ListTypeId");
  if (this->__fbthrift_field_elementType) {
    xfer += prot_->serializedFieldSize("elementType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ListTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ListTypeId");
  if (this->__fbthrift_field_elementType) {
    xfer += prot_->serializedFieldSize("elementType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ListTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ListTypeId");
  bool previousFieldHasValue = true;
  if (this->__fbthrift_field_elementType) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "elementType", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ListTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ListTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ListTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ListTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ListTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ListTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ListTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ListTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void SetTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_elementType:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type_system::TypeId>>();
    ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*iprot, *ptr);
    this->__fbthrift_field_elementType = std::move(ptr);
    _readState.afterSubobject(iprot);
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<SetTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_elementType;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t SetTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("SetTypeId");
  if (this->__fbthrift_field_elementType) {
    xfer += prot_->serializedFieldSize("elementType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t SetTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("SetTypeId");
  if (this->__fbthrift_field_elementType) {
    xfer += prot_->serializedFieldSize("elementType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t SetTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("SetTypeId");
  bool previousFieldHasValue = true;
  if (this->__fbthrift_field_elementType) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "elementType", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_elementType);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void SetTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t SetTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t SetTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t SetTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void SetTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t SetTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t SetTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t SetTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void MapTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          1,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_keyType:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type_system::TypeId>>();
    ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*iprot, *ptr);
    this->__fbthrift_field_keyType = std::move(ptr);
    _readState.afterSubobject(iprot);
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          1,
          2,
          apache::thrift::protocol::T_STRUCT))) {
    goto _advance_failure;
  }
_readField_valueType:
  {
    _readState.beforeSubobject(iprot);
    auto ptr = ::apache::thrift::detail::make_mutable_smart_ptr<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type_system::TypeId>>();
    ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*iprot, *ptr);
    this->__fbthrift_field_valueType = std::move(ptr);
    _readState.afterSubobject(iprot);
  }

  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          2,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _advance_failure;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<MapTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    case 1:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_keyType;
      } else {
        goto _skip;
      }
    }
    case 2:
    {
      if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) {
        goto _readField_valueType;
      } else {
        goto _skip;
      }
    }
    default:
    {
_skip:
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t MapTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("MapTypeId");
  if (this->__fbthrift_field_keyType) {
    xfer += prot_->serializedFieldSize("keyType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_keyType);
  }
  if (this->__fbthrift_field_valueType) {
    xfer += prot_->serializedFieldSize("valueType", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_valueType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t MapTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("MapTypeId");
  if (this->__fbthrift_field_keyType) {
    xfer += prot_->serializedFieldSize("keyType", apache::thrift::protocol::T_STRUCT, 1);
    xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_keyType);
  }
  if (this->__fbthrift_field_valueType) {
    xfer += prot_->serializedFieldSize("valueType", apache::thrift::protocol::T_STRUCT, 2);
    xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_valueType);
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t MapTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("MapTypeId");
  bool previousFieldHasValue = true;
  if (this->__fbthrift_field_keyType) {
    constexpr int16_t kPrevFieldId = 0;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "keyType", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_keyType);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  if (this->__fbthrift_field_valueType) {
    constexpr int16_t kPrevFieldId = 1;
    xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "valueType", previousFieldHasValue);
    previousFieldHasValue = true;
    xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>>(*prot_, *this->__fbthrift_field_valueType);
    xfer += prot_->writeFieldEnd();
  } else {
    previousFieldHasValue = false;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void MapTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t MapTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t MapTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t MapTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void MapTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t MapTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t MapTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t MapTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void BoolTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<BoolTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t BoolTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("BoolTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t BoolTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("BoolTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t BoolTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("BoolTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void BoolTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t BoolTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t BoolTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t BoolTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void BoolTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t BoolTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t BoolTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t BoolTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void ByteTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<ByteTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t ByteTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ByteTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ByteTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("ByteTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t ByteTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("ByteTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void ByteTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t ByteTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t ByteTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t ByteTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void ByteTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t ByteTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t ByteTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t ByteTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void I16TypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<I16TypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t I16TypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I16TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I16TypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I16TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I16TypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("I16TypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void I16TypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t I16TypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t I16TypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t I16TypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void I16TypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t I16TypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t I16TypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t I16TypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void I32TypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<I32TypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t I32TypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I32TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I32TypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I32TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I32TypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("I32TypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void I32TypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t I32TypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t I32TypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t I32TypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void I32TypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t I32TypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t I32TypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t I32TypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void I64TypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<I64TypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t I64TypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I64TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I64TypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("I64TypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t I64TypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("I64TypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void I64TypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t I64TypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t I64TypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t I64TypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void I64TypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t I64TypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t I64TypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t I64TypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void FloatTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<FloatTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t FloatTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("FloatTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t FloatTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("FloatTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t FloatTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("FloatTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void FloatTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t FloatTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t FloatTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t FloatTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void FloatTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t FloatTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t FloatTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t FloatTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void DoubleTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<DoubleTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t DoubleTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("DoubleTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t DoubleTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("DoubleTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t DoubleTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("DoubleTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void DoubleTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t DoubleTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t DoubleTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t DoubleTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void DoubleTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t DoubleTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t DoubleTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t DoubleTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void StringTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<StringTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t StringTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StringTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StringTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("StringTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t StringTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("StringTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void StringTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t StringTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t StringTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t StringTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void StringTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t StringTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t StringTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t StringTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void BinaryTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<BinaryTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t BinaryTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("BinaryTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t BinaryTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("BinaryTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t BinaryTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("BinaryTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void BinaryTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t BinaryTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t BinaryTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t BinaryTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void BinaryTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t BinaryTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t BinaryTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t BinaryTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void AnyTypeIdStruct::readNoXfer(Protocol_* iprot) {
  __fbthrift_clear_terse_fields();

  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;

  _readState.readStructBegin(iprot);

  using apache::thrift::TProtocolException;


  if (UNLIKELY(!_readState.advanceToNextField(
          iprot,
          0,
          0,
          apache::thrift::protocol::T_STOP))) {
    goto _loop;
  }

_end:
  _readState.readStructEnd(iprot);

  return;

  goto _advance_failure; // Avoid compiler warnings about unused labels.
  _advance_failure:
  _readState.afterAdvanceFailure(iprot);
_loop:
  if (_readState.atStop()) {
    goto _end;
  }
  if (iprot->kUsesFieldNames()) {
    _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<AnyTypeIdStruct>>();
  }

  switch (_readState.fieldId) {
    default:
    {
      _readState.skip(iprot);
      _readState.readFieldEnd(iprot);
      _readState.readFieldBeginNoInline(iprot);
      goto _loop;
    }
  }
}

template <class Protocol_>
uint32_t AnyTypeIdStruct::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("AnyTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t AnyTypeIdStruct::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("AnyTypeId");
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t AnyTypeIdStruct::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("AnyTypeId");
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void AnyTypeIdStruct::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t AnyTypeIdStruct::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t AnyTypeIdStruct::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t AnyTypeIdStruct::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void AnyTypeIdStruct::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t AnyTypeIdStruct::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t AnyTypeIdStruct::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t AnyTypeIdStruct::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


template <class Protocol_>
void TypeIdUnion::readNoXfer(Protocol_* iprot) {
  apache::thrift::detail::ProtocolReaderStructReadState<Protocol_> _readState;
  _readState.fieldId = 0;

  _readState.readStructBegin(iprot);

  _readState.readFieldBegin(iprot);
  if (_readState.atStop()) {
    apache::thrift::clear(*this);
  } else {
    if (iprot->kUsesFieldNames()) {
      _readState.template fillFieldTraitsFromName<apache::thrift::detail::TccStructTraits<TypeIdUnion>>();
    }
    switch (_readState.fieldId) {
      case 1:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->boolType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BoolTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BoolTypeIdStruct>>>(*iprot, value_.boolType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 2:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->byteType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ByteTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ByteTypeIdStruct>>>(*iprot, value_.byteType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 3:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->i16Type_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I16TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I16TypeIdStruct>>>(*iprot, value_.i16Type);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 4:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->i32Type_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I32TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I32TypeIdStruct>>>(*iprot, value_.i32Type);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 5:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->i64Type_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I64TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I64TypeIdStruct>>>(*iprot, value_.i64Type);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 6:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->floatType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::FloatTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::FloatTypeIdStruct>>>(*iprot, value_.floatType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 7:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->doubleType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::DoubleTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::DoubleTypeIdStruct>>>(*iprot, value_.doubleType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 8:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->stringType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::StringTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::StringTypeIdStruct>>>(*iprot, value_.stringType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 9:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->binaryType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BinaryTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BinaryTypeIdStruct>>>(*iprot, value_.binaryType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 10:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->anyType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::AnyTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::AnyTypeIdStruct>>>(*iprot, value_.anyType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 11:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRING)) {
          this->userDefinedType_ref().emplace();
          ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::type_system::Uri>::readWithContext(*iprot, value_.userDefinedType, _readState);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 12:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->listType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ListTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ListTypeIdStruct>>>(*iprot, value_.listType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 13:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->setType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::SetTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::SetTypeIdStruct>>>(*iprot, value_.setType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      case 14:
      {
        if (_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT)) {
          this->mapType_ref().emplace();
          _readState.beforeSubobject(iprot);
          ::apache::thrift::op::decode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::MapTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::MapTypeIdStruct>>>(*iprot, value_.mapType);
          _readState.afterSubobject(iprot);
        } else {
          _readState.skip(iprot);
        }
        break;
      }
      default:
      {
        _readState.skip(iprot);
        break;
      }
    }
    _readState.readFieldEnd(iprot);
    _readState.readFieldBegin(iprot);
    if (UNLIKELY(!_readState.atStop())) {
      using apache::thrift::protocol::TProtocolException;
      TProtocolException::throwUnionMissingStop();
    }
  }
  _readState.readStructEnd(iprot);
}
template <class Protocol_>
uint32_t TypeIdUnion::serializedSize(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("TypeId");
  switch(this->getType()) {
    case TypeIdUnion::Type::boolType:
    {
      xfer += prot_->serializedFieldSize("boolType", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BoolTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BoolTypeIdStruct>>>(*prot_, value_.boolType);
      break;
    }
    case TypeIdUnion::Type::byteType:
    {
      xfer += prot_->serializedFieldSize("byteType", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ByteTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ByteTypeIdStruct>>>(*prot_, value_.byteType);
      break;
    }
    case TypeIdUnion::Type::i16Type:
    {
      xfer += prot_->serializedFieldSize("i16Type", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I16TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I16TypeIdStruct>>>(*prot_, value_.i16Type);
      break;
    }
    case TypeIdUnion::Type::i32Type:
    {
      xfer += prot_->serializedFieldSize("i32Type", apache::thrift::protocol::T_STRUCT, 4);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I32TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I32TypeIdStruct>>>(*prot_, value_.i32Type);
      break;
    }
    case TypeIdUnion::Type::i64Type:
    {
      xfer += prot_->serializedFieldSize("i64Type", apache::thrift::protocol::T_STRUCT, 5);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I64TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I64TypeIdStruct>>>(*prot_, value_.i64Type);
      break;
    }
    case TypeIdUnion::Type::floatType:
    {
      xfer += prot_->serializedFieldSize("floatType", apache::thrift::protocol::T_STRUCT, 6);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::FloatTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::FloatTypeIdStruct>>>(*prot_, value_.floatType);
      break;
    }
    case TypeIdUnion::Type::doubleType:
    {
      xfer += prot_->serializedFieldSize("doubleType", apache::thrift::protocol::T_STRUCT, 7);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::DoubleTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::DoubleTypeIdStruct>>>(*prot_, value_.doubleType);
      break;
    }
    case TypeIdUnion::Type::stringType:
    {
      xfer += prot_->serializedFieldSize("stringType", apache::thrift::protocol::T_STRUCT, 8);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::StringTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::StringTypeIdStruct>>>(*prot_, value_.stringType);
      break;
    }
    case TypeIdUnion::Type::binaryType:
    {
      xfer += prot_->serializedFieldSize("binaryType", apache::thrift::protocol::T_STRUCT, 9);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BinaryTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BinaryTypeIdStruct>>>(*prot_, value_.binaryType);
      break;
    }
    case TypeIdUnion::Type::anyType:
    {
      xfer += prot_->serializedFieldSize("anyType", apache::thrift::protocol::T_STRUCT, 10);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::AnyTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::AnyTypeIdStruct>>>(*prot_, value_.anyType);
      break;
    }
    case TypeIdUnion::Type::userDefinedType:
    {
      xfer += prot_->serializedFieldSize("userDefinedType", apache::thrift::protocol::T_STRING, 11);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::type_system::Uri>::serializedSize<false>(*prot_, value_.userDefinedType);
      break;
    }
    case TypeIdUnion::Type::listType:
    {
      xfer += prot_->serializedFieldSize("listType", apache::thrift::protocol::T_STRUCT, 12);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ListTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ListTypeIdStruct>>>(*prot_, value_.listType);
      break;
    }
    case TypeIdUnion::Type::setType:
    {
      xfer += prot_->serializedFieldSize("setType", apache::thrift::protocol::T_STRUCT, 13);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::SetTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::SetTypeIdStruct>>>(*prot_, value_.setType);
      break;
    }
    case TypeIdUnion::Type::mapType:
    {
      xfer += prot_->serializedFieldSize("mapType", apache::thrift::protocol::T_STRUCT, 14);
      xfer += ::apache::thrift::op::serialized_size<false, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::MapTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::MapTypeIdStruct>>>(*prot_, value_.mapType);
      break;
    }
    case TypeIdUnion::Type::__EMPTY__:
      break;
    default:
      break;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t TypeIdUnion::serializedSizeZC(Protocol_ const* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->serializedStructSize("TypeId");
  switch(this->getType()) {
    case TypeIdUnion::Type::boolType:
    {
      xfer += prot_->serializedFieldSize("boolType", apache::thrift::protocol::T_STRUCT, 1);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BoolTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BoolTypeIdStruct>>>(*prot_, value_.boolType);
      break;
    }
    case TypeIdUnion::Type::byteType:
    {
      xfer += prot_->serializedFieldSize("byteType", apache::thrift::protocol::T_STRUCT, 2);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ByteTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ByteTypeIdStruct>>>(*prot_, value_.byteType);
      break;
    }
    case TypeIdUnion::Type::i16Type:
    {
      xfer += prot_->serializedFieldSize("i16Type", apache::thrift::protocol::T_STRUCT, 3);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I16TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I16TypeIdStruct>>>(*prot_, value_.i16Type);
      break;
    }
    case TypeIdUnion::Type::i32Type:
    {
      xfer += prot_->serializedFieldSize("i32Type", apache::thrift::protocol::T_STRUCT, 4);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I32TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I32TypeIdStruct>>>(*prot_, value_.i32Type);
      break;
    }
    case TypeIdUnion::Type::i64Type:
    {
      xfer += prot_->serializedFieldSize("i64Type", apache::thrift::protocol::T_STRUCT, 5);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I64TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I64TypeIdStruct>>>(*prot_, value_.i64Type);
      break;
    }
    case TypeIdUnion::Type::floatType:
    {
      xfer += prot_->serializedFieldSize("floatType", apache::thrift::protocol::T_STRUCT, 6);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::FloatTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::FloatTypeIdStruct>>>(*prot_, value_.floatType);
      break;
    }
    case TypeIdUnion::Type::doubleType:
    {
      xfer += prot_->serializedFieldSize("doubleType", apache::thrift::protocol::T_STRUCT, 7);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::DoubleTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::DoubleTypeIdStruct>>>(*prot_, value_.doubleType);
      break;
    }
    case TypeIdUnion::Type::stringType:
    {
      xfer += prot_->serializedFieldSize("stringType", apache::thrift::protocol::T_STRUCT, 8);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::StringTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::StringTypeIdStruct>>>(*prot_, value_.stringType);
      break;
    }
    case TypeIdUnion::Type::binaryType:
    {
      xfer += prot_->serializedFieldSize("binaryType", apache::thrift::protocol::T_STRUCT, 9);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BinaryTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BinaryTypeIdStruct>>>(*prot_, value_.binaryType);
      break;
    }
    case TypeIdUnion::Type::anyType:
    {
      xfer += prot_->serializedFieldSize("anyType", apache::thrift::protocol::T_STRUCT, 10);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::AnyTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::AnyTypeIdStruct>>>(*prot_, value_.anyType);
      break;
    }
    case TypeIdUnion::Type::userDefinedType:
    {
      xfer += prot_->serializedFieldSize("userDefinedType", apache::thrift::protocol::T_STRING, 11);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::type_system::Uri>::serializedSize<false>(*prot_, value_.userDefinedType);
      break;
    }
    case TypeIdUnion::Type::listType:
    {
      xfer += prot_->serializedFieldSize("listType", apache::thrift::protocol::T_STRUCT, 12);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ListTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ListTypeIdStruct>>>(*prot_, value_.listType);
      break;
    }
    case TypeIdUnion::Type::setType:
    {
      xfer += prot_->serializedFieldSize("setType", apache::thrift::protocol::T_STRUCT, 13);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::SetTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::SetTypeIdStruct>>>(*prot_, value_.setType);
      break;
    }
    case TypeIdUnion::Type::mapType:
    {
      xfer += prot_->serializedFieldSize("mapType", apache::thrift::protocol::T_STRUCT, 14);
      xfer += ::apache::thrift::op::serialized_size<true, ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::MapTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::MapTypeIdStruct>>>(*prot_, value_.mapType);
      break;
    }
    case TypeIdUnion::Type::__EMPTY__:;
      break;
    default:
      break;
  }
  xfer += prot_->serializedSizeStop();
  return xfer;
}

template <class Protocol_>
uint32_t TypeIdUnion::write(Protocol_* prot_) const {
  uint32_t xfer = 0;
  xfer += prot_->writeStructBegin("TypeId");
  switch(this->getType()) {
    case TypeIdUnion::Type::boolType:
    {
      constexpr int16_t kPrevFieldId = 0;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 1, kPrevFieldId>(*prot_, "boolType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BoolTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BoolTypeIdStruct>>>(*prot_, value_.boolType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::byteType:
    {
      constexpr int16_t kPrevFieldId = 1;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 2, kPrevFieldId>(*prot_, "byteType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ByteTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ByteTypeIdStruct>>>(*prot_, value_.byteType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::i16Type:
    {
      constexpr int16_t kPrevFieldId = 2;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 3, kPrevFieldId>(*prot_, "i16Type", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I16TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I16TypeIdStruct>>>(*prot_, value_.i16Type);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::i32Type:
    {
      constexpr int16_t kPrevFieldId = 3;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 4, kPrevFieldId>(*prot_, "i32Type", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I32TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I32TypeIdStruct>>>(*prot_, value_.i32Type);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::i64Type:
    {
      constexpr int16_t kPrevFieldId = 4;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 5, kPrevFieldId>(*prot_, "i64Type", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::I64TypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::I64TypeIdStruct>>>(*prot_, value_.i64Type);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::floatType:
    {
      constexpr int16_t kPrevFieldId = 5;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 6, kPrevFieldId>(*prot_, "floatType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::FloatTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::FloatTypeIdStruct>>>(*prot_, value_.floatType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::doubleType:
    {
      constexpr int16_t kPrevFieldId = 6;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 7, kPrevFieldId>(*prot_, "doubleType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::DoubleTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::DoubleTypeIdStruct>>>(*prot_, value_.doubleType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::stringType:
    {
      constexpr int16_t kPrevFieldId = 7;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 8, kPrevFieldId>(*prot_, "stringType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::StringTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::StringTypeIdStruct>>>(*prot_, value_.stringType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::binaryType:
    {
      constexpr int16_t kPrevFieldId = 8;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 9, kPrevFieldId>(*prot_, "binaryType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::BinaryTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::BinaryTypeIdStruct>>>(*prot_, value_.binaryType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::anyType:
    {
      constexpr int16_t kPrevFieldId = 9;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 10, kPrevFieldId>(*prot_, "anyType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::AnyTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::AnyTypeIdStruct>>>(*prot_, value_.anyType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::userDefinedType:
    {
      constexpr int16_t kPrevFieldId = 10;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRING, 11, kPrevFieldId>(*prot_, "userDefinedType", false);
      xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::string, ::apache::thrift::type_system::Uri>::write(*prot_, value_.userDefinedType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::listType:
    {
      constexpr int16_t kPrevFieldId = 11;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 12, kPrevFieldId>(*prot_, "listType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::ListTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::ListTypeIdStruct>>>(*prot_, value_.listType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::setType:
    {
      constexpr int16_t kPrevFieldId = 12;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 13, kPrevFieldId>(*prot_, "setType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::SetTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::SetTypeIdStruct>>>(*prot_, value_.setType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::mapType:
    {
      constexpr int16_t kPrevFieldId = 13;
      xfer += ::apache::thrift::detail::writeFieldBegin<apache::thrift::protocol::T_STRUCT, 14, kPrevFieldId>(*prot_, "mapType", false);
      xfer += ::apache::thrift::op::encode<::apache::thrift::type::adapted<::apache::thrift::type_system::detail::MapTypeIdAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::MapTypeIdStruct>>>(*prot_, value_.mapType);
      xfer += prot_->writeFieldEnd();
      break;
    }
    case TypeIdUnion::Type::__EMPTY__:;
      break;
    default:
      break;
  }
  xfer += prot_->writeFieldStop();
  xfer += prot_->writeStructEnd();
  return xfer;
}

extern template void TypeIdUnion::readNoXfer<>(apache::thrift::BinaryProtocolReader*);
extern template uint32_t TypeIdUnion::write<>(apache::thrift::BinaryProtocolWriter*) const;
extern template uint32_t TypeIdUnion::serializedSize<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template uint32_t TypeIdUnion::serializedSizeZC<>(apache::thrift::BinaryProtocolWriter const*) const;
extern template void TypeIdUnion::readNoXfer<>(apache::thrift::CompactProtocolReader*);
extern template uint32_t TypeIdUnion::write<>(apache::thrift::CompactProtocolWriter*) const;
extern template uint32_t TypeIdUnion::serializedSize<>(apache::thrift::CompactProtocolWriter const*) const;
extern template uint32_t TypeIdUnion::serializedSizeZC<>(apache::thrift::CompactProtocolWriter const*) const;


} // namespace apache::thrift::type_system
