/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/mcpp2-compare/src/module.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/module_types.h"
#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/module_types.tcc"

#include <thrift/lib/cpp2/gen/module_types_cpp.h>

#include "thrift/compiler/test/fixtures/mcpp2-compare/gen-cpp2/module_data.h"
[[maybe_unused]] static constexpr std::string_view kModuleName = "module";


namespace apache { namespace thrift {

const std::string_view TEnumTraits<::some::valid::ns::MyEnumA>::__fbthrift_module_name_internal_do_not_use = kModuleName;
folly::Range<::some::valid::ns::MyEnumA const*> const TEnumTraits<::some::valid::ns::MyEnumA>::values = folly::range(TEnumDataStorage<::some::valid::ns::MyEnumA>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::MyEnumA>::names = folly::range(TEnumDataStorage<::some::valid::ns::MyEnumA>::names);

bool TEnumTraits<::some::valid::ns::MyEnumA>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::MyEnumA>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}

}} // apache::thrift


namespace apache { namespace thrift {

const std::string_view TEnumTraits<::some::valid::ns::AnnotatedEnum>::__fbthrift_module_name_internal_do_not_use = kModuleName;
folly::Range<::some::valid::ns::AnnotatedEnum const*> const TEnumTraits<::some::valid::ns::AnnotatedEnum>::values = folly::range(TEnumDataStorage<::some::valid::ns::AnnotatedEnum>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::AnnotatedEnum>::names = folly::range(TEnumDataStorage<::some::valid::ns::AnnotatedEnum>::names);

bool TEnumTraits<::some::valid::ns::AnnotatedEnum>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::AnnotatedEnum>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}

}} // apache::thrift


namespace apache { namespace thrift {

const std::string_view TEnumTraits<::some::valid::ns::AnnotatedEnum2>::__fbthrift_module_name_internal_do_not_use = kModuleName;
folly::Range<::some::valid::ns::AnnotatedEnum2 const*> const TEnumTraits<::some::valid::ns::AnnotatedEnum2>::values = folly::range(TEnumDataStorage<::some::valid::ns::AnnotatedEnum2>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::AnnotatedEnum2>::names = folly::range(TEnumDataStorage<::some::valid::ns::AnnotatedEnum2>::names);

bool TEnumTraits<::some::valid::ns::AnnotatedEnum2>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::AnnotatedEnum2>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}

}} // apache::thrift


namespace apache { namespace thrift {

const std::string_view TEnumTraits<::some::valid::ns::MyEnumB>::__fbthrift_module_name_internal_do_not_use = kModuleName;
folly::Range<::some::valid::ns::MyEnumB const*> const TEnumTraits<::some::valid::ns::MyEnumB>::values = folly::range(TEnumDataStorage<::some::valid::ns::MyEnumB>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::MyEnumB>::names = folly::range(TEnumDataStorage<::some::valid::ns::MyEnumB>::names);

bool TEnumTraits<::some::valid::ns::MyEnumB>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::MyEnumB>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}

}} // apache::thrift


namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::Empty>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::Empty>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view Empty::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<Empty>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view Empty::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<Empty>::name;
}


Empty::Empty(apache::thrift::FragileConstructor) {}


void Empty::__fbthrift_clear() {
  // clear all fields
}

void Empty::__fbthrift_clear_terse_fields() {
}

bool Empty::__fbthrift_is_empty() const {
  return true;
}

bool Empty::operator==([[maybe_unused]] const Empty& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool Empty::operator<([[maybe_unused]] const Empty& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}


void swap([[maybe_unused]] Empty& a, [[maybe_unused]] Empty& b) {
  using ::std::swap;
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::ASimpleStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::ASimpleStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view ASimpleStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<ASimpleStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view ASimpleStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<ASimpleStruct>::name;
}


ASimpleStruct::ASimpleStruct(apache::thrift::FragileConstructor, ::std::int64_t boolField__arg) :
    __fbthrift_field_boolField(std::move(boolField__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
}


void ASimpleStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_boolField = ::std::int64_t();
  __isset = {};
}

void ASimpleStruct::__fbthrift_clear_terse_fields() {
}

bool ASimpleStruct::__fbthrift_is_empty() const {
  return !(this->__fbthrift_field_boolField != ::std::int64_t());
}

bool ASimpleStruct::operator==([[maybe_unused]] const ASimpleStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}


void swap([[maybe_unused]] ASimpleStruct& a, [[maybe_unused]] ASimpleStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_boolField, b.__fbthrift_field_boolField);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::ASimpleStructNoexcept>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::ASimpleStructNoexcept>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view ASimpleStructNoexcept::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<ASimpleStructNoexcept>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view ASimpleStructNoexcept::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<ASimpleStructNoexcept>::name;
}


ASimpleStructNoexcept::ASimpleStructNoexcept(apache::thrift::FragileConstructor, ::std::int64_t boolField__arg) :
    __fbthrift_field_boolField(std::move(boolField__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
}


void ASimpleStructNoexcept::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_boolField = ::std::int64_t();
  __isset = {};
}

void ASimpleStructNoexcept::__fbthrift_clear_terse_fields() {
}

bool ASimpleStructNoexcept::__fbthrift_is_empty() const {
  return !(this->__fbthrift_field_boolField != ::std::int64_t());
}

bool ASimpleStructNoexcept::operator==([[maybe_unused]] const ASimpleStructNoexcept& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool ASimpleStructNoexcept::operator<([[maybe_unused]] const ASimpleStructNoexcept& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}


void swap([[maybe_unused]] ASimpleStructNoexcept& a, [[maybe_unused]] ASimpleStructNoexcept& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_boolField, b.__fbthrift_field_boolField);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::MyStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::MyStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view MyStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<MyStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view MyStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<MyStruct>::name;
}

MyStruct::MyStruct(const MyStruct& srcObj) :
    __fbthrift_field_MyBoolField(srcObj.__fbthrift_field_MyBoolField),
    __fbthrift_field_MyIntField(srcObj.__fbthrift_field_MyIntField),
    __fbthrift_field_MyStringField(srcObj.__fbthrift_field_MyStringField),
    __fbthrift_field_MyStringField2(srcObj.__fbthrift_field_MyStringField2),
    __fbthrift_field_MyBinaryField(srcObj.__fbthrift_field_MyBinaryField),
    __fbthrift_field_MyBinaryField2(srcObj.__fbthrift_field_MyBinaryField2),
    __fbthrift_field_MyBinaryField3(srcObj.__fbthrift_field_MyBinaryField3),
    __fbthrift_field_MyBinaryListField4(srcObj.__fbthrift_field_MyBinaryListField4),
    __fbthrift_field_MyMapEnumAndInt(srcObj.__fbthrift_field_MyMapEnumAndInt),
    __fbthrift_field_MyCustomField(srcObj.__fbthrift_field_MyCustomField),
    __fbthrift_field_MyOptCustomField(srcObj.__fbthrift_field_MyOptCustomField),
    __isset(srcObj.__isset) {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 10>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 11>(__fbthrift_field_MyOptCustomField, *this);
}

static void __fbthrift_swap(MyStruct& lhs, MyStruct& rhs) { swap(lhs, rhs); }
MyStruct& MyStruct::operator=(const MyStruct& other) {
  MyStruct tmp(other);
  __fbthrift_swap(*this, tmp);
  return *this;
}

MyStruct::MyStruct() :
    __fbthrift_field_MyBoolField(),
    __fbthrift_field_MyIntField(static_cast<::std::int64_t>(12)),
    __fbthrift_field_MyStringField(apache::thrift::StringTraits<std::string>::fromStringLiteral("test")),
    __fbthrift_field_MyMapEnumAndInt(std::initializer_list<::std::map<::some::valid::ns::MyEnumA, ::std::string>::value_type>{ {  ::some::valid::ns::MyEnumA::fieldA, apache::thrift::StringTraits<std::string>::fromStringLiteral("fieldA") },
  {  ::some::valid::ns::MyEnumA::fieldC, apache::thrift::StringTraits<std::string>::fromStringLiteral("fieldC") },
  { static_cast< ::some::valid::ns::MyEnumA>(9), apache::thrift::StringTraits<std::string>::fromStringLiteral("nothing") } }) {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 10>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 11>(__fbthrift_field_MyOptCustomField, *this);
}


MyStruct::~MyStruct() {}

MyStruct::MyStruct([[maybe_unused]] MyStruct&& other) noexcept :
    __fbthrift_field_MyBoolField(std::move(other.__fbthrift_field_MyBoolField)),
    __fbthrift_field_MyIntField(std::move(other.__fbthrift_field_MyIntField)),
    __fbthrift_field_MyStringField(std::move(other.__fbthrift_field_MyStringField)),
    __fbthrift_field_MyStringField2(std::move(other.__fbthrift_field_MyStringField2)),
    __fbthrift_field_MyBinaryField(std::move(other.__fbthrift_field_MyBinaryField)),
    __fbthrift_field_MyBinaryField2(std::move(other.__fbthrift_field_MyBinaryField2)),
    __fbthrift_field_MyBinaryField3(std::move(other.__fbthrift_field_MyBinaryField3)),
    __fbthrift_field_MyBinaryListField4(std::move(other.__fbthrift_field_MyBinaryListField4)),
    __fbthrift_field_MyMapEnumAndInt(std::move(other.__fbthrift_field_MyMapEnumAndInt)),
    __fbthrift_field_MyCustomField(std::move(other.__fbthrift_field_MyCustomField)),
    __fbthrift_field_MyOptCustomField(std::move(other.__fbthrift_field_MyOptCustomField)),
    __isset(other.__isset) {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 10>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 11>(__fbthrift_field_MyOptCustomField, *this);
}

MyStruct& MyStruct::operator=([[maybe_unused]] MyStruct&& other) noexcept {
    this->__fbthrift_field_MyBoolField = std::move(other.__fbthrift_field_MyBoolField);
    this->__fbthrift_field_MyIntField = std::move(other.__fbthrift_field_MyIntField);
    this->__fbthrift_field_MyStringField = std::move(other.__fbthrift_field_MyStringField);
    this->__fbthrift_field_MyStringField2 = std::move(other.__fbthrift_field_MyStringField2);
    this->__fbthrift_field_MyBinaryField = std::move(other.__fbthrift_field_MyBinaryField);
    this->__fbthrift_field_MyBinaryField2 = std::move(other.__fbthrift_field_MyBinaryField2);
    this->__fbthrift_field_MyBinaryField3 = std::move(other.__fbthrift_field_MyBinaryField3);
    this->__fbthrift_field_MyBinaryListField4 = std::move(other.__fbthrift_field_MyBinaryListField4);
    this->__fbthrift_field_MyMapEnumAndInt = std::move(other.__fbthrift_field_MyMapEnumAndInt);
    this->__fbthrift_field_MyCustomField = std::move(other.__fbthrift_field_MyCustomField);
    this->__fbthrift_field_MyOptCustomField = std::move(other.__fbthrift_field_MyOptCustomField);
    __isset = other.__isset;
    return *this;
}


MyStruct::MyStruct(apache::thrift::FragileConstructor, bool MyBoolField__arg, ::std::int64_t MyIntField__arg, ::std::string MyStringField__arg, ::std::string MyStringField2__arg, ::std::string MyBinaryField__arg, ::std::string MyBinaryField2__arg, ::std::string MyBinaryField3__arg, ::std::vector<::std::string> MyBinaryListField4__arg, ::std::map<::some::valid::ns::MyEnumA, ::std::string> MyMapEnumAndInt__arg, ::some::valid::ns::CustomProtocolType MyCustomField__arg, ::some::valid::ns::CustomProtocolType MyOptCustomField__arg) :
    __fbthrift_field_MyBoolField(std::move(MyBoolField__arg)),
    __fbthrift_field_MyIntField(std::move(MyIntField__arg)),
    __fbthrift_field_MyStringField(std::move(MyStringField__arg)),
    __fbthrift_field_MyStringField2(std::move(MyStringField2__arg)),
    __fbthrift_field_MyBinaryField(std::move(MyBinaryField__arg)),
    __fbthrift_field_MyBinaryField2(std::move(MyBinaryField2__arg)),
    __fbthrift_field_MyBinaryField3(std::move(MyBinaryField3__arg)),
    __fbthrift_field_MyBinaryListField4(std::move(MyBinaryListField4__arg)),
    __fbthrift_field_MyMapEnumAndInt(std::move(MyMapEnumAndInt__arg)),
    __fbthrift_field_MyCustomField(std::move(MyCustomField__arg)),
    __fbthrift_field_MyOptCustomField(std::move(MyOptCustomField__arg)) { 
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 10>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 11>(__fbthrift_field_MyOptCustomField, *this);
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
  __isset.set(folly::index_constant<2>(), true);
  __isset.set(folly::index_constant<3>(), true);
  __isset.set(folly::index_constant<4>(), true);
  __isset.set(folly::index_constant<5>(), true);
  __isset.set(folly::index_constant<6>(), true);
  __isset.set(folly::index_constant<7>(), true);
  __isset.set(folly::index_constant<8>(), true);
  __isset.set(folly::index_constant<9>(), true);
}


void MyStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_MyBoolField = bool();
  this->__fbthrift_field_MyIntField = ::std::int64_t();
  this->__fbthrift_field_MyStringField = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_MyStringField2 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_MyBinaryField = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_MyBinaryField2 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_MyBinaryField3 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_MyBinaryListField4.clear();
  this->__fbthrift_field_MyMapEnumAndInt.clear();
  ::apache::thrift::adapt_detail::clear<::CustomProtocolAdapter, 10>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::clear<::CustomProtocolAdapter, 11>(__fbthrift_field_MyOptCustomField, *this);
  __isset = {};
}

