/**
 * Autogenerated by Thrift for thrift/compiler/test/fixtures/frozen-struct/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/frozen-struct/gen-cpp2/include1_types.h"
#include "thrift/compiler/test/fixtures/frozen-struct/gen-cpp2/include2_types.h"

namespace apache {
namespace thrift {
namespace ident {
struct i32Field;
struct strField;
struct listField;
struct mapField;
struct inclAField;
struct inclBField;
struct i32Field;
struct inclEnumB;
struct field;
struct shared_field;
struct shared_const_field;
struct opt_shared_field;
struct opt_shared_const_field;
struct boxed_field;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_i32Field
#define APACHE_THRIFT_ACCESSOR_i32Field
APACHE_THRIFT_DEFINE_ACCESSOR(i32Field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_strField
#define APACHE_THRIFT_ACCESSOR_strField
APACHE_THRIFT_DEFINE_ACCESSOR(strField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_listField
#define APACHE_THRIFT_ACCESSOR_listField
APACHE_THRIFT_DEFINE_ACCESSOR(listField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_mapField
#define APACHE_THRIFT_ACCESSOR_mapField
APACHE_THRIFT_DEFINE_ACCESSOR(mapField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_inclAField
#define APACHE_THRIFT_ACCESSOR_inclAField
APACHE_THRIFT_DEFINE_ACCESSOR(inclAField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_inclBField
#define APACHE_THRIFT_ACCESSOR_inclBField
APACHE_THRIFT_DEFINE_ACCESSOR(inclBField);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_i32Field
#define APACHE_THRIFT_ACCESSOR_i32Field
APACHE_THRIFT_DEFINE_ACCESSOR(i32Field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_inclEnumB
#define APACHE_THRIFT_ACCESSOR_inclEnumB
APACHE_THRIFT_DEFINE_ACCESSOR(inclEnumB);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_field
#define APACHE_THRIFT_ACCESSOR_field
APACHE_THRIFT_DEFINE_ACCESSOR(field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_shared_field
#define APACHE_THRIFT_ACCESSOR_shared_field
APACHE_THRIFT_DEFINE_ACCESSOR(shared_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_shared_const_field
#define APACHE_THRIFT_ACCESSOR_shared_const_field
APACHE_THRIFT_DEFINE_ACCESSOR(shared_const_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_opt_shared_field
#define APACHE_THRIFT_ACCESSOR_opt_shared_field
APACHE_THRIFT_DEFINE_ACCESSOR(opt_shared_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_opt_shared_const_field
#define APACHE_THRIFT_ACCESSOR_opt_shared_const_field
APACHE_THRIFT_DEFINE_ACCESSOR(opt_shared_const_field);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_boxed_field
#define APACHE_THRIFT_ACCESSOR_boxed_field
APACHE_THRIFT_DEFINE_ACCESSOR(boxed_field);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums
namespace some::ns {

/** Glean {"file": "thrift/compiler/test/fixtures/frozen-struct/src/module.thrift", "name": "EnumB", "kind": "enum" } */
enum class EnumB {
  EMPTY = 1,
};



} // namespace some::ns

namespace std {
template<> struct hash<::some::ns::EnumB> :
  ::apache::thrift::detail::enum_hash<::some::ns::EnumB> {};
} // std

namespace apache { namespace thrift {


template <> struct TEnumDataStorage<::some::ns::EnumB>;

template <> struct TEnumTraits<::some::ns::EnumB> {
  using type = ::some::ns::EnumB;

  static constexpr std::size_t const size = 1;
  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 "EnumB";
  }

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


}} // apache::thrift


// END declare_enums
// BEGIN forward_declare
namespace some::ns {
class ModuleA;
class ModuleB;
namespace detail {
class DirectlyAdapted;
} // namespace detail
class CppRef;
} // namespace some::ns
// 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<::some::ns::CppRef,::apache::thrift::type::field_id<3>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::some::ns::CppRef,::apache::thrift::type::field_id<4>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::some::ns::CppRef,::apache::thrift::type::field_id<5>> : std::true_type{};
} // namespace apache::thrift::detail::qualifier

