/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/types/src/module.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once

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


#include "thrift/compiler/test/fixtures/types/gen-cpp2/included_types.h"

namespace apache {
namespace thrift {
namespace ident {
struct field;
struct fieldA;
struct fieldB;
struct fieldC;
struct fieldD;
struct fieldE;
struct fieldF;
struct fieldG;
struct fieldH;
struct fieldA;
struct MyIntField;
struct a;
struct b;
struct a;
struct b;
struct z;
struct n;
struct a;
struct b;
struct z;
struct n;
struct small;
struct big;
struct medium;
struct biggish;
struct tiny;
struct small;
struct big;
struct medium;
struct biggish;
struct tiny;
struct MyIntField;
struct MyStringField;
struct majorVer;
struct data;
struct bar;
struct binary_field;
struct list_field;
struct ForwardUsageStruct;
struct ForwardUsageByRef;
struct foo;
struct foo;
struct field;
struct field;
struct field;
struct field;
struct field;
struct field;
struct field;
struct field;
struct aa_list;
struct aa_set;
struct aa_map;
struct aa_string;
struct not_a_container;
struct aa_unique;
struct aa_shared;
struct not_a_container;
struct box_field;
struct i32_field;
struct IntTypedef_field;
struct UintTypedef_field;
struct __field;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldA
#define APACHE_THRIFT_ACCESSOR_fieldA
APACHE_THRIFT_DEFINE_ACCESSOR(fieldA);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldB
#define APACHE_THRIFT_ACCESSOR_fieldB
APACHE_THRIFT_DEFINE_ACCESSOR(fieldB);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldC
#define APACHE_THRIFT_ACCESSOR_fieldC
APACHE_THRIFT_DEFINE_ACCESSOR(fieldC);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldD
#define APACHE_THRIFT_ACCESSOR_fieldD
APACHE_THRIFT_DEFINE_ACCESSOR(fieldD);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldE
#define APACHE_THRIFT_ACCESSOR_fieldE
APACHE_THRIFT_DEFINE_ACCESSOR(fieldE);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldF
#define APACHE_THRIFT_ACCESSOR_fieldF
APACHE_THRIFT_DEFINE_ACCESSOR(fieldF);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldG
#define APACHE_THRIFT_ACCESSOR_fieldG
APACHE_THRIFT_DEFINE_ACCESSOR(fieldG);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldH
#define APACHE_THRIFT_ACCESSOR_fieldH
APACHE_THRIFT_DEFINE_ACCESSOR(fieldH);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldA
#define APACHE_THRIFT_ACCESSOR_fieldA
APACHE_THRIFT_DEFINE_ACCESSOR(fieldA);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_MyIntField
#define APACHE_THRIFT_ACCESSOR_MyIntField
APACHE_THRIFT_DEFINE_ACCESSOR(MyIntField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_a
#define APACHE_THRIFT_ACCESSOR_a
APACHE_THRIFT_DEFINE_ACCESSOR(a);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_b
#define APACHE_THRIFT_ACCESSOR_b
APACHE_THRIFT_DEFINE_ACCESSOR(b);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_a
#define APACHE_THRIFT_ACCESSOR_a
APACHE_THRIFT_DEFINE_ACCESSOR(a);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_b
#define APACHE_THRIFT_ACCESSOR_b
APACHE_THRIFT_DEFINE_ACCESSOR(b);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_z
#define APACHE_THRIFT_ACCESSOR_z
APACHE_THRIFT_DEFINE_ACCESSOR(z);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_n
#define APACHE_THRIFT_ACCESSOR_n
APACHE_THRIFT_DEFINE_ACCESSOR(n);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_a
#define APACHE_THRIFT_ACCESSOR_a
APACHE_THRIFT_DEFINE_ACCESSOR(a);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_b
#define APACHE_THRIFT_ACCESSOR_b
APACHE_THRIFT_DEFINE_ACCESSOR(b);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_z
#define APACHE_THRIFT_ACCESSOR_z
APACHE_THRIFT_DEFINE_ACCESSOR(z);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_n
#define APACHE_THRIFT_ACCESSOR_n
APACHE_THRIFT_DEFINE_ACCESSOR(n);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_small
#define APACHE_THRIFT_ACCESSOR_small
APACHE_THRIFT_DEFINE_ACCESSOR(small);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_big
#define APACHE_THRIFT_ACCESSOR_big
APACHE_THRIFT_DEFINE_ACCESSOR(big);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_medium
#define APACHE_THRIFT_ACCESSOR_medium
APACHE_THRIFT_DEFINE_ACCESSOR(medium);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_biggish
#define APACHE_THRIFT_ACCESSOR_biggish
APACHE_THRIFT_DEFINE_ACCESSOR(biggish);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_tiny
#define APACHE_THRIFT_ACCESSOR_tiny
APACHE_THRIFT_DEFINE_ACCESSOR(tiny);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_small
#define APACHE_THRIFT_ACCESSOR_small
APACHE_THRIFT_DEFINE_ACCESSOR(small);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_big
#define APACHE_THRIFT_ACCESSOR_big
APACHE_THRIFT_DEFINE_ACCESSOR(big);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_medium
#define APACHE_THRIFT_ACCESSOR_medium
APACHE_THRIFT_DEFINE_ACCESSOR(medium);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_biggish
#define APACHE_THRIFT_ACCESSOR_biggish
APACHE_THRIFT_DEFINE_ACCESSOR(biggish);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_tiny
#define APACHE_THRIFT_ACCESSOR_tiny
APACHE_THRIFT_DEFINE_ACCESSOR(tiny);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_MyIntField
#define APACHE_THRIFT_ACCESSOR_MyIntField
APACHE_THRIFT_DEFINE_ACCESSOR(MyIntField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_MyStringField
#define APACHE_THRIFT_ACCESSOR_MyStringField
APACHE_THRIFT_DEFINE_ACCESSOR(MyStringField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_majorVer
#define APACHE_THRIFT_ACCESSOR_majorVer
APACHE_THRIFT_DEFINE_ACCESSOR(majorVer);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_data
#define APACHE_THRIFT_ACCESSOR_data
APACHE_THRIFT_DEFINE_ACCESSOR(data);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_bar
#define APACHE_THRIFT_ACCESSOR_bar
APACHE_THRIFT_DEFINE_ACCESSOR(bar);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_binary_field
#define APACHE_THRIFT_ACCESSOR_binary_field
APACHE_THRIFT_DEFINE_ACCESSOR(binary_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_list_field
#define APACHE_THRIFT_ACCESSOR_list_field
APACHE_THRIFT_DEFINE_ACCESSOR(list_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_ForwardUsageStruct
#define APACHE_THRIFT_ACCESSOR_ForwardUsageStruct
APACHE_THRIFT_DEFINE_ACCESSOR(ForwardUsageStruct);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_ForwardUsageByRef
#define APACHE_THRIFT_ACCESSOR_ForwardUsageByRef
APACHE_THRIFT_DEFINE_ACCESSOR(ForwardUsageByRef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_foo
#define APACHE_THRIFT_ACCESSOR_foo
APACHE_THRIFT_DEFINE_ACCESSOR(foo);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_foo
#define APACHE_THRIFT_ACCESSOR_foo
APACHE_THRIFT_DEFINE_ACCESSOR(foo);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_list
#define APACHE_THRIFT_ACCESSOR_aa_list
APACHE_THRIFT_DEFINE_ACCESSOR(aa_list);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_set
#define APACHE_THRIFT_ACCESSOR_aa_set
APACHE_THRIFT_DEFINE_ACCESSOR(aa_set);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_map
#define APACHE_THRIFT_ACCESSOR_aa_map
APACHE_THRIFT_DEFINE_ACCESSOR(aa_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_string
#define APACHE_THRIFT_ACCESSOR_aa_string
APACHE_THRIFT_DEFINE_ACCESSOR(aa_string);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_not_a_container
#define APACHE_THRIFT_ACCESSOR_not_a_container
APACHE_THRIFT_DEFINE_ACCESSOR(not_a_container);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_unique
#define APACHE_THRIFT_ACCESSOR_aa_unique
APACHE_THRIFT_DEFINE_ACCESSOR(aa_unique);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_aa_shared
#define APACHE_THRIFT_ACCESSOR_aa_shared
APACHE_THRIFT_DEFINE_ACCESSOR(aa_shared);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_not_a_container
#define APACHE_THRIFT_ACCESSOR_not_a_container
APACHE_THRIFT_DEFINE_ACCESSOR(not_a_container);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_box_field
#define APACHE_THRIFT_ACCESSOR_box_field
APACHE_THRIFT_DEFINE_ACCESSOR(box_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_i32_field
#define APACHE_THRIFT_ACCESSOR_i32_field
APACHE_THRIFT_DEFINE_ACCESSOR(i32_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_IntTypedef_field
#define APACHE_THRIFT_ACCESSOR_IntTypedef_field
APACHE_THRIFT_DEFINE_ACCESSOR(IntTypedef_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_UintTypedef_field
#define APACHE_THRIFT_ACCESSOR_UintTypedef_field
APACHE_THRIFT_DEFINE_ACCESSOR(UintTypedef_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR___field
#define APACHE_THRIFT_ACCESSOR___field
APACHE_THRIFT_DEFINE_ACCESSOR(__field);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums
namespace apache::thrift::fixtures::types {

/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "has_bitwise_ops", "kind": "enum" } */
enum class has_bitwise_ops {
  none = 0,
  zero = 1,
  one = 2,
  two = 4,
  three = 8,
};

inline constexpr has_bitwise_ops operator&(has_bitwise_ops a, has_bitwise_ops b) {
  using E = has_bitwise_ops;
  using U = std::underlying_type_t<E>;
  return static_cast<E>(static_cast<U>(a) & static_cast<U>(b));
}
inline constexpr has_bitwise_ops& operator&=(has_bitwise_ops& a, has_bitwise_ops b) {
  return a = a & b;
}

inline constexpr has_bitwise_ops operator|(has_bitwise_ops a, has_bitwise_ops b) {
  using E = has_bitwise_ops;
  using U = std::underlying_type_t<E>;
  return static_cast<E>(static_cast<U>(a) | static_cast<U>(b));
}
inline constexpr has_bitwise_ops& operator|=(has_bitwise_ops& a, has_bitwise_ops b) {
  return a = a | b;
}

inline constexpr has_bitwise_ops operator^(has_bitwise_ops a, has_bitwise_ops b) {
  using E = has_bitwise_ops;
  using U = std::underlying_type_t<E>;
  return static_cast<E>(static_cast<U>(a) ^ static_cast<U>(b));
}
inline constexpr has_bitwise_ops& operator^=(has_bitwise_ops& a, has_bitwise_ops b) {
  return a = a ^ b;
}

inline constexpr has_bitwise_ops operator~(has_bitwise_ops a) {
  using E = has_bitwise_ops;
  using U = std::underlying_type_t<E>;
  return static_cast<E>(~static_cast<U>(a));
}

/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "is_unscoped", "kind": "enum" } */
enum is_unscoped : int {
  hello = 0,
  world = 1,
};



/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MyForwardRefEnum", "kind": "enum" } */
enum class MyForwardRefEnum {
  ZERO = 0,
  NONZERO = 12,
};



} // namespace apache::thrift::fixtures::types

namespace std {
template<> struct hash<::apache::thrift::fixtures::types::has_bitwise_ops> :
  ::apache::thrift::detail::enum_hash<::apache::thrift::fixtures::types::has_bitwise_ops> {};
template<> struct hash<::apache::thrift::fixtures::types::is_unscoped> :
  ::apache::thrift::detail::enum_hash<::apache::thrift::fixtures::types::is_unscoped> {};
template<> struct hash<::apache::thrift::fixtures::types::MyForwardRefEnum> :
  ::apache::thrift::detail::enum_hash<::apache::thrift::fixtures::types::MyForwardRefEnum> {};
} // std

namespace apache { namespace thrift {


template <> struct TEnumDataStorage<::apache::thrift::fixtures::types::has_bitwise_ops>;

template <> struct TEnumTraits<::apache::thrift::fixtures::types::has_bitwise_ops> {
  using type = ::apache::thrift::fixtures::types::has_bitwise_ops;

  static constexpr std::size_t const size = 5;
  static folly::Range<type const*> const values;
  static folly::Range<std::string_view const*> const names;
  static const std::string_view __fbthrift_module_name_internal_do_not_use;

  static bool findName(type value, std::string_view* out) noexcept;
  static bool findValue(std::string_view name, type* out) noexcept;

  template <class ...>
  FOLLY_ERASE static std::string_view typeName() noexcept {
    return "has_bitwise_ops";
  }

  static char const* findName(type value) noexcept {
    std::string_view ret;
    (void)findName(value, &ret);
    return ret.data();
  }
  static constexpr type min() { return type::none; }
  static constexpr type max() { return type::three; }
};


template <> struct TEnumDataStorage<::apache::thrift::fixtures::types::is_unscoped>;

template <> struct TEnumTraits<::apache::thrift::fixtures::types::is_unscoped> {
  using type = ::apache::thrift::fixtures::types::is_unscoped;

  static constexpr std::size_t const size = 2;
  static folly::Range<type const*> const values;
  static folly::Range<std::string_view const*> const names;
  static const std::string_view __fbthrift_module_name_internal_do_not_use;

  static bool findName(type value, std::string_view* out) noexcept;
  static bool findValue(std::string_view name, type* out) noexcept;

  template <class ...>
  FOLLY_ERASE static std::string_view typeName() noexcept {
    return "is_unscoped";
  }

  static char const* findName(type value) noexcept {
    std::string_view ret;
    (void)findName(value, &ret);
    return ret.data();
  }
  static constexpr type min() { return type::hello; }
  static constexpr type max() { return type::world; }
};


template <> struct TEnumDataStorage<::apache::thrift::fixtures::types::MyForwardRefEnum>;

template <> struct TEnumTraits<::apache::thrift::fixtures::types::MyForwardRefEnum> {
  using type = ::apache::thrift::fixtures::types::MyForwardRefEnum;

  static constexpr std::size_t const size = 2;
  static folly::Range<type const*> const values;
  static folly::Range<std::string_view const*> const names;
  static const std::string_view __fbthrift_module_name_internal_do_not_use;

  static bool findName(type value, std::string_view* out) noexcept;
  static bool findValue(std::string_view name, type* out) noexcept;

  template <class ...>
  FOLLY_ERASE static std::string_view typeName() noexcept {
    return "MyForwardRefEnum";
  }

  static char const* findName(type value) noexcept {
    std::string_view ret;
    (void)findName(value, &ret);
    return ret.data();
  }
  static constexpr type min() { return type::ZERO; }
  static constexpr type max() { return type::NONZERO; }
};


}} // apache::thrift


// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::fixtures::types {
class empty_struct;
class decorated_struct;
class ContainerStruct;
class CppTypeStruct;
class VirtualStruct;
class MyStructWithForwardRefEnum;
class TrivialNumeric;
class TrivialNestedWithDefault;
class ComplexString;
class ComplexNestedWithDefault;
class MinPadding;
class MinPaddingWithCustomType;
class MyStruct;
class MyDataItem;
class Renamed;
class AnnotatedTypes;
class ForwardUsageRoot;
class ForwardUsageStruct;
class ForwardUsageByRef;
class IncompleteMap;
class IncompleteMapDep;
class CompleteMap;
class CompleteMapDep;
class IncompleteList;
class IncompleteListDep;
class CompleteList;
class CompleteListDep;
class AdaptedList;
namespace detail {
class AdaptedListDep;
} // namespace detail
class DependentAdaptedList;
namespace detail {
class DependentAdaptedListDep;
} // namespace detail
class AllocatorAware;
class AllocatorAware2;
class TypedefStruct;
class StructWithDoubleUnderscores;
} // namespace apache::thrift::fixtures::types
// END forward_declare
namespace apache::thrift::detail::annotation {
} // namespace apache::thrift::detail::annotation

namespace apache::thrift::detail::qualifier {
template<>
struct is_cpp_ref_field_optional<::apache::thrift::fixtures::types::ForwardUsageRoot,::apache::thrift::type::field_id<2>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::fixtures::types::ForwardUsageStruct,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::fixtures::types::ForwardUsageByRef,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::fixtures::types::detail::DependentAdaptedListDep,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::fixtures::types::AllocatorAware2,::apache::thrift::type::field_id<2>> : std::true_type{};
} // namespace apache::thrift::detail::qualifier

// BEGIN hash_and_equal_to
namespace std {

template<> struct hash<typename ::apache::thrift::fixtures::types::decorated_struct> {
  size_t operator()(const ::apache::thrift::fixtures::types::decorated_struct&) const;
};
template<> struct equal_to<typename ::apache::thrift::fixtures::types::decorated_struct> {
  bool operator()(const ::apache::thrift::fixtures::types::decorated_struct&,const ::apache::thrift::fixtures::types::decorated_struct&) const;
};
} // std
// END hash_and_equal_to
namespace apache::thrift::fixtures::types {
using AdaptedListDep = detail::AdaptedListDep;

using ::apache::thrift::detail::operator!=;
using ::apache::thrift::detail::operator>;
using ::apache::thrift::detail::operator<=;
using ::apache::thrift::detail::operator>=;

/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "TBinary", "kind": "typedef" } */
typedef ::std::string TBinary;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "IntTypedef", "kind": "typedef" } */
typedef ::std::int32_t IntTypedef;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "UintTypedef", "kind": "typedef" } */
typedef std::uint32_t UintTypedef;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "SomeListOfTypeMap_2468", "kind": "typedef" } */
typedef ::apache::thrift::fixtures::types::SomeListOfTypeMap SomeListOfTypeMap_2468;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "TBinary_8623", "kind": "typedef" } */
typedef ::apache::thrift::fixtures::types::TBinary TBinary_8623;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "i32_9314", "kind": "typedef" } */
typedef ::std::int32_t i32_9314;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "list_i32_9187", "kind": "typedef" } */
typedef ::std::vector<::std::int32_t> list_i32_9187;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "map_i32_i32_9565", "kind": "typedef" } */
typedef ::std::map<::std::int32_t, ::std::int32_t> map_i32_i32_9565;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "map_i32_string_1261", "kind": "typedef" } */
typedef ::std::map<::std::int32_t, ::std::string> map_i32_string_1261;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "set_i32_7070", "kind": "typedef" } */
typedef ::std::set<::std::int32_t> set_i32_7070;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "set_i32_7194", "kind": "typedef" } */
typedef folly::sorted_vector_set<::std::int32_t> set_i32_7194;
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "string_5252", "kind": "typedef" } */
typedef ::std::string string_5252;