void MyStruct::__fbthrift_clear_terse_fields() {
}

bool MyStruct::__fbthrift_is_empty() const {
  return false;
}

bool MyStruct::operator==([[maybe_unused]] const MyStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool MyStruct::operator<([[maybe_unused]] const MyStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::std::vector<::std::string>& MyStruct::get_MyBinaryListField4() const& {
  return __fbthrift_field_MyBinaryListField4;
}

::std::vector<::std::string> MyStruct::get_MyBinaryListField4() && {
  return std::move(__fbthrift_field_MyBinaryListField4);
}

const ::std::map<::some::valid::ns::MyEnumA, ::std::string>& MyStruct::get_MyMapEnumAndInt() const& {
  return __fbthrift_field_MyMapEnumAndInt;
}

::std::map<::some::valid::ns::MyEnumA, ::std::string> MyStruct::get_MyMapEnumAndInt() && {
  return std::move(__fbthrift_field_MyMapEnumAndInt);
}


void swap([[maybe_unused]] MyStruct& a, [[maybe_unused]] MyStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_MyBoolField, b.__fbthrift_field_MyBoolField);
  swap(a.__fbthrift_field_MyIntField, b.__fbthrift_field_MyIntField);
  swap(a.__fbthrift_field_MyStringField, b.__fbthrift_field_MyStringField);
  swap(a.__fbthrift_field_MyStringField2, b.__fbthrift_field_MyStringField2);
  swap(a.__fbthrift_field_MyBinaryField, b.__fbthrift_field_MyBinaryField);
  swap(a.__fbthrift_field_MyBinaryField2, b.__fbthrift_field_MyBinaryField2);
  swap(a.__fbthrift_field_MyBinaryField3, b.__fbthrift_field_MyBinaryField3);
  swap(a.__fbthrift_field_MyBinaryListField4, b.__fbthrift_field_MyBinaryListField4);
  swap(a.__fbthrift_field_MyMapEnumAndInt, b.__fbthrift_field_MyMapEnumAndInt);
  swap(a.__fbthrift_field_MyCustomField, b.__fbthrift_field_MyCustomField);
  swap(a.__fbthrift_field_MyOptCustomField, b.__fbthrift_field_MyOptCustomField);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::SimpleUnion>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::SimpleUnion>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace apache { namespace thrift {

folly::Range<::some::valid::ns::SimpleUnion::Type const*> const TEnumTraits<::some::valid::ns::SimpleUnion::Type>::values = folly::range(TEnumDataStorage<::some::valid::ns::SimpleUnion::Type>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::SimpleUnion::Type>::names = folly::range(TEnumDataStorage<::some::valid::ns::SimpleUnion::Type>::names);

bool TEnumTraits<::some::valid::ns::SimpleUnion::Type>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::SimpleUnion::Type>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}
}} // apache::thrift
namespace some::valid::ns {

std::string_view SimpleUnion::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<SimpleUnion>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view SimpleUnion::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<SimpleUnion>::name;
}

void SimpleUnion::__fbthrift_destruct() {
  switch(getType()) {
    case Type::__EMPTY__:
      break;
    case Type::intValue:
      ::std::destroy_at(::std::addressof(value_.intValue));
      break;
    case Type::stringValue:
      ::std::destroy_at(::std::addressof(value_.stringValue));
      break;
    default:
      assert(false);
      break;
  }
}

void SimpleUnion::__fbthrift_clear() {
  __fbthrift_destruct();
  type_ = folly::to_underlying(Type::__EMPTY__);
}

  SimpleUnion::~SimpleUnion() {
    __fbthrift_destruct();
  }

bool SimpleUnion::__fbthrift_is_empty() const {
  return getType() == Type::__EMPTY__;
}
  SimpleUnion::SimpleUnion(const SimpleUnion& rhs)
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        return;
      case Type::intValue:
        set_intValue(rhs.value_.intValue);
        break;
      case Type::stringValue:
        set_stringValue(rhs.value_.stringValue);
        break;
      default:
        assert(false);
    }
  }

    SimpleUnion&SimpleUnion::operator=(const SimpleUnion& rhs) {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        __fbthrift_clear();
        return *this;
      case Type::intValue:
        set_intValue(rhs.value_.intValue);
        break;
      case Type::stringValue:
        set_stringValue(rhs.value_.stringValue);
        break;
      default:
        __fbthrift_clear();
        assert(false);
    }
    return *this;
  }


bool SimpleUnion::operator==(const SimpleUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionEquality{}(*this, rhs);
}

bool SimpleUnion::operator<([[maybe_unused]] const SimpleUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionLessThan{}(*this, rhs);
}

void swap(SimpleUnion& a, SimpleUnion& b) {
  SimpleUnion temp(std::move(a));
  a = std::move(b);
  b = std::move(temp);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::ComplexUnion>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::ComplexUnion>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace apache { namespace thrift {

folly::Range<::some::valid::ns::ComplexUnion::Type const*> const TEnumTraits<::some::valid::ns::ComplexUnion::Type>::values = folly::range(TEnumDataStorage<::some::valid::ns::ComplexUnion::Type>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::ComplexUnion::Type>::names = folly::range(TEnumDataStorage<::some::valid::ns::ComplexUnion::Type>::names);

bool TEnumTraits<::some::valid::ns::ComplexUnion::Type>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::ComplexUnion::Type>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}
}} // apache::thrift
namespace some::valid::ns {

std::string_view ComplexUnion::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<ComplexUnion>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view ComplexUnion::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<ComplexUnion>::name;
}

void ComplexUnion::__fbthrift_destruct() {
  switch(getType()) {
    case Type::__EMPTY__:
      break;
    case Type::intValue:
      ::std::destroy_at(::std::addressof(value_.intValue));
      break;
    case Type::opt_intValue:
      ::std::destroy_at(::std::addressof(value_.opt_intValue));
      break;
    case Type::stringValue:
      ::std::destroy_at(::std::addressof(value_.stringValue));
      break;
    case Type::opt_stringValue:
      ::std::destroy_at(::std::addressof(value_.opt_stringValue));
      break;
    case Type::intValue2:
      ::std::destroy_at(::std::addressof(value_.intValue2));
      break;
    case Type::intValue3:
      ::std::destroy_at(::std::addressof(value_.intValue3));
      break;
    case Type::doubelValue:
      ::std::destroy_at(::std::addressof(value_.doubelValue));
      break;
    case Type::boolValue:
      ::std::destroy_at(::std::addressof(value_.boolValue));
      break;
    case Type::union_list:
      ::std::destroy_at(::std::addressof(value_.union_list));
      break;
    case Type::union_set:
      ::std::destroy_at(::std::addressof(value_.union_set));
      break;
    case Type::union_map:
      ::std::destroy_at(::std::addressof(value_.union_map));
      break;
    case Type::opt_union_map:
      ::std::destroy_at(::std::addressof(value_.opt_union_map));
      break;
    case Type::enum_field:
      ::std::destroy_at(::std::addressof(value_.enum_field));
      break;
    case Type::enum_container:
      ::std::destroy_at(::std::addressof(value_.enum_container));
      break;
    case Type::a_struct:
      ::std::destroy_at(::std::addressof(value_.a_struct));
      break;
    case Type::a_set_struct:
      ::std::destroy_at(::std::addressof(value_.a_set_struct));
      break;
    case Type::a_union:
      ::std::destroy_at(::std::addressof(value_.a_union));
      break;
    case Type::opt_a_union:
      ::std::destroy_at(::std::addressof(value_.opt_a_union));
      break;
    case Type::a_union_list:
      ::std::destroy_at(::std::addressof(value_.a_union_list));
      break;
    case Type::a_union_typedef:
      ::std::destroy_at(::std::addressof(value_.a_union_typedef));
      break;
    case Type::a_union_typedef_list:
      ::std::destroy_at(::std::addressof(value_.a_union_typedef_list));
      break;
    case Type::MyBinaryField:
      ::std::destroy_at(::std::addressof(value_.MyBinaryField));
      break;
    case Type::MyBinaryField2:
      ::std::destroy_at(::std::addressof(value_.MyBinaryField2));
      break;
    case Type::MyBinaryListField4:
      ::std::destroy_at(::std::addressof(value_.MyBinaryListField4));
      break;
    case Type::ref_field:
      ::std::destroy_at(::std::addressof(value_.ref_field));
      break;
    case Type::ref_field2:
      ::std::destroy_at(::std::addressof(value_.ref_field2));
      break;
    case Type::excp_field:
      ::std::destroy_at(::std::addressof(value_.excp_field));
      break;
    case Type::MyCustomField:
      ::std::destroy_at(::std::addressof(value_.MyCustomField));
      break;
    default:
      assert(false);
      break;
  }
}

void ComplexUnion::__fbthrift_clear() {
  __fbthrift_destruct();
  type_ = folly::to_underlying(Type::__EMPTY__);
}

  ComplexUnion::~ComplexUnion() {
    __fbthrift_destruct();
  }

bool ComplexUnion::__fbthrift_is_empty() const {
  return getType() == Type::__EMPTY__;
}
  ComplexUnion::ComplexUnion(const ComplexUnion& rhs)
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        return;
      case Type::intValue:
        set_intValue(rhs.value_.intValue);
        break;
      case Type::opt_intValue:
        set_opt_intValue(rhs.value_.opt_intValue);
        break;
      case Type::stringValue:
        set_stringValue(rhs.value_.stringValue);
        break;
      case Type::opt_stringValue:
        set_opt_stringValue(rhs.value_.opt_stringValue);
        break;
      case Type::intValue2:
        set_intValue2(rhs.value_.intValue2);
        break;
      case Type::intValue3:
        set_intValue3(rhs.value_.intValue3);
        break;
      case Type::doubelValue:
        set_doubelValue(rhs.value_.doubelValue);
        break;
      case Type::boolValue:
        set_boolValue(rhs.value_.boolValue);
        break;
      case Type::union_list:
        set_union_list(rhs.value_.union_list);
        break;
      case Type::union_set:
        set_union_set(rhs.value_.union_set);
        break;
      case Type::union_map:
        set_union_map(rhs.value_.union_map);
        break;
      case Type::opt_union_map:
        set_opt_union_map(rhs.value_.opt_union_map);
        break;
      case Type::enum_field:
        set_enum_field(rhs.value_.enum_field);
        break;
      case Type::enum_container:
        set_enum_container(rhs.value_.enum_container);
        break;
      case Type::a_struct:
        set_a_struct(rhs.value_.a_struct);
        break;
      case Type::a_set_struct:
        set_a_set_struct(rhs.value_.a_set_struct);
        break;
      case Type::a_union:
        set_a_union(rhs.value_.a_union);
        break;
      case Type::opt_a_union:
        set_opt_a_union(rhs.value_.opt_a_union);
        break;
      case Type::a_union_list:
        set_a_union_list(rhs.value_.a_union_list);
        break;
      case Type::a_union_typedef:
        set_a_union_typedef(rhs.value_.a_union_typedef);
        break;
      case Type::a_union_typedef_list:
        set_a_union_typedef_list(rhs.value_.a_union_typedef_list);
        break;
      case Type::MyBinaryField:
        set_MyBinaryField(rhs.value_.MyBinaryField);
        break;
      case Type::MyBinaryField2:
        set_MyBinaryField2(rhs.value_.MyBinaryField2);
        break;
      case Type::MyBinaryListField4:
        set_MyBinaryListField4(rhs.value_.MyBinaryListField4);
        break;
      case Type::ref_field:
        set_ref_field(::apache::thrift::detail::st::copy_field<
          ::apache::thrift::type_class::structure>(rhs.value_.ref_field));
        break;
      case Type::ref_field2:
        set_ref_field2(*rhs.value_.ref_field2);
        break;
      case Type::excp_field:
        set_excp_field(rhs.value_.excp_field);
        break;
      case Type::MyCustomField:
        set_MyCustomField(rhs.value_.MyCustomField);
        break;
      default:
        assert(false);
    }
  }

    ComplexUnion&ComplexUnion::operator=(const ComplexUnion& rhs) {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        __fbthrift_clear();
        return *this;
      case Type::intValue:
        set_intValue(rhs.value_.intValue);
        break;
      case Type::opt_intValue:
        set_opt_intValue(rhs.value_.opt_intValue);
        break;
      case Type::stringValue:
        set_stringValue(rhs.value_.stringValue);
        break;
      case Type::opt_stringValue:
        set_opt_stringValue(rhs.value_.opt_stringValue);
        break;
      case Type::intValue2:
        set_intValue2(rhs.value_.intValue2);
        break;
      case Type::intValue3:
        set_intValue3(rhs.value_.intValue3);
        break;
      case Type::doubelValue:
        set_doubelValue(rhs.value_.doubelValue);
        break;
      case Type::boolValue:
        set_boolValue(rhs.value_.boolValue);
        break;
      case Type::union_list:
        set_union_list(rhs.value_.union_list);
        break;
      case Type::union_set:
        set_union_set(rhs.value_.union_set);
        break;
      case Type::union_map:
        set_union_map(rhs.value_.union_map);
        break;
      case Type::opt_union_map:
        set_opt_union_map(rhs.value_.opt_union_map);
        break;
      case Type::enum_field:
        set_enum_field(rhs.value_.enum_field);
        break;
      case Type::enum_container:
        set_enum_container(rhs.value_.enum_container);
        break;
      case Type::a_struct:
        set_a_struct(rhs.value_.a_struct);
        break;
      case Type::a_set_struct:
        set_a_set_struct(rhs.value_.a_set_struct);
        break;
      case Type::a_union:
        set_a_union(rhs.value_.a_union);
        break;
      case Type::opt_a_union:
        set_opt_a_union(rhs.value_.opt_a_union);
        break;
      case Type::a_union_list:
        set_a_union_list(rhs.value_.a_union_list);
        break;
      case Type::a_union_typedef:
        set_a_union_typedef(rhs.value_.a_union_typedef);
        break;
      case Type::a_union_typedef_list:
        set_a_union_typedef_list(rhs.value_.a_union_typedef_list);
        break;
      case Type::MyBinaryField:
        set_MyBinaryField(rhs.value_.MyBinaryField);
        break;
      case Type::MyBinaryField2:
        set_MyBinaryField2(rhs.value_.MyBinaryField2);
        break;
      case Type::MyBinaryListField4:
        set_MyBinaryListField4(rhs.value_.MyBinaryListField4);
        break;
      case Type::ref_field:
        set_ref_field(::apache::thrift::detail::st::copy_field<
          ::apache::thrift::type_class::structure>(rhs.value_.ref_field));
        break;
      case Type::ref_field2:
        set_ref_field2(*rhs.value_.ref_field2);
        break;
      case Type::excp_field:
        set_excp_field(rhs.value_.excp_field);
        break;
      case Type::MyCustomField:
        set_MyCustomField(rhs.value_.MyCustomField);
        break;
      default:
        __fbthrift_clear();
        assert(false);
    }
    return *this;
  }