// BEGIN hash_and_equal_to
// END hash_and_equal_to
namespace some::ns {
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/frozen-struct/src/module.thrift", "name": "ModuleA", "kind": "struct" } */
class ModuleA 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 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::i32Field,
    ::apache::thrift::ident::strField,
    ::apache::thrift::ident::listField,
    ::apache::thrift::ident::mapField,
    ::apache::thrift::ident::inclAField,
    ::apache::thrift::ident::inclBField
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::i16_t>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::i32_t>,
    ::apache::thrift::type::struct_t<::some::ns::IncludedA>,
    ::apache::thrift::type::struct_t<::some::ns::IncludedB>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 6;

  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 = ModuleA;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ModuleA();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ModuleA(apache::thrift::FragileConstructor, ::std::int32_t i32Field__arg, ::std::string strField__arg, ::std::vector<::std::int16_t> listField__arg, ::std::map<::std::string, ::std::int32_t> mapField__arg, ::some::ns::IncludedA inclAField__arg, ::some::ns::IncludedB inclBField__arg);

  ModuleA(ModuleA&&) noexcept;

  ModuleA(const ModuleA& src);


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

  ~ModuleA();

 private:
  ::std::int32_t __fbthrift_field_i32Field;
 private:
  ::std::string __fbthrift_field_strField;
 private:
  ::std::vector<::std::int16_t> __fbthrift_field_listField;
 private:
  ::std::map<::std::string, ::std::int32_t> __fbthrift_field_mapField;
 private:
  ::some::ns::IncludedA __fbthrift_field_inclAField;
 private:
  ::some::ns::IncludedB __fbthrift_field_inclBField;
 private:
  apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> inclAField_ref() const& {
    return {this->__fbthrift_field_inclAField, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> inclAField_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_inclAField), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclAField_ref() & {
    return {this->__fbthrift_field_inclAField, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> inclAField_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_inclAField), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> inclAField() const& {
    return {this->__fbthrift_field_inclAField, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> inclAField() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_inclAField), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclAField() & {
    return {this->__fbthrift_field_inclAField, __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclAField" } */
  template <typename..., typename T = ::some::ns::IncludedA>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> inclAField() && {
    return {static_cast<T&&>(this->__fbthrift_field_inclAField), __isset.at(4), __isset.bit(4)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> inclBField_ref() const& {
    return {this->__fbthrift_field_inclBField, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> inclBField_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_inclBField), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclBField_ref() & {
    return {this->__fbthrift_field_inclBField, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> inclBField_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_inclBField), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> inclBField() const& {
    return {this->__fbthrift_field_inclBField, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> inclBField() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_inclBField), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclBField() & {
    return {this->__fbthrift_field_inclBField, __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "inclBField" } */
  template <typename..., typename T = ::some::ns::IncludedB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> inclBField() && {
    return {static_cast<T&&>(this->__fbthrift_field_inclBField), __isset.at(5), __isset.bit(5)};
  }

  /** Glean { "field": "i32Field" } */
  ::std::int32_t get_i32Field() const {
    return __fbthrift_field_i32Field;
  }

  /** Glean { "field": "i32Field" } */
  [[deprecated("Use `FOO.i32Field() = BAR;` instead of `FOO.set_i32Field(BAR);`")]]
  ::std::int32_t& set_i32Field(::std::int32_t i32Field_) {
    i32Field_ref() = i32Field_;
    return __fbthrift_field_i32Field;
  }

  /** Glean { "field": "strField" } */
  const ::std::string& get_strField() const& {
    return __fbthrift_field_strField;
  }

  /** Glean { "field": "strField" } */
  ::std::string get_strField() && {
    return std::move(__fbthrift_field_strField);
  }

  /** Glean { "field": "strField" } */
  template <typename T_ModuleA_strField_struct_setter = ::std::string>
  [[deprecated("Use `FOO.strField() = BAR;` instead of `FOO.set_strField(BAR);`")]]
  ::std::string& set_strField(T_ModuleA_strField_struct_setter&& strField_) {
    strField_ref() = std::forward<T_ModuleA_strField_struct_setter>(strField_);
    return __fbthrift_field_strField;
  }
  /** Glean { "field": "listField" } */
  const ::std::vector<::std::int16_t>& get_listField() const&;
  /** Glean { "field": "listField" } */
  ::std::vector<::std::int16_t> get_listField() &&;

  /** Glean { "field": "listField" } */
  template <typename T_ModuleA_listField_struct_setter = ::std::vector<::std::int16_t>>
  [[deprecated("Use `FOO.listField() = BAR;` instead of `FOO.set_listField(BAR);`")]]
  ::std::vector<::std::int16_t>& set_listField(T_ModuleA_listField_struct_setter&& listField_) {
    listField_ref() = std::forward<T_ModuleA_listField_struct_setter>(listField_);
    return __fbthrift_field_listField;
  }
  /** Glean { "field": "mapField" } */
  const ::std::map<::std::string, ::std::int32_t>& get_mapField() const&;
  /** Glean { "field": "mapField" } */
  ::std::map<::std::string, ::std::int32_t> get_mapField() &&;

  /** Glean { "field": "mapField" } */
  template <typename T_ModuleA_mapField_struct_setter = ::std::map<::std::string, ::std::int32_t>>
  [[deprecated("Use `FOO.mapField() = BAR;` instead of `FOO.set_mapField(BAR);`")]]
  ::std::map<::std::string, ::std::int32_t>& set_mapField(T_ModuleA_mapField_struct_setter&& mapField_) {
    mapField_ref() = std::forward<T_ModuleA_mapField_struct_setter>(mapField_);
    return __fbthrift_field_mapField;
  }
  /** Glean { "field": "inclAField" } */
  const ::some::ns::IncludedA& get_inclAField() const&;
  /** Glean { "field": "inclAField" } */
  ::some::ns::IncludedA get_inclAField() &&;

  /** Glean { "field": "inclAField" } */
  template <typename T_ModuleA_inclAField_struct_setter = ::some::ns::IncludedA>
  [[deprecated("Use `FOO.inclAField() = BAR;` instead of `FOO.set_inclAField(BAR);`")]]
  ::some::ns::IncludedA& set_inclAField(T_ModuleA_inclAField_struct_setter&& inclAField_) {
    inclAField_ref() = std::forward<T_ModuleA_inclAField_struct_setter>(inclAField_);
    return __fbthrift_field_inclAField;
  }
  /** Glean { "field": "inclBField" } */
  const ::some::ns::IncludedB& get_inclBField() const&;
  /** Glean { "field": "inclBField" } */
  ::some::ns::IncludedB get_inclBField() &&;

  /** Glean { "field": "inclBField" } */
  template <typename T_ModuleA_inclBField_struct_setter = ::some::ns::IncludedB>
  [[deprecated("Use `FOO.inclBField() = BAR;` instead of `FOO.set_inclBField(BAR);`")]]
  ::some::ns::IncludedB& set_inclBField(T_ModuleA_inclBField_struct_setter&& inclBField_) {
    inclBField_ref() = std::forward<T_ModuleA_inclBField_struct_setter>(inclBField_);
    return __fbthrift_field_inclBField;
  }

  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<ModuleA>;
  friend void swap(ModuleA& a, ModuleA& b);
};

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


/** Glean {"file": "thrift/compiler/test/fixtures/frozen-struct/src/module.thrift", "name": "ModuleB", "kind": "struct" } */
class ModuleB 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 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::i32Field,
    ::apache::thrift::ident::inclEnumB
  >;

  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::enum_t<::some::ns::EnumB>
  >;

  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 = ModuleB;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  ModuleB() :
      __fbthrift_field_i32Field(),
      __fbthrift_field_inclEnumB() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ModuleB(apache::thrift::FragileConstructor, ::std::int32_t i32Field__arg, ::some::ns::EnumB inclEnumB__arg);

  ModuleB(ModuleB&&) = default;

  ModuleB(const ModuleB&) = default;


  ModuleB& operator=(ModuleB&&) = default;

  ModuleB& operator=(const ModuleB&) = default;
 private:
  ::std::int32_t __fbthrift_field_i32Field;
 private:
  ::some::ns::EnumB __fbthrift_field_inclEnumB;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "inclEnumB" } */
  template <typename..., typename T = ::some::ns::EnumB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> inclEnumB_ref() const& {
    return {this->__fbthrift_field_inclEnumB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "inclEnumB" } */
  template <typename..., typename T = ::some::ns::EnumB>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> inclEnumB_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_inclEnumB), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "inclEnumB" } */
  template <typename..., typename T = ::some::ns::EnumB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclEnumB_ref() & {
    return {this->__fbthrift_field_inclEnumB, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "inclEnumB" } */
  template <typename..., typename T = ::some::ns::EnumB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> inclEnumB_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_inclEnumB), __isset.at(1), __isset.bit(1)};
  }

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

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

  /** Glean { "field": "inclEnumB" } */
  template <typename..., typename T = ::some::ns::EnumB>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> inclEnumB() & {
    return {this->__fbthrift_field_inclEnumB, __isset.at(1), __isset.bit(1)};
  }

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

  /** Glean { "field": "i32Field" } */
  ::std::int32_t get_i32Field() const {
    return __fbthrift_field_i32Field;
  }

  /** Glean { "field": "i32Field" } */
  [[deprecated("Use `FOO.i32Field() = BAR;` instead of `FOO.set_i32Field(BAR);`")]]
  ::std::int32_t& set_i32Field(::std::int32_t i32Field_) {
    i32Field_ref() = i32Field_;
    return __fbthrift_field_i32Field;
  }

  /** Glean { "field": "inclEnumB" } */
  ::some::ns::EnumB get_inclEnumB() const {
    return __fbthrift_field_inclEnumB;
  }

  /** Glean { "field": "inclEnumB" } */
  [[deprecated("Use `FOO.inclEnumB() = BAR;` instead of `FOO.set_inclEnumB(BAR);`")]]
  ::some::ns::EnumB& set_inclEnumB(::some::ns::EnumB inclEnumB_) {
    inclEnumB_ref() = inclEnumB_;
    return __fbthrift_field_inclEnumB;
  }

  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<ModuleB>;
  friend void swap(ModuleB& a, ModuleB& b);
};

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


namespace detail {
/** Glean {"file": "thrift/compiler/test/fixtures/frozen-struct/src/module.thrift", "name": "DirectlyAdapted", "kind": "struct" } */
class DirectlyAdapted 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 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 = DirectlyAdapted;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  DirectlyAdapted() :
      __fbthrift_field_field() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  DirectlyAdapted(apache::thrift::FragileConstructor, ::std::int32_t field__arg);

  DirectlyAdapted(DirectlyAdapted&&) = default;

  DirectlyAdapted(const DirectlyAdapted&) = default;


  DirectlyAdapted& operator=(DirectlyAdapted&&) = default;

  DirectlyAdapted& operator=(const DirectlyAdapted&) = 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 DirectlyAdapted&) const;
  bool operator<(const DirectlyAdapted&) 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<DirectlyAdapted>;
  friend void swap(DirectlyAdapted& a, DirectlyAdapted& b);
};

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

using DirectlyAdapted = ::apache::thrift::adapt_detail::adapted_t<::my::Adapter, ::some::ns::detail::DirectlyAdapted>;


/** Glean {"file": "thrift/compiler/test/fixtures/frozen-struct/src/module.thrift", "name": "CppRef", "kind": "struct" } */
class CppRef 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 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::shared_field,
    ::apache::thrift::ident::shared_const_field,
    ::apache::thrift::ident::opt_shared_field,
    ::apache::thrift::ident::opt_shared_const_field,
    ::apache::thrift::ident::boxed_field
  >;

  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::i32_t,
    ::apache::thrift::type::i32_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 = 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 = CppRef;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;
  static constexpr bool __fbthrift_cpp2_uses_op_encode =
    false;


 public:

  CppRef();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CppRef(apache::thrift::FragileConstructor, ::std::shared_ptr<::std::int32_t> shared_field__arg, ::std::shared_ptr<const ::std::int32_t> shared_const_field__arg, ::std::shared_ptr<::std::int32_t> opt_shared_field__arg, ::std::shared_ptr<const ::std::int32_t> opt_shared_const_field__arg, ::apache::thrift::detail::boxed_value_ptr<::std::int32_t> boxed_field__arg);

  CppRef(CppRef&&) noexcept;

  CppRef(const CppRef& src);


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

  ~CppRef();

 private:
  ::std::shared_ptr<::std::int32_t> __fbthrift_field_shared_field;
 private:
  ::std::shared_ptr<const ::std::int32_t> __fbthrift_field_shared_const_field;
 private:
  ::std::shared_ptr<::std::int32_t> __fbthrift_field_opt_shared_field;
 private:
  ::std::shared_ptr<const ::std::int32_t> __fbthrift_field_opt_shared_const_field;
 private:
  ::apache::thrift::detail::boxed_value_ptr<::std::int32_t> __fbthrift_field_boxed_field;

 public:

  bool operator==(const CppRef&) const;
  bool operator<(const CppRef&) const;
  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T& shared_field_ref() & {
    return __fbthrift_field_shared_field;
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T& shared_field_ref() const& {
    return __fbthrift_field_shared_field;
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T&& shared_field_ref() && {
    return static_cast<T&&>(__fbthrift_field_shared_field);
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T&& shared_field_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_shared_field);
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T& shared_field() & {
    return __fbthrift_field_shared_field;
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T& shared_field() const& {
    return __fbthrift_field_shared_field;
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T&& shared_field() && {
    return static_cast<T&&>(__fbthrift_field_shared_field);
  }

  /** Glean { "field": "shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T&& shared_field() const&& {
    return static_cast<const T&&>(__fbthrift_field_shared_field);
  }
  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T& shared_const_field_ref() & {
    return __fbthrift_field_shared_const_field;
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T& shared_const_field_ref() const& {
    return __fbthrift_field_shared_const_field;
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T&& shared_const_field_ref() && {
    return static_cast<T&&>(__fbthrift_field_shared_const_field);
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T&& shared_const_field_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_shared_const_field);
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T& shared_const_field() & {
    return __fbthrift_field_shared_const_field;
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T& shared_const_field() const& {
    return __fbthrift_field_shared_const_field;
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T&& shared_const_field() && {
    return static_cast<T&&>(__fbthrift_field_shared_const_field);
  }

  /** Glean { "field": "shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T&& shared_const_field() const&& {
    return static_cast<const T&&>(__fbthrift_field_shared_const_field);
  }
  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T& opt_shared_field_ref() & {
    return __fbthrift_field_opt_shared_field;
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T& opt_shared_field_ref() const& {
    return __fbthrift_field_opt_shared_field;
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T&& opt_shared_field_ref() && {
    return static_cast<T&&>(__fbthrift_field_opt_shared_field);
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T&& opt_shared_field_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_opt_shared_field);
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T& opt_shared_field() & {
    return __fbthrift_field_opt_shared_field;
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T& opt_shared_field() const& {
    return __fbthrift_field_opt_shared_field;
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE T&& opt_shared_field() && {
    return static_cast<T&&>(__fbthrift_field_opt_shared_field);
  }

  /** Glean { "field": "opt_shared_field" } */
  template <typename ..., typename T = ::std::shared_ptr<::std::int32_t>>
  FOLLY_ERASE const T&& opt_shared_field() const&& {
    return static_cast<const T&&>(__fbthrift_field_opt_shared_field);
  }
  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T& opt_shared_const_field_ref() & {
    return __fbthrift_field_opt_shared_const_field;
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T& opt_shared_const_field_ref() const& {
    return __fbthrift_field_opt_shared_const_field;
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T&& opt_shared_const_field_ref() && {
    return static_cast<T&&>(__fbthrift_field_opt_shared_const_field);
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T&& opt_shared_const_field_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_opt_shared_const_field);
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T& opt_shared_const_field() & {
    return __fbthrift_field_opt_shared_const_field;
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T& opt_shared_const_field() const& {
    return __fbthrift_field_opt_shared_const_field;
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE T&& opt_shared_const_field() && {
    return static_cast<T&&>(__fbthrift_field_opt_shared_const_field);
  }

  /** Glean { "field": "opt_shared_const_field" } */
  template <typename ..., typename T = ::std::shared_ptr<const ::std::int32_t>>
  FOLLY_ERASE const T&& opt_shared_const_field() const&& {
    return static_cast<const T&&>(__fbthrift_field_opt_shared_const_field);
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> boxed_field_ref() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_boxed_field};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> boxed_field_ref() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_boxed_field)};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> boxed_field_ref() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_boxed_field};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> boxed_field_ref() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_boxed_field)};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&> boxed_field() const& {
    return ::apache::thrift::optional_boxed_field_ref<const T&>{this->__fbthrift_field_boxed_field};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<const T&&> boxed_field() const&& {
    return ::apache::thrift::optional_boxed_field_ref<const T&&>{static_cast<const T&&>(this->__fbthrift_field_boxed_field)};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&> boxed_field() & {
    return ::apache::thrift::optional_boxed_field_ref<T&>{this->__fbthrift_field_boxed_field};
  }

  /** Glean { "field": "boxed_field" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::std::int32_t>>
  FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref<T&&> boxed_field() && {
    return ::apache::thrift::optional_boxed_field_ref<T&&>{static_cast<T&&>(this->__fbthrift_field_boxed_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<CppRef>;
  friend void swap(CppRef& a, CppRef& b);
};

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


} // namespace some::ns