/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "empty_struct", "kind": "struct" } */
class empty_struct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = empty_struct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  empty_struct() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  empty_struct(apache::thrift::FragileConstructor);

  empty_struct(empty_struct&&) = default;

  empty_struct(const empty_struct&) = default;


  empty_struct& operator=(empty_struct&&) = default;

  empty_struct& operator=(const empty_struct&) = default;

 public:

  bool operator==(const empty_struct&) const;
  bool operator<(const empty_struct&) const;

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<empty_struct>;
  friend void swap(empty_struct& a, empty_struct& b);
};

template <class Protocol_>
unsigned long empty_struct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "decorated_struct", "kind": "struct" } */
class decorated_struct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::string_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = decorated_struct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  decorated_struct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  decorated_struct(apache::thrift::FragileConstructor, ::std::string field__arg);

  decorated_struct(decorated_struct&&) noexcept;

  decorated_struct(const decorated_struct& src);


  decorated_struct& operator=(decorated_struct&&) noexcept;
  decorated_struct& operator=(const decorated_struct& src);

  ~decorated_struct();

 private:
  ::std::string __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const decorated_struct&) const;
  bool operator<(const decorated_struct&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  const ::std::string& get_field() const& {
    return __fbthrift_field_field;
  }

  /** Glean { "field": "field" } */
  ::std::string get_field() && {
    return std::move(__fbthrift_field_field);
  }

  /** Glean { "field": "field" } */
  template <typename T_decorated_struct_field_struct_setter = ::std::string>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::std::string& set_field(T_decorated_struct_field_struct_setter&& field_) {
    field_ref() = std::forward<T_decorated_struct_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<decorated_struct>;
  friend void swap(decorated_struct& a, decorated_struct& b);
};

template <class Protocol_>
unsigned long decorated_struct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ContainerStruct", "kind": "struct" } */
class ContainerStruct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::fieldA,
    ::apache::thrift::ident::fieldB,
    ::apache::thrift::ident::fieldC,
    ::apache::thrift::ident::fieldD,
    ::apache::thrift::ident::fieldE,
    ::apache::thrift::ident::fieldF,
    ::apache::thrift::ident::fieldG,
    ::apache::thrift::ident::fieldH
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,12,2,3,4,5,6,7,8};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::i32_t>,
    ::apache::thrift::type::cpp_type<std::list<::std::int32_t>, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>,
    ::apache::thrift::type::cpp_type<std::deque<::std::int32_t>, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>,
    ::apache::thrift::type::cpp_type<folly::fbvector<::std::int32_t>, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>,
    ::apache::thrift::type::cpp_type<folly::small_vector<::std::int32_t>, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>,
    ::apache::thrift::type::cpp_type<folly::sorted_vector_set<::std::int32_t>, ::apache::thrift::type::set<::apache::thrift::type::i32_t>>,
    ::apache::thrift::type::cpp_type<folly::sorted_vector_map<::std::int32_t, ::std::string>, ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>>,
    ::apache::thrift::type::cpp_type<std::unordered_map<::std::int32_t, ::std::string>, ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 8;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ContainerStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ContainerStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ContainerStruct(apache::thrift::FragileConstructor, ::std::vector<::std::int32_t> fieldA__arg, std::list<::std::int32_t> fieldB__arg, std::deque<::std::int32_t> fieldC__arg, folly::fbvector<::std::int32_t> fieldD__arg, folly::small_vector<::std::int32_t> fieldE__arg, ::apache::thrift::fixtures::types::set_i32_7194 fieldF__arg, folly::sorted_vector_map<::std::int32_t, ::std::string> fieldG__arg, ::apache::thrift::fixtures::types::SomeMap fieldH__arg);

  ContainerStruct(ContainerStruct&&) noexcept;

  ContainerStruct(const ContainerStruct& src);


  ContainerStruct& operator=(ContainerStruct&&) noexcept;
  ContainerStruct& operator=(const ContainerStruct& src);

  ~ContainerStruct();

 private:
  ::std::vector<::std::int32_t> __fbthrift_field_fieldA;
 private:
  std::list<::std::int32_t> __fbthrift_field_fieldB;
 private:
  std::deque<::std::int32_t> __fbthrift_field_fieldC;
 private:
  folly::fbvector<::std::int32_t> __fbthrift_field_fieldD;
 private:
  folly::small_vector<::std::int32_t> __fbthrift_field_fieldE;
 private:
  ::apache::thrift::fixtures::types::set_i32_7194 __fbthrift_field_fieldF;
 private:
  folly::sorted_vector_map<::std::int32_t, ::std::string> __fbthrift_field_fieldG;
 private:
  ::apache::thrift::fixtures::types::SomeMap __fbthrift_field_fieldH;
 private:
  apache::thrift::detail::isset_bitset<8, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const ContainerStruct&) const;
  bool operator<(const ContainerStruct&) const;

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldA_ref() const& {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldA_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldA_ref() & {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldA_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldA() const& {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldA() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldA() & {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = ::std::vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldA() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldB_ref() const& {
    return {this->__fbthrift_field_fieldB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldB_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldB), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldB_ref() & {
    return {this->__fbthrift_field_fieldB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldB_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldB), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldB() const& {
    return {this->__fbthrift_field_fieldB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldB() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldB), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldB() & {
    return {this->__fbthrift_field_fieldB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldB" } */
  template <typename..., typename T = std::list<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldB() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldB), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldC_ref() const& {
    return {this->__fbthrift_field_fieldC, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldC_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldC), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldC_ref() & {
    return {this->__fbthrift_field_fieldC, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldC_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldC), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldC() const& {
    return {this->__fbthrift_field_fieldC, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldC() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldC), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldC() & {
    return {this->__fbthrift_field_fieldC, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldC" } */
  template <typename..., typename T = std::deque<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldC() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldC), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldD_ref() const& {
    return {this->__fbthrift_field_fieldD, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldD_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldD), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldD_ref() & {
    return {this->__fbthrift_field_fieldD, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldD_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldD), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldD() const& {
    return {this->__fbthrift_field_fieldD, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldD() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldD), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldD() & {
    return {this->__fbthrift_field_fieldD, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldD" } */
  template <typename..., typename T = folly::fbvector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldD() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldD), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldE_ref() const& {
    return {this->__fbthrift_field_fieldE, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldE_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldE), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldE_ref() & {
    return {this->__fbthrift_field_fieldE, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldE_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldE), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldE() const& {
    return {this->__fbthrift_field_fieldE, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldE() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldE), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldE() & {
    return {this->__fbthrift_field_fieldE, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldE" } */
  template <typename..., typename T = folly::small_vector<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldE() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldE), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldF_ref() const& {
    return {this->__fbthrift_field_fieldF, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldF_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldF), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldF_ref() & {
    return {this->__fbthrift_field_fieldF, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldF_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldF), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldF() const& {
    return {this->__fbthrift_field_fieldF, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldF() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldF), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldF() & {
    return {this->__fbthrift_field_fieldF, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldF" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7194>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldF() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldF), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldG_ref() const& {
    return {this->__fbthrift_field_fieldG, __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldG_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldG), __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldG_ref() & {
    return {this->__fbthrift_field_fieldG, __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldG_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldG), __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldG() const& {
    return {this->__fbthrift_field_fieldG, __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldG() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldG), __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldG() & {
    return {this->__fbthrift_field_fieldG, __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldG" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldG() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldG), __isset.at(6), __isset.bit(6)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldH_ref() const& {
    return {this->__fbthrift_field_fieldH, __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldH_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldH), __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldH_ref() & {
    return {this->__fbthrift_field_fieldH, __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldH_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldH), __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldH() const& {
    return {this->__fbthrift_field_fieldH, __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldH() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldH), __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldH() & {
    return {this->__fbthrift_field_fieldH, __isset.at(7), __isset.bit(7)};
  }

  /** Glean { "field": "fieldH" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeMap>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldH() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldH), __isset.at(7), __isset.bit(7)};
  }
  /** Glean { "field": "fieldA" } */
  const ::std::vector<::std::int32_t>& get_fieldA() const&;
  /** Glean { "field": "fieldA" } */
  ::std::vector<::std::int32_t> get_fieldA() &&;

  /** Glean { "field": "fieldA" } */
  template <typename T_ContainerStruct_fieldA_struct_setter = ::std::vector<::std::int32_t>>
  [[deprecated("Use `FOO.fieldA() = BAR;` instead of `FOO.set_fieldA(BAR);`")]]
  ::std::vector<::std::int32_t>& set_fieldA(T_ContainerStruct_fieldA_struct_setter&& fieldA_) {
    fieldA_ref() = std::forward<T_ContainerStruct_fieldA_struct_setter>(fieldA_);
    return __fbthrift_field_fieldA;
  }
  /** Glean { "field": "fieldB" } */
  const std::list<::std::int32_t>& get_fieldB() const&;
  /** Glean { "field": "fieldB" } */
  std::list<::std::int32_t> get_fieldB() &&;

  /** Glean { "field": "fieldB" } */
  template <typename T_ContainerStruct_fieldB_struct_setter = std::list<::std::int32_t>>
  [[deprecated("Use `FOO.fieldB() = BAR;` instead of `FOO.set_fieldB(BAR);`")]]
  std::list<::std::int32_t>& set_fieldB(T_ContainerStruct_fieldB_struct_setter&& fieldB_) {
    fieldB_ref() = std::forward<T_ContainerStruct_fieldB_struct_setter>(fieldB_);
    return __fbthrift_field_fieldB;
  }
  /** Glean { "field": "fieldC" } */
  const std::deque<::std::int32_t>& get_fieldC() const&;
  /** Glean { "field": "fieldC" } */
  std::deque<::std::int32_t> get_fieldC() &&;

  /** Glean { "field": "fieldC" } */
  template <typename T_ContainerStruct_fieldC_struct_setter = std::deque<::std::int32_t>>
  [[deprecated("Use `FOO.fieldC() = BAR;` instead of `FOO.set_fieldC(BAR);`")]]
  std::deque<::std::int32_t>& set_fieldC(T_ContainerStruct_fieldC_struct_setter&& fieldC_) {
    fieldC_ref() = std::forward<T_ContainerStruct_fieldC_struct_setter>(fieldC_);
    return __fbthrift_field_fieldC;
  }
  /** Glean { "field": "fieldD" } */
  const folly::fbvector<::std::int32_t>& get_fieldD() const&;
  /** Glean { "field": "fieldD" } */
  folly::fbvector<::std::int32_t> get_fieldD() &&;

  /** Glean { "field": "fieldD" } */
  template <typename T_ContainerStruct_fieldD_struct_setter = folly::fbvector<::std::int32_t>>
  [[deprecated("Use `FOO.fieldD() = BAR;` instead of `FOO.set_fieldD(BAR);`")]]
  folly::fbvector<::std::int32_t>& set_fieldD(T_ContainerStruct_fieldD_struct_setter&& fieldD_) {
    fieldD_ref() = std::forward<T_ContainerStruct_fieldD_struct_setter>(fieldD_);
    return __fbthrift_field_fieldD;
  }
  /** Glean { "field": "fieldE" } */
  const folly::small_vector<::std::int32_t>& get_fieldE() const&;
  /** Glean { "field": "fieldE" } */
  folly::small_vector<::std::int32_t> get_fieldE() &&;

  /** Glean { "field": "fieldE" } */
  template <typename T_ContainerStruct_fieldE_struct_setter = folly::small_vector<::std::int32_t>>
  [[deprecated("Use `FOO.fieldE() = BAR;` instead of `FOO.set_fieldE(BAR);`")]]
  folly::small_vector<::std::int32_t>& set_fieldE(T_ContainerStruct_fieldE_struct_setter&& fieldE_) {
    fieldE_ref() = std::forward<T_ContainerStruct_fieldE_struct_setter>(fieldE_);
    return __fbthrift_field_fieldE;
  }
  /** Glean { "field": "fieldF" } */
  const ::apache::thrift::fixtures::types::set_i32_7194& get_fieldF() const&;
  /** Glean { "field": "fieldF" } */
  ::apache::thrift::fixtures::types::set_i32_7194 get_fieldF() &&;

  /** Glean { "field": "fieldF" } */
  template <typename T_ContainerStruct_fieldF_struct_setter = ::apache::thrift::fixtures::types::set_i32_7194>
  [[deprecated("Use `FOO.fieldF() = BAR;` instead of `FOO.set_fieldF(BAR);`")]]
  ::apache::thrift::fixtures::types::set_i32_7194& set_fieldF(T_ContainerStruct_fieldF_struct_setter&& fieldF_) {
    fieldF_ref() = std::forward<T_ContainerStruct_fieldF_struct_setter>(fieldF_);
    return __fbthrift_field_fieldF;
  }
  /** Glean { "field": "fieldG" } */
  const folly::sorted_vector_map<::std::int32_t, ::std::string>& get_fieldG() const&;
  /** Glean { "field": "fieldG" } */
  folly::sorted_vector_map<::std::int32_t, ::std::string> get_fieldG() &&;

  /** Glean { "field": "fieldG" } */
  template <typename T_ContainerStruct_fieldG_struct_setter = folly::sorted_vector_map<::std::int32_t, ::std::string>>
  [[deprecated("Use `FOO.fieldG() = BAR;` instead of `FOO.set_fieldG(BAR);`")]]
  folly::sorted_vector_map<::std::int32_t, ::std::string>& set_fieldG(T_ContainerStruct_fieldG_struct_setter&& fieldG_) {
    fieldG_ref() = std::forward<T_ContainerStruct_fieldG_struct_setter>(fieldG_);
    return __fbthrift_field_fieldG;
  }
  /** Glean { "field": "fieldH" } */
  const ::apache::thrift::fixtures::types::SomeMap& get_fieldH() const&;
  /** Glean { "field": "fieldH" } */
  ::apache::thrift::fixtures::types::SomeMap get_fieldH() &&;

  /** Glean { "field": "fieldH" } */
  template <typename T_ContainerStruct_fieldH_struct_setter = ::apache::thrift::fixtures::types::SomeMap>
  [[deprecated("Use `FOO.fieldH() = BAR;` instead of `FOO.set_fieldH(BAR);`")]]
  ::apache::thrift::fixtures::types::SomeMap& set_fieldH(T_ContainerStruct_fieldH_struct_setter&& fieldH_) {
    fieldH_ref() = std::forward<T_ContainerStruct_fieldH_struct_setter>(fieldH_);
    return __fbthrift_field_fieldH;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ContainerStruct>;
  friend void swap(ContainerStruct& a, ContainerStruct& b);
};

template <class Protocol_>
unsigned long ContainerStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "CppTypeStruct", "kind": "struct" } */
class CppTypeStruct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::fieldA
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::cpp_type<std::list<int32_t>, ::apache::thrift::type::list<::apache::thrift::type::i32_t>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = CppTypeStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CppTypeStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CppTypeStruct(apache::thrift::FragileConstructor, std::list<int32_t> fieldA__arg);

  CppTypeStruct(CppTypeStruct&&) noexcept;

  CppTypeStruct(const CppTypeStruct& src);


  CppTypeStruct& operator=(CppTypeStruct&&) noexcept;
  CppTypeStruct& operator=(const CppTypeStruct& src);

  ~CppTypeStruct();

 private:
  std::list<int32_t> __fbthrift_field_fieldA;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const CppTypeStruct&) const;
  bool operator<(const CppTypeStruct&) const;

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldA_ref() const& {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldA_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldA_ref() & {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldA_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fieldA() const& {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fieldA() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fieldA() & {
    return {this->__fbthrift_field_fieldA, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "fieldA" } */
  template <typename..., typename T = std::list<int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fieldA() && {
    return {static_cast<T&&>(this->__fbthrift_field_fieldA), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "fieldA" } */
  const std::list<int32_t>& get_fieldA() const&;
  /** Glean { "field": "fieldA" } */
  std::list<int32_t> get_fieldA() &&;

  /** Glean { "field": "fieldA" } */
  template <typename T_CppTypeStruct_fieldA_struct_setter = std::list<int32_t>>
  [[deprecated("Use `FOO.fieldA() = BAR;` instead of `FOO.set_fieldA(BAR);`")]]
  std::list<int32_t>& set_fieldA(T_CppTypeStruct_fieldA_struct_setter&& fieldA_) {
    fieldA_ref() = std::forward<T_CppTypeStruct_fieldA_struct_setter>(fieldA_);
    return __fbthrift_field_fieldA;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<CppTypeStruct>;
  friend void swap(CppTypeStruct& a, CppTypeStruct& b);
};

template <class Protocol_>
unsigned long CppTypeStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "VirtualStruct", "kind": "struct" } */
class VirtualStruct  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::MyIntField
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i64_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = VirtualStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  VirtualStruct() :
      __fbthrift_field_MyIntField() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  VirtualStruct(apache::thrift::FragileConstructor, ::std::int64_t MyIntField__arg);

  VirtualStruct(VirtualStruct&&) noexcept;

  VirtualStruct(const VirtualStruct& src);


  VirtualStruct& operator=(VirtualStruct&&) noexcept;
  VirtualStruct& operator=(const VirtualStruct& src);

  virtual ~VirtualStruct() {}

 private:
  ::std::int64_t __fbthrift_field_MyIntField;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const VirtualStruct&) const;
  bool operator<(const VirtualStruct&) const;

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyIntField_ref() const& {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyIntField_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyIntField_ref() & {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyIntField_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyIntField() const& {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyIntField() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyIntField() & {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyIntField() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  ::std::int64_t get_MyIntField() const {
    return __fbthrift_field_MyIntField;
  }

  /** Glean { "field": "MyIntField" } */
  [[deprecated("Use `FOO.MyIntField() = BAR;` instead of `FOO.set_MyIntField(BAR);`")]]
  ::std::int64_t& set_MyIntField(::std::int64_t MyIntField_) {
    MyIntField_ref() = MyIntField_;
    return __fbthrift_field_MyIntField;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<VirtualStruct>;
  friend void swap(VirtualStruct& a, VirtualStruct& b);
};

template <class Protocol_>
unsigned long VirtualStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MyStructWithForwardRefEnum", "kind": "struct" } */
class MyStructWithForwardRefEnum final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::a,
    ::apache::thrift::ident::b
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::enum_t<::apache::thrift::fixtures::types::MyForwardRefEnum>,
    ::apache::thrift::type::enum_t<::apache::thrift::fixtures::types::MyForwardRefEnum>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = MyStructWithForwardRefEnum;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  MyStructWithForwardRefEnum() :
      __fbthrift_field_a( ::apache::thrift::fixtures::types::MyForwardRefEnum::NONZERO),
      __fbthrift_field_b( ::apache::thrift::fixtures::types::MyForwardRefEnum::NONZERO) {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  MyStructWithForwardRefEnum(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::MyForwardRefEnum a__arg, ::apache::thrift::fixtures::types::MyForwardRefEnum b__arg);

  MyStructWithForwardRefEnum(MyStructWithForwardRefEnum&&) = default;

  MyStructWithForwardRefEnum(const MyStructWithForwardRefEnum&) = default;


  MyStructWithForwardRefEnum& operator=(MyStructWithForwardRefEnum&&) = default;

  MyStructWithForwardRefEnum& operator=(const MyStructWithForwardRefEnum&) = default;
 private:
  ::apache::thrift::fixtures::types::MyForwardRefEnum __fbthrift_field_a;
 private:
  ::apache::thrift::fixtures::types::MyForwardRefEnum __fbthrift_field_b;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const MyStructWithForwardRefEnum&) const;
  bool operator<(const MyStructWithForwardRefEnum&) const;

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a_ref() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a_ref() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b_ref() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b_ref() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyForwardRefEnum>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "a" } */
  ::apache::thrift::fixtures::types::MyForwardRefEnum get_a() const {
    return __fbthrift_field_a;
  }

  /** Glean { "field": "a" } */
  [[deprecated("Use `FOO.a() = BAR;` instead of `FOO.set_a(BAR);`")]]
  ::apache::thrift::fixtures::types::MyForwardRefEnum& set_a(::apache::thrift::fixtures::types::MyForwardRefEnum a_) {
    a_ref() = a_;
    return __fbthrift_field_a;
  }

  /** Glean { "field": "b" } */
  ::apache::thrift::fixtures::types::MyForwardRefEnum get_b() const {
    return __fbthrift_field_b;
  }

  /** Glean { "field": "b" } */
  [[deprecated("Use `FOO.b() = BAR;` instead of `FOO.set_b(BAR);`")]]
  ::apache::thrift::fixtures::types::MyForwardRefEnum& set_b(::apache::thrift::fixtures::types::MyForwardRefEnum b_) {
    b_ref() = b_;
    return __fbthrift_field_b;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<MyStructWithForwardRefEnum>;
  friend void swap(MyStructWithForwardRefEnum& a, MyStructWithForwardRefEnum& b);
};

template <class Protocol_>
unsigned long MyStructWithForwardRefEnum::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "TrivialNumeric", "kind": "struct" } */
class TrivialNumeric final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::a,
    ::apache::thrift::ident::b
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::bool_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = TrivialNumeric;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  TrivialNumeric() :
      __fbthrift_field_a(),
      __fbthrift_field_b() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  TrivialNumeric(apache::thrift::FragileConstructor, ::std::int32_t a__arg, bool b__arg);

  TrivialNumeric(TrivialNumeric&&) = default;

  TrivialNumeric(const TrivialNumeric&) = default;


  TrivialNumeric& operator=(TrivialNumeric&&) = default;

  TrivialNumeric& operator=(const TrivialNumeric&) = default;
 private:
  ::std::int32_t __fbthrift_field_a;
 private:
  bool __fbthrift_field_b;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const TrivialNumeric&) const;
  bool operator<(const TrivialNumeric&) const;

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a_ref() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a_ref() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b_ref() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b_ref() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "a" } */
  ::std::int32_t get_a() const {
    return __fbthrift_field_a;
  }

  /** Glean { "field": "a" } */
  [[deprecated("Use `FOO.a() = BAR;` instead of `FOO.set_a(BAR);`")]]
  ::std::int32_t& set_a(::std::int32_t a_) {
    a_ref() = a_;
    return __fbthrift_field_a;
  }

  /** Glean { "field": "b" } */
  bool get_b() const {
    return __fbthrift_field_b;
  }

  /** Glean { "field": "b" } */
  [[deprecated("Use `FOO.b() = BAR;` instead of `FOO.set_b(BAR);`")]]
  bool& set_b(bool b_) {
    b_ref() = b_;
    return __fbthrift_field_b;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<TrivialNumeric>;
  friend void swap(TrivialNumeric& a, TrivialNumeric& b);
};

template <class Protocol_>
unsigned long TrivialNumeric::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "TrivialNestedWithDefault", "kind": "struct" } */
class TrivialNestedWithDefault final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::z,
    ::apache::thrift::ident::n
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::TrivialNumeric>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = TrivialNestedWithDefault;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  TrivialNestedWithDefault() :
      __fbthrift_field_z(static_cast<::std::int32_t>(4)),
      __fbthrift_field_n(::apache::thrift::detail::make_structured_constant<::apache::thrift::fixtures::types::TrivialNumeric>(::apache::thrift::detail::wrap_struct_argument<::apache::thrift::ident::a>(static_cast<::std::int32_t>(3)), ::apache::thrift::detail::wrap_struct_argument<::apache::thrift::ident::b>(true))) {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  TrivialNestedWithDefault(apache::thrift::FragileConstructor, ::std::int32_t z__arg, ::apache::thrift::fixtures::types::TrivialNumeric n__arg);

  TrivialNestedWithDefault(TrivialNestedWithDefault&&) = default;

  TrivialNestedWithDefault(const TrivialNestedWithDefault&) = default;


  TrivialNestedWithDefault& operator=(TrivialNestedWithDefault&&) = default;

  TrivialNestedWithDefault& operator=(const TrivialNestedWithDefault&) = default;
 private:
  ::std::int32_t __fbthrift_field_z;
 private:
  ::apache::thrift::fixtures::types::TrivialNumeric __fbthrift_field_n;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const TrivialNestedWithDefault&) const;
  bool operator<(const TrivialNestedWithDefault&) const;

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> z_ref() const& {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> z_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> z_ref() & {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> z_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> z() const& {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> z() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> z() & {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> z() && {
    return {static_cast<T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> n_ref() const& {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> n_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> n_ref() & {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> n_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> n() const& {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> n() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> n() & {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TrivialNumeric>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> n() && {
    return {static_cast<T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "z" } */
  ::std::int32_t get_z() const {
    return __fbthrift_field_z;
  }

  /** Glean { "field": "z" } */
  [[deprecated("Use `FOO.z() = BAR;` instead of `FOO.set_z(BAR);`")]]
  ::std::int32_t& set_z(::std::int32_t z_) {
    z_ref() = z_;
    return __fbthrift_field_z;
  }
  /** Glean { "field": "n" } */
  const ::apache::thrift::fixtures::types::TrivialNumeric& get_n() const&;
  /** Glean { "field": "n" } */
  ::apache::thrift::fixtures::types::TrivialNumeric get_n() &&;

  /** Glean { "field": "n" } */
  template <typename T_TrivialNestedWithDefault_n_struct_setter = ::apache::thrift::fixtures::types::TrivialNumeric>
  [[deprecated("Use `FOO.n() = BAR;` instead of `FOO.set_n(BAR);`")]]
  ::apache::thrift::fixtures::types::TrivialNumeric& set_n(T_TrivialNestedWithDefault_n_struct_setter&& n_) {
    n_ref() = std::forward<T_TrivialNestedWithDefault_n_struct_setter>(n_);
    return __fbthrift_field_n;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<TrivialNestedWithDefault>;
  friend void swap(TrivialNestedWithDefault& a, TrivialNestedWithDefault& b);
};

template <class Protocol_>
unsigned long TrivialNestedWithDefault::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ComplexString", "kind": "struct" } */
class ComplexString final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::a,
    ::apache::thrift::ident::b
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::i32_t>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ComplexString;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ComplexString();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ComplexString(apache::thrift::FragileConstructor, ::std::string a__arg, ::std::map<::std::string, ::std::int32_t> b__arg);

  ComplexString(ComplexString&&) noexcept;

  ComplexString(const ComplexString& src);


  ComplexString& operator=(ComplexString&&) noexcept;
  ComplexString& operator=(const ComplexString& src);

  ~ComplexString();

 private:
  ::std::string __fbthrift_field_a;
 private:
  ::std::map<::std::string, ::std::int32_t> __fbthrift_field_b;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const ComplexString&) const;
  bool operator<(const ComplexString&) const;

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a_ref() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a_ref() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> a() const& {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> a() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> a() & {
    return {this->__fbthrift_field_a, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "a" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> a() && {
    return {static_cast<T&&>(this->__fbthrift_field_a), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b_ref() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b_ref() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> b() const& {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> b() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> b() & {
    return {this->__fbthrift_field_b, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "b" } */
  template <typename..., typename T = ::std::map<::std::string, ::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> b() && {
    return {static_cast<T&&>(this->__fbthrift_field_b), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "a" } */
  const ::std::string& get_a() const& {
    return __fbthrift_field_a;
  }

  /** Glean { "field": "a" } */
  ::std::string get_a() && {
    return std::move(__fbthrift_field_a);
  }

  /** Glean { "field": "a" } */
  template <typename T_ComplexString_a_struct_setter = ::std::string>
  [[deprecated("Use `FOO.a() = BAR;` instead of `FOO.set_a(BAR);`")]]
  ::std::string& set_a(T_ComplexString_a_struct_setter&& a_) {
    a_ref() = std::forward<T_ComplexString_a_struct_setter>(a_);
    return __fbthrift_field_a;
  }
  /** Glean { "field": "b" } */
  const ::std::map<::std::string, ::std::int32_t>& get_b() const&;
  /** Glean { "field": "b" } */
  ::std::map<::std::string, ::std::int32_t> get_b() &&;

  /** Glean { "field": "b" } */
  template <typename T_ComplexString_b_struct_setter = ::std::map<::std::string, ::std::int32_t>>
  [[deprecated("Use `FOO.b() = BAR;` instead of `FOO.set_b(BAR);`")]]
  ::std::map<::std::string, ::std::int32_t>& set_b(T_ComplexString_b_struct_setter&& b_) {
    b_ref() = std::forward<T_ComplexString_b_struct_setter>(b_);
    return __fbthrift_field_b;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ComplexString>;
  friend void swap(ComplexString& a, ComplexString& b);
};

template <class Protocol_>
unsigned long ComplexString::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ComplexNestedWithDefault", "kind": "struct" } */
class ComplexNestedWithDefault final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::z,
    ::apache::thrift::ident::n
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::ComplexString>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ComplexNestedWithDefault;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ComplexNestedWithDefault();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ComplexNestedWithDefault(apache::thrift::FragileConstructor, ::std::string z__arg, ::apache::thrift::fixtures::types::ComplexString n__arg);

  ComplexNestedWithDefault(ComplexNestedWithDefault&&) noexcept;

  ComplexNestedWithDefault(const ComplexNestedWithDefault& src);


  ComplexNestedWithDefault& operator=(ComplexNestedWithDefault&&) noexcept;
  ComplexNestedWithDefault& operator=(const ComplexNestedWithDefault& src);

  ~ComplexNestedWithDefault();

 private:
  ::std::string __fbthrift_field_z;
 private:
  ::apache::thrift::fixtures::types::ComplexString __fbthrift_field_n;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const ComplexNestedWithDefault&) const;
  bool operator<(const ComplexNestedWithDefault&) const;

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> z_ref() const& {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> z_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> z_ref() & {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> z_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> z() const& {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> z() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> z() & {
    return {this->__fbthrift_field_z, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "z" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> z() && {
    return {static_cast<T&&>(this->__fbthrift_field_z), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> n_ref() const& {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> n_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> n_ref() & {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> n_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> n() const& {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> n() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> n() & {
    return {this->__fbthrift_field_n, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "n" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ComplexString>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> n() && {
    return {static_cast<T&&>(this->__fbthrift_field_n), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "z" } */
  const ::std::string& get_z() const& {
    return __fbthrift_field_z;
  }

  /** Glean { "field": "z" } */
  ::std::string get_z() && {
    return std::move(__fbthrift_field_z);
  }

  /** Glean { "field": "z" } */
  template <typename T_ComplexNestedWithDefault_z_struct_setter = ::std::string>
  [[deprecated("Use `FOO.z() = BAR;` instead of `FOO.set_z(BAR);`")]]
  ::std::string& set_z(T_ComplexNestedWithDefault_z_struct_setter&& z_) {
    z_ref() = std::forward<T_ComplexNestedWithDefault_z_struct_setter>(z_);
    return __fbthrift_field_z;
  }
  /** Glean { "field": "n" } */
  const ::apache::thrift::fixtures::types::ComplexString& get_n() const&;
  /** Glean { "field": "n" } */
  ::apache::thrift::fixtures::types::ComplexString get_n() &&;

  /** Glean { "field": "n" } */
  template <typename T_ComplexNestedWithDefault_n_struct_setter = ::apache::thrift::fixtures::types::ComplexString>
  [[deprecated("Use `FOO.n() = BAR;` instead of `FOO.set_n(BAR);`")]]
  ::apache::thrift::fixtures::types::ComplexString& set_n(T_ComplexNestedWithDefault_n_struct_setter&& n_) {
    n_ref() = std::forward<T_ComplexNestedWithDefault_n_struct_setter>(n_);
    return __fbthrift_field_n;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ComplexNestedWithDefault>;
  friend void swap(ComplexNestedWithDefault& a, ComplexNestedWithDefault& b);
};

template <class Protocol_>
unsigned long ComplexNestedWithDefault::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MinPadding", "kind": "struct" } */
class MinPadding final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::small,
    ::apache::thrift::ident::big,
    ::apache::thrift::ident::medium,
    ::apache::thrift::ident::biggish,
    ::apache::thrift::ident::tiny
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::byte_t,
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::i16_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::byte_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 5;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = MinPadding;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  MinPadding() :
      __fbthrift_field_big(),
      __fbthrift_field_biggish(),
      __fbthrift_field_medium(),
      __fbthrift_field_small(),
      __fbthrift_field_tiny() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  MinPadding(apache::thrift::FragileConstructor, ::std::int8_t small__arg, ::std::int64_t big__arg, ::std::int16_t medium__arg, ::std::int32_t biggish__arg, ::std::int8_t tiny__arg);

  MinPadding(MinPadding&&) noexcept;

  MinPadding(const MinPadding& src);


  MinPadding& operator=(MinPadding&&) noexcept;
  MinPadding& operator=(const MinPadding& src);
 private:
  ::std::int64_t __fbthrift_field_big;
 private:
  ::std::int32_t __fbthrift_field_biggish;
 private:
  ::std::int16_t __fbthrift_field_medium;
 private:
  ::std::int8_t __fbthrift_field_small;
 private:
  ::std::int8_t __fbthrift_field_tiny;

 public:

  bool operator==(const MinPadding&) const;
  bool operator<(const MinPadding&) const;

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> small_ref() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> small_ref() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> small_ref() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> small_ref() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> small() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> small() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> small() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> small() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> big_ref() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> big_ref() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> big_ref() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> big_ref() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> big() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> big() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> big() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> big() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> medium_ref() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> medium_ref() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> medium_ref() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> medium_ref() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> medium() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> medium() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> medium() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> medium() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> biggish_ref() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> biggish_ref() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> biggish_ref() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> biggish_ref() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> biggish() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> biggish() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> biggish() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> biggish() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> tiny_ref() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> tiny_ref() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> tiny_ref() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> tiny_ref() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&> tiny() const& {
    return ::apache::thrift::required_field_ref<const T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<const T&&> tiny() const&& {
    return ::apache::thrift::required_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&> tiny() & {
    return ::apache::thrift::required_field_ref<T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::required_field_ref<T&&> tiny() && {
    return ::apache::thrift::required_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "small" } */
  ::std::int8_t get_small() const {
    return __fbthrift_field_small;
  }

  /** Glean { "field": "small" } */
  [[deprecated("Use `FOO.small() = BAR;` instead of `FOO.set_small(BAR);`")]]
  ::std::int8_t& set_small(::std::int8_t small_) {
    small_ref() = small_;
    return __fbthrift_field_small;
  }

  /** Glean { "field": "big" } */
  ::std::int64_t get_big() const {
    return __fbthrift_field_big;
  }

  /** Glean { "field": "big" } */
  [[deprecated("Use `FOO.big() = BAR;` instead of `FOO.set_big(BAR);`")]]
  ::std::int64_t& set_big(::std::int64_t big_) {
    big_ref() = big_;
    return __fbthrift_field_big;
  }

  /** Glean { "field": "medium" } */
  ::std::int16_t get_medium() const {
    return __fbthrift_field_medium;
  }

  /** Glean { "field": "medium" } */
  [[deprecated("Use `FOO.medium() = BAR;` instead of `FOO.set_medium(BAR);`")]]
  ::std::int16_t& set_medium(::std::int16_t medium_) {
    medium_ref() = medium_;
    return __fbthrift_field_medium;
  }

  /** Glean { "field": "biggish" } */
  ::std::int32_t get_biggish() const {
    return __fbthrift_field_biggish;
  }

  /** Glean { "field": "biggish" } */
  [[deprecated("Use `FOO.biggish() = BAR;` instead of `FOO.set_biggish(BAR);`")]]
  ::std::int32_t& set_biggish(::std::int32_t biggish_) {
    biggish_ref() = biggish_;
    return __fbthrift_field_biggish;
  }

  /** Glean { "field": "tiny" } */
  ::std::int8_t get_tiny() const {
    return __fbthrift_field_tiny;
  }

  /** Glean { "field": "tiny" } */
  [[deprecated("Use `FOO.tiny() = BAR;` instead of `FOO.set_tiny(BAR);`")]]
  ::std::int8_t& set_tiny(::std::int8_t tiny_) {
    tiny_ref() = tiny_;
    return __fbthrift_field_tiny;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<MinPadding>;
  friend void swap(MinPadding& a, MinPadding& b);
};

template <class Protocol_>
unsigned long MinPadding::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MinPaddingWithCustomType", "kind": "struct" } */
class MinPaddingWithCustomType final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::small,
    ::apache::thrift::ident::big,
    ::apache::thrift::ident::medium,
    ::apache::thrift::ident::biggish,
    ::apache::thrift::ident::tiny
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::byte_t,
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::adapted<::my::Adapter, ::apache::thrift::type::i16_t>,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::byte_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 5;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = MinPaddingWithCustomType;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    true;


 public:

  MinPaddingWithCustomType() :
      __fbthrift_field_medium(),
      __fbthrift_field_big(),
      __fbthrift_field_biggish(),
      __fbthrift_field_small(),
      __fbthrift_field_tiny() {
    ::apache::thrift::adapt_detail::construct<::my::Adapter, 3>(__fbthrift_field_medium, *this);
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  MinPaddingWithCustomType(apache::thrift::FragileConstructor, ::std::int8_t small__arg, ::std::int64_t big__arg, ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType> medium__arg, ::std::int32_t biggish__arg, ::std::int8_t tiny__arg);

  MinPaddingWithCustomType(MinPaddingWithCustomType&&) noexcept;
  MinPaddingWithCustomType(const MinPaddingWithCustomType& src);


  MinPaddingWithCustomType& operator=(MinPaddingWithCustomType&&) noexcept;
  MinPaddingWithCustomType& operator=(const MinPaddingWithCustomType& src);
 private:
  ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType> __fbthrift_field_medium;
 private:
  ::std::int64_t __fbthrift_field_big;
 private:
  ::std::int32_t __fbthrift_field_biggish;
 private:
  ::std::int8_t __fbthrift_field_small;
 private:
  ::std::int8_t __fbthrift_field_tiny;

 public:

  bool operator==(const MinPaddingWithCustomType&) const;
  bool operator<(const MinPaddingWithCustomType&) const;

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> small_ref() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> small_ref() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> small_ref() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> small_ref() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> small() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> small() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> small() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_small};
  }

  /** Glean { "field": "small" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> small() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_small)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> big_ref() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> big_ref() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> big_ref() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> big_ref() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> big() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> big() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> big() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_big};
  }

  /** Glean { "field": "big" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> big() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_big)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> medium_ref() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> medium_ref() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> medium_ref() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> medium_ref() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> medium() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> medium() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> medium() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_medium};
  }

  /** Glean { "field": "medium" } */
  template <typename..., typename T = ::apache::thrift::adapt_detail::adapted_field_t<::my::Adapter, 3, ::std::int16_t, MinPaddingWithCustomType>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> medium() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_medium)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> biggish_ref() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> biggish_ref() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> biggish_ref() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> biggish_ref() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> biggish() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> biggish() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> biggish() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_biggish};
  }

  /** Glean { "field": "biggish" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> biggish() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_biggish)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> tiny_ref() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> tiny_ref() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> tiny_ref() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> tiny_ref() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&> tiny() const& {
    return ::apache::thrift::terse_field_ref<const T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const T&&> tiny() const&& {
    return ::apache::thrift::terse_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_tiny)};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&> tiny() & {
    return ::apache::thrift::terse_field_ref<T&>{this->__fbthrift_field_tiny};
  }

  /** Glean { "field": "tiny" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<T&&> tiny() && {
    return ::apache::thrift::terse_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_tiny)};
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<MinPaddingWithCustomType>;
  friend void swap(MinPaddingWithCustomType& a, MinPaddingWithCustomType& b);
};

template <class Protocol_>
unsigned long MinPaddingWithCustomType::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MyDataItem", "kind": "struct" } */
class MyDataItem final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = MyDataItem;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  MyDataItem() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  MyDataItem(apache::thrift::FragileConstructor);

  MyDataItem(MyDataItem&&) = default;

  MyDataItem(const MyDataItem&) = default;


  MyDataItem& operator=(MyDataItem&&) = default;

  MyDataItem& operator=(const MyDataItem&) = default;

 public:

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<MyDataItem>;
  friend void swap(MyDataItem& a, MyDataItem& b);
};

template <class Protocol_>
unsigned long MyDataItem::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "MyStruct", "kind": "struct" } */
class MyStruct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::MyIntField,
    ::apache::thrift::ident::MyStringField,
    ::apache::thrift::ident::majorVer,
    ::apache::thrift::ident::data
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::MyDataItem>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 4;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = MyStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  MyStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  MyStruct(apache::thrift::FragileConstructor, ::std::int64_t MyIntField__arg, ::std::string MyStringField__arg, ::std::int64_t majorVer__arg, ::apache::thrift::fixtures::types::MyDataItem data__arg);

  MyStruct(MyStruct&&) noexcept;

  MyStruct(const MyStruct& src);


  MyStruct& operator=(MyStruct&&) noexcept;
  MyStruct& operator=(const MyStruct& src);

  ~MyStruct();

 private:
  ::std::int64_t __fbthrift_field_MyIntField;
 private:
  ::std::string __fbthrift_field_MyStringField;
 private:
  ::std::int64_t __fbthrift_field_majorVer;
 private:
  ::apache::thrift::fixtures::types::MyDataItem __fbthrift_field_data;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyIntField_ref() const& {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyIntField_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyIntField_ref() & {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyIntField_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyIntField() const& {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyIntField() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyIntField() & {
    return {this->__fbthrift_field_MyIntField, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyIntField" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyIntField() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyIntField), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyStringField_ref() const& {
    return {this->__fbthrift_field_MyStringField, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyStringField_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyStringField), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyStringField_ref() & {
    return {this->__fbthrift_field_MyStringField, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyStringField_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyStringField), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> MyStringField() const& {
    return {this->__fbthrift_field_MyStringField, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> MyStringField() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_MyStringField), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> MyStringField() & {
    return {this->__fbthrift_field_MyStringField, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "MyStringField" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> MyStringField() && {
    return {static_cast<T&&>(this->__fbthrift_field_MyStringField), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> majorVer_ref() const& {
    return {this->__fbthrift_field_majorVer, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> majorVer_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_majorVer), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> majorVer_ref() & {
    return {this->__fbthrift_field_majorVer, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> majorVer_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_majorVer), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> majorVer() const& {
    return {this->__fbthrift_field_majorVer, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> majorVer() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_majorVer), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> majorVer() & {
    return {this->__fbthrift_field_majorVer, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "majorVer" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> majorVer() && {
    return {static_cast<T&&>(this->__fbthrift_field_majorVer), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> data_ref() const& {
    return {this->__fbthrift_field_data, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> data_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_data), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> data_ref() & {
    return {this->__fbthrift_field_data, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> data_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_data), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> data() const& {
    return {this->__fbthrift_field_data, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> data() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_data), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> data() & {
    return {this->__fbthrift_field_data, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::MyDataItem>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> data() && {
    return {static_cast<T&&>(this->__fbthrift_field_data), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "MyIntField" } */
  ::std::int64_t get_MyIntField() const {
    return __fbthrift_field_MyIntField;
  }

  /** Glean { "field": "MyIntField" } */
  [[deprecated("Use `FOO.MyIntField() = BAR;` instead of `FOO.set_MyIntField(BAR);`")]]
  ::std::int64_t& set_MyIntField(::std::int64_t MyIntField_) {
    MyIntField_ref() = MyIntField_;
    return __fbthrift_field_MyIntField;
  }

  /** Glean { "field": "MyStringField" } */
  const ::std::string& get_MyStringField() const& {
    return __fbthrift_field_MyStringField;
  }

  /** Glean { "field": "MyStringField" } */
  ::std::string get_MyStringField() && {
    return std::move(__fbthrift_field_MyStringField);
  }

  /** Glean { "field": "MyStringField" } */
  template <typename T_MyStruct_MyStringField_struct_setter = ::std::string>
  [[deprecated("Use `FOO.MyStringField() = BAR;` instead of `FOO.set_MyStringField(BAR);`")]]
  ::std::string& set_MyStringField(T_MyStruct_MyStringField_struct_setter&& MyStringField_) {
    MyStringField_ref() = std::forward<T_MyStruct_MyStringField_struct_setter>(MyStringField_);
    return __fbthrift_field_MyStringField;
  }

  /** Glean { "field": "majorVer" } */
  ::std::int64_t get_majorVer() const {
    return __fbthrift_field_majorVer;
  }

  /** Glean { "field": "majorVer" } */
  [[deprecated("Use `FOO.majorVer() = BAR;` instead of `FOO.set_majorVer(BAR);`")]]
  ::std::int64_t& set_majorVer(::std::int64_t majorVer_) {
    majorVer_ref() = majorVer_;
    return __fbthrift_field_majorVer;
  }
  /** Glean { "field": "data" } */
  const ::apache::thrift::fixtures::types::MyDataItem& get_data() const&;
  /** Glean { "field": "data" } */
  ::apache::thrift::fixtures::types::MyDataItem get_data() &&;

  /** Glean { "field": "data" } */
  template <typename T_MyStruct_data_struct_setter = ::apache::thrift::fixtures::types::MyDataItem>
  [[deprecated("Use `FOO.data() = BAR;` instead of `FOO.set_data(BAR);`")]]
  ::apache::thrift::fixtures::types::MyDataItem& set_data(T_MyStruct_data_struct_setter&& data_) {
    data_ref() = std::forward<T_MyStruct_data_struct_setter>(data_);
    return __fbthrift_field_data;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<MyStruct>;
  friend void swap(MyStruct& a, MyStruct& b);
};

template <class Protocol_>
unsigned long MyStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "Renamed", "kind": "struct" } */
class Renamed final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::bar
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i64_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = Renamed;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  Renamed() :
      __fbthrift_field_bar() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  Renamed(apache::thrift::FragileConstructor, ::std::int64_t bar__arg);

  Renamed(Renamed&&) = default;

  Renamed(const Renamed&) = default;


  Renamed& operator=(Renamed&&) = default;

  Renamed& operator=(const Renamed&) = default;
 private:
  ::std::int64_t __fbthrift_field_bar;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const Renamed&) const;
  bool operator<(const Renamed&) const;

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> bar_ref() const& {
    return {this->__fbthrift_field_bar, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> bar_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_bar), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> bar_ref() & {
    return {this->__fbthrift_field_bar, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> bar_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_bar), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> bar() const& {
    return {this->__fbthrift_field_bar, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> bar() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_bar), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> bar() & {
    return {this->__fbthrift_field_bar, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> bar() && {
    return {static_cast<T&&>(this->__fbthrift_field_bar), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "bar" } */
  ::std::int64_t get_bar() const {
    return __fbthrift_field_bar;
  }

  /** Glean { "field": "bar" } */
  [[deprecated("Use `FOO.bar() = BAR;` instead of `FOO.set_bar(BAR);`")]]
  ::std::int64_t& set_bar(::std::int64_t bar_) {
    bar_ref() = bar_;
    return __fbthrift_field_bar;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<Renamed>;
  friend void swap(Renamed& a, Renamed& b);
};

template <class Protocol_>
unsigned long Renamed::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "AnnotatedTypes", "kind": "struct" } */
class AnnotatedTypes final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::binary_field,
    ::apache::thrift::ident::list_field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::binary_t,
    ::apache::thrift::type::list<::apache::thrift::type::cpp_type<std::unordered_map<::std::int32_t, ::std::string>, ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = AnnotatedTypes;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  AnnotatedTypes();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AnnotatedTypes(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::TBinary_8623 binary_field__arg, ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468 list_field__arg);

  AnnotatedTypes(AnnotatedTypes&&) noexcept;

  AnnotatedTypes(const AnnotatedTypes& src);


  AnnotatedTypes& operator=(AnnotatedTypes&&) noexcept;
  AnnotatedTypes& operator=(const AnnotatedTypes& src);

  ~AnnotatedTypes();

 private:
  ::apache::thrift::fixtures::types::TBinary_8623 __fbthrift_field_binary_field;
 private:
  ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468 __fbthrift_field_list_field;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AnnotatedTypes&) const;
  bool operator<(const AnnotatedTypes&) const;

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> binary_field_ref() const& {
    return {this->__fbthrift_field_binary_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> binary_field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_binary_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> binary_field_ref() & {
    return {this->__fbthrift_field_binary_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> binary_field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_binary_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> binary_field() const& {
    return {this->__fbthrift_field_binary_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> binary_field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_binary_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> binary_field() & {
    return {this->__fbthrift_field_binary_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "binary_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::TBinary_8623>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> binary_field() && {
    return {static_cast<T&&>(this->__fbthrift_field_binary_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> list_field_ref() const& {
    return {this->__fbthrift_field_list_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> list_field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_list_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> list_field_ref() & {
    return {this->__fbthrift_field_list_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> list_field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_list_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> list_field() const& {
    return {this->__fbthrift_field_list_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> list_field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_list_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> list_field() & {
    return {this->__fbthrift_field_list_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "list_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> list_field() && {
    return {static_cast<T&&>(this->__fbthrift_field_list_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "binary_field" } */
  const ::apache::thrift::fixtures::types::TBinary_8623& get_binary_field() const& {
    return __fbthrift_field_binary_field;
  }

  /** Glean { "field": "binary_field" } */
  ::apache::thrift::fixtures::types::TBinary_8623 get_binary_field() && {
    return std::move(__fbthrift_field_binary_field);
  }

  /** Glean { "field": "binary_field" } */
  template <typename T_AnnotatedTypes_binary_field_struct_setter = ::apache::thrift::fixtures::types::TBinary_8623>
  [[deprecated("Use `FOO.binary_field() = BAR;` instead of `FOO.set_binary_field(BAR);`")]]
  ::apache::thrift::fixtures::types::TBinary_8623& set_binary_field(T_AnnotatedTypes_binary_field_struct_setter&& binary_field_) {
    binary_field_ref() = std::forward<T_AnnotatedTypes_binary_field_struct_setter>(binary_field_);
    return __fbthrift_field_binary_field;
  }
  /** Glean { "field": "list_field" } */
  const ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468& get_list_field() const&;
  /** Glean { "field": "list_field" } */
  ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468 get_list_field() &&;

  /** Glean { "field": "list_field" } */
  template <typename T_AnnotatedTypes_list_field_struct_setter = ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468>
  [[deprecated("Use `FOO.list_field() = BAR;` instead of `FOO.set_list_field(BAR);`")]]
  ::apache::thrift::fixtures::types::SomeListOfTypeMap_2468& set_list_field(T_AnnotatedTypes_list_field_struct_setter&& list_field_) {
    list_field_ref() = std::forward<T_AnnotatedTypes_list_field_struct_setter>(list_field_);
    return __fbthrift_field_list_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<AnnotatedTypes>;
  friend void swap(AnnotatedTypes& a, AnnotatedTypes& b);
};

template <class Protocol_>
unsigned long AnnotatedTypes::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ForwardUsageStruct", "kind": "struct" } */
class ForwardUsageStruct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::foo
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::ForwardUsageRoot>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ForwardUsageStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ForwardUsageStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ForwardUsageStruct(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot> foo__arg);

  ForwardUsageStruct(ForwardUsageStruct&&) noexcept;
  ForwardUsageStruct(const ForwardUsageStruct& src);


  ForwardUsageStruct& operator=(ForwardUsageStruct&&) noexcept;
  ForwardUsageStruct& operator=(const ForwardUsageStruct& src);

  ~ForwardUsageStruct();

 private:
  ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot> __fbthrift_field_foo;

 public:

  bool operator==(const ForwardUsageStruct&) const;
  bool operator<(const ForwardUsageStruct&) const;
  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T& foo_ref() & {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T& foo_ref() const& {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T&& foo_ref() && {
    return static_cast<T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T&& foo_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T& foo() & {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T& foo() const& {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T&& foo() && {
    return static_cast<T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T&& foo() const&& {
    return static_cast<const T&&>(__fbthrift_field_foo);
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ForwardUsageStruct>;
  friend void swap(ForwardUsageStruct& a, ForwardUsageStruct& b);
};

template <class Protocol_>
unsigned long ForwardUsageStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ForwardUsageRoot", "kind": "struct" } */
class ForwardUsageRoot final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::ForwardUsageStruct,
    ::apache::thrift::ident::ForwardUsageByRef
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::ForwardUsageStruct>,
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::ForwardUsageByRef>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ForwardUsageRoot;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ForwardUsageRoot();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ForwardUsageRoot(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::ForwardUsageStruct ForwardUsageStruct__arg, ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef> ForwardUsageByRef__arg);

  ForwardUsageRoot(ForwardUsageRoot&&) noexcept;
  ForwardUsageRoot(const ForwardUsageRoot& src);


  ForwardUsageRoot& operator=(ForwardUsageRoot&&) noexcept;
  ForwardUsageRoot& operator=(const ForwardUsageRoot& src);

  ~ForwardUsageRoot();

 private:
  ::apache::thrift::fixtures::types::ForwardUsageStruct __fbthrift_field_ForwardUsageStruct;
 private:
  ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef> __fbthrift_field_ForwardUsageByRef;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const ForwardUsageRoot&) const;
  bool operator<(const ForwardUsageRoot&) const;

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> ForwardUsageStruct_ref() const& {
    return {this->__fbthrift_field_ForwardUsageStruct, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> ForwardUsageStruct_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_ForwardUsageStruct), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> ForwardUsageStruct_ref() & {
    return {this->__fbthrift_field_ForwardUsageStruct, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> ForwardUsageStruct_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_ForwardUsageStruct), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> ForwardUsageStruct() const& {
    return {this->__fbthrift_field_ForwardUsageStruct, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> ForwardUsageStruct() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_ForwardUsageStruct), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> ForwardUsageStruct() & {
    return {this->__fbthrift_field_ForwardUsageStruct, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> ForwardUsageStruct() && {
    return {static_cast<T&&>(this->__fbthrift_field_ForwardUsageStruct), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE T& ForwardUsageByRef_ref() & {
    return __fbthrift_field_ForwardUsageByRef;
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE const T& ForwardUsageByRef_ref() const& {
    return __fbthrift_field_ForwardUsageByRef;
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE T&& ForwardUsageByRef_ref() && {
    return static_cast<T&&>(__fbthrift_field_ForwardUsageByRef);
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE const T&& ForwardUsageByRef_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_ForwardUsageByRef);
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE T& ForwardUsageByRef() & {
    return __fbthrift_field_ForwardUsageByRef;
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE const T& ForwardUsageByRef() const& {
    return __fbthrift_field_ForwardUsageByRef;
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE T&& ForwardUsageByRef() && {
    return static_cast<T&&>(__fbthrift_field_ForwardUsageByRef);
  }

  /** Glean { "field": "ForwardUsageByRef" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageByRef>>
  FOLLY_ERASE const T&& ForwardUsageByRef() const&& {
    return static_cast<const T&&>(__fbthrift_field_ForwardUsageByRef);
  }
  /** Glean { "field": "ForwardUsageStruct" } */
  const ::apache::thrift::fixtures::types::ForwardUsageStruct* get_ForwardUsageStruct() const&;
  /** Glean { "field": "ForwardUsageStruct" } */
  ::apache::thrift::fixtures::types::ForwardUsageStruct* get_ForwardUsageStruct() &;
  /** Glean { "field": "ForwardUsageStruct" } */
  ::apache::thrift::fixtures::types::ForwardUsageStruct* get_ForwardUsageStruct() && = delete;

  /** Glean { "field": "ForwardUsageStruct" } */
  template <typename T_ForwardUsageRoot_ForwardUsageStruct_struct_setter = ::apache::thrift::fixtures::types::ForwardUsageStruct>
  [[deprecated("Use `FOO.ForwardUsageStruct() = BAR;` instead of `FOO.set_ForwardUsageStruct(BAR);`")]]
  ::apache::thrift::fixtures::types::ForwardUsageStruct& set_ForwardUsageStruct(T_ForwardUsageRoot_ForwardUsageStruct_struct_setter&& ForwardUsageStruct_) {
    ForwardUsageStruct_ref() = std::forward<T_ForwardUsageRoot_ForwardUsageStruct_struct_setter>(ForwardUsageStruct_);
    return __fbthrift_field_ForwardUsageStruct;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ForwardUsageRoot>;
  friend void swap(ForwardUsageRoot& a, ForwardUsageRoot& b);
};

template <class Protocol_>
unsigned long ForwardUsageRoot::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "ForwardUsageByRef", "kind": "struct" } */
class ForwardUsageByRef final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::foo
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::ForwardUsageRoot>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ForwardUsageByRef;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ForwardUsageByRef();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ForwardUsageByRef(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot> foo__arg);

  ForwardUsageByRef(ForwardUsageByRef&&) noexcept;
  ForwardUsageByRef(const ForwardUsageByRef& src);


  ForwardUsageByRef& operator=(ForwardUsageByRef&&) noexcept;
  ForwardUsageByRef& operator=(const ForwardUsageByRef& src);

  ~ForwardUsageByRef();

 private:
  ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot> __fbthrift_field_foo;

 public:

  bool operator==(const ForwardUsageByRef&) const;
  bool operator<(const ForwardUsageByRef&) const;
  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T& foo_ref() & {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T& foo_ref() const& {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T&& foo_ref() && {
    return static_cast<T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T&& foo_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T& foo() & {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T& foo() const& {
    return __fbthrift_field_foo;
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE T&& foo() && {
    return static_cast<T&&>(__fbthrift_field_foo);
  }

  /** Glean { "field": "foo" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::ForwardUsageRoot>>
  FOLLY_ERASE const T&& foo() const&& {
    return static_cast<const T&&>(__fbthrift_field_foo);
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<ForwardUsageByRef>;
  friend void swap(ForwardUsageByRef& a, ForwardUsageByRef& b);
};

template <class Protocol_>
unsigned long ForwardUsageByRef::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "IncompleteMap", "kind": "struct" } */
class IncompleteMap final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::IncompleteMapDep>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = IncompleteMap;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  IncompleteMap();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  IncompleteMap(apache::thrift::FragileConstructor, ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep> field__arg);

  IncompleteMap(IncompleteMap&&) noexcept;

  IncompleteMap(const IncompleteMap& src);


  IncompleteMap& operator=(IncompleteMap&&) noexcept;
  IncompleteMap& operator=(const IncompleteMap& src);

  ~IncompleteMap();

 private:
  ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const IncompleteMap&) const;
  bool operator<(const IncompleteMap&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>* get_field() const&;
  /** Glean { "field": "field" } */
  ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>* get_field() &;
  /** Glean { "field": "field" } */
  ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_IncompleteMap_field_struct_setter = ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::std::map<::std::int32_t, ::apache::thrift::fixtures::types::IncompleteMapDep>& set_field(T_IncompleteMap_field_struct_setter&& field_) {
    field_ref() = std::forward<T_IncompleteMap_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<IncompleteMap>;
  friend void swap(IncompleteMap& a, IncompleteMap& b);
};

template <class Protocol_>
unsigned long IncompleteMap::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "IncompleteMapDep", "kind": "struct" } */
class IncompleteMapDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = IncompleteMapDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  IncompleteMapDep() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  IncompleteMapDep(apache::thrift::FragileConstructor);

  IncompleteMapDep(IncompleteMapDep&&) = default;

  IncompleteMapDep(const IncompleteMapDep&) = default;


  IncompleteMapDep& operator=(IncompleteMapDep&&) = default;

  IncompleteMapDep& operator=(const IncompleteMapDep&) = default;

 public:

  bool operator==(const IncompleteMapDep&) const;
  bool operator<(const IncompleteMapDep&) const;

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<IncompleteMapDep>;
  friend void swap(IncompleteMapDep& a, IncompleteMapDep& b);
};

template <class Protocol_>
unsigned long IncompleteMapDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "CompleteMapDep", "kind": "struct" } */
class CompleteMapDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = CompleteMapDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CompleteMapDep() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompleteMapDep(apache::thrift::FragileConstructor);

  CompleteMapDep(CompleteMapDep&&) = default;

  CompleteMapDep(const CompleteMapDep&) = default;


  CompleteMapDep& operator=(CompleteMapDep&&) = default;

  CompleteMapDep& operator=(const CompleteMapDep&) = default;

 public:

  bool operator==(const CompleteMapDep&) const;
  bool operator<(const CompleteMapDep&) const;

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<CompleteMapDep>;
  friend void swap(CompleteMapDep& a, CompleteMapDep& b);
};

template <class Protocol_>
unsigned long CompleteMapDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "CompleteMap", "kind": "struct" } */
class CompleteMap final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::cpp_type<std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>, ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::CompleteMapDep>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = CompleteMap;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CompleteMap();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompleteMap(apache::thrift::FragileConstructor, std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep> field__arg);

  CompleteMap(CompleteMap&&) noexcept;

  CompleteMap(const CompleteMap& src);


  CompleteMap& operator=(CompleteMap&&) noexcept;
  CompleteMap& operator=(const CompleteMap& src);

  ~CompleteMap();

 private:
  std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const CompleteMap&) const;
  bool operator<(const CompleteMap&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>* get_field() const&;
  /** Glean { "field": "field" } */
  std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>* get_field() &;
  /** Glean { "field": "field" } */
  std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_CompleteMap_field_struct_setter = std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  std::unordered_map<::std::int32_t, ::apache::thrift::fixtures::types::CompleteMapDep>& set_field(T_CompleteMap_field_struct_setter&& field_) {
    field_ref() = std::forward<T_CompleteMap_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<CompleteMap>;
  friend void swap(CompleteMap& a, CompleteMap& b);
};

template <class Protocol_>
unsigned long CompleteMap::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "IncompleteList", "kind": "struct" } */
class IncompleteList final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::cpp_type<::std::list<::apache::thrift::fixtures::types::IncompleteListDep>, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::IncompleteListDep>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = IncompleteList;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  IncompleteList();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  IncompleteList(apache::thrift::FragileConstructor, ::std::list<::apache::thrift::fixtures::types::IncompleteListDep> field__arg);

  IncompleteList(IncompleteList&&) noexcept;

  IncompleteList(const IncompleteList& src);


  IncompleteList& operator=(IncompleteList&&) noexcept;
  IncompleteList& operator=(const IncompleteList& src);

  ~IncompleteList();

 private:
  ::std::list<::apache::thrift::fixtures::types::IncompleteListDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const IncompleteList&) const;
  bool operator<(const IncompleteList&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>* get_field() const&;
  /** Glean { "field": "field" } */
  ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>* get_field() &;
  /** Glean { "field": "field" } */
  ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_IncompleteList_field_struct_setter = ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::std::list<::apache::thrift::fixtures::types::IncompleteListDep>& set_field(T_IncompleteList_field_struct_setter&& field_) {
    field_ref() = std::forward<T_IncompleteList_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<IncompleteList>;
  friend void swap(IncompleteList& a, IncompleteList& b);
};

template <class Protocol_>
unsigned long IncompleteList::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "IncompleteListDep", "kind": "struct" } */
class IncompleteListDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = IncompleteListDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  IncompleteListDep() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  IncompleteListDep(apache::thrift::FragileConstructor);

  IncompleteListDep(IncompleteListDep&&) = default;

  IncompleteListDep(const IncompleteListDep&) = default;


  IncompleteListDep& operator=(IncompleteListDep&&) = default;

  IncompleteListDep& operator=(const IncompleteListDep&) = default;

 public:

  bool operator==(const IncompleteListDep&) const;
  bool operator<(const IncompleteListDep&) const;

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<IncompleteListDep>;
  friend void swap(IncompleteListDep& a, IncompleteListDep& b);
};

template <class Protocol_>
unsigned long IncompleteListDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "CompleteListDep", "kind": "struct" } */
class CompleteListDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0};
  using __fbthrift_reflection_type_tags = folly::tag_t<
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 0;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = CompleteListDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CompleteListDep() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompleteListDep(apache::thrift::FragileConstructor);

  CompleteListDep(CompleteListDep&&) = default;

  CompleteListDep(const CompleteListDep&) = default;


  CompleteListDep& operator=(CompleteListDep&&) = default;

  CompleteListDep& operator=(const CompleteListDep&) = default;

 public:

  bool operator==(const CompleteListDep&) const;
  bool operator<(const CompleteListDep&) const;

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<CompleteListDep>;
  friend void swap(CompleteListDep& a, CompleteListDep& b);
};

template <class Protocol_>
unsigned long CompleteListDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "CompleteList", "kind": "struct" } */
class CompleteList final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::cpp_type<folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::CompleteListDep>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = CompleteList;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CompleteList();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompleteList(apache::thrift::FragileConstructor, folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep> field__arg);

  CompleteList(CompleteList&&) noexcept;

  CompleteList(const CompleteList& src);


  CompleteList& operator=(CompleteList&&) noexcept;
  CompleteList& operator=(const CompleteList& src);

  ~CompleteList();

 private:
  folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const CompleteList&) const;
  bool operator<(const CompleteList&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>* get_field() const&;
  /** Glean { "field": "field" } */
  folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>* get_field() &;
  /** Glean { "field": "field" } */
  folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_CompleteList_field_struct_setter = folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  folly::small_vector<::apache::thrift::fixtures::types::CompleteListDep>& set_field(T_CompleteList_field_struct_setter&& field_) {
    field_ref() = std::forward<T_CompleteList_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<CompleteList>;
  friend void swap(CompleteList& a, CompleteList& b);
};

template <class Protocol_>
unsigned long CompleteList::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "AdaptedList", "kind": "struct" } */
class AdaptedList final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::adapted<IdentityAdapter<detail::AdaptedListDep>, ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::detail::AdaptedListDep>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = AdaptedList;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    true;


 public:

  AdaptedList();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AdaptedList(apache::thrift::FragileConstructor, ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep> field__arg);

  AdaptedList(AdaptedList&&) noexcept;

  AdaptedList(const AdaptedList& src);


  AdaptedList& operator=(AdaptedList&&) noexcept;
  AdaptedList& operator=(const AdaptedList& src);

  ~AdaptedList();

 private:
  ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AdaptedList&) const;
  bool operator<(const AdaptedList&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>* get_field() const&;
  /** Glean { "field": "field" } */
  ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>* get_field() &;
  /** Glean { "field": "field" } */
  ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_AdaptedList_field_struct_setter = ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::std::vector<::apache::thrift::fixtures::types::AdaptedListDep>& set_field(T_AdaptedList_field_struct_setter&& field_) {
    field_ref() = std::forward<T_AdaptedList_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<AdaptedList>;
  friend void swap(AdaptedList& a, AdaptedList& b);
};

template <class Protocol_>
unsigned long AdaptedList::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


namespace detail {
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "AdaptedListDep", "kind": "struct" } */
class AdaptedListDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::AdaptedList>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = AdaptedListDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  AdaptedListDep() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AdaptedListDep(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::AdaptedList field__arg);

  AdaptedListDep(AdaptedListDep&&) noexcept;

  AdaptedListDep(const AdaptedListDep& src);


  AdaptedListDep& operator=(AdaptedListDep&&) noexcept;
  AdaptedListDep& operator=(const AdaptedListDep& src);
 private:
  ::apache::thrift::fixtures::types::AdaptedList __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AdaptedListDep&) const;
  bool operator<(const AdaptedListDep&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::AdaptedList>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const ::apache::thrift::fixtures::types::AdaptedList& get_field() const&;
  /** Glean { "field": "field" } */
  ::apache::thrift::fixtures::types::AdaptedList get_field() &&;

  /** Glean { "field": "field" } */
  template <typename T_AdaptedListDep_field_struct_setter = ::apache::thrift::fixtures::types::AdaptedList>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::apache::thrift::fixtures::types::AdaptedList& set_field(T_AdaptedListDep_field_struct_setter&& field_) {
    field_ref() = std::forward<T_AdaptedListDep_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<AdaptedListDep>;
  friend void swap(AdaptedListDep& a, AdaptedListDep& b);
};

template <class Protocol_>
unsigned long AdaptedListDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}
} // namespace detail


namespace detail {
/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "DependentAdaptedListDep", "kind": "struct" } */
class DependentAdaptedListDep final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i16_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = DependentAdaptedListDep;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  DependentAdaptedListDep();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  DependentAdaptedListDep(apache::thrift::FragileConstructor, ::apache::thrift::detail::boxed_value_ptr<::std::int16_t> field__arg);

  DependentAdaptedListDep(DependentAdaptedListDep&&) noexcept;

  DependentAdaptedListDep(const DependentAdaptedListDep& src);


  DependentAdaptedListDep& operator=(DependentAdaptedListDep&&) noexcept;
  DependentAdaptedListDep& operator=(const DependentAdaptedListDep& src);

  ~DependentAdaptedListDep();

 private:
  ::apache::thrift::detail::boxed_value_ptr<::std::int16_t> __fbthrift_field_field;

 public:

  bool operator==(const DependentAdaptedListDep&) const;
  bool operator<(const DependentAdaptedListDep&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> field_ref() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_field};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> field_ref() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_field)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> field_ref() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_field};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> field_ref() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_field)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> field() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_field};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> field() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_field)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> field() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_field};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int16_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> field() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_field)};
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<DependentAdaptedListDep>;
  friend void swap(DependentAdaptedListDep& a, DependentAdaptedListDep& b);
};

template <class Protocol_>
unsigned long DependentAdaptedListDep::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}
} // namespace detail

using DependentAdaptedListDep = ::apache::thrift::adapt_detail::adapted_t<IdentityAdapter<detail::DependentAdaptedListDep>, ::apache::thrift::fixtures::types::detail::DependentAdaptedListDep>;


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "DependentAdaptedList", "kind": "struct" } */
class DependentAdaptedList final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::adapted<IdentityAdapter<detail::DependentAdaptedListDep>, ::apache::thrift::type::struct_t<::apache::thrift::fixtures::types::detail::DependentAdaptedListDep>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = DependentAdaptedList;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    true;


 public:

  DependentAdaptedList();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  DependentAdaptedList(apache::thrift::FragileConstructor, ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep> field__arg);

  DependentAdaptedList(DependentAdaptedList&&) noexcept;

  DependentAdaptedList(const DependentAdaptedList& src);


  DependentAdaptedList& operator=(DependentAdaptedList&&) noexcept;
  DependentAdaptedList& operator=(const DependentAdaptedList& src);

  ~DependentAdaptedList();

 private:
  ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep> __fbthrift_field_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const DependentAdaptedList&) const;
  bool operator<(const DependentAdaptedList&) const;

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field_ref() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field_ref() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> field() const& {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> field() & {
    return {this->__fbthrift_field_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "field" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> field() && {
    return {static_cast<T&&>(this->__fbthrift_field_field), __isset.at(0), __isset.bit(0)};
  }
  /** Glean { "field": "field" } */
  const ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>* get_field() const&;
  /** Glean { "field": "field" } */
  ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>* get_field() &;
  /** Glean { "field": "field" } */
  ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>* get_field() && = delete;

  /** Glean { "field": "field" } */
  template <typename T_DependentAdaptedList_field_struct_setter = ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>>
  [[deprecated("Use `FOO.field() = BAR;` instead of `FOO.set_field(BAR);`")]]
  ::std::vector<::apache::thrift::fixtures::types::DependentAdaptedListDep>& set_field(T_DependentAdaptedList_field_struct_setter&& field_) {
    field_ref() = std::forward<T_DependentAdaptedList_field_struct_setter>(field_);
    return __fbthrift_field_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<DependentAdaptedList>;
  friend void swap(DependentAdaptedList& a, DependentAdaptedList& b);
};

template <class Protocol_>
unsigned long DependentAdaptedList::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "AllocatorAware", "kind": "struct" } */
class AllocatorAware final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::aa_list,
    ::apache::thrift::ident::aa_set,
    ::apache::thrift::ident::aa_map,
    ::apache::thrift::ident::aa_string,
    ::apache::thrift::ident::not_a_container,
    ::apache::thrift::ident::aa_unique,
    ::apache::thrift::ident::aa_shared
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6,7};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::i32_t>,
    ::apache::thrift::type::set<::apache::thrift::type::i32_t>,
    ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::i32_t>,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i32_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 7;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = AllocatorAware;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;

 public:
  using allocator_type = some_allocator;
  allocator_type get_allocator() const {
    return __fbthrift_alloc;
  }
 private:
  [[FOLLY_ATTR_NO_UNIQUE_ADDRESS]] allocator_type __fbthrift_alloc;

 public:

  AllocatorAware();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AllocatorAware(apache::thrift::FragileConstructor, ::apache::thrift::fixtures::types::list_i32_9187 aa_list__arg, ::apache::thrift::fixtures::types::set_i32_7070 aa_set__arg, ::apache::thrift::fixtures::types::map_i32_i32_9565 aa_map__arg, ::apache::thrift::fixtures::types::string_5252 aa_string__arg, ::std::int32_t not_a_container__arg, ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314> aa_unique__arg, ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314> aa_shared__arg);

  AllocatorAware(AllocatorAware&&) noexcept;
  AllocatorAware(const AllocatorAware& src);

  explicit AllocatorAware(const allocator_type& alloc) noexcept :
    __fbthrift_alloc(alloc),
    __fbthrift_field_aa_list(alloc),
    __fbthrift_field_aa_set(alloc),
    __fbthrift_field_aa_map(alloc),
    __fbthrift_field_aa_string(alloc),
    __fbthrift_field_not_a_container(),
    __fbthrift_field_aa_unique(folly::allocate_unique<::apache::thrift::fixtures::types::i32_9314>(alloc)),
    __fbthrift_field_aa_shared(std::allocate_shared<::apache::thrift::fixtures::types::i32_9314>(alloc)) {}

  explicit AllocatorAware(const AllocatorAware& other, const allocator_type& alloc) :
    __fbthrift_alloc(alloc),
    __fbthrift_field_aa_list(other.__fbthrift_field_aa_list, alloc),
    __fbthrift_field_aa_set(other.__fbthrift_field_aa_set, alloc),
    __fbthrift_field_aa_map(other.__fbthrift_field_aa_map, alloc),
    __fbthrift_field_aa_string(other.__fbthrift_field_aa_string, alloc),
    __fbthrift_field_not_a_container(other.__fbthrift_field_not_a_container),
    __fbthrift_field_aa_unique(folly::allocate_unique<::apache::thrift::fixtures::types::i32_9314>(alloc, *other.__fbthrift_field_aa_unique)),
    __fbthrift_field_aa_shared(std::allocate_shared<::apache::thrift::fixtures::types::i32_9314>(alloc, *other.__fbthrift_field_aa_shared)),
    __isset(other.__isset) {}

  explicit AllocatorAware(AllocatorAware&& other, const allocator_type& alloc) :
    __fbthrift_alloc(alloc),
    __fbthrift_field_aa_list(std::move(other.__fbthrift_field_aa_list), alloc),
    __fbthrift_field_aa_set(std::move(other.__fbthrift_field_aa_set), alloc),
    __fbthrift_field_aa_map(std::move(other.__fbthrift_field_aa_map), alloc),
    __fbthrift_field_aa_string(std::move(other.__fbthrift_field_aa_string), alloc),
    __fbthrift_field_not_a_container(std::move(other.__fbthrift_field_not_a_container)),
    __fbthrift_field_aa_unique(folly::allocate_unique<::apache::thrift::fixtures::types::i32_9314>(alloc, std::move(*other.__fbthrift_field_aa_unique))),
    __fbthrift_field_aa_shared(std::allocate_shared<::apache::thrift::fixtures::types::i32_9314>(alloc, std::move(*other.__fbthrift_field_aa_shared))),
    __isset(other.__isset) {}

  AllocatorAware& operator=(AllocatorAware&&) noexcept;
  AllocatorAware& operator=(const AllocatorAware& src);

  ~AllocatorAware();

 private:
  ::apache::thrift::fixtures::types::list_i32_9187 __fbthrift_field_aa_list;
 private:
  ::apache::thrift::fixtures::types::set_i32_7070 __fbthrift_field_aa_set;
 private:
  ::apache::thrift::fixtures::types::map_i32_i32_9565 __fbthrift_field_aa_map;
 private:
  ::apache::thrift::fixtures::types::string_5252 __fbthrift_field_aa_string;
 private:
  ::std::int32_t __fbthrift_field_not_a_container;
 private:
  ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314> __fbthrift_field_aa_unique;
 private:
  ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314> __fbthrift_field_aa_shared;
 private:
  apache::thrift::detail::isset_bitset<5, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AllocatorAware&) const;
  bool operator<(const AllocatorAware&) const;

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_list_ref() const& {
    return {this->__fbthrift_field_aa_list, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_list_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_list), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_list_ref() & {
    return {this->__fbthrift_field_aa_list, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_list_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_list), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_list() const& {
    return {this->__fbthrift_field_aa_list, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_list() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_list), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_list() & {
    return {this->__fbthrift_field_aa_list, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_list" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::list_i32_9187>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_list() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_list), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_set_ref() const& {
    return {this->__fbthrift_field_aa_set, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_set_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_set), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_set_ref() & {
    return {this->__fbthrift_field_aa_set, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_set_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_set), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_set() const& {
    return {this->__fbthrift_field_aa_set, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_set() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_set), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_set() & {
    return {this->__fbthrift_field_aa_set, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_set" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::set_i32_7070>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_set() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_set), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_map_ref() const& {
    return {this->__fbthrift_field_aa_map, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_map_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_map), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_map_ref() & {
    return {this->__fbthrift_field_aa_map, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_map_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_map), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_map() const& {
    return {this->__fbthrift_field_aa_map, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_map() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_map), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_map() & {
    return {this->__fbthrift_field_aa_map, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_map" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_map() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_map), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_string_ref() const& {
    return {this->__fbthrift_field_aa_string, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_string_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_string), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_string_ref() & {
    return {this->__fbthrift_field_aa_string, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_string_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_string), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> aa_string() const& {
    return {this->__fbthrift_field_aa_string, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> aa_string() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_aa_string), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> aa_string() & {
    return {this->__fbthrift_field_aa_string, __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "aa_string" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::string_5252>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> aa_string() && {
    return {static_cast<T&&>(this->__fbthrift_field_aa_string), __isset.at(3), __isset.bit(3)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> not_a_container_ref() const& {
    return {this->__fbthrift_field_not_a_container, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> not_a_container_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_not_a_container), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> not_a_container_ref() & {
    return {this->__fbthrift_field_not_a_container, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> not_a_container_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_not_a_container), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> not_a_container() const& {
    return {this->__fbthrift_field_not_a_container, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> not_a_container() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_not_a_container), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> not_a_container() & {
    return {this->__fbthrift_field_not_a_container, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> not_a_container() && {
    return {static_cast<T&&>(this->__fbthrift_field_not_a_container), __isset.at(4), __isset.bit(4)};
  }
  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T& aa_unique_ref() & {
    return __fbthrift_field_aa_unique;
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T& aa_unique_ref() const& {
    return __fbthrift_field_aa_unique;
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T&& aa_unique_ref() && {
    return static_cast<T&&>(__fbthrift_field_aa_unique);
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T&& aa_unique_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_aa_unique);
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T& aa_unique() & {
    return __fbthrift_field_aa_unique;
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T& aa_unique() const& {
    return __fbthrift_field_aa_unique;
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T&& aa_unique() && {
    return static_cast<T&&>(__fbthrift_field_aa_unique);
  }

  /** Glean { "field": "aa_unique" } */
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T&& aa_unique() const&& {
    return static_cast<const T&&>(__fbthrift_field_aa_unique);
  }
  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T& aa_shared_ref() & {
    return __fbthrift_field_aa_shared;
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T& aa_shared_ref() const& {
    return __fbthrift_field_aa_shared;
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T&& aa_shared_ref() && {
    return static_cast<T&&>(__fbthrift_field_aa_shared);
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T&& aa_shared_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_aa_shared);
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T& aa_shared() & {
    return __fbthrift_field_aa_shared;
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T& aa_shared() const& {
    return __fbthrift_field_aa_shared;
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE T&& aa_shared() && {
    return static_cast<T&&>(__fbthrift_field_aa_shared);
  }

  /** Glean { "field": "aa_shared" } */
  template <typename ..., typename T = ::std::shared_ptr<::apache::thrift::fixtures::types::i32_9314>>
  FOLLY_ERASE const T&& aa_shared() const&& {
    return static_cast<const T&&>(__fbthrift_field_aa_shared);
  }
  /** Glean { "field": "aa_list" } */
  const ::apache::thrift::fixtures::types::list_i32_9187& get_aa_list() const&;
  /** Glean { "field": "aa_list" } */
  ::apache::thrift::fixtures::types::list_i32_9187 get_aa_list() &&;

  /** Glean { "field": "aa_list" } */
  template <typename T_AllocatorAware_aa_list_struct_setter = ::apache::thrift::fixtures::types::list_i32_9187>
  [[deprecated("Use `FOO.aa_list() = BAR;` instead of `FOO.set_aa_list(BAR);`")]]
  ::apache::thrift::fixtures::types::list_i32_9187& set_aa_list(T_AllocatorAware_aa_list_struct_setter&& aa_list_) {
    aa_list_ref() = std::forward<T_AllocatorAware_aa_list_struct_setter>(aa_list_);
    return __fbthrift_field_aa_list;
  }
  /** Glean { "field": "aa_set" } */
  const ::apache::thrift::fixtures::types::set_i32_7070& get_aa_set() const&;
  /** Glean { "field": "aa_set" } */
  ::apache::thrift::fixtures::types::set_i32_7070 get_aa_set() &&;

  /** Glean { "field": "aa_set" } */
  template <typename T_AllocatorAware_aa_set_struct_setter = ::apache::thrift::fixtures::types::set_i32_7070>
  [[deprecated("Use `FOO.aa_set() = BAR;` instead of `FOO.set_aa_set(BAR);`")]]
  ::apache::thrift::fixtures::types::set_i32_7070& set_aa_set(T_AllocatorAware_aa_set_struct_setter&& aa_set_) {
    aa_set_ref() = std::forward<T_AllocatorAware_aa_set_struct_setter>(aa_set_);
    return __fbthrift_field_aa_set;
  }
  /** Glean { "field": "aa_map" } */
  const ::apache::thrift::fixtures::types::map_i32_i32_9565& get_aa_map() const&;
  /** Glean { "field": "aa_map" } */
  ::apache::thrift::fixtures::types::map_i32_i32_9565 get_aa_map() &&;

  /** Glean { "field": "aa_map" } */
  template <typename T_AllocatorAware_aa_map_struct_setter = ::apache::thrift::fixtures::types::map_i32_i32_9565>
  [[deprecated("Use `FOO.aa_map() = BAR;` instead of `FOO.set_aa_map(BAR);`")]]
  ::apache::thrift::fixtures::types::map_i32_i32_9565& set_aa_map(T_AllocatorAware_aa_map_struct_setter&& aa_map_) {
    aa_map_ref() = std::forward<T_AllocatorAware_aa_map_struct_setter>(aa_map_);
    return __fbthrift_field_aa_map;
  }

  /** Glean { "field": "aa_string" } */
  const ::apache::thrift::fixtures::types::string_5252& get_aa_string() const& {
    return __fbthrift_field_aa_string;
  }

  /** Glean { "field": "aa_string" } */
  ::apache::thrift::fixtures::types::string_5252 get_aa_string() && {
    return std::move(__fbthrift_field_aa_string);
  }

  /** Glean { "field": "aa_string" } */
  template <typename T_AllocatorAware_aa_string_struct_setter = ::apache::thrift::fixtures::types::string_5252>
  [[deprecated("Use `FOO.aa_string() = BAR;` instead of `FOO.set_aa_string(BAR);`")]]
  ::apache::thrift::fixtures::types::string_5252& set_aa_string(T_AllocatorAware_aa_string_struct_setter&& aa_string_) {
    aa_string_ref() = std::forward<T_AllocatorAware_aa_string_struct_setter>(aa_string_);
    return __fbthrift_field_aa_string;
  }

  /** Glean { "field": "not_a_container" } */
  ::std::int32_t get_not_a_container() const {
    return __fbthrift_field_not_a_container;
  }

  /** Glean { "field": "not_a_container" } */
  [[deprecated("Use `FOO.not_a_container() = BAR;` instead of `FOO.set_not_a_container(BAR);`")]]
  ::std::int32_t& set_not_a_container(::std::int32_t not_a_container_) {
    not_a_container_ref() = not_a_container_;
    return __fbthrift_field_not_a_container;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<AllocatorAware>;
  friend void swap(AllocatorAware& a, AllocatorAware& b);
};

template <class Protocol_>
unsigned long AllocatorAware::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "AllocatorAware2", "kind": "struct" } */
class AllocatorAware2 final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::not_a_container,
    ::apache::thrift::ident::box_field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i32_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = AllocatorAware2;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;

 public:
  using allocator_type = some_allocator;
  allocator_type get_allocator() const {
    return __fbthrift_alloc;
  }
 private:
  [[FOLLY_ATTR_NO_UNIQUE_ADDRESS]] allocator_type __fbthrift_alloc;

 public:

  AllocatorAware2();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AllocatorAware2(apache::thrift::FragileConstructor, ::std::int32_t not_a_container__arg, ::apache::thrift::detail::boxed_value_ptr<::std::int32_t> box_field__arg);

  AllocatorAware2(AllocatorAware2&&) noexcept;
  AllocatorAware2(const AllocatorAware2& src);

  explicit AllocatorAware2(const allocator_type& alloc) noexcept :
    __fbthrift_alloc(alloc),
    __fbthrift_field_not_a_container(),
    __fbthrift_field_box_field() {}

  explicit AllocatorAware2(const AllocatorAware2& other, const allocator_type& alloc) :
    __fbthrift_alloc(alloc),
    __fbthrift_field_not_a_container(other.__fbthrift_field_not_a_container),
    __fbthrift_field_box_field(),
    __isset(other.__isset) {}

  explicit AllocatorAware2(AllocatorAware2&& other, const allocator_type& alloc) :
    __fbthrift_alloc(alloc),
    __fbthrift_field_not_a_container(std::move(other.__fbthrift_field_not_a_container)),
    __fbthrift_field_box_field(),
    __isset(other.__isset) {}

  AllocatorAware2& operator=(AllocatorAware2&&) noexcept;
  AllocatorAware2& operator=(const AllocatorAware2& src);

  ~AllocatorAware2();

 private:
  ::std::int32_t __fbthrift_field_not_a_container;
 private:
  ::apache::thrift::detail::boxed_value_ptr<::std::int32_t> __fbthrift_field_box_field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AllocatorAware2&) const;
  bool operator<(const AllocatorAware2&) const;

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> not_a_container_ref() const& {
    return {this->__fbthrift_field_not_a_container, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> not_a_container_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_not_a_container), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> not_a_container_ref() & {
    return {this->__fbthrift_field_not_a_container, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> not_a_container_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_not_a_container), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> not_a_container() const& {
    return {this->__fbthrift_field_not_a_container, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> not_a_container() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_not_a_container), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> not_a_container() & {
    return {this->__fbthrift_field_not_a_container, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "not_a_container" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> not_a_container() && {
    return {static_cast<T&&>(this->__fbthrift_field_not_a_container), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> box_field_ref() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_box_field};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> box_field_ref() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_box_field)};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> box_field_ref() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_box_field};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> box_field_ref() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_box_field)};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> box_field() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_box_field};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> box_field() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_box_field)};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> box_field() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_box_field};
  }

  /** Glean { "field": "box_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> box_field() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_box_field)};
  }

  /** Glean { "field": "not_a_container" } */
  ::std::int32_t get_not_a_container() const {
    return __fbthrift_field_not_a_container;
  }

  /** Glean { "field": "not_a_container" } */
  [[deprecated("Use `FOO.not_a_container() = BAR;` instead of `FOO.set_not_a_container(BAR);`")]]
  ::std::int32_t& set_not_a_container(::std::int32_t not_a_container_) {
    not_a_container_ref() = not_a_container_;
    return __fbthrift_field_not_a_container;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<AllocatorAware2>;
  friend void swap(AllocatorAware2& a, AllocatorAware2& b);
};

template <class Protocol_>
unsigned long AllocatorAware2::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "TypedefStruct", "kind": "struct" } */
class TypedefStruct final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::i32_field,
    ::apache::thrift::ident::IntTypedef_field,
    ::apache::thrift::ident::UintTypedef_field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::cpp_type<std::uint32_t, ::apache::thrift::type::i32_t>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 3;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = TypedefStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  TypedefStruct() :
      __fbthrift_field_i32_field(),
      __fbthrift_field_IntTypedef_field(),
      __fbthrift_field_UintTypedef_field() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  TypedefStruct(apache::thrift::FragileConstructor, ::std::int32_t i32_field__arg, ::apache::thrift::fixtures::types::IntTypedef IntTypedef_field__arg, ::apache::thrift::fixtures::types::UintTypedef UintTypedef_field__arg);

  TypedefStruct(TypedefStruct&&) noexcept;

  TypedefStruct(const TypedefStruct& src);


  TypedefStruct& operator=(TypedefStruct&&) noexcept;
  TypedefStruct& operator=(const TypedefStruct& src);
 private:
  ::std::int32_t __fbthrift_field_i32_field;
 private:
  ::apache::thrift::fixtures::types::IntTypedef __fbthrift_field_IntTypedef_field;
 private:
  ::apache::thrift::fixtures::types::UintTypedef __fbthrift_field_UintTypedef_field;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const TypedefStruct&) const;
  bool operator<(const TypedefStruct&) const;

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> i32_field_ref() const& {
    return {this->__fbthrift_field_i32_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> i32_field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_i32_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> i32_field_ref() & {
    return {this->__fbthrift_field_i32_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> i32_field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_i32_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> i32_field() const& {
    return {this->__fbthrift_field_i32_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> i32_field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_i32_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> i32_field() & {
    return {this->__fbthrift_field_i32_field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "i32_field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> i32_field() && {
    return {static_cast<T&&>(this->__fbthrift_field_i32_field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> IntTypedef_field_ref() const& {
    return {this->__fbthrift_field_IntTypedef_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> IntTypedef_field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_IntTypedef_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> IntTypedef_field_ref() & {
    return {this->__fbthrift_field_IntTypedef_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> IntTypedef_field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_IntTypedef_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> IntTypedef_field() const& {
    return {this->__fbthrift_field_IntTypedef_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> IntTypedef_field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_IntTypedef_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> IntTypedef_field() & {
    return {this->__fbthrift_field_IntTypedef_field, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "IntTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::IntTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> IntTypedef_field() && {
    return {static_cast<T&&>(this->__fbthrift_field_IntTypedef_field), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> UintTypedef_field_ref() const& {
    return {this->__fbthrift_field_UintTypedef_field, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> UintTypedef_field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_UintTypedef_field), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> UintTypedef_field_ref() & {
    return {this->__fbthrift_field_UintTypedef_field, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> UintTypedef_field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_UintTypedef_field), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> UintTypedef_field() const& {
    return {this->__fbthrift_field_UintTypedef_field, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> UintTypedef_field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_UintTypedef_field), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> UintTypedef_field() & {
    return {this->__fbthrift_field_UintTypedef_field, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "UintTypedef_field" } */
  template <typename..., typename T = ::apache::thrift::fixtures::types::UintTypedef>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> UintTypedef_field() && {
    return {static_cast<T&&>(this->__fbthrift_field_UintTypedef_field), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "i32_field" } */
  ::std::int32_t get_i32_field() const {
    return __fbthrift_field_i32_field;
  }

  /** Glean { "field": "i32_field" } */
  [[deprecated("Use `FOO.i32_field() = BAR;` instead of `FOO.set_i32_field(BAR);`")]]
  ::std::int32_t& set_i32_field(::std::int32_t i32_field_) {
    i32_field_ref() = i32_field_;
    return __fbthrift_field_i32_field;
  }

  /** Glean { "field": "IntTypedef_field" } */
  ::apache::thrift::fixtures::types::IntTypedef get_IntTypedef_field() const {
    return __fbthrift_field_IntTypedef_field;
  }

  /** Glean { "field": "IntTypedef_field" } */
  [[deprecated("Use `FOO.IntTypedef_field() = BAR;` instead of `FOO.set_IntTypedef_field(BAR);`")]]
  ::apache::thrift::fixtures::types::IntTypedef& set_IntTypedef_field(::apache::thrift::fixtures::types::IntTypedef IntTypedef_field_) {
    IntTypedef_field_ref() = IntTypedef_field_;
    return __fbthrift_field_IntTypedef_field;
  }

  /** Glean { "field": "UintTypedef_field" } */
  ::apache::thrift::fixtures::types::UintTypedef get_UintTypedef_field() const {
    return __fbthrift_field_UintTypedef_field;
  }

  /** Glean { "field": "UintTypedef_field" } */
  [[deprecated("Use `FOO.UintTypedef_field() = BAR;` instead of `FOO.set_UintTypedef_field(BAR);`")]]
  ::apache::thrift::fixtures::types::UintTypedef& set_UintTypedef_field(::apache::thrift::fixtures::types::UintTypedef UintTypedef_field_) {
    UintTypedef_field_ref() = UintTypedef_field_;
    return __fbthrift_field_UintTypedef_field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<TypedefStruct>;
  friend void swap(TypedefStruct& a, TypedefStruct& b);
};

template <class Protocol_>
unsigned long TypedefStruct::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


/** Glean {"file": "thrift/compiler/test/fixtures/types/src/module.thrift", "name": "StructWithDoubleUnderscores", "kind": "struct" } */
class StructWithDoubleUnderscores final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::__field
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 1;

  template<class T>
  using __fbthrift_id = ::apache::thrift::type::field_id<__fbthrift_reflection_field_id_list[folly::to_underlying(T::value)]>;

  template<class T>
  using __fbthrift_type_tag = ::apache::thrift::detail::at<__fbthrift_reflection_type_tags, T::value>;

  template<class T>
  using __fbthrift_ident = ::apache::thrift::detail::at<__fbthrift_reflection_ident_list, T::value>;

  template<class T> using __fbthrift_ordinal = ::apache::thrift::type::ordinal_tag<
    ::apache::thrift::detail::getFieldOrdinal<T,
                                              __fbthrift_reflection_ident_list,
                                              __fbthrift_reflection_type_tags>(
      __fbthrift_reflection_field_id_list
    )
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = StructWithDoubleUnderscores;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  StructWithDoubleUnderscores() :
      __fbthrift_field___field() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  StructWithDoubleUnderscores(apache::thrift::FragileConstructor, ::std::int32_t __field__arg);

  StructWithDoubleUnderscores(StructWithDoubleUnderscores&&) = default;

  StructWithDoubleUnderscores(const StructWithDoubleUnderscores&) = default;


  StructWithDoubleUnderscores& operator=(StructWithDoubleUnderscores&&) = default;

  StructWithDoubleUnderscores& operator=(const StructWithDoubleUnderscores&) = default;
 private:
  ::std::int32_t __fbthrift_field___field;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const StructWithDoubleUnderscores&) const;
  bool operator<(const StructWithDoubleUnderscores&) const;

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> __field_ref() const& {
    return {this->__fbthrift_field___field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> __field_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field___field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> __field_ref() & {
    return {this->__fbthrift_field___field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> __field_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field___field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> __field() const& {
    return {this->__fbthrift_field___field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> __field() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field___field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> __field() & {
    return {this->__fbthrift_field___field, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> __field() && {
    return {static_cast<T&&>(this->__fbthrift_field___field), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "__field" } */
  ::std::int32_t get___field() const {
    return __fbthrift_field___field;
  }

  /** Glean { "field": "__field" } */
  [[deprecated("Use `FOO.__field() = BAR;` instead of `FOO.set___field(BAR);`")]]
  ::std::int32_t& set___field(::std::int32_t __field_) {
    __field_ref() = __field_;
    return __fbthrift_field___field;
  }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;

 private:
  template <class Protocol_>
  void readNoXfer(Protocol_* iprot);

  friend class ::apache::thrift::Cpp2Ops<StructWithDoubleUnderscores>;
  friend void swap(StructWithDoubleUnderscores& a, StructWithDoubleUnderscores& b);
};

template <class Protocol_>
unsigned long StructWithDoubleUnderscores::read(Protocol_* iprot) {
  auto _xferStart = iprot->getCursorPosition();
  readNoXfer(iprot);
  return iprot->getCursorPosition() - _xferStart;
}


} // namespace apache::thrift::fixtures::types