bool ComplexUnion::operator==(const ComplexUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionEquality{}(*this, rhs);
}

bool ComplexUnion::operator<([[maybe_unused]] const ComplexUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionLessThan{}(*this, rhs);
}

::std::unique_ptr<::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field(::std::unique_ptr<::some::valid::ns::MyStruct> t) {
  __fbthrift_destruct();
  type_ = folly::to_underlying(Type::ref_field);
  ::new (std::addressof(value_.ref_field)) ::std::unique_ptr<::some::valid::ns::MyStruct>(std::move(t));
  return value_.ref_field;
}

::std::unique_ptr<::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field(::some::valid::ns::MyStruct const &t) {
  return set_ref_field(::std::unique_ptr<::some::valid::ns::MyStruct>(new ::std::unique_ptr<::some::valid::ns::MyStruct>::element_type(t)));
}

::std::unique_ptr<::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field(::some::valid::ns::MyStruct&& t) {
  return set_ref_field(::std::unique_ptr<::some::valid::ns::MyStruct>(new ::std::unique_ptr<::some::valid::ns::MyStruct>::element_type(std::move(t))));
}

::std::shared_ptr<const ::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field2(::std::shared_ptr<const ::some::valid::ns::MyStruct> t) {
  __fbthrift_destruct();
  type_ = folly::to_underlying(Type::ref_field2);
  ::new (std::addressof(value_.ref_field2)) ::std::shared_ptr<const ::some::valid::ns::MyStruct>(std::move(t));
  return value_.ref_field2;
}

::std::shared_ptr<const ::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field2(::some::valid::ns::MyStruct const &t) {
  return set_ref_field2(::std::shared_ptr<const ::some::valid::ns::MyStruct>(new ::std::shared_ptr<const ::some::valid::ns::MyStruct>::element_type(t)));
}

::std::shared_ptr<const ::some::valid::ns::MyStruct>& ComplexUnion::set_ref_field2(::some::valid::ns::MyStruct&& t) {
  return set_ref_field2(::std::shared_ptr<const ::some::valid::ns::MyStruct>(new ::std::shared_ptr<const ::some::valid::ns::MyStruct>::element_type(std::move(t))));
}

void swap(ComplexUnion& a, ComplexUnion& b) {
  ComplexUnion temp(std::move(a));
  a = std::move(b);
  b = std::move(temp);
}

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

static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::structure>,
        ::std::set<::some::valid::ns::MyStruct>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::variant,
        ::some::valid::ns::SimpleUnion>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::variant,
        ::some::valid::ns::SimpleUnion>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::list<::apache::thrift::type_class::variant>,
        ::std::vector<::some::valid::ns::SimpleUnion>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::variant>,
        ::some::valid::ns::unionTypeDef>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        ComplexUnion,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");

} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::AnException>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::AnException>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view AnException::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<AnException>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view AnException::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<AnException>::name;
}

AnException::AnException(const AnException& srcObj) :
    __fbthrift_field_code(srcObj.__fbthrift_field_code),
    __fbthrift_field_req_code(srcObj.__fbthrift_field_req_code),
    __fbthrift_field_message2(srcObj.__fbthrift_field_message2),
    __fbthrift_field_req_message(srcObj.__fbthrift_field_req_message),
    __fbthrift_field_exception_list(srcObj.__fbthrift_field_exception_list),
    __fbthrift_field_exception_set(srcObj.__fbthrift_field_exception_set),
    __fbthrift_field_exception_map(srcObj.__fbthrift_field_exception_map),
    __fbthrift_field_req_exception_map(srcObj.__fbthrift_field_req_exception_map),
    __fbthrift_field_enum_field(srcObj.__fbthrift_field_enum_field),
    __fbthrift_field_enum_container(srcObj.__fbthrift_field_enum_container),
    __fbthrift_field_a_struct(srcObj.__fbthrift_field_a_struct),
    __fbthrift_field_a_set_struct(srcObj.__fbthrift_field_a_set_struct),
    __fbthrift_field_a_union_list(srcObj.__fbthrift_field_a_union_list),
    __fbthrift_field_union_typedef(srcObj.__fbthrift_field_union_typedef),
    __fbthrift_field_a_union_typedef_list(srcObj.__fbthrift_field_a_union_typedef_list),
    __fbthrift_field_MyCustomField(srcObj.__fbthrift_field_MyCustomField),
    __fbthrift_field_MyOptCustomField(srcObj.__fbthrift_field_MyOptCustomField),
    __isset(srcObj.__isset) {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 20>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 21>(__fbthrift_field_MyOptCustomField, *this);
}

static void __fbthrift_swap(AnException& lhs, AnException& rhs) { swap(lhs, rhs); }
AnException& AnException::operator=(const AnException& other) {
  AnException tmp(other);
  __fbthrift_swap(*this, tmp);
  return *this;
}

AnException::AnException() :
    __fbthrift_field_code(),
    __fbthrift_field_req_code(),
    __fbthrift_field_exception_list(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3) }),
    __fbthrift_field_enum_field() {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 20>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 21>(__fbthrift_field_MyOptCustomField, *this);
}

AnException::AnException(std::string __message) : AnException() {
  __fbthrift_field_message2 = std::move(__message);
}


AnException::~AnException() {}

AnException::AnException([[maybe_unused]] AnException&& other) noexcept :
    __fbthrift_field_code(std::move(other.__fbthrift_field_code)),
    __fbthrift_field_req_code(std::move(other.__fbthrift_field_req_code)),
    __fbthrift_field_message2(std::move(other.__fbthrift_field_message2)),
    __fbthrift_field_req_message(std::move(other.__fbthrift_field_req_message)),
    __fbthrift_field_exception_list(std::move(other.__fbthrift_field_exception_list)),
    __fbthrift_field_exception_set(std::move(other.__fbthrift_field_exception_set)),
    __fbthrift_field_exception_map(std::move(other.__fbthrift_field_exception_map)),
    __fbthrift_field_req_exception_map(std::move(other.__fbthrift_field_req_exception_map)),
    __fbthrift_field_enum_field(std::move(other.__fbthrift_field_enum_field)),
    __fbthrift_field_enum_container(std::move(other.__fbthrift_field_enum_container)),
    __fbthrift_field_a_struct(std::move(other.__fbthrift_field_a_struct)),
    __fbthrift_field_a_set_struct(std::move(other.__fbthrift_field_a_set_struct)),
    __fbthrift_field_a_union_list(std::move(other.__fbthrift_field_a_union_list)),
    __fbthrift_field_union_typedef(std::move(other.__fbthrift_field_union_typedef)),
    __fbthrift_field_a_union_typedef_list(std::move(other.__fbthrift_field_a_union_typedef_list)),
    __fbthrift_field_MyCustomField(std::move(other.__fbthrift_field_MyCustomField)),
    __fbthrift_field_MyOptCustomField(std::move(other.__fbthrift_field_MyOptCustomField)),
    __isset(other.__isset) {
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 20>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 21>(__fbthrift_field_MyOptCustomField, *this);
}

AnException& AnException::operator=([[maybe_unused]] AnException&& other) noexcept {
    this->__fbthrift_field_code = std::move(other.__fbthrift_field_code);
    this->__fbthrift_field_req_code = std::move(other.__fbthrift_field_req_code);
    this->__fbthrift_field_message2 = std::move(other.__fbthrift_field_message2);
    this->__fbthrift_field_req_message = std::move(other.__fbthrift_field_req_message);
    this->__fbthrift_field_exception_list = std::move(other.__fbthrift_field_exception_list);
    this->__fbthrift_field_exception_set = std::move(other.__fbthrift_field_exception_set);
    this->__fbthrift_field_exception_map = std::move(other.__fbthrift_field_exception_map);
    this->__fbthrift_field_req_exception_map = std::move(other.__fbthrift_field_req_exception_map);
    this->__fbthrift_field_enum_field = std::move(other.__fbthrift_field_enum_field);
    this->__fbthrift_field_enum_container = std::move(other.__fbthrift_field_enum_container);
    this->__fbthrift_field_a_struct = std::move(other.__fbthrift_field_a_struct);
    this->__fbthrift_field_a_set_struct = std::move(other.__fbthrift_field_a_set_struct);
    this->__fbthrift_field_a_union_list = std::move(other.__fbthrift_field_a_union_list);
    this->__fbthrift_field_union_typedef = std::move(other.__fbthrift_field_union_typedef);
    this->__fbthrift_field_a_union_typedef_list = std::move(other.__fbthrift_field_a_union_typedef_list);
    this->__fbthrift_field_MyCustomField = std::move(other.__fbthrift_field_MyCustomField);
    this->__fbthrift_field_MyOptCustomField = std::move(other.__fbthrift_field_MyOptCustomField);
    __isset = other.__isset;
    return *this;
}


AnException::AnException(apache::thrift::FragileConstructor, ::std::int32_t code__arg, ::std::int32_t req_code__arg, ::std::string message2__arg, ::std::string req_message__arg, ::std::vector<::std::int32_t> exception_list__arg, ::std::set<::std::int64_t> exception_set__arg, ::std::map<::std::string, ::std::int32_t> exception_map__arg, ::std::map<::std::string, ::std::int32_t> req_exception_map__arg, ::some::valid::ns::MyEnumA enum_field__arg, ::std::vector<::some::valid::ns::MyEnumA> enum_container__arg, ::some::valid::ns::MyStruct a_struct__arg, ::std::set<::some::valid::ns::MyStruct> a_set_struct__arg, ::std::vector<::some::valid::ns::SimpleUnion> a_union_list__arg, ::some::valid::ns::unionTypeDef union_typedef__arg, ::std::vector<::some::valid::ns::unionTypeDef> a_union_typedef_list__arg, ::some::valid::ns::CustomProtocolType MyCustomField__arg, ::some::valid::ns::CustomProtocolType MyOptCustomField__arg) :
    __fbthrift_field_code(std::move(code__arg)),
    __fbthrift_field_req_code(std::move(req_code__arg)),
    __fbthrift_field_message2(std::move(message2__arg)),
    __fbthrift_field_req_message(std::move(req_message__arg)),
    __fbthrift_field_exception_list(std::move(exception_list__arg)),
    __fbthrift_field_exception_set(std::move(exception_set__arg)),
    __fbthrift_field_exception_map(std::move(exception_map__arg)),
    __fbthrift_field_req_exception_map(std::move(req_exception_map__arg)),
    __fbthrift_field_enum_field(std::move(enum_field__arg)),
    __fbthrift_field_enum_container(std::move(enum_container__arg)),
    __fbthrift_field_a_struct(std::move(a_struct__arg)),
    __fbthrift_field_a_set_struct(std::move(a_set_struct__arg)),
    __fbthrift_field_a_union_list(std::move(a_union_list__arg)),
    __fbthrift_field_union_typedef(std::move(union_typedef__arg)),
    __fbthrift_field_a_union_typedef_list(std::move(a_union_typedef_list__arg)),
    __fbthrift_field_MyCustomField(std::move(MyCustomField__arg)),
    __fbthrift_field_MyOptCustomField(std::move(MyOptCustomField__arg)) { 
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 20>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::construct<::CustomProtocolAdapter, 21>(__fbthrift_field_MyOptCustomField, *this);
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
  __isset.set(folly::index_constant<2>(), true);
  __isset.set(folly::index_constant<3>(), true);
  __isset.set(folly::index_constant<4>(), true);
  __isset.set(folly::index_constant<5>(), true);
  __isset.set(folly::index_constant<6>(), true);
  __isset.set(folly::index_constant<7>(), true);
  __isset.set(folly::index_constant<8>(), true);
  __isset.set(folly::index_constant<9>(), true);
  __isset.set(folly::index_constant<10>(), true);
  __isset.set(folly::index_constant<11>(), true);
  __isset.set(folly::index_constant<12>(), true);
  __isset.set(folly::index_constant<13>(), true);
}


void AnException::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_code = ::std::int32_t();
  this->__fbthrift_field_req_code = ::std::int32_t();
  this->__fbthrift_field_message2 = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_req_message = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->__fbthrift_field_exception_list.clear();
  this->__fbthrift_field_exception_set.clear();
  this->__fbthrift_field_exception_map.clear();
  this->__fbthrift_field_req_exception_map.clear();
  this->__fbthrift_field_enum_field = ::some::valid::ns::MyEnumA();
  this->__fbthrift_field_enum_container.clear();
  ::apache::thrift::clear(this->__fbthrift_field_a_struct);
  this->__fbthrift_field_a_set_struct.clear();
  this->__fbthrift_field_a_union_list.clear();
  this->__fbthrift_field_union_typedef.clear();
  this->__fbthrift_field_a_union_typedef_list.clear();
  ::apache::thrift::adapt_detail::clear<::CustomProtocolAdapter, 20>(__fbthrift_field_MyCustomField, *this);
  ::apache::thrift::adapt_detail::clear<::CustomProtocolAdapter, 21>(__fbthrift_field_MyOptCustomField, *this);
  __isset = {};
}

void AnException::__fbthrift_clear_terse_fields() {
}

bool AnException::__fbthrift_is_empty() const {
  return false;
}

bool AnException::operator==([[maybe_unused]] const AnException& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool AnException::operator<([[maybe_unused]] const AnException& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::std::vector<::std::int32_t>& AnException::get_exception_list() const& {
  return __fbthrift_field_exception_list;
}

::std::vector<::std::int32_t> AnException::get_exception_list() && {
  return std::move(__fbthrift_field_exception_list);
}

const ::std::set<::std::int64_t>& AnException::get_exception_set() const& {
  return __fbthrift_field_exception_set;
}

::std::set<::std::int64_t> AnException::get_exception_set() && {
  return std::move(__fbthrift_field_exception_set);
}

const ::std::map<::std::string, ::std::int32_t>& AnException::get_exception_map() const& {
  return __fbthrift_field_exception_map;
}

::std::map<::std::string, ::std::int32_t> AnException::get_exception_map() && {
  return std::move(__fbthrift_field_exception_map);
}

const ::std::map<::std::string, ::std::int32_t>& AnException::get_req_exception_map() const& {
  return __fbthrift_field_req_exception_map;
}

::std::map<::std::string, ::std::int32_t> AnException::get_req_exception_map() && {
  return std::move(__fbthrift_field_req_exception_map);
}

const ::std::vector<::some::valid::ns::MyEnumA>& AnException::get_enum_container() const& {
  return __fbthrift_field_enum_container;
}

::std::vector<::some::valid::ns::MyEnumA> AnException::get_enum_container() && {
  return std::move(__fbthrift_field_enum_container);
}

const ::some::valid::ns::MyStruct& AnException::get_a_struct() const& {
  return __fbthrift_field_a_struct;
}

::some::valid::ns::MyStruct AnException::get_a_struct() && {
  return std::move(__fbthrift_field_a_struct);
}

const ::std::set<::some::valid::ns::MyStruct>& AnException::get_a_set_struct() const& {
  return __fbthrift_field_a_set_struct;
}

::std::set<::some::valid::ns::MyStruct> AnException::get_a_set_struct() && {
  return std::move(__fbthrift_field_a_set_struct);
}

const ::std::vector<::some::valid::ns::SimpleUnion>& AnException::get_a_union_list() const& {
  return __fbthrift_field_a_union_list;
}

::std::vector<::some::valid::ns::SimpleUnion> AnException::get_a_union_list() && {
  return std::move(__fbthrift_field_a_union_list);
}

const ::some::valid::ns::unionTypeDef& AnException::get_union_typedef() const& {
  return __fbthrift_field_union_typedef;
}

::some::valid::ns::unionTypeDef AnException::get_union_typedef() && {
  return std::move(__fbthrift_field_union_typedef);
}

const ::std::vector<::some::valid::ns::unionTypeDef>& AnException::get_a_union_typedef_list() const& {
  return __fbthrift_field_a_union_typedef_list;
}

::std::vector<::some::valid::ns::unionTypeDef> AnException::get_a_union_typedef_list() && {
  return std::move(__fbthrift_field_a_union_typedef_list);
}


void swap([[maybe_unused]] AnException& a, [[maybe_unused]] AnException& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_code, b.__fbthrift_field_code);
  swap(a.__fbthrift_field_req_code, b.__fbthrift_field_req_code);
  swap(a.__fbthrift_field_message2, b.__fbthrift_field_message2);
  swap(a.__fbthrift_field_req_message, b.__fbthrift_field_req_message);
  swap(a.__fbthrift_field_exception_list, b.__fbthrift_field_exception_list);
  swap(a.__fbthrift_field_exception_set, b.__fbthrift_field_exception_set);
  swap(a.__fbthrift_field_exception_map, b.__fbthrift_field_exception_map);
  swap(a.__fbthrift_field_req_exception_map, b.__fbthrift_field_req_exception_map);
  swap(a.__fbthrift_field_enum_field, b.__fbthrift_field_enum_field);
  swap(a.__fbthrift_field_enum_container, b.__fbthrift_field_enum_container);
  swap(a.__fbthrift_field_a_struct, b.__fbthrift_field_a_struct);
  swap(a.__fbthrift_field_a_set_struct, b.__fbthrift_field_a_set_struct);
  swap(a.__fbthrift_field_a_union_list, b.__fbthrift_field_a_union_list);
  swap(a.__fbthrift_field_union_typedef, b.__fbthrift_field_union_typedef);
  swap(a.__fbthrift_field_a_union_typedef_list, b.__fbthrift_field_a_union_typedef_list);
  swap(a.__fbthrift_field_MyCustomField, b.__fbthrift_field_MyCustomField);
  swap(a.__fbthrift_field_MyOptCustomField, b.__fbthrift_field_MyOptCustomField);
  swap(a.__isset, b.__isset);
}

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

static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnException,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnException,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::structure>,
        ::std::set<::some::valid::ns::MyStruct>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnException,
        ::apache::thrift::type_class::list<::apache::thrift::type_class::variant>,
        ::std::vector<::some::valid::ns::SimpleUnion>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnException,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::variant>,
        ::some::valid::ns::unionTypeDef>,
    "inconsistent use of json option");

} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::AnotherException>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::AnotherException>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view AnotherException::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<AnotherException>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view AnotherException::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<AnotherException>::name;
}

AnotherException::AnotherException(const AnotherException&) = default;
AnotherException& AnotherException::operator=(const AnotherException&) = default;
AnotherException::AnotherException() :
    __fbthrift_field_code(),
    __fbthrift_field_req_code() {
}


AnotherException::~AnotherException() {}

AnotherException::AnotherException([[maybe_unused]] AnotherException&& other) noexcept :
    __fbthrift_field_code(std::move(other.__fbthrift_field_code)),
    __fbthrift_field_req_code(std::move(other.__fbthrift_field_req_code)),
    __fbthrift_field_message(std::move(other.__fbthrift_field_message)),
    __isset(other.__isset) {
}

AnotherException& AnotherException::operator=([[maybe_unused]] AnotherException&& other) noexcept {
    this->__fbthrift_field_code = std::move(other.__fbthrift_field_code);
    this->__fbthrift_field_req_code = std::move(other.__fbthrift_field_req_code);
    this->__fbthrift_field_message = std::move(other.__fbthrift_field_message);
    __isset = other.__isset;
    return *this;
}


AnotherException::AnotherException(apache::thrift::FragileConstructor, ::std::int32_t code__arg, ::std::int32_t req_code__arg, ::std::string message__arg) :
    __fbthrift_field_code(std::move(code__arg)),
    __fbthrift_field_req_code(std::move(req_code__arg)),
    __fbthrift_field_message(std::move(message__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
}


void AnotherException::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_code = ::std::int32_t();
  this->__fbthrift_field_req_code = ::std::int32_t();
  this->__fbthrift_field_message = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  __isset = {};
}

void AnotherException::__fbthrift_clear_terse_fields() {
}

bool AnotherException::__fbthrift_is_empty() const {
  return false;
}

bool AnotherException::operator==([[maybe_unused]] const AnotherException& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool AnotherException::operator<([[maybe_unused]] const AnotherException& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}


void swap([[maybe_unused]] AnotherException& a, [[maybe_unused]] AnotherException& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_code, b.__fbthrift_field_code);
  swap(a.__fbthrift_field_req_code, b.__fbthrift_field_req_code);
  swap(a.__fbthrift_field_message, b.__fbthrift_field_message);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::containerStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::containerStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view containerStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<containerStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view containerStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<containerStruct>::name;
}

containerStruct::containerStruct() :
    fieldA(),
    req_fieldA(),
    opt_fieldA(),
    fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    req_fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    opt_fieldC(std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(4) }),
    fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")),
    req_fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")),
    opt_fieldE(apache::thrift::StringTraits<std::string>::fromStringLiteral("somestring")),
    fieldF(std::initializer_list<::std::vector<::std::int32_t>>{ std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(3),
  static_cast<::std::int32_t>(5),
  static_cast<::std::int32_t>(7),
  static_cast<::std::int32_t>(9) },
  std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(4),
  static_cast<::std::int32_t>(8),
  static_cast<::std::int32_t>(10),
  static_cast<::std::int32_t>(12) } }),
    fieldI(true),
    fieldJ(std::initializer_list<::std::map<::std::string, ::std::vector<::std::int32_t>>::value_type>{ { apache::thrift::StringTraits<std::string>::fromStringLiteral("subfieldA"), std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(1),
  static_cast<::std::int32_t>(4),
  static_cast<::std::int32_t>(8),
  static_cast<::std::int32_t>(12) } },
  { apache::thrift::StringTraits<std::string>::fromStringLiteral("subfieldB"), std::initializer_list<::std::int32_t>{ static_cast<::std::int32_t>(2),
  static_cast<::std::int32_t>(5),
  static_cast<::std::int32_t>(9),
  static_cast<::std::int32_t>(13) } } }),
    fieldN(),
    fieldQ(),
    fieldR( ::some::valid::ns::MyEnumA::fieldB),
    req_fieldR( ::some::valid::ns::MyEnumA::fieldB),
    opt_fieldR( ::some::valid::ns::MyEnumA::fieldB),
    fieldS( ::some::valid::ns::MyEnumA::fieldB),
    fieldU(std::initializer_list<::some::valid::ns::MyEnumA>{  ::some::valid::ns::MyEnumA::fieldC,
   ::some::valid::ns::MyEnumA::fieldB,
   ::some::valid::ns::MyEnumA::fieldA }),
    fieldAC(),
    fieldAD() {
}


containerStruct::~containerStruct() {}


containerStruct::containerStruct(apache::thrift::FragileConstructor, bool fieldA__arg, bool req_fieldA__arg, bool opt_fieldA__arg, ::std::map<::std::string, bool> fieldB__arg, ::std::map<::std::string, bool> req_fieldB__arg, ::std::map<::std::string, bool> opt_fieldB__arg, ::std::set<::std::int32_t> fieldC__arg, ::std::set<::std::int32_t> req_fieldC__arg, ::std::set<::std::int32_t> opt_fieldC__arg, ::std::string fieldD__arg, ::std::string fieldE__arg, ::std::string req_fieldE__arg, ::std::string opt_fieldE__arg, ::std::vector<::std::vector<::std::int32_t>> fieldF__arg, ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> fieldG__arg, ::std::vector<::std::set<::std::int32_t>> fieldH__arg, bool fieldI__arg, ::std::map<::std::string, ::std::vector<::std::int32_t>> fieldJ__arg, ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> fieldK__arg, ::std::set<::std::set<::std::set<bool>>> fieldL__arg, ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>> fieldM__arg, ::some::valid::ns::simpleTypeDef fieldN__arg, ::some::valid::ns::complexStructTypeDef fieldO__arg, ::std::vector<::some::valid::ns::mostComplexTypeDef> fieldP__arg, ::some::valid::ns::MyEnumA fieldQ__arg, ::some::valid::ns::MyEnumA fieldR__arg, ::some::valid::ns::MyEnumA req_fieldR__arg, ::some::valid::ns::MyEnumA opt_fieldR__arg, ::some::valid::ns::MyEnumA fieldS__arg, ::std::vector<::some::valid::ns::MyEnumA> fieldT__arg, ::std::vector<::some::valid::ns::MyEnumA> fieldU__arg, ::some::valid::ns::MyStruct fieldV__arg, ::some::valid::ns::MyStruct req_fieldV__arg, ::some::valid::ns::MyStruct opt_fieldV__arg, ::std::set<::some::valid::ns::MyStruct> fieldW__arg, ::some::valid::ns::ComplexUnion fieldX__arg, ::some::valid::ns::ComplexUnion req_fieldX__arg, ::some::valid::ns::ComplexUnion opt_fieldX__arg, ::std::vector<::some::valid::ns::ComplexUnion> fieldY__arg, ::some::valid::ns::unionTypeDef fieldZ__arg, ::std::vector<::some::valid::ns::unionTypeDef> fieldAA__arg, ::std::map<::some::valid::ns::IndirectionB, ::some::valid::ns::IndirectionC> fieldAB__arg, ::some::valid::ns::MyEnumB fieldAC__arg, ::a::different::ns::AnEnum fieldAD__arg, ::std::map<::std::string, ::std::int32_t> fieldAE__arg, ::some::valid::ns::IndirectionD fieldSD__arg) :
    fieldA(std::move(fieldA__arg)),
    req_fieldA(std::move(req_fieldA__arg)),
    opt_fieldA(std::move(opt_fieldA__arg)),
    fieldB(std::move(fieldB__arg)),
    req_fieldB(std::move(req_fieldB__arg)),
    opt_fieldB(std::move(opt_fieldB__arg)),
    fieldC(std::move(fieldC__arg)),
    req_fieldC(std::move(req_fieldC__arg)),
    opt_fieldC(std::move(opt_fieldC__arg)),
    fieldD(std::move(fieldD__arg)),
    fieldE(std::move(fieldE__arg)),
    req_fieldE(std::move(req_fieldE__arg)),
    opt_fieldE(std::move(opt_fieldE__arg)),
    fieldF(std::move(fieldF__arg)),
    fieldG(std::move(fieldG__arg)),
    fieldH(std::move(fieldH__arg)),
    fieldI(std::move(fieldI__arg)),
    fieldJ(std::move(fieldJ__arg)),
    fieldK(std::move(fieldK__arg)),
    fieldL(std::move(fieldL__arg)),
    fieldM(std::move(fieldM__arg)),
    fieldN(std::move(fieldN__arg)),
    fieldO(std::move(fieldO__arg)),
    fieldP(std::move(fieldP__arg)),
    fieldQ(std::move(fieldQ__arg)),
    fieldR(std::move(fieldR__arg)),
    req_fieldR(std::move(req_fieldR__arg)),
    opt_fieldR(std::move(opt_fieldR__arg)),
    fieldS(std::move(fieldS__arg)),
    fieldT(std::move(fieldT__arg)),
    fieldU(std::move(fieldU__arg)),
    fieldV(std::move(fieldV__arg)),
    req_fieldV(std::move(req_fieldV__arg)),
    opt_fieldV(std::move(opt_fieldV__arg)),
    fieldW(std::move(fieldW__arg)),
    fieldX(std::move(fieldX__arg)),
    req_fieldX(std::move(req_fieldX__arg)),
    opt_fieldX(std::move(opt_fieldX__arg)),
    fieldY(std::move(fieldY__arg)),
    fieldZ(std::move(fieldZ__arg)),
    fieldAA(std::move(fieldAA__arg)),
    fieldAB(std::move(fieldAB__arg)),
    fieldAC(std::move(fieldAC__arg)),
    fieldAD(std::move(fieldAD__arg)),
    fieldAE(std::move(fieldAE__arg)),
    fieldSD(std::move(fieldSD__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
  __isset.set(folly::index_constant<2>(), true);
  __isset.set(folly::index_constant<3>(), true);
  __isset.set(folly::index_constant<4>(), true);
  __isset.set(folly::index_constant<5>(), true);
  __isset.set(folly::index_constant<6>(), true);
  __isset.set(folly::index_constant<7>(), true);
  __isset.set(folly::index_constant<8>(), true);
  __isset.set(folly::index_constant<9>(), true);
  __isset.set(folly::index_constant<10>(), true);
  __isset.set(folly::index_constant<11>(), true);
  __isset.set(folly::index_constant<12>(), true);
  __isset.set(folly::index_constant<13>(), true);
  __isset.set(folly::index_constant<14>(), true);
  __isset.set(folly::index_constant<15>(), true);
  __isset.set(folly::index_constant<16>(), true);
  __isset.set(folly::index_constant<17>(), true);
  __isset.set(folly::index_constant<18>(), true);
  __isset.set(folly::index_constant<19>(), true);
  __isset.set(folly::index_constant<20>(), true);
  __isset.set(folly::index_constant<21>(), true);
  __isset.set(folly::index_constant<22>(), true);
  __isset.set(folly::index_constant<23>(), true);
  __isset.set(folly::index_constant<24>(), true);
  __isset.set(folly::index_constant<25>(), true);
  __isset.set(folly::index_constant<26>(), true);
  __isset.set(folly::index_constant<27>(), true);
  __isset.set(folly::index_constant<28>(), true);
  __isset.set(folly::index_constant<29>(), true);
  __isset.set(folly::index_constant<30>(), true);
  __isset.set(folly::index_constant<31>(), true);
  __isset.set(folly::index_constant<32>(), true);
  __isset.set(folly::index_constant<33>(), true);
  __isset.set(folly::index_constant<34>(), true);
  __isset.set(folly::index_constant<35>(), true);
  __isset.set(folly::index_constant<36>(), true);
  __isset.set(folly::index_constant<37>(), true);
  __isset.set(folly::index_constant<38>(), true);
}


void containerStruct::__fbthrift_clear() {
  // clear all fields
  this->fieldA = bool();
  this->req_fieldA = bool();
  this->opt_fieldA = bool();
  this->fieldB.clear();
  this->req_fieldB.clear();
  this->opt_fieldB.clear();
  this->fieldC.clear();
  this->req_fieldC.clear();
  this->opt_fieldC.clear();
  this->fieldD = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->req_fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->opt_fieldE = apache::thrift::StringTraits<std::string>::fromStringLiteral("");
  this->fieldF.clear();
  this->fieldG.clear();
  this->fieldH.clear();
  this->fieldI = bool();
  this->fieldJ.clear();
  this->fieldK.clear();
  this->fieldL.clear();
  this->fieldM.clear();
  this->fieldN = ::some::valid::ns::simpleTypeDef();
  this->fieldO.clear();
  this->fieldP.clear();
  this->fieldQ = ::some::valid::ns::MyEnumA();
  this->fieldR = ::some::valid::ns::MyEnumA();
  this->req_fieldR = ::some::valid::ns::MyEnumA();
  this->opt_fieldR = ::some::valid::ns::MyEnumA();
  this->fieldS = ::some::valid::ns::MyEnumA();
  this->fieldT.clear();
  this->fieldU.clear();
  ::apache::thrift::clear(this->fieldV);
  ::apache::thrift::clear(this->req_fieldV);
  ::apache::thrift::clear(this->opt_fieldV);
  this->fieldW.clear();
  ::apache::thrift::clear(this->fieldX);
  ::apache::thrift::clear(this->req_fieldX);
  ::apache::thrift::clear(this->opt_fieldX);
  this->fieldY.clear();
  this->fieldZ.clear();
  this->fieldAA.clear();
  this->fieldAB.clear();
  this->fieldAC = ::some::valid::ns::MyEnumB();
  this->fieldAD = ::a::different::ns::AnEnum();
  this->fieldAE.clear();
  ::apache::thrift::apply_indirection(this->fieldSD) = apache::thrift::StringTraits<::folly::remove_cvref_t<::folly::invoke_result_t<::apache::thrift::detail::apply_indirection_fn, FooBar const&>>>::fromStringLiteral("");
  __isset = {};
}

void containerStruct::__fbthrift_clear_terse_fields() {
}

bool containerStruct::__fbthrift_is_empty() const {
  return false;
}

bool containerStruct::operator==([[maybe_unused]] const containerStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool containerStruct::operator<([[maybe_unused]] const containerStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::std::map<::std::string, bool>& containerStruct::get_fieldB() const& {
  return fieldB;
}

::std::map<::std::string, bool> containerStruct::get_fieldB() && {
  return std::move(fieldB);
}

const ::std::map<::std::string, bool>& containerStruct::get_req_fieldB() const& {
  return req_fieldB;
}

::std::map<::std::string, bool> containerStruct::get_req_fieldB() && {
  return std::move(req_fieldB);
}

const ::std::map<::std::string, bool>* containerStruct::get_opt_fieldB() const& {
  return opt_fieldB_ref().has_value() ? std::addressof(opt_fieldB) : nullptr;
}

::std::map<::std::string, bool>* containerStruct::get_opt_fieldB() & {
  return opt_fieldB_ref().has_value() ? std::addressof(opt_fieldB) : nullptr;
}

const ::std::set<::std::int32_t>& containerStruct::get_fieldC() const& {
  return fieldC;
}

::std::set<::std::int32_t> containerStruct::get_fieldC() && {
  return std::move(fieldC);
}

const ::std::set<::std::int32_t>& containerStruct::get_req_fieldC() const& {
  return req_fieldC;
}

::std::set<::std::int32_t> containerStruct::get_req_fieldC() && {
  return std::move(req_fieldC);
}

const ::std::set<::std::int32_t>* containerStruct::get_opt_fieldC() const& {
  return opt_fieldC_ref().has_value() ? std::addressof(opt_fieldC) : nullptr;
}

::std::set<::std::int32_t>* containerStruct::get_opt_fieldC() & {
  return opt_fieldC_ref().has_value() ? std::addressof(opt_fieldC) : nullptr;
}

const ::std::vector<::std::vector<::std::int32_t>>& containerStruct::get_fieldF() const& {
  return fieldF;
}

::std::vector<::std::vector<::std::int32_t>> containerStruct::get_fieldF() && {
  return std::move(fieldF);
}

const ::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>>& containerStruct::get_fieldG() const& {
  return fieldG;
}

::std::map<::std::string, ::std::map<::std::string, ::std::map<::std::string, ::std::int32_t>>> containerStruct::get_fieldG() && {
  return std::move(fieldG);
}

const ::std::vector<::std::set<::std::int32_t>>& containerStruct::get_fieldH() const& {
  return fieldH;
}

::std::vector<::std::set<::std::int32_t>> containerStruct::get_fieldH() && {
  return std::move(fieldH);
}

const ::std::map<::std::string, ::std::vector<::std::int32_t>>& containerStruct::get_fieldJ() const& {
  return fieldJ;
}

::std::map<::std::string, ::std::vector<::std::int32_t>> containerStruct::get_fieldJ() && {
  return std::move(fieldJ);
}

const ::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>>& containerStruct::get_fieldK() const& {
  return fieldK;
}

::std::vector<::std::vector<::std::vector<::std::vector<::std::int32_t>>>> containerStruct::get_fieldK() && {
  return std::move(fieldK);
}

const ::std::set<::std::set<::std::set<bool>>>& containerStruct::get_fieldL() const& {
  return fieldL;
}

::std::set<::std::set<::std::set<bool>>> containerStruct::get_fieldL() && {
  return std::move(fieldL);
}

const ::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>>& containerStruct::get_fieldM() const& {
  return fieldM;
}

::std::map<::std::set<::std::vector<::std::int32_t>>, ::std::map<::std::vector<::std::set<::std::string>>, ::std::string>> containerStruct::get_fieldM() && {
  return std::move(fieldM);
}

const ::some::valid::ns::complexStructTypeDef& containerStruct::get_fieldO() const& {
  return fieldO;
}

::some::valid::ns::complexStructTypeDef containerStruct::get_fieldO() && {
  return std::move(fieldO);
}

const ::std::vector<::some::valid::ns::mostComplexTypeDef>& containerStruct::get_fieldP() const& {
  return fieldP;
}

::std::vector<::some::valid::ns::mostComplexTypeDef> containerStruct::get_fieldP() && {
  return std::move(fieldP);
}

const ::std::vector<::some::valid::ns::MyEnumA>& containerStruct::get_fieldT() const& {
  return fieldT;
}

::std::vector<::some::valid::ns::MyEnumA> containerStruct::get_fieldT() && {
  return std::move(fieldT);
}

const ::std::vector<::some::valid::ns::MyEnumA>& containerStruct::get_fieldU() const& {
  return fieldU;
}

::std::vector<::some::valid::ns::MyEnumA> containerStruct::get_fieldU() && {
  return std::move(fieldU);
}

const ::some::valid::ns::MyStruct& containerStruct::get_fieldV() const& {
  return fieldV;
}

::some::valid::ns::MyStruct containerStruct::get_fieldV() && {
  return std::move(fieldV);
}

const ::some::valid::ns::MyStruct& containerStruct::get_req_fieldV() const& {
  return req_fieldV;
}

::some::valid::ns::MyStruct containerStruct::get_req_fieldV() && {
  return std::move(req_fieldV);
}

const ::some::valid::ns::MyStruct* containerStruct::get_opt_fieldV() const& {
  return opt_fieldV_ref().has_value() ? std::addressof(opt_fieldV) : nullptr;
}

::some::valid::ns::MyStruct* containerStruct::get_opt_fieldV() & {
  return opt_fieldV_ref().has_value() ? std::addressof(opt_fieldV) : nullptr;
}

const ::std::set<::some::valid::ns::MyStruct>& containerStruct::get_fieldW() const& {
  return fieldW;
}

::std::set<::some::valid::ns::MyStruct> containerStruct::get_fieldW() && {
  return std::move(fieldW);
}

const ::some::valid::ns::ComplexUnion& containerStruct::get_fieldX() const& {
  return fieldX;
}

::some::valid::ns::ComplexUnion containerStruct::get_fieldX() && {
  return std::move(fieldX);
}

const ::some::valid::ns::ComplexUnion& containerStruct::get_req_fieldX() const& {
  return req_fieldX;
}

::some::valid::ns::ComplexUnion containerStruct::get_req_fieldX() && {
  return std::move(req_fieldX);
}

const ::some::valid::ns::ComplexUnion* containerStruct::get_opt_fieldX() const& {
  return opt_fieldX_ref().has_value() ? std::addressof(opt_fieldX) : nullptr;
}

::some::valid::ns::ComplexUnion* containerStruct::get_opt_fieldX() & {
  return opt_fieldX_ref().has_value() ? std::addressof(opt_fieldX) : nullptr;
}

const ::std::vector<::some::valid::ns::ComplexUnion>& containerStruct::get_fieldY() const& {
  return fieldY;
}

::std::vector<::some::valid::ns::ComplexUnion> containerStruct::get_fieldY() && {
  return std::move(fieldY);
}

const ::some::valid::ns::unionTypeDef& containerStruct::get_fieldZ() const& {
  return fieldZ;
}

::some::valid::ns::unionTypeDef containerStruct::get_fieldZ() && {
  return std::move(fieldZ);
}

const ::std::vector<::some::valid::ns::unionTypeDef>& containerStruct::get_fieldAA() const& {
  return fieldAA;
}

::std::vector<::some::valid::ns::unionTypeDef> containerStruct::get_fieldAA() && {
  return std::move(fieldAA);
}

const ::std::map<::some::valid::ns::IndirectionB, ::some::valid::ns::IndirectionC>& containerStruct::get_fieldAB() const& {
  return fieldAB;
}

::std::map<::some::valid::ns::IndirectionB, ::some::valid::ns::IndirectionC> containerStruct::get_fieldAB() && {
  return std::move(fieldAB);
}

const ::std::map<::std::string, ::std::int32_t>& containerStruct::get_fieldAE() const& {
  return fieldAE;
}

::std::map<::std::string, ::std::int32_t> containerStruct::get_fieldAE() && {
  return std::move(fieldAE);
}


void swap([[maybe_unused]] containerStruct& a, [[maybe_unused]] containerStruct& b) {
  using ::std::swap;
  swap(a.fieldA, b.fieldA);
  swap(a.req_fieldA, b.req_fieldA);
  swap(a.opt_fieldA, b.opt_fieldA);
  swap(a.fieldB, b.fieldB);
  swap(a.req_fieldB, b.req_fieldB);
  swap(a.opt_fieldB, b.opt_fieldB);
  swap(a.fieldC, b.fieldC);
  swap(a.req_fieldC, b.req_fieldC);
  swap(a.opt_fieldC, b.opt_fieldC);
  swap(a.fieldD, b.fieldD);
  swap(a.fieldE, b.fieldE);
  swap(a.req_fieldE, b.req_fieldE);
  swap(a.opt_fieldE, b.opt_fieldE);
  swap(a.fieldF, b.fieldF);
  swap(a.fieldG, b.fieldG);
  swap(a.fieldH, b.fieldH);
  swap(a.fieldI, b.fieldI);
  swap(a.fieldJ, b.fieldJ);
  swap(a.fieldK, b.fieldK);
  swap(a.fieldL, b.fieldL);
  swap(a.fieldM, b.fieldM);
  swap(a.fieldN, b.fieldN);
  swap(a.fieldO, b.fieldO);
  swap(a.fieldP, b.fieldP);
  swap(a.fieldQ, b.fieldQ);
  swap(a.fieldR, b.fieldR);
  swap(a.req_fieldR, b.req_fieldR);
  swap(a.opt_fieldR, b.opt_fieldR);
  swap(a.fieldS, b.fieldS);
  swap(a.fieldT, b.fieldT);
  swap(a.fieldU, b.fieldU);
  swap(a.fieldV, b.fieldV);
  swap(a.req_fieldV, b.req_fieldV);
  swap(a.opt_fieldV, b.opt_fieldV);
  swap(a.fieldW, b.fieldW);
  swap(a.fieldX, b.fieldX);
  swap(a.req_fieldX, b.req_fieldX);
  swap(a.opt_fieldX, b.opt_fieldX);
  swap(a.fieldY, b.fieldY);
  swap(a.fieldZ, b.fieldZ);
  swap(a.fieldAA, b.fieldAA);
  swap(a.fieldAB, b.fieldAB);
  swap(a.fieldAC, b.fieldAC);
  swap(a.fieldAD, b.fieldAD);
  swap(a.fieldAE, b.fieldAE);
  swap(a.fieldSD, b.fieldSD);
  swap(a.__isset, b.__isset);
}

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

static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::list<::apache::thrift::type_class::map<::apache::thrift::type_class::structure, ::apache::thrift::type_class::structure>>,
        ::some::valid::ns::complexStructTypeDef>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::MyStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::structure>,
        ::std::set<::some::valid::ns::MyStruct>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::variant,
        ::some::valid::ns::ComplexUnion>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::variant,
        ::some::valid::ns::ComplexUnion>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::variant,
        ::some::valid::ns::ComplexUnion>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::list<::apache::thrift::type_class::variant>,
        ::std::vector<::some::valid::ns::ComplexUnion>>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        containerStruct,
        ::apache::thrift::type_class::set<::apache::thrift::type_class::variant>,
        ::some::valid::ns::unionTypeDef>,
    "inconsistent use of json option");

} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::MyIncludedStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::MyIncludedStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view MyIncludedStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<MyIncludedStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view MyIncludedStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<MyIncludedStruct>::name;
}

MyIncludedStruct::MyIncludedStruct(const MyIncludedStruct& srcObj) :
    __fbthrift_field_MyIncludedInt(srcObj.__fbthrift_field_MyIncludedInt),
    __fbthrift_field_MyIncludedStruct(srcObj.__fbthrift_field_MyIncludedStruct),
    __fbthrift_field_ARefField(::apache::thrift::detail::st::copy_field<
          ::apache::thrift::type_class::structure>(srcObj.__fbthrift_field_ARefField)),
    __fbthrift_field_ARequiredField(srcObj.__fbthrift_field_ARequiredField),
    __isset(srcObj.__isset) {
}

static void __fbthrift_swap(MyIncludedStruct& lhs, MyIncludedStruct& rhs) { swap(lhs, rhs); }
MyIncludedStruct& MyIncludedStruct::operator=(const MyIncludedStruct& other) {
  MyIncludedStruct tmp(other);
  __fbthrift_swap(*this, tmp);
  return *this;
}

MyIncludedStruct::MyIncludedStruct() :
    __fbthrift_field_MyIncludedInt(static_cast<::a::different::ns::IncludedInt64>(42)),
    __fbthrift_field_ARefField(std::make_unique<::some::valid::ns::AStruct>()) {
}


MyIncludedStruct::~MyIncludedStruct() {}

MyIncludedStruct::MyIncludedStruct([[maybe_unused]] MyIncludedStruct&& other) noexcept :
    __fbthrift_field_MyIncludedInt(std::move(other.__fbthrift_field_MyIncludedInt)),
    __fbthrift_field_MyIncludedStruct(std::move(other.__fbthrift_field_MyIncludedStruct)),
    __fbthrift_field_ARefField(std::move(other.__fbthrift_field_ARefField)),
    __fbthrift_field_ARequiredField(std::move(other.__fbthrift_field_ARequiredField)),
    __isset(other.__isset) {
}

MyIncludedStruct& MyIncludedStruct::operator=([[maybe_unused]] MyIncludedStruct&& other) noexcept {
    this->__fbthrift_field_MyIncludedInt = std::move(other.__fbthrift_field_MyIncludedInt);
    this->__fbthrift_field_MyIncludedStruct = std::move(other.__fbthrift_field_MyIncludedStruct);
    this->__fbthrift_field_ARefField = std::move(other.__fbthrift_field_ARefField);
    this->__fbthrift_field_ARequiredField = std::move(other.__fbthrift_field_ARequiredField);
    __isset = other.__isset;
    return *this;
}


MyIncludedStruct::MyIncludedStruct(apache::thrift::FragileConstructor, ::a::different::ns::IncludedInt64 MyIncludedInt__arg, ::some::valid::ns::AStruct MyIncludedStruct__arg, ::std::unique_ptr<::some::valid::ns::AStruct> ARefField__arg, ::some::valid::ns::AStruct ARequiredField__arg) :
    __fbthrift_field_MyIncludedInt(std::move(MyIncludedInt__arg)),
    __fbthrift_field_MyIncludedStruct(std::move(MyIncludedStruct__arg)),
    __fbthrift_field_ARefField(std::move(ARefField__arg)),
    __fbthrift_field_ARequiredField(std::move(ARequiredField__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
}


void MyIncludedStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_MyIncludedInt = ::a::different::ns::IncludedInt64();
  ::apache::thrift::clear(this->__fbthrift_field_MyIncludedStruct);
  if (this->__fbthrift_field_ARefField) ::apache::thrift::clear(*this->__fbthrift_field_ARefField);
  ::apache::thrift::clear(this->__fbthrift_field_ARequiredField);
  __isset = {};
}

void MyIncludedStruct::__fbthrift_clear_terse_fields() {
}

bool MyIncludedStruct::__fbthrift_is_empty() const {
  return false;
}

bool MyIncludedStruct::operator==([[maybe_unused]] const MyIncludedStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool MyIncludedStruct::operator<([[maybe_unused]] const MyIncludedStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::some::valid::ns::AStruct& MyIncludedStruct::get_MyIncludedStruct() const& {
  return __fbthrift_field_MyIncludedStruct;
}

::some::valid::ns::AStruct MyIncludedStruct::get_MyIncludedStruct() && {
  return std::move(__fbthrift_field_MyIncludedStruct);
}

const ::some::valid::ns::AStruct& MyIncludedStruct::get_ARequiredField() const& {
  return __fbthrift_field_ARequiredField;
}

::some::valid::ns::AStruct MyIncludedStruct::get_ARequiredField() && {
  return std::move(__fbthrift_field_ARequiredField);
}


void swap([[maybe_unused]] MyIncludedStruct& a, [[maybe_unused]] MyIncludedStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_MyIncludedInt, b.__fbthrift_field_MyIncludedInt);
  swap(a.__fbthrift_field_MyIncludedStruct, b.__fbthrift_field_MyIncludedStruct);
  swap(a.__fbthrift_field_ARefField, b.__fbthrift_field_ARefField);
  swap(a.__fbthrift_field_ARequiredField, b.__fbthrift_field_ARequiredField);
  swap(a.__isset, b.__isset);
}

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

static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        MyIncludedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::AStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        MyIncludedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::AStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        MyIncludedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::AStruct>,
    "inconsistent use of json option");

} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::AnnotatedStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::AnnotatedStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view AnnotatedStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<AnnotatedStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view AnnotatedStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<AnnotatedStruct>::name;
}

AnnotatedStruct::AnnotatedStruct() :
    cpp_unique_ref(std::make_unique<::some::valid::ns::containerStruct>()),
    cpp2_unique_ref(std::make_unique<::some::valid::ns::containerStruct>()),
    container_with_ref(std::make_unique<::std::map<::std::int32_t, ::std::vector<::std::string>>>()),
    req_cpp_unique_ref(std::make_unique<::some::valid::ns::containerStruct>()),
    req_cpp2_unique_ref(std::make_unique<::some::valid::ns::containerStruct>()),
    req_container_with_ref(std::make_unique<::std::vector<::std::string>>()),
    ref_type_unique(std::make_unique<::some::valid::ns::containerStruct>()),
    ref_type_shared(std::make_shared<::some::valid::ns::containerStruct>()),
    ref_type_const(std::make_shared<::std::map<::std::int32_t, ::std::vector<::std::string>>>()),
    req_ref_type_shared(std::make_shared<::some::valid::ns::containerStruct>()),
    req_ref_type_const(std::make_shared<::some::valid::ns::containerStruct>()),
    req_ref_type_unique(std::make_unique<::std::vector<::std::string>>()),
    base_type(),
    indirection_a(),
    iobuf_type_val(apache::thrift::StringTraits<folly::IOBuf>::fromStringLiteral("value")),
    iobuf_ptr_val(apache::thrift::StringTraits<std::unique_ptr<folly::IOBuf>>::fromStringLiteral("value2")),
    struct_struct(::apache::thrift::detail::make_structured_constant<::some::valid::ns::containerStruct>(::apache::thrift::detail::wrap_struct_argument<::apache::thrift::ident::fieldD>(apache::thrift::StringTraits<std::string>::fromStringLiteral("some string")), ::apache::thrift::detail::wrap_struct_argument<::apache::thrift::ident::fieldI>(false))) {
}


AnnotatedStruct::~AnnotatedStruct() {}


AnnotatedStruct::AnnotatedStruct(apache::thrift::FragileConstructor, ::some::valid::ns::containerStruct no_annotation__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> cpp_unique_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> cpp2_unique_ref__arg, ::std::unique_ptr<::std::map<::std::int32_t, ::std::vector<::std::string>>> container_with_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> req_cpp_unique_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> req_cpp2_unique_ref__arg, ::std::unique_ptr<::std::vector<::std::string>> req_container_with_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> opt_cpp_unique_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> opt_cpp2_unique_ref__arg, ::std::unique_ptr<::std::set<::std::int32_t>> opt_container_with_ref__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> ref_type_unique__arg, ::std::shared_ptr<::some::valid::ns::containerStruct> ref_type_shared__arg, ::std::shared_ptr<const ::std::map<::std::int32_t, ::std::vector<::std::string>>> ref_type_const__arg, ::std::shared_ptr<::some::valid::ns::containerStruct> req_ref_type_shared__arg, ::std::shared_ptr<const ::some::valid::ns::containerStruct> req_ref_type_const__arg, ::std::unique_ptr<::std::vector<::std::string>> req_ref_type_unique__arg, ::std::shared_ptr<const ::some::valid::ns::containerStruct> opt_ref_type_const__arg, ::std::unique_ptr<::some::valid::ns::containerStruct> opt_ref_type_unique__arg, ::std::shared_ptr<::std::set<::std::int32_t>> opt_ref_type_shared__arg, ::some::valid::ns::CppFakeI32 base_type__arg, ::some::valid::ns::FollySmallVectorI64 list_type__arg, ::some::valid::ns::SortedVectorSetString set_type__arg, ::some::valid::ns::FakeMap map_type__arg, ::some::valid::ns::UnorderedMapStruct map_struct_type__arg, ::some::valid::ns::IOBuf iobuf_type__arg, ::some::valid::ns::IOBufPtr iobuf_ptr__arg, std::list<::std::int32_t> list_i32_template__arg, std::deque<::std::string> list_string_template__arg, folly::sorted_vector_set<::std::string> set_template__arg, folly::sorted_vector_map<::std::int64_t, ::std::string> map_template__arg, ::some::valid::ns::std_list typedef_list_template__arg, ::some::valid::ns::std_deque typedef_deque_template__arg, ::some::valid::ns::folly_set typedef_set_template__arg, ::some::valid::ns::folly_map typedef_map_template__arg, ::some::valid::ns::IndirectionA indirection_a__arg, ::std::vector<::some::valid::ns::IndirectionB> indirection_b__arg, ::std::set<::some::valid::ns::IndirectionC> indirection_c__arg, ::some::valid::ns::IOBuf iobuf_type_val__arg, ::some::valid::ns::IOBufPtr iobuf_ptr_val__arg, ::some::valid::ns::containerStruct struct_struct__arg) :
    no_annotation(std::move(no_annotation__arg)),
    cpp_unique_ref(std::move(cpp_unique_ref__arg)),
    cpp2_unique_ref(std::move(cpp2_unique_ref__arg)),
    container_with_ref(std::move(container_with_ref__arg)),
    req_cpp_unique_ref(std::move(req_cpp_unique_ref__arg)),
    req_cpp2_unique_ref(std::move(req_cpp2_unique_ref__arg)),
    req_container_with_ref(std::move(req_container_with_ref__arg)),
    opt_cpp_unique_ref(std::move(opt_cpp_unique_ref__arg)),
    opt_cpp2_unique_ref(std::move(opt_cpp2_unique_ref__arg)),
    opt_container_with_ref(std::move(opt_container_with_ref__arg)),
    ref_type_unique(std::move(ref_type_unique__arg)),
    ref_type_shared(std::move(ref_type_shared__arg)),
    ref_type_const(std::move(ref_type_const__arg)),
    req_ref_type_shared(std::move(req_ref_type_shared__arg)),
    req_ref_type_const(std::move(req_ref_type_const__arg)),
    req_ref_type_unique(std::move(req_ref_type_unique__arg)),
    opt_ref_type_const(std::move(opt_ref_type_const__arg)),
    opt_ref_type_unique(std::move(opt_ref_type_unique__arg)),
    opt_ref_type_shared(std::move(opt_ref_type_shared__arg)),
    base_type(std::move(base_type__arg)),
    list_type(std::move(list_type__arg)),
    set_type(std::move(set_type__arg)),
    map_type(std::move(map_type__arg)),
    map_struct_type(std::move(map_struct_type__arg)),
    iobuf_type(std::move(iobuf_type__arg)),
    iobuf_ptr(std::move(iobuf_ptr__arg)),
    list_i32_template(std::move(list_i32_template__arg)),
    list_string_template(std::move(list_string_template__arg)),
    set_template(std::move(set_template__arg)),
    map_template(std::move(map_template__arg)),
    typedef_list_template(std::move(typedef_list_template__arg)),
    typedef_deque_template(std::move(typedef_deque_template__arg)),
    typedef_set_template(std::move(typedef_set_template__arg)),
    typedef_map_template(std::move(typedef_map_template__arg)),
    indirection_a(std::move(indirection_a__arg)),
    indirection_b(std::move(indirection_b__arg)),
    indirection_c(std::move(indirection_c__arg)),
    iobuf_type_val(std::move(iobuf_type_val__arg)),
    iobuf_ptr_val(std::move(iobuf_ptr_val__arg)),
    struct_struct(std::move(struct_struct__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
  __isset.set(folly::index_constant<2>(), true);
  __isset.set(folly::index_constant<3>(), true);
  __isset.set(folly::index_constant<4>(), true);
  __isset.set(folly::index_constant<5>(), true);
  __isset.set(folly::index_constant<6>(), true);
  __isset.set(folly::index_constant<7>(), true);
  __isset.set(folly::index_constant<8>(), true);
  __isset.set(folly::index_constant<9>(), true);
  __isset.set(folly::index_constant<10>(), true);
  __isset.set(folly::index_constant<11>(), true);
  __isset.set(folly::index_constant<12>(), true);
  __isset.set(folly::index_constant<13>(), true);
  __isset.set(folly::index_constant<14>(), true);
  __isset.set(folly::index_constant<15>(), true);
  __isset.set(folly::index_constant<16>(), true);
  __isset.set(folly::index_constant<17>(), true);
  __isset.set(folly::index_constant<18>(), true);
  __isset.set(folly::index_constant<19>(), true);
  __isset.set(folly::index_constant<20>(), true);
  __isset.set(folly::index_constant<21>(), true);
}


void AnnotatedStruct::__fbthrift_clear() {
  // clear all fields
  ::apache::thrift::clear(this->no_annotation);
  if (this->cpp_unique_ref) ::apache::thrift::clear(*this->cpp_unique_ref);
  if (this->cpp2_unique_ref) ::apache::thrift::clear(*this->cpp2_unique_ref);
  this->container_with_ref = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::std::map<::std::int32_t, ::std::vector<::std::string>>>>();
  if (this->req_cpp_unique_ref) ::apache::thrift::clear(*this->req_cpp_unique_ref);
  if (this->req_cpp2_unique_ref) ::apache::thrift::clear(*this->req_cpp2_unique_ref);
  this->req_container_with_ref = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::std::vector<::std::string>>>();
  this->opt_cpp_unique_ref.reset();
  this->opt_cpp2_unique_ref.reset();
  this->opt_container_with_ref.reset();
  if (this->ref_type_unique) ::apache::thrift::clear(*this->ref_type_unique);
  if (this->ref_type_shared) this->ref_type_shared = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<::some::valid::ns::containerStruct>>();
  this->ref_type_const = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<const ::std::map<::std::int32_t, ::std::vector<::std::string>>>>();
  if (this->req_ref_type_shared) this->req_ref_type_shared = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<::some::valid::ns::containerStruct>>();
  if (this->req_ref_type_const) this->req_ref_type_const = ::apache::thrift::detail::make_mutable_smart_ptr<::std::shared_ptr<const ::some::valid::ns::containerStruct>>();
  this->req_ref_type_unique = ::apache::thrift::detail::make_mutable_smart_ptr<::std::unique_ptr<::std::vector<::std::string>>>();
  this->opt_ref_type_const.reset();
  this->opt_ref_type_unique.reset();
  this->opt_ref_type_shared.reset();
  this->base_type = ::some::valid::ns::CppFakeI32();
  this->list_type.clear();
  this->set_type.clear();
  this->map_type.clear();
  this->map_struct_type.clear();
  this->iobuf_type = apache::thrift::StringTraits<folly::IOBuf>::fromStringLiteral("");
  this->iobuf_ptr = apache::thrift::StringTraits<std::unique_ptr<folly::IOBuf>>::fromStringLiteral("");
  this->list_i32_template.clear();
  this->list_string_template.clear();
  this->set_template.clear();
  this->map_template.clear();
  this->typedef_list_template.clear();
  this->typedef_deque_template.clear();
  this->typedef_set_template.clear();
  this->typedef_map_template.clear();
  ::apache::thrift::apply_indirection(this->indirection_a) = 0;
  this->indirection_b.clear();
  this->indirection_c.clear();
  this->iobuf_type_val = apache::thrift::StringTraits<folly::IOBuf>::fromStringLiteral("");
  this->iobuf_ptr_val = apache::thrift::StringTraits<std::unique_ptr<folly::IOBuf>>::fromStringLiteral("");
  ::apache::thrift::clear(this->struct_struct);
  __isset = {};
}

void AnnotatedStruct::__fbthrift_clear_terse_fields() {
}

bool AnnotatedStruct::__fbthrift_is_empty() const {
  return false;
}

bool AnnotatedStruct::operator==([[maybe_unused]] const AnnotatedStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

const ::some::valid::ns::containerStruct& AnnotatedStruct::get_no_annotation() const& {
  return no_annotation;
}

::some::valid::ns::containerStruct AnnotatedStruct::get_no_annotation() && {
  return std::move(no_annotation);
}

const ::some::valid::ns::FollySmallVectorI64& AnnotatedStruct::get_list_type() const& {
  return list_type;
}

::some::valid::ns::FollySmallVectorI64 AnnotatedStruct::get_list_type() && {
  return std::move(list_type);
}

const ::some::valid::ns::SortedVectorSetString& AnnotatedStruct::get_set_type() const& {
  return set_type;
}

::some::valid::ns::SortedVectorSetString AnnotatedStruct::get_set_type() && {
  return std::move(set_type);
}

const ::some::valid::ns::FakeMap& AnnotatedStruct::get_map_type() const& {
  return map_type;
}

::some::valid::ns::FakeMap AnnotatedStruct::get_map_type() && {
  return std::move(map_type);
}

const ::some::valid::ns::UnorderedMapStruct& AnnotatedStruct::get_map_struct_type() const& {
  return map_struct_type;
}

::some::valid::ns::UnorderedMapStruct AnnotatedStruct::get_map_struct_type() && {
  return std::move(map_struct_type);
}

const std::list<::std::int32_t>& AnnotatedStruct::get_list_i32_template() const& {
  return list_i32_template;
}

std::list<::std::int32_t> AnnotatedStruct::get_list_i32_template() && {
  return std::move(list_i32_template);
}

const std::deque<::std::string>& AnnotatedStruct::get_list_string_template() const& {
  return list_string_template;
}

std::deque<::std::string> AnnotatedStruct::get_list_string_template() && {
  return std::move(list_string_template);
}

const folly::sorted_vector_set<::std::string>& AnnotatedStruct::get_set_template() const& {
  return set_template;
}

folly::sorted_vector_set<::std::string> AnnotatedStruct::get_set_template() && {
  return std::move(set_template);
}

const folly::sorted_vector_map<::std::int64_t, ::std::string>& AnnotatedStruct::get_map_template() const& {
  return map_template;
}

folly::sorted_vector_map<::std::int64_t, ::std::string> AnnotatedStruct::get_map_template() && {
  return std::move(map_template);
}

const ::some::valid::ns::std_list& AnnotatedStruct::get_typedef_list_template() const& {
  return typedef_list_template;
}

::some::valid::ns::std_list AnnotatedStruct::get_typedef_list_template() && {
  return std::move(typedef_list_template);
}

const ::some::valid::ns::std_deque& AnnotatedStruct::get_typedef_deque_template() const& {
  return typedef_deque_template;
}

::some::valid::ns::std_deque AnnotatedStruct::get_typedef_deque_template() && {
  return std::move(typedef_deque_template);
}

const ::some::valid::ns::folly_set& AnnotatedStruct::get_typedef_set_template() const& {
  return typedef_set_template;
}

::some::valid::ns::folly_set AnnotatedStruct::get_typedef_set_template() && {
  return std::move(typedef_set_template);
}

const ::some::valid::ns::folly_map& AnnotatedStruct::get_typedef_map_template() const& {
  return typedef_map_template;
}

::some::valid::ns::folly_map AnnotatedStruct::get_typedef_map_template() && {
  return std::move(typedef_map_template);
}

const ::std::vector<::some::valid::ns::IndirectionB>& AnnotatedStruct::get_indirection_b() const& {
  return indirection_b;
}

::std::vector<::some::valid::ns::IndirectionB> AnnotatedStruct::get_indirection_b() && {
  return std::move(indirection_b);
}

const ::std::set<::some::valid::ns::IndirectionC>& AnnotatedStruct::get_indirection_c() const& {
  return indirection_c;
}

::std::set<::some::valid::ns::IndirectionC> AnnotatedStruct::get_indirection_c() && {
  return std::move(indirection_c);
}

const ::some::valid::ns::containerStruct& AnnotatedStruct::get_struct_struct() const& {
  return struct_struct;
}

::some::valid::ns::containerStruct AnnotatedStruct::get_struct_struct() && {
  return std::move(struct_struct);
}


void swap([[maybe_unused]] AnnotatedStruct& a, [[maybe_unused]] AnnotatedStruct& b) {
  using ::std::swap;
  swap(a.no_annotation, b.no_annotation);
  swap(a.cpp_unique_ref, b.cpp_unique_ref);
  swap(a.cpp2_unique_ref, b.cpp2_unique_ref);
  swap(a.container_with_ref, b.container_with_ref);
  swap(a.req_cpp_unique_ref, b.req_cpp_unique_ref);
  swap(a.req_cpp2_unique_ref, b.req_cpp2_unique_ref);
  swap(a.req_container_with_ref, b.req_container_with_ref);
  swap(a.opt_cpp_unique_ref, b.opt_cpp_unique_ref);
  swap(a.opt_cpp2_unique_ref, b.opt_cpp2_unique_ref);
  swap(a.opt_container_with_ref, b.opt_container_with_ref);
  swap(a.ref_type_unique, b.ref_type_unique);
  swap(a.ref_type_shared, b.ref_type_shared);
  swap(a.ref_type_const, b.ref_type_const);
  swap(a.req_ref_type_shared, b.req_ref_type_shared);
  swap(a.req_ref_type_const, b.req_ref_type_const);
  swap(a.req_ref_type_unique, b.req_ref_type_unique);
  swap(a.opt_ref_type_const, b.opt_ref_type_const);
  swap(a.opt_ref_type_unique, b.opt_ref_type_unique);
  swap(a.opt_ref_type_shared, b.opt_ref_type_shared);
  swap(a.base_type, b.base_type);
  swap(a.list_type, b.list_type);
  swap(a.set_type, b.set_type);
  swap(a.map_type, b.map_type);
  swap(a.map_struct_type, b.map_struct_type);
  swap(a.iobuf_type, b.iobuf_type);
  swap(a.iobuf_ptr, b.iobuf_ptr);
  swap(a.list_i32_template, b.list_i32_template);
  swap(a.list_string_template, b.list_string_template);
  swap(a.set_template, b.set_template);
  swap(a.map_template, b.map_template);
  swap(a.typedef_list_template, b.typedef_list_template);
  swap(a.typedef_deque_template, b.typedef_deque_template);
  swap(a.typedef_set_template, b.typedef_set_template);
  swap(a.typedef_map_template, b.typedef_map_template);
  swap(a.indirection_a, b.indirection_a);
  swap(a.indirection_b, b.indirection_b);
  swap(a.indirection_c, b.indirection_c);
  swap(a.iobuf_type_val, b.iobuf_type_val);
  swap(a.iobuf_ptr_val, b.iobuf_ptr_val);
  swap(a.struct_struct, b.struct_struct);
  swap(a.__isset, b.__isset);
}

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

static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::structure>,
        ::some::valid::ns::UnorderedMapStruct>,
    "inconsistent use of json option");
static_assert(
    ::apache::thrift::detail::st::gen_check_json<
        AnnotatedStruct,
        ::apache::thrift::type_class::structure,
        ::some::valid::ns::containerStruct>,
    "inconsistent use of json option");

} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::ComplexContainerStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::ComplexContainerStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view ComplexContainerStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<ComplexContainerStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view ComplexContainerStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<ComplexContainerStruct>::name;
}

ComplexContainerStruct::ComplexContainerStruct(const ComplexContainerStruct& srcObj) :
    __fbthrift_field_map_of_iobufs(srcObj.__fbthrift_field_map_of_iobufs),
    __fbthrift_field_map_of_iobuf_ptrs(::apache::thrift::detail::st::copy_field<
          ::apache::thrift::type_class::map<::apache::thrift::type_class::string, ::apache::thrift::type_class::binary>>(srcObj.__fbthrift_field_map_of_iobuf_ptrs)),
    __isset(srcObj.__isset) {
}

static void __fbthrift_swap(ComplexContainerStruct& lhs, ComplexContainerStruct& rhs) { swap(lhs, rhs); }
ComplexContainerStruct& ComplexContainerStruct::operator=(const ComplexContainerStruct& other) {
  ComplexContainerStruct tmp(other);
  __fbthrift_swap(*this, tmp);
  return *this;
}

ComplexContainerStruct::ComplexContainerStruct() {
}


ComplexContainerStruct::~ComplexContainerStruct() {}

ComplexContainerStruct::ComplexContainerStruct([[maybe_unused]] ComplexContainerStruct&& other) noexcept :
    __fbthrift_field_map_of_iobufs(std::move(other.__fbthrift_field_map_of_iobufs)),
    __fbthrift_field_map_of_iobuf_ptrs(std::move(other.__fbthrift_field_map_of_iobuf_ptrs)),
    __isset(other.__isset) {
}

ComplexContainerStruct& ComplexContainerStruct::operator=([[maybe_unused]] ComplexContainerStruct&& other) noexcept {
    this->__fbthrift_field_map_of_iobufs = std::move(other.__fbthrift_field_map_of_iobufs);
    this->__fbthrift_field_map_of_iobuf_ptrs = std::move(other.__fbthrift_field_map_of_iobuf_ptrs);
    __isset = other.__isset;
    return *this;
}


ComplexContainerStruct::ComplexContainerStruct(apache::thrift::FragileConstructor, ::std::map<::std::string, ::some::valid::ns::IOBuf> map_of_iobufs__arg, ::std::map<::std::string, ::some::valid::ns::IOBufPtr> map_of_iobuf_ptrs__arg) :
    __fbthrift_field_map_of_iobufs(std::move(map_of_iobufs__arg)),
    __fbthrift_field_map_of_iobuf_ptrs(std::move(map_of_iobuf_ptrs__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
}


void ComplexContainerStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_map_of_iobufs.clear();
  this->__fbthrift_field_map_of_iobuf_ptrs.clear();
  __isset = {};
}

void ComplexContainerStruct::__fbthrift_clear_terse_fields() {
}

bool ComplexContainerStruct::__fbthrift_is_empty() const {
  return !(!::apache::thrift::op::isEmpty<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::cpp_type<folly::IOBuf, ::apache::thrift::type::binary_t>>>(this->__fbthrift_field_map_of_iobufs)) &&
 !(!::apache::thrift::op::isEmpty<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::cpp_type<std::unique_ptr<folly::IOBuf>, ::apache::thrift::type::binary_t>>>(this->__fbthrift_field_map_of_iobuf_ptrs));
}

bool ComplexContainerStruct::operator==([[maybe_unused]] const ComplexContainerStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool ComplexContainerStruct::operator<([[maybe_unused]] const ComplexContainerStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}

const ::std::map<::std::string, ::some::valid::ns::IOBuf>& ComplexContainerStruct::get_map_of_iobufs() const& {
  return __fbthrift_field_map_of_iobufs;
}

::std::map<::std::string, ::some::valid::ns::IOBuf> ComplexContainerStruct::get_map_of_iobufs() && {
  return std::move(__fbthrift_field_map_of_iobufs);
}

const ::std::map<::std::string, ::some::valid::ns::IOBufPtr>& ComplexContainerStruct::get_map_of_iobuf_ptrs() const& {
  return __fbthrift_field_map_of_iobuf_ptrs;
}

::std::map<::std::string, ::some::valid::ns::IOBufPtr> ComplexContainerStruct::get_map_of_iobuf_ptrs() && {
  return std::move(__fbthrift_field_map_of_iobuf_ptrs);
}


void swap([[maybe_unused]] ComplexContainerStruct& a, [[maybe_unused]] ComplexContainerStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_map_of_iobufs, b.__fbthrift_field_map_of_iobufs);
  swap(a.__fbthrift_field_map_of_iobuf_ptrs, b.__fbthrift_field_map_of_iobuf_ptrs);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::FloatStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::FloatStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view FloatStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<FloatStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view FloatStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<FloatStruct>::name;
}


FloatStruct::FloatStruct(apache::thrift::FragileConstructor, float floatField__arg, double doubleField__arg) :
    __fbthrift_field_floatField(std::move(floatField__arg)),
    __fbthrift_field_doubleField(std::move(doubleField__arg)) { 
  __isset.set(folly::index_constant<0>(), true);
  __isset.set(folly::index_constant<1>(), true);
}


void FloatStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_floatField = float();
  this->__fbthrift_field_doubleField = double();
  __isset = {};
}

void FloatStruct::__fbthrift_clear_terse_fields() {
}

bool FloatStruct::__fbthrift_is_empty() const {
  return !(this->__fbthrift_field_floatField != float()) &&
 !(this->__fbthrift_field_doubleField != double());
}

bool FloatStruct::operator==([[maybe_unused]] const FloatStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool FloatStruct::operator<([[maybe_unused]] const FloatStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}


void swap([[maybe_unused]] FloatStruct& a, [[maybe_unused]] FloatStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_floatField, b.__fbthrift_field_floatField);
  swap(a.__fbthrift_field_doubleField, b.__fbthrift_field_doubleField);
  swap(a.__isset, b.__isset);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::FloatUnion>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::FloatUnion>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace apache { namespace thrift {

folly::Range<::some::valid::ns::FloatUnion::Type const*> const TEnumTraits<::some::valid::ns::FloatUnion::Type>::values = folly::range(TEnumDataStorage<::some::valid::ns::FloatUnion::Type>::values);
folly::Range<std::string_view const*> const TEnumTraits<::some::valid::ns::FloatUnion::Type>::names = folly::range(TEnumDataStorage<::some::valid::ns::FloatUnion::Type>::names);

bool TEnumTraits<::some::valid::ns::FloatUnion::Type>::findName(type value, std::string_view* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_name(value, out);
}

bool TEnumTraits<::some::valid::ns::FloatUnion::Type>::findValue(std::string_view name, type* out) noexcept {
  return ::apache::thrift::detail::st::enum_find_value(name, out);
}
}} // apache::thrift
namespace some::valid::ns {

std::string_view FloatUnion::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<FloatUnion>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view FloatUnion::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<FloatUnion>::name;
}

void FloatUnion::__fbthrift_destruct() {
  switch(getType()) {
    case Type::__EMPTY__:
      break;
    case Type::floatSide:
      ::std::destroy_at(::std::addressof(value_.floatSide));
      break;
    case Type::doubleSide:
      ::std::destroy_at(::std::addressof(value_.doubleSide));
      break;
    default:
      assert(false);
      break;
  }
}

void FloatUnion::__fbthrift_clear() {
  __fbthrift_destruct();
  type_ = folly::to_underlying(Type::__EMPTY__);
}


bool FloatUnion::__fbthrift_is_empty() const {
  return getType() == Type::__EMPTY__;
}
  FloatUnion::FloatUnion(const FloatUnion& rhs)
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        return;
      case Type::floatSide:
        set_floatSide(rhs.value_.floatSide);
        break;
      case Type::doubleSide:
        set_doubleSide(rhs.value_.doubleSide);
        break;
      default:
        assert(false);
    }
  }

    FloatUnion&FloatUnion::operator=(const FloatUnion& rhs) {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
        __fbthrift_clear();
        return *this;
      case Type::floatSide:
        set_floatSide(rhs.value_.floatSide);
        break;
      case Type::doubleSide:
        set_doubleSide(rhs.value_.doubleSide);
        break;
      default:
        __fbthrift_clear();
        assert(false);
    }
    return *this;
  }


bool FloatUnion::operator==(const FloatUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionEquality{}(*this, rhs);
}

bool FloatUnion::operator<([[maybe_unused]] const FloatUnion& rhs) const {
  return ::apache::thrift::op::detail::UnionLessThan{}(*this, rhs);
}

void swap(FloatUnion& a, FloatUnion& b) {
  FloatUnion temp(std::move(a));
  a = std::move(b);
  b = std::move(temp);
}

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


} // namespace some::valid::ns

namespace apache {
namespace thrift {
namespace detail {

void TccStructTraits<::some::valid::ns::AllRequiredNoExceptMoveCtrStruct>::translateFieldName(
    std::string_view _fname,
    int16_t& fid,
    apache::thrift::protocol::TType& _ftype) noexcept {
  using data = apache::thrift::TStructDataStorage<::some::valid::ns::AllRequiredNoExceptMoveCtrStruct>;
  static const st::translate_field_name_table table{
      data::fields_size,
      data::fields_names.data(),
      data::fields_ids.data(),
      data::fields_types.data()};
  st::translate_field_name(_fname, fid, _ftype, table);
}

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

namespace some::valid::ns {

std::string_view AllRequiredNoExceptMoveCtrStruct::__fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord) {
  if (ord == ::apache::thrift::FieldOrdinal{0}) { return {}; }
  return apache::thrift::TStructDataStorage<AllRequiredNoExceptMoveCtrStruct>::fields_names[folly::to_underlying(ord) - 1];
}
std::string_view AllRequiredNoExceptMoveCtrStruct::__fbthrift_get_class_name() {
  return apache::thrift::TStructDataStorage<AllRequiredNoExceptMoveCtrStruct>::name;
}


AllRequiredNoExceptMoveCtrStruct::AllRequiredNoExceptMoveCtrStruct(apache::thrift::FragileConstructor, ::std::int64_t intField__arg) :
    __fbthrift_field_intField(std::move(intField__arg)) { 
}


void AllRequiredNoExceptMoveCtrStruct::__fbthrift_clear() {
  // clear all fields
  this->__fbthrift_field_intField = ::std::int64_t();
}

void AllRequiredNoExceptMoveCtrStruct::__fbthrift_clear_terse_fields() {
}

bool AllRequiredNoExceptMoveCtrStruct::__fbthrift_is_empty() const {
  return false;
}

bool AllRequiredNoExceptMoveCtrStruct::operator==([[maybe_unused]] const AllRequiredNoExceptMoveCtrStruct& rhs) const {
  return ::apache::thrift::op::detail::StructEquality{}(*this, rhs);
}

bool AllRequiredNoExceptMoveCtrStruct::operator<([[maybe_unused]] const AllRequiredNoExceptMoveCtrStruct& rhs) const {
  return ::apache::thrift::op::detail::StructLessThan{}(*this, rhs);
}


void swap([[maybe_unused]] AllRequiredNoExceptMoveCtrStruct& a, [[maybe_unused]] AllRequiredNoExceptMoveCtrStruct& b) {
  using ::std::swap;
  swap(a.__fbthrift_field_intField, b.__fbthrift_field_intField);
}

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


} // namespace some::valid::ns

namespace some::valid::ns { namespace {
[[maybe_unused]] FOLLY_ERASE void validateAdapters() {
  ::apache::thrift::adapt_detail::validateFieldAdapter<::CustomProtocolAdapter, 10, ::some::valid::ns::IOBuf, ::some::valid::ns::MyStruct>();
  ::apache::thrift::adapt_detail::validateFieldAdapter<::CustomProtocolAdapter, 11, ::some::valid::ns::IOBuf, ::some::valid::ns::MyStruct>();
  ::apache::thrift::adapt_detail::validateFieldAdapter<::CustomProtocolAdapter, 27, ::some::valid::ns::IOBuf, ::some::valid::ns::ComplexUnion>();
  ::apache::thrift::adapt_detail::validateFieldAdapter<::CustomProtocolAdapter, 20, ::some::valid::ns::IOBuf, ::some::valid::ns::AnException>();
  ::apache::thrift::adapt_detail::validateFieldAdapter<::CustomProtocolAdapter, 21, ::some::valid::ns::IOBuf, ::some::valid::ns::AnException>();
}
}} // namespace some::valid::ns
namespace apache::thrift::detail::annotation {
}
