/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.01.22.00/thrift/lib/thrift/metadata.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>



namespace apache {
namespace thrift {
namespace ident {
struct key;
struct value;
struct cv_bool;
struct cv_integer;
struct cv_double;
struct cv_string;
struct cv_map;
struct cv_list;
struct cv_struct;
struct type;
struct fields;
struct valueType;
struct valueType;
struct keyType;
struct valueType;
struct name;
struct name;
struct name;
struct name;
struct underlyingType;
struct structured_annotations;
struct elemType;
struct initialResponseType;
struct elemType;
struct finalResponseType;
struct initialResponseType;
struct t_primitive;
struct t_list;
struct t_set;
struct t_map;
struct t_enum;
struct t_struct;
struct t_union;
struct t_typedef;
struct t_stream;
struct t_sink;
struct name;
struct elements;
struct structured_annotations;
struct id;
struct type;
struct name;
struct is_optional;
struct structured_annotations;
struct unstructured_annotations;
struct name;
struct fields;
struct is_union;
struct structured_annotations;
struct name;
struct fields;
struct structured_annotations;
struct name;
struct return_type;
struct arguments;
struct exceptions;
struct is_oneway;
struct structured_annotations;
struct name;
struct functions;
struct parent;
struct structured_annotations;
struct name;
struct service_info;
struct module;
struct service_name;
struct module;
struct context;
struct metadata;
struct services;
struct enums;
struct structs;
struct exceptions;
struct services;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_key
#define APACHE_THRIFT_ACCESSOR_key
APACHE_THRIFT_DEFINE_ACCESSOR(key);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_value
#define APACHE_THRIFT_ACCESSOR_value
APACHE_THRIFT_DEFINE_ACCESSOR(value);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_bool
#define APACHE_THRIFT_ACCESSOR_cv_bool
APACHE_THRIFT_DEFINE_ACCESSOR(cv_bool);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_integer
#define APACHE_THRIFT_ACCESSOR_cv_integer
APACHE_THRIFT_DEFINE_ACCESSOR(cv_integer);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_double
#define APACHE_THRIFT_ACCESSOR_cv_double
APACHE_THRIFT_DEFINE_ACCESSOR(cv_double);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_string
#define APACHE_THRIFT_ACCESSOR_cv_string
APACHE_THRIFT_DEFINE_ACCESSOR(cv_string);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_map
#define APACHE_THRIFT_ACCESSOR_cv_map
APACHE_THRIFT_DEFINE_ACCESSOR(cv_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_list
#define APACHE_THRIFT_ACCESSOR_cv_list
APACHE_THRIFT_DEFINE_ACCESSOR(cv_list);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_cv_struct
#define APACHE_THRIFT_ACCESSOR_cv_struct
APACHE_THRIFT_DEFINE_ACCESSOR(cv_struct);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_valueType
#define APACHE_THRIFT_ACCESSOR_valueType
APACHE_THRIFT_DEFINE_ACCESSOR(valueType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_valueType
#define APACHE_THRIFT_ACCESSOR_valueType
APACHE_THRIFT_DEFINE_ACCESSOR(valueType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_keyType
#define APACHE_THRIFT_ACCESSOR_keyType
APACHE_THRIFT_DEFINE_ACCESSOR(keyType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_valueType
#define APACHE_THRIFT_ACCESSOR_valueType
APACHE_THRIFT_DEFINE_ACCESSOR(valueType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_underlyingType
#define APACHE_THRIFT_ACCESSOR_underlyingType
APACHE_THRIFT_DEFINE_ACCESSOR(underlyingType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_elemType
#define APACHE_THRIFT_ACCESSOR_elemType
APACHE_THRIFT_DEFINE_ACCESSOR(elemType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_initialResponseType
#define APACHE_THRIFT_ACCESSOR_initialResponseType
APACHE_THRIFT_DEFINE_ACCESSOR(initialResponseType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_elemType
#define APACHE_THRIFT_ACCESSOR_elemType
APACHE_THRIFT_DEFINE_ACCESSOR(elemType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_finalResponseType
#define APACHE_THRIFT_ACCESSOR_finalResponseType
APACHE_THRIFT_DEFINE_ACCESSOR(finalResponseType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_initialResponseType
#define APACHE_THRIFT_ACCESSOR_initialResponseType
APACHE_THRIFT_DEFINE_ACCESSOR(initialResponseType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_primitive
#define APACHE_THRIFT_ACCESSOR_t_primitive
APACHE_THRIFT_DEFINE_ACCESSOR(t_primitive);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_list
#define APACHE_THRIFT_ACCESSOR_t_list
APACHE_THRIFT_DEFINE_ACCESSOR(t_list);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_set
#define APACHE_THRIFT_ACCESSOR_t_set
APACHE_THRIFT_DEFINE_ACCESSOR(t_set);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_map
#define APACHE_THRIFT_ACCESSOR_t_map
APACHE_THRIFT_DEFINE_ACCESSOR(t_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_enum
#define APACHE_THRIFT_ACCESSOR_t_enum
APACHE_THRIFT_DEFINE_ACCESSOR(t_enum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_struct
#define APACHE_THRIFT_ACCESSOR_t_struct
APACHE_THRIFT_DEFINE_ACCESSOR(t_struct);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_union
#define APACHE_THRIFT_ACCESSOR_t_union
APACHE_THRIFT_DEFINE_ACCESSOR(t_union);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_typedef
#define APACHE_THRIFT_ACCESSOR_t_typedef
APACHE_THRIFT_DEFINE_ACCESSOR(t_typedef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_stream
#define APACHE_THRIFT_ACCESSOR_t_stream
APACHE_THRIFT_DEFINE_ACCESSOR(t_stream);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_t_sink
#define APACHE_THRIFT_ACCESSOR_t_sink
APACHE_THRIFT_DEFINE_ACCESSOR(t_sink);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_elements
#define APACHE_THRIFT_ACCESSOR_elements
APACHE_THRIFT_DEFINE_ACCESSOR(elements);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_id
#define APACHE_THRIFT_ACCESSOR_id
APACHE_THRIFT_DEFINE_ACCESSOR(id);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_is_optional
#define APACHE_THRIFT_ACCESSOR_is_optional
APACHE_THRIFT_DEFINE_ACCESSOR(is_optional);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_unstructured_annotations
#define APACHE_THRIFT_ACCESSOR_unstructured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(unstructured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_is_union
#define APACHE_THRIFT_ACCESSOR_is_union
APACHE_THRIFT_DEFINE_ACCESSOR(is_union);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_return_type
#define APACHE_THRIFT_ACCESSOR_return_type
APACHE_THRIFT_DEFINE_ACCESSOR(return_type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_arguments
#define APACHE_THRIFT_ACCESSOR_arguments
APACHE_THRIFT_DEFINE_ACCESSOR(arguments);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_exceptions
#define APACHE_THRIFT_ACCESSOR_exceptions
APACHE_THRIFT_DEFINE_ACCESSOR(exceptions);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_is_oneway
#define APACHE_THRIFT_ACCESSOR_is_oneway
APACHE_THRIFT_DEFINE_ACCESSOR(is_oneway);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_functions
#define APACHE_THRIFT_ACCESSOR_functions
APACHE_THRIFT_DEFINE_ACCESSOR(functions);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_parent
#define APACHE_THRIFT_ACCESSOR_parent
APACHE_THRIFT_DEFINE_ACCESSOR(parent);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structured_annotations
#define APACHE_THRIFT_ACCESSOR_structured_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(structured_annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_service_info
#define APACHE_THRIFT_ACCESSOR_service_info
APACHE_THRIFT_DEFINE_ACCESSOR(service_info);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_module
#define APACHE_THRIFT_ACCESSOR_module
APACHE_THRIFT_DEFINE_ACCESSOR(module);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_service_name
#define APACHE_THRIFT_ACCESSOR_service_name
APACHE_THRIFT_DEFINE_ACCESSOR(service_name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_module
#define APACHE_THRIFT_ACCESSOR_module
APACHE_THRIFT_DEFINE_ACCESSOR(module);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_context
#define APACHE_THRIFT_ACCESSOR_context
APACHE_THRIFT_DEFINE_ACCESSOR(context);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_metadata
#define APACHE_THRIFT_ACCESSOR_metadata
APACHE_THRIFT_DEFINE_ACCESSOR(metadata);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_services
#define APACHE_THRIFT_ACCESSOR_services
APACHE_THRIFT_DEFINE_ACCESSOR(services);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_enums
#define APACHE_THRIFT_ACCESSOR_enums
APACHE_THRIFT_DEFINE_ACCESSOR(enums);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structs
#define APACHE_THRIFT_ACCESSOR_structs
APACHE_THRIFT_DEFINE_ACCESSOR(structs);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_exceptions
#define APACHE_THRIFT_ACCESSOR_exceptions
APACHE_THRIFT_DEFINE_ACCESSOR(exceptions);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_services
#define APACHE_THRIFT_ACCESSOR_services
APACHE_THRIFT_DEFINE_ACCESSOR(services);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums
namespace apache { namespace thrift { namespace metadata {

enum class ThriftPrimitiveType {
  THRIFT_BOOL_TYPE = 1,
  THRIFT_BYTE_TYPE = 2,
  THRIFT_I16_TYPE = 3,
  THRIFT_I32_TYPE = 4,
  THRIFT_I64_TYPE = 5,
  THRIFT_FLOAT_TYPE = 6,
  THRIFT_DOUBLE_TYPE = 7,
  THRIFT_BINARY_TYPE = 8,
  THRIFT_STRING_TYPE = 9,
  THRIFT_VOID_TYPE = 10,
};



}}} // apache::thrift::metadata

namespace std {
template<> struct hash<::apache::thrift::metadata::ThriftPrimitiveType> :
  ::apache::thrift::detail::enum_hash<::apache::thrift::metadata::ThriftPrimitiveType> {};
} // std

namespace apache { namespace thrift {


template <> struct TEnumDataStorage<::apache::thrift::metadata::ThriftPrimitiveType>;

template <> struct TEnumTraits<::apache::thrift::metadata::ThriftPrimitiveType> {
  using type = ::apache::thrift::metadata::ThriftPrimitiveType;

  static constexpr std::size_t const size = 10;
  static folly::Range<type const*> const values;
  static folly::Range<folly::StringPiece const*> const names;

  static bool findName(type value, folly::StringPiece* out) noexcept;
  static bool findValue(folly::StringPiece name, type* out) noexcept;

#if FOLLY_HAS_STRING_VIEW
  static bool findName(type value, std::string_view* out) noexcept {
    folly::StringPiece outp;
    return findName(value, &outp) && ((*out = outp), true);
  }
#endif
  static char const* findName(type value) noexcept {
    folly::StringPiece ret;
    (void)findName(value, &ret);
    return ret.data();
  }
  static constexpr type min() { return type::THRIFT_BOOL_TYPE; }
  static constexpr type max() { return type::THRIFT_VOID_TYPE; }
};


}} // apache::thrift


// END declare_enums
// BEGIN forward_declare
namespace apache { namespace thrift { namespace metadata {
class ThriftConstValuePair;
class ThriftConstValue;
class ThriftConstStruct;
class ThriftListType;
class ThriftSetType;
class ThriftMapType;
class ThriftEnumType;
class ThriftStructType;
class ThriftUnionType;
class ThriftTypedefType;
class ThriftStreamType;
class ThriftSinkType;
class ThriftType;
class ThriftEnum;
class ThriftField;
class ThriftStruct;
class ThriftException;
class ThriftFunction;
class ThriftService;
class ThriftModuleContext;
class ThriftServiceContext;
class ThriftServiceContextRef;
class ThriftServiceMetadataResponse;
class ThriftMetadata;
}}} // apache::thrift::metadata
// 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::metadata::ThriftListType,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftSetType,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftMapType,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftMapType,::apache::thrift::type::field_id<2>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftTypedefType,::apache::thrift::type::field_id<2>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftStreamType,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftStreamType,::apache::thrift::type::field_id<2>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftSinkType,::apache::thrift::type::field_id<1>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftSinkType,::apache::thrift::type::field_id<2>> : std::true_type{};
template<>
struct is_cpp_ref_field_optional<::apache::thrift::metadata::ThriftSinkType,::apache::thrift::type::field_id<3>> : std::true_type{};
} // namespace apache::thrift::detail::qualifier

// BEGIN hash_and_equal_to
// END hash_and_equal_to
namespace apache { namespace thrift { namespace metadata {
using ::apache::thrift::detail::operator!=;
using ::apache::thrift::detail::operator>;
using ::apache::thrift::detail::operator<=;
using ::apache::thrift::detail::operator>=;


class ThriftStructType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name
  >;

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


 public:

  ThriftStructType();

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

  ThriftStructType(ThriftStructType&&) noexcept;

  ThriftStructType(const ThriftStructType& src);


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

  ~ThriftStructType();

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

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftStructType_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftStructType_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftStructType_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

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

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


class ThriftConstStruct 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::fields
  >;

  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::metadata::ThriftStructType>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftConstValue>>
  >;

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


 public:

  ThriftConstStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftConstStruct(apache::thrift::FragileConstructor, ::apache::thrift::metadata::ThriftStructType type__arg, ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue> fields__arg);

  ThriftConstStruct(ThriftConstStruct&&) noexcept;

  ThriftConstStruct(const ThriftConstStruct& src);


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

  ~ThriftConstStruct();

 private:
  ::apache::thrift::metadata::ThriftStructType __fbthrift_field_type;
 private:
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue> __fbthrift_field_fields;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> type_ref() const& {
    return {this->__fbthrift_field_type, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> type_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_type), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> type_ref() & {
    return {this->__fbthrift_field_type, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> type_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_type), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> type() const& {
    return {this->__fbthrift_field_type, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> type() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_type), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> type() & {
    return {this->__fbthrift_field_type, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> type() && {
    return {static_cast<T&&>(this->__fbthrift_field_type), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields_ref() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields_ref() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }
  const ::apache::thrift::metadata::ThriftStructType& get_type() const&;
  ::apache::thrift::metadata::ThriftStructType get_type() &&;

  template <typename T_ThriftConstStruct_type_struct_setter = ::apache::thrift::metadata::ThriftStructType>
  [[deprecated("Use `FOO.type_ref() = BAR;` instead of `FOO.set_type(BAR);`")]]
  ::apache::thrift::metadata::ThriftStructType& set_type(T_ThriftConstStruct_type_struct_setter&& type_) {
    type_ref() = std::forward<T_ThriftConstStruct_type_struct_setter>(type_);
    return __fbthrift_field_type;
  }
  const ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>& get_fields() const&;
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue> get_fields() &&;

  template <typename T_ThriftConstStruct_fields_struct_setter = ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>>
  [[deprecated("Use `FOO.fields_ref() = BAR;` instead of `FOO.set_fields(BAR);`")]]
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftConstValue>& set_fields(T_ThriftConstStruct_fields_struct_setter&& fields_) {
    fields_ref() = std::forward<T_ThriftConstStruct_fields_struct_setter>(fields_);
    return __fbthrift_field_fields;
  }

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

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


class ThriftConstValue 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::cv_bool,
    ::apache::thrift::ident::cv_integer,
    ::apache::thrift::ident::cv_double,
    ::apache::thrift::ident::cv_string,
    ::apache::thrift::ident::cv_map,
    ::apache::thrift::ident::cv_list,
    ::apache::thrift::ident::cv_struct
  >;

  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::bool_t,
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::double_t,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstValuePair>>,
    ::apache::thrift::type::list<::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftConstValue>>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>
  >;

  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_destruct();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ThriftConstValue;
  static constexpr bool __fbthrift_cpp2_is_union =
    true;


 public:
  enum Type : int {
    __EMPTY__ = 0,
    cv_bool = 1,
    cv_integer = 2,
    cv_double = 3,
    cv_string = 4,
    cv_map = 5,
    cv_list = 6,
    cv_struct = 7,
  } ;

  ThriftConstValue()
      : type_(folly::to_underlying(Type::__EMPTY__)) {}

  ThriftConstValue(ThriftConstValue&& rhs) noexcept
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::cv_bool:
      {
        set_cv_bool(std::move(rhs.value_.cv_bool));
        break;
      }
      case Type::cv_integer:
      {
        set_cv_integer(std::move(rhs.value_.cv_integer));
        break;
      }
      case Type::cv_double:
      {
        set_cv_double(std::move(rhs.value_.cv_double));
        break;
      }
      case Type::cv_string:
      {
        set_cv_string(std::move(rhs.value_.cv_string));
        break;
      }
      case Type::cv_map:
      {
        set_cv_map(std::move(rhs.value_.cv_map));
        break;
      }
      case Type::cv_list:
      {
        set_cv_list(std::move(rhs.value_.cv_list));
        break;
      }
      case Type::cv_struct:
      {
        set_cv_struct(std::move(rhs.value_.cv_struct));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  ThriftConstValue(const ThriftConstValue& rhs)
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::cv_bool:
      {
        set_cv_bool(rhs.value_.cv_bool);
        break;
      }
      case Type::cv_integer:
      {
        set_cv_integer(rhs.value_.cv_integer);
        break;
      }
      case Type::cv_double:
      {
        set_cv_double(rhs.value_.cv_double);
        break;
      }
      case Type::cv_string:
      {
        set_cv_string(rhs.value_.cv_string);
        break;
      }
      case Type::cv_map:
      {
        set_cv_map(rhs.value_.cv_map);
        break;
      }
      case Type::cv_list:
      {
        set_cv_list(rhs.value_.cv_list);
        break;
      }
      case Type::cv_struct:
      {
        set_cv_struct(rhs.value_.cv_struct);
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
  }

  ThriftConstValue& operator=(ThriftConstValue&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    __fbthrift_clear();
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return *this;
      }
      case Type::cv_bool:
      {
        set_cv_bool(std::move(rhs.value_.cv_bool));
        break;
      }
      case Type::cv_integer:
      {
        set_cv_integer(std::move(rhs.value_.cv_integer));
        break;
      }
      case Type::cv_double:
      {
        set_cv_double(std::move(rhs.value_.cv_double));
        break;
      }
      case Type::cv_string:
      {
        set_cv_string(std::move(rhs.value_.cv_string));
        break;
      }
      case Type::cv_map:
      {
        set_cv_map(std::move(rhs.value_.cv_map));
        break;
      }
      case Type::cv_list:
      {
        set_cv_list(std::move(rhs.value_.cv_list));
        break;
      }
      case Type::cv_struct:
      {
        set_cv_struct(std::move(rhs.value_.cv_struct));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  ThriftConstValue& operator=(const ThriftConstValue& rhs) {
    if (this == &rhs) { return *this; }
    __fbthrift_clear();
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return *this;
      }
      case Type::cv_bool:
      {
        set_cv_bool(rhs.value_.cv_bool);
        break;
      }
      case Type::cv_integer:
      {
        set_cv_integer(rhs.value_.cv_integer);
        break;
      }
      case Type::cv_double:
      {
        set_cv_double(rhs.value_.cv_double);
        break;
      }
      case Type::cv_string:
      {
        set_cv_string(rhs.value_.cv_string);
        break;
      }
      case Type::cv_map:
      {
        set_cv_map(rhs.value_.cv_map);
        break;
      }
      case Type::cv_list:
      {
        set_cv_list(rhs.value_.cv_list);
        break;
      }
      case Type::cv_struct:
      {
        set_cv_struct(rhs.value_.cv_struct);
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    return *this;
  }

  ~ThriftConstValue();

  union storage_type {
    bool cv_bool;
    ::std::int64_t cv_integer;
    double cv_double;
    ::std::string cv_string;
    ::std::vector<::apache::thrift::metadata::ThriftConstValuePair> cv_map;
    ::std::vector<::apache::thrift::metadata::ThriftConstValue> cv_list;
    ::apache::thrift::metadata::ThriftConstStruct cv_struct;

    storage_type() {}
    ~storage_type() {}
  } ;

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

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  bool& set_cv_bool(bool t = bool()) {
    using T0 = bool;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_bool);
    ::new (std::addressof(value_.cv_bool)) T(t);
    return value_.cv_bool;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::int64_t& set_cv_integer(::std::int64_t t = ::std::int64_t()) {
    using T0 = ::std::int64_t;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_integer);
    ::new (std::addressof(value_.cv_integer)) T(t);
    return value_.cv_integer;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  double& set_cv_double(double t = double()) {
    using T0 = double;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_double);
    ::new (std::addressof(value_.cv_double)) T(t);
    return value_.cv_double;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::string& set_cv_string(::std::string const &t) {
    using T0 = ::std::string;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_string);
    ::new (std::addressof(value_.cv_string)) T(t);
    return value_.cv_string;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::string& set_cv_string(::std::string&& t) {
    using T0 = ::std::string;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_string);
    ::new (std::addressof(value_.cv_string)) T(std::move(t));
    return value_.cv_string;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::std::string, T...>> ::std::string& set_cv_string(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_string);
    ::new (std::addressof(value_.cv_string)) ::std::string(std::forward<T>(t)...);
    return value_.cv_string;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>& set_cv_map(::std::vector<::apache::thrift::metadata::ThriftConstValuePair> const &t) {
    using T0 = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_map);
    ::new (std::addressof(value_.cv_map)) T(t);
    return value_.cv_map;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>& set_cv_map(::std::vector<::apache::thrift::metadata::ThriftConstValuePair>&& t) {
    using T0 = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_map);
    ::new (std::addressof(value_.cv_map)) T(std::move(t));
    return value_.cv_map;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::std::vector<::apache::thrift::metadata::ThriftConstValuePair>, T...>> ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>& set_cv_map(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_map);
    ::new (std::addressof(value_.cv_map)) ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>(std::forward<T>(t)...);
    return value_.cv_map;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::vector<::apache::thrift::metadata::ThriftConstValue>& set_cv_list(::std::vector<::apache::thrift::metadata::ThriftConstValue> const &t) {
    using T0 = ::std::vector<::apache::thrift::metadata::ThriftConstValue>;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_list);
    ::new (std::addressof(value_.cv_list)) T(t);
    return value_.cv_list;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::std::vector<::apache::thrift::metadata::ThriftConstValue>& set_cv_list(::std::vector<::apache::thrift::metadata::ThriftConstValue>&& t) {
    using T0 = ::std::vector<::apache::thrift::metadata::ThriftConstValue>;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_list);
    ::new (std::addressof(value_.cv_list)) T(std::move(t));
    return value_.cv_list;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::std::vector<::apache::thrift::metadata::ThriftConstValue>, T...>> ::std::vector<::apache::thrift::metadata::ThriftConstValue>& set_cv_list(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_list);
    ::new (std::addressof(value_.cv_list)) ::std::vector<::apache::thrift::metadata::ThriftConstValue>(std::forward<T>(t)...);
    return value_.cv_list;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftConstStruct& set_cv_struct(::apache::thrift::metadata::ThriftConstStruct const &t) {
    using T0 = ::apache::thrift::metadata::ThriftConstStruct;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_struct);
    ::new (std::addressof(value_.cv_struct)) T(t);
    return value_.cv_struct;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftConstStruct& set_cv_struct(::apache::thrift::metadata::ThriftConstStruct&& t) {
    using T0 = ::apache::thrift::metadata::ThriftConstStruct;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_struct);
    ::new (std::addressof(value_.cv_struct)) T(std::move(t));
    return value_.cv_struct;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftConstStruct, T...>> ::apache::thrift::metadata::ThriftConstStruct& set_cv_struct(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::cv_struct);
    ::new (std::addressof(value_.cv_struct)) ::apache::thrift::metadata::ThriftConstStruct(std::forward<T>(t)...);
    return value_.cv_struct;
  }

  bool const& get_cv_bool() const {
    if (getType() != Type::cv_bool) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_bool;
  }

  ::std::int64_t const& get_cv_integer() const {
    if (getType() != Type::cv_integer) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_integer;
  }

  double const& get_cv_double() const {
    if (getType() != Type::cv_double) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_double;
  }

  ::std::string const& get_cv_string() const {
    if (getType() != Type::cv_string) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_string;
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValuePair> const& get_cv_map() const {
    if (getType() != Type::cv_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_map;
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValue> const& get_cv_list() const {
    if (getType() != Type::cv_list) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_list;
  }

  ::apache::thrift::metadata::ThriftConstStruct const& get_cv_struct() const {
    if (getType() != Type::cv_struct) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.cv_struct;
  }

  bool& mutable_cv_bool() {
    assert(getType() == Type::cv_bool);
    return value_.cv_bool;
  }

  ::std::int64_t& mutable_cv_integer() {
    assert(getType() == Type::cv_integer);
    return value_.cv_integer;
  }

  double& mutable_cv_double() {
    assert(getType() == Type::cv_double);
    return value_.cv_double;
  }

  ::std::string& mutable_cv_string() {
    assert(getType() == Type::cv_string);
    return value_.cv_string;
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>& mutable_cv_map() {
    assert(getType() == Type::cv_map);
    return value_.cv_map;
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValue>& mutable_cv_list() {
    assert(getType() == Type::cv_list);
    return value_.cv_list;
  }

  ::apache::thrift::metadata::ThriftConstStruct& mutable_cv_struct() {
    assert(getType() == Type::cv_struct);
    return value_.cv_struct;
  }

  bool move_cv_bool() {
    assert(getType() == Type::cv_bool);
    return std::move(value_.cv_bool);
  }

  ::std::int64_t move_cv_integer() {
    assert(getType() == Type::cv_integer);
    return std::move(value_.cv_integer);
  }

  double move_cv_double() {
    assert(getType() == Type::cv_double);
    return std::move(value_.cv_double);
  }

  ::std::string move_cv_string() {
    assert(getType() == Type::cv_string);
    return std::move(value_.cv_string);
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValuePair> move_cv_map() {
    assert(getType() == Type::cv_map);
    return std::move(value_.cv_map);
  }

  ::std::vector<::apache::thrift::metadata::ThriftConstValue> move_cv_list() {
    assert(getType() == Type::cv_list);
    return std::move(value_.cv_list);
  }

  ::apache::thrift::metadata::ThriftConstStruct move_cv_struct() {
    assert(getType() == Type::cv_struct);
    return std::move(value_.cv_struct);
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_bool_ref() const& {
    return {value_.cv_bool, type_, folly::to_underlying(Type::cv_bool), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_bool_ref() const&& {
    return {std::move(value_.cv_bool), type_, folly::to_underlying(Type::cv_bool), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_bool_ref() & {
    return {value_.cv_bool, type_, folly::to_underlying(Type::cv_bool), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_bool_ref() && {
    return {std::move(value_.cv_bool), type_, folly::to_underlying(Type::cv_bool), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_integer_ref() const& {
    return {value_.cv_integer, type_, folly::to_underlying(Type::cv_integer), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_integer_ref() const&& {
    return {std::move(value_.cv_integer), type_, folly::to_underlying(Type::cv_integer), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_integer_ref() & {
    return {value_.cv_integer, type_, folly::to_underlying(Type::cv_integer), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_integer_ref() && {
    return {std::move(value_.cv_integer), type_, folly::to_underlying(Type::cv_integer), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = double>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_double_ref() const& {
    return {value_.cv_double, type_, folly::to_underlying(Type::cv_double), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = double>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_double_ref() const&& {
    return {std::move(value_.cv_double), type_, folly::to_underlying(Type::cv_double), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = double>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_double_ref() & {
    return {value_.cv_double, type_, folly::to_underlying(Type::cv_double), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = double>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_double_ref() && {
    return {std::move(value_.cv_double), type_, folly::to_underlying(Type::cv_double), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_string_ref() const& {
    return {value_.cv_string, type_, folly::to_underlying(Type::cv_string), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_string_ref() const&& {
    return {std::move(value_.cv_string), type_, folly::to_underlying(Type::cv_string), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_string_ref() & {
    return {value_.cv_string, type_, folly::to_underlying(Type::cv_string), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_string_ref() && {
    return {std::move(value_.cv_string), type_, folly::to_underlying(Type::cv_string), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_map_ref() const& {
    return {value_.cv_map, type_, folly::to_underlying(Type::cv_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_map_ref() const&& {
    return {std::move(value_.cv_map), type_, folly::to_underlying(Type::cv_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_map_ref() & {
    return {value_.cv_map, type_, folly::to_underlying(Type::cv_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValuePair>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_map_ref() && {
    return {std::move(value_.cv_map), type_, folly::to_underlying(Type::cv_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_list_ref() const& {
    return {value_.cv_list, type_, folly::to_underlying(Type::cv_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_list_ref() const&& {
    return {std::move(value_.cv_list), type_, folly::to_underlying(Type::cv_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_list_ref() & {
    return {value_.cv_list, type_, folly::to_underlying(Type::cv_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstValue>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_list_ref() && {
    return {std::move(value_.cv_list), type_, folly::to_underlying(Type::cv_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstStruct>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> cv_struct_ref() const& {
    return {value_.cv_struct, type_, folly::to_underlying(Type::cv_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstStruct>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> cv_struct_ref() const&& {
    return {std::move(value_.cv_struct), type_, folly::to_underlying(Type::cv_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstStruct>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> cv_struct_ref() & {
    return {value_.cv_struct, type_, folly::to_underlying(Type::cv_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstStruct>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> cv_struct_ref() && {
    return {std::move(value_.cv_struct), type_, folly::to_underlying(Type::cv_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  Type getType() const { return static_cast<Type>(type_); }

  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;
 protected:
  storage_type value_;
  std::underlying_type_t<Type> type_;

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

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

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


class ThriftConstValuePair 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::key,
    ::apache::thrift::ident::value
  >;

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

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


 public:

  ThriftConstValuePair() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftConstValuePair(apache::thrift::FragileConstructor, ::apache::thrift::metadata::ThriftConstValue key__arg, ::apache::thrift::metadata::ThriftConstValue value__arg);

  ThriftConstValuePair(ThriftConstValuePair&&) noexcept;

  ThriftConstValuePair(const ThriftConstValuePair& src);


  ThriftConstValuePair& operator=(ThriftConstValuePair&&) noexcept;
  ThriftConstValuePair& operator=(const ThriftConstValuePair& src);
 private:
  ::apache::thrift::metadata::ThriftConstValue __fbthrift_field_key;
 private:
  ::apache::thrift::metadata::ThriftConstValue __fbthrift_field_value;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> key_ref() const& {
    return {this->__fbthrift_field_key, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> key_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_key), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> key_ref() & {
    return {this->__fbthrift_field_key, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> key_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_key), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> key() const& {
    return {this->__fbthrift_field_key, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> key() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_key), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> key() & {
    return {this->__fbthrift_field_key, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> key() && {
    return {static_cast<T&&>(this->__fbthrift_field_key), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> value_ref() const& {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> value_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_value), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> value_ref() & {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> value_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_value), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> value() const& {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> value() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_value), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> value() & {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftConstValue>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> value() && {
    return {static_cast<T&&>(this->__fbthrift_field_value), __isset.at(1), __isset.bit(1)};
  }
  const ::apache::thrift::metadata::ThriftConstValue& get_key() const&;
  ::apache::thrift::metadata::ThriftConstValue get_key() &&;

  template <typename T_ThriftConstValuePair_key_struct_setter = ::apache::thrift::metadata::ThriftConstValue>
  [[deprecated("Use `FOO.key_ref() = BAR;` instead of `FOO.set_key(BAR);`")]]
  ::apache::thrift::metadata::ThriftConstValue& set_key(T_ThriftConstValuePair_key_struct_setter&& key_) {
    key_ref() = std::forward<T_ThriftConstValuePair_key_struct_setter>(key_);
    return __fbthrift_field_key;
  }
  const ::apache::thrift::metadata::ThriftConstValue& get_value() const&;
  ::apache::thrift::metadata::ThriftConstValue get_value() &&;

  template <typename T_ThriftConstValuePair_value_struct_setter = ::apache::thrift::metadata::ThriftConstValue>
  [[deprecated("Use `FOO.value_ref() = BAR;` instead of `FOO.set_value(BAR);`")]]
  ::apache::thrift::metadata::ThriftConstValue& set_value(T_ThriftConstValuePair_value_struct_setter&& value_) {
    value_ref() = std::forward<T_ThriftConstValuePair_value_struct_setter>(value_);
    return __fbthrift_field_value;
  }

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

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


class ThriftListType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::valueType
  >;

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

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


 public:

  ThriftListType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftListType(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> valueType__arg);

  ThriftListType(ThriftListType&&) noexcept;
  ThriftListType(const ThriftListType& src);


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

  ~ThriftListType();

 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_valueType;

 public:

  bool operator==(const ThriftListType&) const;
  bool operator<(const ThriftListType&) const;
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType_ref() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType_ref() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType_ref() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

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

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


class ThriftSetType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::valueType
  >;

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

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


 public:

  ThriftSetType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftSetType(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> valueType__arg);

  ThriftSetType(ThriftSetType&&) noexcept;
  ThriftSetType(const ThriftSetType& src);


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

  ~ThriftSetType();

 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_valueType;

 public:

  bool operator==(const ThriftSetType&) const;
  bool operator<(const ThriftSetType&) const;
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType_ref() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType_ref() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType_ref() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

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

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


class ThriftMapType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::keyType,
    ::apache::thrift::ident::valueType
  >;

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

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


 public:

  ThriftMapType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftMapType(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> keyType__arg, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> valueType__arg);

  ThriftMapType(ThriftMapType&&) noexcept;
  ThriftMapType(const ThriftMapType& src);


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

  ~ThriftMapType();

 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_keyType;
 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_valueType;

 public:

  bool operator==(const ThriftMapType&) const;
  bool operator<(const ThriftMapType&) const;
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& keyType_ref() & {
    return __fbthrift_field_keyType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& keyType_ref() const& {
    return __fbthrift_field_keyType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& keyType_ref() && {
    return static_cast<T&&>(__fbthrift_field_keyType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& keyType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_keyType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& keyType() & {
    return __fbthrift_field_keyType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& keyType() const& {
    return __fbthrift_field_keyType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& keyType() && {
    return static_cast<T&&>(__fbthrift_field_keyType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& keyType() const&& {
    return static_cast<const T&&>(__fbthrift_field_keyType);
  }
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType_ref() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType_ref() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType_ref() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& valueType() & {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& valueType() const& {
    return __fbthrift_field_valueType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& valueType() && {
    return static_cast<T&&>(__fbthrift_field_valueType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& valueType() const&& {
    return static_cast<const T&&>(__fbthrift_field_valueType);
  }

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

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


class ThriftEnumType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name
  >;

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


 public:

  ThriftEnumType();

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

  ThriftEnumType(ThriftEnumType&&) noexcept;

  ThriftEnumType(const ThriftEnumType& src);


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

  ~ThriftEnumType();

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

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftEnumType_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftEnumType_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftEnumType_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

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

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


class ThriftUnionType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name
  >;

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


 public:

  ThriftUnionType();

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

  ThriftUnionType(ThriftUnionType&&) noexcept;

  ThriftUnionType(const ThriftUnionType& src);


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

  ~ThriftUnionType();

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

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftUnionType_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftUnionType_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftUnionType_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

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

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


class ThriftTypedefType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::underlyingType,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftType>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftTypedefType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftTypedefType(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> underlyingType__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftTypedefType(ThriftTypedefType&&) noexcept;
  ThriftTypedefType(const ThriftTypedefType& src);


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

  ~ThriftTypedefType();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_underlyingType;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& underlyingType_ref() & {
    return __fbthrift_field_underlyingType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& underlyingType_ref() const& {
    return __fbthrift_field_underlyingType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& underlyingType_ref() && {
    return static_cast<T&&>(__fbthrift_field_underlyingType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& underlyingType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_underlyingType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& underlyingType() & {
    return __fbthrift_field_underlyingType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& underlyingType() const& {
    return __fbthrift_field_underlyingType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& underlyingType() && {
    return static_cast<T&&>(__fbthrift_field_underlyingType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& underlyingType() const&& {
    return static_cast<const T&&>(__fbthrift_field_underlyingType);
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(1), __isset.bit(1)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftTypedefType_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftTypedefType_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftTypedefType_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftTypedefType_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftTypedefType_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftTypedefType_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftStreamType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::elemType,
    ::apache::thrift::ident::initialResponseType
  >;

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

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


 public:

  ThriftStreamType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftStreamType(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> elemType__arg, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> initialResponseType__arg);

  ThriftStreamType(ThriftStreamType&&) noexcept;
  ThriftStreamType(const ThriftStreamType& src);


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

  ~ThriftStreamType();

 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_elemType;
 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_initialResponseType;

 public:

  bool operator==(const ThriftStreamType&) const;
  bool operator<(const ThriftStreamType&) const;
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& elemType_ref() & {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& elemType_ref() const& {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& elemType_ref() && {
    return static_cast<T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& elemType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& elemType() & {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& elemType() const& {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& elemType() && {
    return static_cast<T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& elemType() const&& {
    return static_cast<const T&&>(__fbthrift_field_elemType);
  }
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& initialResponseType_ref() & {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& initialResponseType_ref() const& {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& initialResponseType_ref() && {
    return static_cast<T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& initialResponseType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& initialResponseType() & {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& initialResponseType() const& {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& initialResponseType() && {
    return static_cast<T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& initialResponseType() const&& {
    return static_cast<const T&&>(__fbthrift_field_initialResponseType);
  }

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

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


class ThriftSinkType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::elemType,
    ::apache::thrift::ident::finalResponseType,
    ::apache::thrift::ident::initialResponseType
  >;

  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::union_t<::apache::thrift::metadata::ThriftType>,
    ::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftType>,
    ::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftType>
  >;

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


 public:

  ThriftSinkType();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftSinkType(apache::thrift::FragileConstructor, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> elemType__arg, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> finalResponseType__arg, ::std::unique_ptr<::apache::thrift::metadata::ThriftType> initialResponseType__arg);

  ThriftSinkType(ThriftSinkType&&) noexcept;
  ThriftSinkType(const ThriftSinkType& src);


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

  ~ThriftSinkType();

 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_elemType;
 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_finalResponseType;
 private:
  ::std::unique_ptr<::apache::thrift::metadata::ThriftType> __fbthrift_field_initialResponseType;

 public:

  bool operator==(const ThriftSinkType&) const;
  bool operator<(const ThriftSinkType&) const;
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& elemType_ref() & {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& elemType_ref() const& {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& elemType_ref() && {
    return static_cast<T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& elemType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& elemType() & {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& elemType() const& {
    return __fbthrift_field_elemType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& elemType() && {
    return static_cast<T&&>(__fbthrift_field_elemType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& elemType() const&& {
    return static_cast<const T&&>(__fbthrift_field_elemType);
  }
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& finalResponseType_ref() & {
    return __fbthrift_field_finalResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& finalResponseType_ref() const& {
    return __fbthrift_field_finalResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& finalResponseType_ref() && {
    return static_cast<T&&>(__fbthrift_field_finalResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& finalResponseType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_finalResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& finalResponseType() & {
    return __fbthrift_field_finalResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& finalResponseType() const& {
    return __fbthrift_field_finalResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& finalResponseType() && {
    return static_cast<T&&>(__fbthrift_field_finalResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& finalResponseType() const&& {
    return static_cast<const T&&>(__fbthrift_field_finalResponseType);
  }
  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& initialResponseType_ref() & {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& initialResponseType_ref() const& {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& initialResponseType_ref() && {
    return static_cast<T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& initialResponseType_ref() const&& {
    return static_cast<const T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T& initialResponseType() & {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T& initialResponseType() const& {
    return __fbthrift_field_initialResponseType;
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE T&& initialResponseType() && {
    return static_cast<T&&>(__fbthrift_field_initialResponseType);
  }

  template <typename ..., typename T = ::std::unique_ptr<::apache::thrift::metadata::ThriftType>>
  FOLLY_ERASE const T&& initialResponseType() const&& {
    return static_cast<const T&&>(__fbthrift_field_initialResponseType);
  }

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

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


class ThriftType 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::t_primitive,
    ::apache::thrift::ident::t_list,
    ::apache::thrift::ident::t_set,
    ::apache::thrift::ident::t_map,
    ::apache::thrift::ident::t_enum,
    ::apache::thrift::ident::t_struct,
    ::apache::thrift::ident::t_union,
    ::apache::thrift::ident::t_typedef,
    ::apache::thrift::ident::t_stream,
    ::apache::thrift::ident::t_sink
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6,7,8,9,10};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::enum_t<::apache::thrift::metadata::ThriftPrimitiveType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftListType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftSetType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftMapType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftEnumType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftStructType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftUnionType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftTypedefType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftStreamType>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftSinkType>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 10;

  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_destruct();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = ThriftType;
  static constexpr bool __fbthrift_cpp2_is_union =
    true;


 public:
  enum Type : int {
    __EMPTY__ = 0,
    t_primitive = 1,
    t_list = 2,
    t_set = 3,
    t_map = 4,
    t_enum = 5,
    t_struct = 6,
    t_union = 7,
    t_typedef = 8,
    t_stream = 9,
    t_sink = 10,
  } ;

  ThriftType()
      : type_(folly::to_underlying(Type::__EMPTY__)) {}

  ThriftType(ThriftType&& rhs) noexcept
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::t_primitive:
      {
        set_t_primitive(std::move(rhs.value_.t_primitive));
        break;
      }
      case Type::t_list:
      {
        set_t_list(std::move(rhs.value_.t_list));
        break;
      }
      case Type::t_set:
      {
        set_t_set(std::move(rhs.value_.t_set));
        break;
      }
      case Type::t_map:
      {
        set_t_map(std::move(rhs.value_.t_map));
        break;
      }
      case Type::t_enum:
      {
        set_t_enum(std::move(rhs.value_.t_enum));
        break;
      }
      case Type::t_struct:
      {
        set_t_struct(std::move(rhs.value_.t_struct));
        break;
      }
      case Type::t_union:
      {
        set_t_union(std::move(rhs.value_.t_union));
        break;
      }
      case Type::t_typedef:
      {
        set_t_typedef(std::move(rhs.value_.t_typedef));
        break;
      }
      case Type::t_stream:
      {
        set_t_stream(std::move(rhs.value_.t_stream));
        break;
      }
      case Type::t_sink:
      {
        set_t_sink(std::move(rhs.value_.t_sink));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  ThriftType(const ThriftType& rhs)
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::t_primitive:
      {
        set_t_primitive(rhs.value_.t_primitive);
        break;
      }
      case Type::t_list:
      {
        set_t_list(rhs.value_.t_list);
        break;
      }
      case Type::t_set:
      {
        set_t_set(rhs.value_.t_set);
        break;
      }
      case Type::t_map:
      {
        set_t_map(rhs.value_.t_map);
        break;
      }
      case Type::t_enum:
      {
        set_t_enum(rhs.value_.t_enum);
        break;
      }
      case Type::t_struct:
      {
        set_t_struct(rhs.value_.t_struct);
        break;
      }
      case Type::t_union:
      {
        set_t_union(rhs.value_.t_union);
        break;
      }
      case Type::t_typedef:
      {
        set_t_typedef(rhs.value_.t_typedef);
        break;
      }
      case Type::t_stream:
      {
        set_t_stream(rhs.value_.t_stream);
        break;
      }
      case Type::t_sink:
      {
        set_t_sink(rhs.value_.t_sink);
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
  }

  ThriftType& operator=(ThriftType&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    __fbthrift_clear();
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return *this;
      }
      case Type::t_primitive:
      {
        set_t_primitive(std::move(rhs.value_.t_primitive));
        break;
      }
      case Type::t_list:
      {
        set_t_list(std::move(rhs.value_.t_list));
        break;
      }
      case Type::t_set:
      {
        set_t_set(std::move(rhs.value_.t_set));
        break;
      }
      case Type::t_map:
      {
        set_t_map(std::move(rhs.value_.t_map));
        break;
      }
      case Type::t_enum:
      {
        set_t_enum(std::move(rhs.value_.t_enum));
        break;
      }
      case Type::t_struct:
      {
        set_t_struct(std::move(rhs.value_.t_struct));
        break;
      }
      case Type::t_union:
      {
        set_t_union(std::move(rhs.value_.t_union));
        break;
      }
      case Type::t_typedef:
      {
        set_t_typedef(std::move(rhs.value_.t_typedef));
        break;
      }
      case Type::t_stream:
      {
        set_t_stream(std::move(rhs.value_.t_stream));
        break;
      }
      case Type::t_sink:
      {
        set_t_sink(std::move(rhs.value_.t_sink));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  ThriftType& operator=(const ThriftType& rhs) {
    if (this == &rhs) { return *this; }
    __fbthrift_clear();
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return *this;
      }
      case Type::t_primitive:
      {
        set_t_primitive(rhs.value_.t_primitive);
        break;
      }
      case Type::t_list:
      {
        set_t_list(rhs.value_.t_list);
        break;
      }
      case Type::t_set:
      {
        set_t_set(rhs.value_.t_set);
        break;
      }
      case Type::t_map:
      {
        set_t_map(rhs.value_.t_map);
        break;
      }
      case Type::t_enum:
      {
        set_t_enum(rhs.value_.t_enum);
        break;
      }
      case Type::t_struct:
      {
        set_t_struct(rhs.value_.t_struct);
        break;
      }
      case Type::t_union:
      {
        set_t_union(rhs.value_.t_union);
        break;
      }
      case Type::t_typedef:
      {
        set_t_typedef(rhs.value_.t_typedef);
        break;
      }
      case Type::t_stream:
      {
        set_t_stream(rhs.value_.t_stream);
        break;
      }
      case Type::t_sink:
      {
        set_t_sink(rhs.value_.t_sink);
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    return *this;
  }

  ~ThriftType();

  union storage_type {
    ::apache::thrift::metadata::ThriftPrimitiveType t_primitive;
    ::apache::thrift::metadata::ThriftListType t_list;
    ::apache::thrift::metadata::ThriftSetType t_set;
    ::apache::thrift::metadata::ThriftMapType t_map;
    ::apache::thrift::metadata::ThriftEnumType t_enum;
    ::apache::thrift::metadata::ThriftStructType t_struct;
    ::apache::thrift::metadata::ThriftUnionType t_union;
    ::apache::thrift::metadata::ThriftTypedefType t_typedef;
    ::apache::thrift::metadata::ThriftStreamType t_stream;
    ::apache::thrift::metadata::ThriftSinkType t_sink;

    storage_type() {}
    ~storage_type() {}
  } ;

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

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftPrimitiveType& set_t_primitive(::apache::thrift::metadata::ThriftPrimitiveType t = ::apache::thrift::metadata::ThriftPrimitiveType()) {
    using T0 = ::apache::thrift::metadata::ThriftPrimitiveType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_primitive);
    ::new (std::addressof(value_.t_primitive)) T(t);
    return value_.t_primitive;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftListType& set_t_list(::apache::thrift::metadata::ThriftListType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftListType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_list);
    ::new (std::addressof(value_.t_list)) T(t);
    return value_.t_list;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftListType& set_t_list(::apache::thrift::metadata::ThriftListType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftListType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_list);
    ::new (std::addressof(value_.t_list)) T(std::move(t));
    return value_.t_list;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftListType, T...>> ::apache::thrift::metadata::ThriftListType& set_t_list(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_list);
    ::new (std::addressof(value_.t_list)) ::apache::thrift::metadata::ThriftListType(std::forward<T>(t)...);
    return value_.t_list;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftSetType& set_t_set(::apache::thrift::metadata::ThriftSetType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftSetType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_set);
    ::new (std::addressof(value_.t_set)) T(t);
    return value_.t_set;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftSetType& set_t_set(::apache::thrift::metadata::ThriftSetType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftSetType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_set);
    ::new (std::addressof(value_.t_set)) T(std::move(t));
    return value_.t_set;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftSetType, T...>> ::apache::thrift::metadata::ThriftSetType& set_t_set(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_set);
    ::new (std::addressof(value_.t_set)) ::apache::thrift::metadata::ThriftSetType(std::forward<T>(t)...);
    return value_.t_set;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftMapType& set_t_map(::apache::thrift::metadata::ThriftMapType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftMapType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_map);
    ::new (std::addressof(value_.t_map)) T(t);
    return value_.t_map;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftMapType& set_t_map(::apache::thrift::metadata::ThriftMapType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftMapType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_map);
    ::new (std::addressof(value_.t_map)) T(std::move(t));
    return value_.t_map;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftMapType, T...>> ::apache::thrift::metadata::ThriftMapType& set_t_map(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_map);
    ::new (std::addressof(value_.t_map)) ::apache::thrift::metadata::ThriftMapType(std::forward<T>(t)...);
    return value_.t_map;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftEnumType& set_t_enum(::apache::thrift::metadata::ThriftEnumType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftEnumType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_enum);
    ::new (std::addressof(value_.t_enum)) T(t);
    return value_.t_enum;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftEnumType& set_t_enum(::apache::thrift::metadata::ThriftEnumType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftEnumType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_enum);
    ::new (std::addressof(value_.t_enum)) T(std::move(t));
    return value_.t_enum;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftEnumType, T...>> ::apache::thrift::metadata::ThriftEnumType& set_t_enum(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_enum);
    ::new (std::addressof(value_.t_enum)) ::apache::thrift::metadata::ThriftEnumType(std::forward<T>(t)...);
    return value_.t_enum;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftStructType& set_t_struct(::apache::thrift::metadata::ThriftStructType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftStructType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_struct);
    ::new (std::addressof(value_.t_struct)) T(t);
    return value_.t_struct;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftStructType& set_t_struct(::apache::thrift::metadata::ThriftStructType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftStructType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_struct);
    ::new (std::addressof(value_.t_struct)) T(std::move(t));
    return value_.t_struct;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftStructType, T...>> ::apache::thrift::metadata::ThriftStructType& set_t_struct(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_struct);
    ::new (std::addressof(value_.t_struct)) ::apache::thrift::metadata::ThriftStructType(std::forward<T>(t)...);
    return value_.t_struct;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftUnionType& set_t_union(::apache::thrift::metadata::ThriftUnionType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftUnionType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_union);
    ::new (std::addressof(value_.t_union)) T(t);
    return value_.t_union;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftUnionType& set_t_union(::apache::thrift::metadata::ThriftUnionType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftUnionType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_union);
    ::new (std::addressof(value_.t_union)) T(std::move(t));
    return value_.t_union;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftUnionType, T...>> ::apache::thrift::metadata::ThriftUnionType& set_t_union(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_union);
    ::new (std::addressof(value_.t_union)) ::apache::thrift::metadata::ThriftUnionType(std::forward<T>(t)...);
    return value_.t_union;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftTypedefType& set_t_typedef(::apache::thrift::metadata::ThriftTypedefType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftTypedefType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_typedef);
    ::new (std::addressof(value_.t_typedef)) T(t);
    return value_.t_typedef;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftTypedefType& set_t_typedef(::apache::thrift::metadata::ThriftTypedefType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftTypedefType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_typedef);
    ::new (std::addressof(value_.t_typedef)) T(std::move(t));
    return value_.t_typedef;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftTypedefType, T...>> ::apache::thrift::metadata::ThriftTypedefType& set_t_typedef(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_typedef);
    ::new (std::addressof(value_.t_typedef)) ::apache::thrift::metadata::ThriftTypedefType(std::forward<T>(t)...);
    return value_.t_typedef;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftStreamType& set_t_stream(::apache::thrift::metadata::ThriftStreamType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftStreamType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_stream);
    ::new (std::addressof(value_.t_stream)) T(t);
    return value_.t_stream;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftStreamType& set_t_stream(::apache::thrift::metadata::ThriftStreamType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftStreamType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_stream);
    ::new (std::addressof(value_.t_stream)) T(std::move(t));
    return value_.t_stream;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftStreamType, T...>> ::apache::thrift::metadata::ThriftStreamType& set_t_stream(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_stream);
    ::new (std::addressof(value_.t_stream)) ::apache::thrift::metadata::ThriftStreamType(std::forward<T>(t)...);
    return value_.t_stream;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftSinkType& set_t_sink(::apache::thrift::metadata::ThriftSinkType const &t) {
    using T0 = ::apache::thrift::metadata::ThriftSinkType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_sink);
    ::new (std::addressof(value_.t_sink)) T(t);
    return value_.t_sink;
  }

  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::metadata::ThriftSinkType& set_t_sink(::apache::thrift::metadata::ThriftSinkType&& t) {
    using T0 = ::apache::thrift::metadata::ThriftSinkType;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_sink);
    ::new (std::addressof(value_.t_sink)) T(std::move(t));
    return value_.t_sink;
  }

  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::metadata::ThriftSinkType, T...>> ::apache::thrift::metadata::ThriftSinkType& set_t_sink(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::t_sink);
    ::new (std::addressof(value_.t_sink)) ::apache::thrift::metadata::ThriftSinkType(std::forward<T>(t)...);
    return value_.t_sink;
  }

  ::apache::thrift::metadata::ThriftPrimitiveType const& get_t_primitive() const {
    if (getType() != Type::t_primitive) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_primitive;
  }

  ::apache::thrift::metadata::ThriftListType const& get_t_list() const {
    if (getType() != Type::t_list) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_list;
  }

  ::apache::thrift::metadata::ThriftSetType const& get_t_set() const {
    if (getType() != Type::t_set) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_set;
  }

  ::apache::thrift::metadata::ThriftMapType const& get_t_map() const {
    if (getType() != Type::t_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_map;
  }

  ::apache::thrift::metadata::ThriftEnumType const& get_t_enum() const {
    if (getType() != Type::t_enum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_enum;
  }

  ::apache::thrift::metadata::ThriftStructType const& get_t_struct() const {
    if (getType() != Type::t_struct) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_struct;
  }

  ::apache::thrift::metadata::ThriftUnionType const& get_t_union() const {
    if (getType() != Type::t_union) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_union;
  }

  ::apache::thrift::metadata::ThriftTypedefType const& get_t_typedef() const {
    if (getType() != Type::t_typedef) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_typedef;
  }

  ::apache::thrift::metadata::ThriftStreamType const& get_t_stream() const {
    if (getType() != Type::t_stream) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_stream;
  }

  ::apache::thrift::metadata::ThriftSinkType const& get_t_sink() const {
    if (getType() != Type::t_sink) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.t_sink;
  }

  ::apache::thrift::metadata::ThriftPrimitiveType& mutable_t_primitive() {
    assert(getType() == Type::t_primitive);
    return value_.t_primitive;
  }

  ::apache::thrift::metadata::ThriftListType& mutable_t_list() {
    assert(getType() == Type::t_list);
    return value_.t_list;
  }

  ::apache::thrift::metadata::ThriftSetType& mutable_t_set() {
    assert(getType() == Type::t_set);
    return value_.t_set;
  }

  ::apache::thrift::metadata::ThriftMapType& mutable_t_map() {
    assert(getType() == Type::t_map);
    return value_.t_map;
  }

  ::apache::thrift::metadata::ThriftEnumType& mutable_t_enum() {
    assert(getType() == Type::t_enum);
    return value_.t_enum;
  }

  ::apache::thrift::metadata::ThriftStructType& mutable_t_struct() {
    assert(getType() == Type::t_struct);
    return value_.t_struct;
  }

  ::apache::thrift::metadata::ThriftUnionType& mutable_t_union() {
    assert(getType() == Type::t_union);
    return value_.t_union;
  }

  ::apache::thrift::metadata::ThriftTypedefType& mutable_t_typedef() {
    assert(getType() == Type::t_typedef);
    return value_.t_typedef;
  }

  ::apache::thrift::metadata::ThriftStreamType& mutable_t_stream() {
    assert(getType() == Type::t_stream);
    return value_.t_stream;
  }

  ::apache::thrift::metadata::ThriftSinkType& mutable_t_sink() {
    assert(getType() == Type::t_sink);
    return value_.t_sink;
  }

  ::apache::thrift::metadata::ThriftPrimitiveType move_t_primitive() {
    assert(getType() == Type::t_primitive);
    return std::move(value_.t_primitive);
  }

  ::apache::thrift::metadata::ThriftListType move_t_list() {
    assert(getType() == Type::t_list);
    return std::move(value_.t_list);
  }

  ::apache::thrift::metadata::ThriftSetType move_t_set() {
    assert(getType() == Type::t_set);
    return std::move(value_.t_set);
  }

  ::apache::thrift::metadata::ThriftMapType move_t_map() {
    assert(getType() == Type::t_map);
    return std::move(value_.t_map);
  }

  ::apache::thrift::metadata::ThriftEnumType move_t_enum() {
    assert(getType() == Type::t_enum);
    return std::move(value_.t_enum);
  }

  ::apache::thrift::metadata::ThriftStructType move_t_struct() {
    assert(getType() == Type::t_struct);
    return std::move(value_.t_struct);
  }

  ::apache::thrift::metadata::ThriftUnionType move_t_union() {
    assert(getType() == Type::t_union);
    return std::move(value_.t_union);
  }

  ::apache::thrift::metadata::ThriftTypedefType move_t_typedef() {
    assert(getType() == Type::t_typedef);
    return std::move(value_.t_typedef);
  }

  ::apache::thrift::metadata::ThriftStreamType move_t_stream() {
    assert(getType() == Type::t_stream);
    return std::move(value_.t_stream);
  }

  ::apache::thrift::metadata::ThriftSinkType move_t_sink() {
    assert(getType() == Type::t_sink);
    return std::move(value_.t_sink);
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftPrimitiveType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_primitive_ref() const& {
    return {value_.t_primitive, type_, folly::to_underlying(Type::t_primitive), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftPrimitiveType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_primitive_ref() const&& {
    return {std::move(value_.t_primitive), type_, folly::to_underlying(Type::t_primitive), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftPrimitiveType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_primitive_ref() & {
    return {value_.t_primitive, type_, folly::to_underlying(Type::t_primitive), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftPrimitiveType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_primitive_ref() && {
    return {std::move(value_.t_primitive), type_, folly::to_underlying(Type::t_primitive), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftListType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_list_ref() const& {
    return {value_.t_list, type_, folly::to_underlying(Type::t_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftListType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_list_ref() const&& {
    return {std::move(value_.t_list), type_, folly::to_underlying(Type::t_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftListType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_list_ref() & {
    return {value_.t_list, type_, folly::to_underlying(Type::t_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftListType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_list_ref() && {
    return {std::move(value_.t_list), type_, folly::to_underlying(Type::t_list), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftSetType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_set_ref() const& {
    return {value_.t_set, type_, folly::to_underlying(Type::t_set), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSetType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_set_ref() const&& {
    return {std::move(value_.t_set), type_, folly::to_underlying(Type::t_set), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSetType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_set_ref() & {
    return {value_.t_set, type_, folly::to_underlying(Type::t_set), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSetType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_set_ref() && {
    return {std::move(value_.t_set), type_, folly::to_underlying(Type::t_set), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftMapType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_map_ref() const& {
    return {value_.t_map, type_, folly::to_underlying(Type::t_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMapType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_map_ref() const&& {
    return {std::move(value_.t_map), type_, folly::to_underlying(Type::t_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMapType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_map_ref() & {
    return {value_.t_map, type_, folly::to_underlying(Type::t_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMapType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_map_ref() && {
    return {std::move(value_.t_map), type_, folly::to_underlying(Type::t_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftEnumType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_enum_ref() const& {
    return {value_.t_enum, type_, folly::to_underlying(Type::t_enum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftEnumType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_enum_ref() const&& {
    return {std::move(value_.t_enum), type_, folly::to_underlying(Type::t_enum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftEnumType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_enum_ref() & {
    return {value_.t_enum, type_, folly::to_underlying(Type::t_enum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftEnumType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_enum_ref() && {
    return {std::move(value_.t_enum), type_, folly::to_underlying(Type::t_enum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_struct_ref() const& {
    return {value_.t_struct, type_, folly::to_underlying(Type::t_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_struct_ref() const&& {
    return {std::move(value_.t_struct), type_, folly::to_underlying(Type::t_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_struct_ref() & {
    return {value_.t_struct, type_, folly::to_underlying(Type::t_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStructType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_struct_ref() && {
    return {std::move(value_.t_struct), type_, folly::to_underlying(Type::t_struct), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftUnionType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_union_ref() const& {
    return {value_.t_union, type_, folly::to_underlying(Type::t_union), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftUnionType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_union_ref() const&& {
    return {std::move(value_.t_union), type_, folly::to_underlying(Type::t_union), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftUnionType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_union_ref() & {
    return {value_.t_union, type_, folly::to_underlying(Type::t_union), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftUnionType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_union_ref() && {
    return {std::move(value_.t_union), type_, folly::to_underlying(Type::t_union), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftTypedefType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_typedef_ref() const& {
    return {value_.t_typedef, type_, folly::to_underlying(Type::t_typedef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftTypedefType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_typedef_ref() const&& {
    return {std::move(value_.t_typedef), type_, folly::to_underlying(Type::t_typedef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftTypedefType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_typedef_ref() & {
    return {value_.t_typedef, type_, folly::to_underlying(Type::t_typedef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftTypedefType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_typedef_ref() && {
    return {std::move(value_.t_typedef), type_, folly::to_underlying(Type::t_typedef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftStreamType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_stream_ref() const& {
    return {value_.t_stream, type_, folly::to_underlying(Type::t_stream), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStreamType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_stream_ref() const&& {
    return {std::move(value_.t_stream), type_, folly::to_underlying(Type::t_stream), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStreamType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_stream_ref() & {
    return {value_.t_stream, type_, folly::to_underlying(Type::t_stream), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftStreamType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_stream_ref() && {
    return {std::move(value_.t_stream), type_, folly::to_underlying(Type::t_stream), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  template <typename..., typename T = ::apache::thrift::metadata::ThriftSinkType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> t_sink_ref() const& {
    return {value_.t_sink, type_, folly::to_underlying(Type::t_sink), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSinkType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> t_sink_ref() const&& {
    return {std::move(value_.t_sink), type_, folly::to_underlying(Type::t_sink), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSinkType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> t_sink_ref() & {
    return {value_.t_sink, type_, folly::to_underlying(Type::t_sink), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftSinkType>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> t_sink_ref() && {
    return {std::move(value_.t_sink), type_, folly::to_underlying(Type::t_sink), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  Type getType() const { return static_cast<Type>(type_); }

  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;
 protected:
  storage_type value_;
  std::underlying_type_t<Type> type_;

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

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

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


class ThriftEnum 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::elements,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::string_t>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftEnum();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftEnum(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::map<::std::int32_t, ::std::string> elements__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftEnum(ThriftEnum&&) noexcept;

  ThriftEnum(const ThriftEnum& src);


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

  ~ThriftEnum();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::map<::std::int32_t, ::std::string> __fbthrift_field_elements;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> elements_ref() const& {
    return {this->__fbthrift_field_elements, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> elements_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_elements), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> elements_ref() & {
    return {this->__fbthrift_field_elements, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> elements_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_elements), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> elements() const& {
    return {this->__fbthrift_field_elements, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> elements() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_elements), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> elements() & {
    return {this->__fbthrift_field_elements, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::int32_t, ::std::string>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> elements() && {
    return {static_cast<T&&>(this->__fbthrift_field_elements), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftEnum_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftEnum_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftEnum_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::std::map<::std::int32_t, ::std::string>& get_elements() const&;
  ::std::map<::std::int32_t, ::std::string> get_elements() &&;

  template <typename T_ThriftEnum_elements_struct_setter = ::std::map<::std::int32_t, ::std::string>>
  [[deprecated("Use `FOO.elements_ref() = BAR;` instead of `FOO.set_elements(BAR);`")]]
  ::std::map<::std::int32_t, ::std::string>& set_elements(T_ThriftEnum_elements_struct_setter&& elements_) {
    elements_ref() = std::forward<T_ThriftEnum_elements_struct_setter>(elements_);
    return __fbthrift_field_elements;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftEnum_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftEnum_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftEnum_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftField 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::id,
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::is_optional,
    ::apache::thrift::ident::structured_annotations,
    ::apache::thrift::ident::unstructured_annotations
  >;

  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::union_t<::apache::thrift::metadata::ThriftType>,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>
  >;

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


 public:

  ThriftField();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftField(apache::thrift::FragileConstructor, ::std::int32_t id__arg, ::apache::thrift::metadata::ThriftType type__arg, ::std::string name__arg, bool is_optional__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg, ::std::map<::std::string, ::std::string> unstructured_annotations__arg);

  ThriftField(ThriftField&&) noexcept;

  ThriftField(const ThriftField& src);


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

  ~ThriftField();

 private:
  ::std::int32_t __fbthrift_field_id;
 private:
  ::apache::thrift::metadata::ThriftType __fbthrift_field_type;
 private:
  ::std::string __fbthrift_field_name;
 private:
  bool __fbthrift_field_is_optional;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  ::std::map<::std::string, ::std::string> __fbthrift_field_unstructured_annotations;
 private:
  apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> id_ref() const& {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> id_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_id), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> id_ref() & {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> id_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_id), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> id() const& {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> id() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_id), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> id() & {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> id() && {
    return {static_cast<T&&>(this->__fbthrift_field_id), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> type_ref() const& {
    return {this->__fbthrift_field_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> type_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> type_ref() & {
    return {this->__fbthrift_field_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> type_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> type() const& {
    return {this->__fbthrift_field_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> type() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> type() & {
    return {this->__fbthrift_field_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> type() && {
    return {static_cast<T&&>(this->__fbthrift_field_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_optional_ref() const& {
    return {this->__fbthrift_field_is_optional, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_optional_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_optional), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_optional_ref() & {
    return {this->__fbthrift_field_is_optional, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_optional_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_optional), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_optional() const& {
    return {this->__fbthrift_field_is_optional, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_optional() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_optional), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_optional() & {
    return {this->__fbthrift_field_is_optional, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_optional() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_optional), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> unstructured_annotations_ref() const& {
    return {this->__fbthrift_field_unstructured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> unstructured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_unstructured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> unstructured_annotations_ref() & {
    return {this->__fbthrift_field_unstructured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> unstructured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_unstructured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> unstructured_annotations() const& {
    return {this->__fbthrift_field_unstructured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> unstructured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_unstructured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> unstructured_annotations() & {
    return {this->__fbthrift_field_unstructured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::std::string>>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> unstructured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_unstructured_annotations), __isset.at(5), __isset.bit(5)};
  }

  ::std::int32_t get_id() const {
    return __fbthrift_field_id;
  }

  [[deprecated("Use `FOO.id_ref() = BAR;` instead of `FOO.set_id(BAR);`")]]
  ::std::int32_t& set_id(::std::int32_t id_) {
    id_ref() = id_;
    return __fbthrift_field_id;
  }
  const ::apache::thrift::metadata::ThriftType& get_type() const&;
  ::apache::thrift::metadata::ThriftType get_type() &&;

  template <typename T_ThriftField_type_struct_setter = ::apache::thrift::metadata::ThriftType>
  [[deprecated("Use `FOO.type_ref() = BAR;` instead of `FOO.set_type(BAR);`")]]
  ::apache::thrift::metadata::ThriftType& set_type(T_ThriftField_type_struct_setter&& type_) {
    type_ref() = std::forward<T_ThriftField_type_struct_setter>(type_);
    return __fbthrift_field_type;
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftField_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftField_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftField_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

  bool get_is_optional() const {
    return __fbthrift_field_is_optional;
  }

  [[deprecated("Use `FOO.is_optional_ref() = BAR;` instead of `FOO.set_is_optional(BAR);`")]]
  bool& set_is_optional(bool is_optional_) {
    is_optional_ref() = is_optional_;
    return __fbthrift_field_is_optional;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftField_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftField_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftField_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }
  const ::std::map<::std::string, ::std::string>* get_unstructured_annotations() const&;
  ::std::map<::std::string, ::std::string>* get_unstructured_annotations() &;
  ::std::map<::std::string, ::std::string>* get_unstructured_annotations() && = delete;

  template <typename T_ThriftField_unstructured_annotations_struct_setter = ::std::map<::std::string, ::std::string>>
  [[deprecated("Use `FOO.unstructured_annotations_ref() = BAR;` instead of `FOO.set_unstructured_annotations(BAR);`")]]
  ::std::map<::std::string, ::std::string>& set_unstructured_annotations(T_ThriftField_unstructured_annotations_struct_setter&& unstructured_annotations_) {
    unstructured_annotations_ref() = std::forward<T_ThriftField_unstructured_annotations_struct_setter>(unstructured_annotations_);
    return __fbthrift_field_unstructured_annotations;
  }

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

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


class ThriftStruct 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::fields,
    ::apache::thrift::ident::is_union,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftField>>,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftStruct(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::vector<::apache::thrift::metadata::ThriftField> fields__arg, bool is_union__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftStruct(ThriftStruct&&) noexcept;

  ThriftStruct(const ThriftStruct& src);


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

  ~ThriftStruct();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftField> __fbthrift_field_fields;
 private:
  bool __fbthrift_field_is_union;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields_ref() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields_ref() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_union_ref() const& {
    return {this->__fbthrift_field_is_union, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_union_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_union), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_union_ref() & {
    return {this->__fbthrift_field_is_union, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_union_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_union), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_union() const& {
    return {this->__fbthrift_field_is_union, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_union() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_union), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_union() & {
    return {this->__fbthrift_field_is_union, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_union() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_union), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftStruct_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftStruct_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftStruct_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftField>& get_fields() const&;
  ::std::vector<::apache::thrift::metadata::ThriftField> get_fields() &&;

  template <typename T_ThriftStruct_fields_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftField>>
  [[deprecated("Use `FOO.fields_ref() = BAR;` instead of `FOO.set_fields(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftField>& set_fields(T_ThriftStruct_fields_struct_setter&& fields_) {
    fields_ref() = std::forward<T_ThriftStruct_fields_struct_setter>(fields_);
    return __fbthrift_field_fields;
  }

  bool get_is_union() const {
    return __fbthrift_field_is_union;
  }

  [[deprecated("Use `FOO.is_union_ref() = BAR;` instead of `FOO.set_is_union(BAR);`")]]
  bool& set_is_union(bool is_union_) {
    is_union_ref() = is_union_;
    return __fbthrift_field_is_union;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftStruct_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftStruct_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftStruct_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftException 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::fields,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftField>>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftException();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftException(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::vector<::apache::thrift::metadata::ThriftField> fields__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftException(ThriftException&&) noexcept;

  ThriftException(const ThriftException& src);


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

  ~ThriftException();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftField> __fbthrift_field_fields;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields_ref() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields_ref() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields() const& {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields() & {
    return {this->__fbthrift_field_fields, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(2), __isset.bit(2)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftException_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftException_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftException_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftField>& get_fields() const&;
  ::std::vector<::apache::thrift::metadata::ThriftField> get_fields() &&;

  template <typename T_ThriftException_fields_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftField>>
  [[deprecated("Use `FOO.fields_ref() = BAR;` instead of `FOO.set_fields(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftField>& set_fields(T_ThriftException_fields_struct_setter&& fields_) {
    fields_ref() = std::forward<T_ThriftException_fields_struct_setter>(fields_);
    return __fbthrift_field_fields;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftException_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftException_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftException_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftFunction 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::return_type,
    ::apache::thrift::ident::arguments,
    ::apache::thrift::ident::exceptions,
    ::apache::thrift::ident::is_oneway,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::union_t<::apache::thrift::metadata::ThriftType>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftField>>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftField>>,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftFunction();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftFunction(apache::thrift::FragileConstructor, ::std::string name__arg, ::apache::thrift::metadata::ThriftType return_type__arg, ::std::vector<::apache::thrift::metadata::ThriftField> arguments__arg, ::std::vector<::apache::thrift::metadata::ThriftField> exceptions__arg, bool is_oneway__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftFunction(ThriftFunction&&) noexcept;

  ThriftFunction(const ThriftFunction& src);


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

  ~ThriftFunction();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::apache::thrift::metadata::ThriftType __fbthrift_field_return_type;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftField> __fbthrift_field_arguments;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftField> __fbthrift_field_exceptions;
 private:
  bool __fbthrift_field_is_oneway;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> return_type_ref() const& {
    return {this->__fbthrift_field_return_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> return_type_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_return_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> return_type_ref() & {
    return {this->__fbthrift_field_return_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> return_type_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_return_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> return_type() const& {
    return {this->__fbthrift_field_return_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> return_type() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_return_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> return_type() & {
    return {this->__fbthrift_field_return_type, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftType>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> return_type() && {
    return {static_cast<T&&>(this->__fbthrift_field_return_type), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> arguments_ref() const& {
    return {this->__fbthrift_field_arguments, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> arguments_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_arguments), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> arguments_ref() & {
    return {this->__fbthrift_field_arguments, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> arguments_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_arguments), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> arguments() const& {
    return {this->__fbthrift_field_arguments, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> arguments() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_arguments), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> arguments() & {
    return {this->__fbthrift_field_arguments, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> arguments() && {
    return {static_cast<T&&>(this->__fbthrift_field_arguments), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> exceptions_ref() const& {
    return {this->__fbthrift_field_exceptions, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> exceptions_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_exceptions), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> exceptions_ref() & {
    return {this->__fbthrift_field_exceptions, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> exceptions_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_exceptions), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> exceptions() const& {
    return {this->__fbthrift_field_exceptions, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> exceptions() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_exceptions), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> exceptions() & {
    return {this->__fbthrift_field_exceptions, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftField>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> exceptions() && {
    return {static_cast<T&&>(this->__fbthrift_field_exceptions), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_oneway_ref() const& {
    return {this->__fbthrift_field_is_oneway, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_oneway_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_oneway), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_oneway_ref() & {
    return {this->__fbthrift_field_is_oneway, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_oneway_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_oneway), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> is_oneway() const& {
    return {this->__fbthrift_field_is_oneway, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> is_oneway() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_is_oneway), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> is_oneway() & {
    return {this->__fbthrift_field_is_oneway, __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> is_oneway() && {
    return {static_cast<T&&>(this->__fbthrift_field_is_oneway), __isset.at(4), __isset.bit(4)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(5), __isset.bit(5)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(5), __isset.bit(5)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftFunction_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftFunction_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftFunction_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::apache::thrift::metadata::ThriftType& get_return_type() const&;
  ::apache::thrift::metadata::ThriftType get_return_type() &&;

  template <typename T_ThriftFunction_return_type_struct_setter = ::apache::thrift::metadata::ThriftType>
  [[deprecated("Use `FOO.return_type_ref() = BAR;` instead of `FOO.set_return_type(BAR);`")]]
  ::apache::thrift::metadata::ThriftType& set_return_type(T_ThriftFunction_return_type_struct_setter&& return_type_) {
    return_type_ref() = std::forward<T_ThriftFunction_return_type_struct_setter>(return_type_);
    return __fbthrift_field_return_type;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftField>& get_arguments() const&;
  ::std::vector<::apache::thrift::metadata::ThriftField> get_arguments() &&;

  template <typename T_ThriftFunction_arguments_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftField>>
  [[deprecated("Use `FOO.arguments_ref() = BAR;` instead of `FOO.set_arguments(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftField>& set_arguments(T_ThriftFunction_arguments_struct_setter&& arguments_) {
    arguments_ref() = std::forward<T_ThriftFunction_arguments_struct_setter>(arguments_);
    return __fbthrift_field_arguments;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftField>& get_exceptions() const&;
  ::std::vector<::apache::thrift::metadata::ThriftField> get_exceptions() &&;

  template <typename T_ThriftFunction_exceptions_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftField>>
  [[deprecated("Use `FOO.exceptions_ref() = BAR;` instead of `FOO.set_exceptions(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftField>& set_exceptions(T_ThriftFunction_exceptions_struct_setter&& exceptions_) {
    exceptions_ref() = std::forward<T_ThriftFunction_exceptions_struct_setter>(exceptions_);
    return __fbthrift_field_exceptions;
  }

  bool get_is_oneway() const {
    return __fbthrift_field_is_oneway;
  }

  [[deprecated("Use `FOO.is_oneway_ref() = BAR;` instead of `FOO.set_is_oneway(BAR);`")]]
  bool& set_is_oneway(bool is_oneway_) {
    is_oneway_ref() = is_oneway_;
    return __fbthrift_field_is_oneway;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftFunction_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftFunction_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftFunction_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftService 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::functions,
    ::apache::thrift::ident::parent,
    ::apache::thrift::ident::structured_annotations
  >;

  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::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftFunction>>,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftConstStruct>>
  >;

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


 public:

  ThriftService();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftService(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::vector<::apache::thrift::metadata::ThriftFunction> functions__arg, ::std::string parent__arg, ::std::vector<::apache::thrift::metadata::ThriftConstStruct> structured_annotations__arg);

  ThriftService(ThriftService&&) noexcept;

  ThriftService(const ThriftService& src);


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

  ~ThriftService();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftFunction> __fbthrift_field_functions;
 private:
  ::std::string __fbthrift_field_parent;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> __fbthrift_field_structured_annotations;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> functions_ref() const& {
    return {this->__fbthrift_field_functions, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> functions_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_functions), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> functions_ref() & {
    return {this->__fbthrift_field_functions, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> functions_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_functions), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> functions() const& {
    return {this->__fbthrift_field_functions, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> functions() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_functions), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> functions() & {
    return {this->__fbthrift_field_functions, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> functions() && {
    return {static_cast<T&&>(this->__fbthrift_field_functions), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> parent_ref() const& {
    return {this->__fbthrift_field_parent, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> parent_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_parent), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> parent_ref() & {
    return {this->__fbthrift_field_parent, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> parent_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_parent), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&> parent() const& {
    return {this->__fbthrift_field_parent, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const T&&> parent() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_parent), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&> parent() & {
    return {this->__fbthrift_field_parent, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<T&&> parent() && {
    return {static_cast<T&&>(this->__fbthrift_field_parent), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations_ref() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations_ref() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structured_annotations() const& {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structured_annotations() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structured_annotations() & {
    return {this->__fbthrift_field_structured_annotations, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structured_annotations() && {
    return {static_cast<T&&>(this->__fbthrift_field_structured_annotations), __isset.at(3), __isset.bit(3)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftService_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftService_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftService_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftFunction>& get_functions() const&;
  ::std::vector<::apache::thrift::metadata::ThriftFunction> get_functions() &&;

  template <typename T_ThriftService_functions_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftFunction>>
  [[deprecated("Use `FOO.functions_ref() = BAR;` instead of `FOO.set_functions(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftFunction>& set_functions(T_ThriftService_functions_struct_setter&& functions_) {
    functions_ref() = std::forward<T_ThriftService_functions_struct_setter>(functions_);
    return __fbthrift_field_functions;
  }

  const ::std::string* get_parent() const& {
    return parent_ref() ? std::addressof(__fbthrift_field_parent) : nullptr;
  }

  ::std::string* get_parent() & {
    return parent_ref() ? std::addressof(__fbthrift_field_parent) : nullptr;
  }
  ::std::string* get_parent() && = delete;

  template <typename T_ThriftService_parent_struct_setter = ::std::string>
  [[deprecated("Use `FOO.parent_ref() = BAR;` instead of `FOO.set_parent(BAR);`")]]
  ::std::string& set_parent(T_ThriftService_parent_struct_setter&& parent_) {
    parent_ref() = std::forward<T_ThriftService_parent_struct_setter>(parent_);
    return __fbthrift_field_parent;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& get_structured_annotations() const&;
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct> get_structured_annotations() &&;

  template <typename T_ThriftService_structured_annotations_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftConstStruct>>
  [[deprecated("Use `FOO.structured_annotations_ref() = BAR;` instead of `FOO.set_structured_annotations(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftConstStruct>& set_structured_annotations(T_ThriftService_structured_annotations_struct_setter&& structured_annotations_) {
    structured_annotations_ref() = std::forward<T_ThriftService_structured_annotations_struct_setter>(structured_annotations_);
    return __fbthrift_field_structured_annotations;
  }

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

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


class ThriftModuleContext 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::name
  >;

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


 public:

  ThriftModuleContext();

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

  ThriftModuleContext(ThriftModuleContext&&) noexcept;

  ThriftModuleContext(const ThriftModuleContext& src);


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

  ~ThriftModuleContext();

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

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name_ref() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> name() const& {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> name() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> name() && {
    return {static_cast<T&&>(this->__fbthrift_field_name), __isset.at(0), __isset.bit(0)};
  }

  const ::std::string& get_name() const& {
    return __fbthrift_field_name;
  }

  ::std::string get_name() && {
    return std::move(__fbthrift_field_name);
  }

  template <typename T_ThriftModuleContext_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.name_ref() = BAR;` instead of `FOO.set_name(BAR);`")]]
  ::std::string& set_name(T_ThriftModuleContext_name_struct_setter&& name_) {
    name_ref() = std::forward<T_ThriftModuleContext_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

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

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


class ThriftServiceContext 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::service_info,
    ::apache::thrift::ident::module
  >;

  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::metadata::ThriftService>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftModuleContext>
  >;

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


 public:

  ThriftServiceContext() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftServiceContext(apache::thrift::FragileConstructor, ::apache::thrift::metadata::ThriftService service_info__arg, ::apache::thrift::metadata::ThriftModuleContext module__arg);

  ThriftServiceContext(ThriftServiceContext&&) noexcept;

  ThriftServiceContext(const ThriftServiceContext& src);


  ThriftServiceContext& operator=(ThriftServiceContext&&) noexcept;
  ThriftServiceContext& operator=(const ThriftServiceContext& src);
 private:
  ::apache::thrift::metadata::ThriftService __fbthrift_field_service_info;
 private:
  ::apache::thrift::metadata::ThriftModuleContext __fbthrift_field_module;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> service_info_ref() const& {
    return {this->__fbthrift_field_service_info, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> service_info_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_service_info), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> service_info_ref() & {
    return {this->__fbthrift_field_service_info, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> service_info_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_service_info), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> service_info() const& {
    return {this->__fbthrift_field_service_info, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> service_info() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_service_info), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> service_info() & {
    return {this->__fbthrift_field_service_info, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftService>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> service_info() && {
    return {static_cast<T&&>(this->__fbthrift_field_service_info), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> module_ref() const& {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> module_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> module_ref() & {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> module_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> module() const& {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> module() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> module() & {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> module() && {
    return {static_cast<T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }
  const ::apache::thrift::metadata::ThriftService& get_service_info() const&;
  ::apache::thrift::metadata::ThriftService get_service_info() &&;

  template <typename T_ThriftServiceContext_service_info_struct_setter = ::apache::thrift::metadata::ThriftService>
  [[deprecated("Use `FOO.service_info_ref() = BAR;` instead of `FOO.set_service_info(BAR);`")]]
  ::apache::thrift::metadata::ThriftService& set_service_info(T_ThriftServiceContext_service_info_struct_setter&& service_info_) {
    service_info_ref() = std::forward<T_ThriftServiceContext_service_info_struct_setter>(service_info_);
    return __fbthrift_field_service_info;
  }
  const ::apache::thrift::metadata::ThriftModuleContext& get_module() const&;
  ::apache::thrift::metadata::ThriftModuleContext get_module() &&;

  template <typename T_ThriftServiceContext_module_struct_setter = ::apache::thrift::metadata::ThriftModuleContext>
  [[deprecated("Use `FOO.module_ref() = BAR;` instead of `FOO.set_module(BAR);`")]]
  ::apache::thrift::metadata::ThriftModuleContext& set_module(T_ThriftServiceContext_module_struct_setter&& module_) {
    module_ref() = std::forward<T_ThriftServiceContext_module_struct_setter>(module_);
    return __fbthrift_field_module;
  }

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

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


class ThriftServiceContextRef 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::service_name,
    ::apache::thrift::ident::module
  >;

  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::metadata::ThriftModuleContext>
  >;

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


 public:

  ThriftServiceContextRef();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftServiceContextRef(apache::thrift::FragileConstructor, ::std::string service_name__arg, ::apache::thrift::metadata::ThriftModuleContext module__arg);

  ThriftServiceContextRef(ThriftServiceContextRef&&) noexcept;

  ThriftServiceContextRef(const ThriftServiceContextRef& src);


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

  ~ThriftServiceContextRef();

 private:
  ::std::string __fbthrift_field_service_name;
 private:
  ::apache::thrift::metadata::ThriftModuleContext __fbthrift_field_module;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> service_name_ref() const& {
    return {this->__fbthrift_field_service_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> service_name_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_service_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> service_name_ref() & {
    return {this->__fbthrift_field_service_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> service_name_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_service_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> service_name() const& {
    return {this->__fbthrift_field_service_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> service_name() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_service_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> service_name() & {
    return {this->__fbthrift_field_service_name, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> service_name() && {
    return {static_cast<T&&>(this->__fbthrift_field_service_name), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> module_ref() const& {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> module_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> module_ref() & {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> module_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> module() const& {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> module() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> module() & {
    return {this->__fbthrift_field_module, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftModuleContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> module() && {
    return {static_cast<T&&>(this->__fbthrift_field_module), __isset.at(1), __isset.bit(1)};
  }

  const ::std::string& get_service_name() const& {
    return __fbthrift_field_service_name;
  }

  ::std::string get_service_name() && {
    return std::move(__fbthrift_field_service_name);
  }

  template <typename T_ThriftServiceContextRef_service_name_struct_setter = ::std::string>
  [[deprecated("Use `FOO.service_name_ref() = BAR;` instead of `FOO.set_service_name(BAR);`")]]
  ::std::string& set_service_name(T_ThriftServiceContextRef_service_name_struct_setter&& service_name_) {
    service_name_ref() = std::forward<T_ThriftServiceContextRef_service_name_struct_setter>(service_name_);
    return __fbthrift_field_service_name;
  }
  const ::apache::thrift::metadata::ThriftModuleContext& get_module() const&;
  ::apache::thrift::metadata::ThriftModuleContext get_module() &&;

  template <typename T_ThriftServiceContextRef_module_struct_setter = ::apache::thrift::metadata::ThriftModuleContext>
  [[deprecated("Use `FOO.module_ref() = BAR;` instead of `FOO.set_module(BAR);`")]]
  ::apache::thrift::metadata::ThriftModuleContext& set_module(T_ThriftServiceContextRef_module_struct_setter&& module_) {
    module_ref() = std::forward<T_ThriftServiceContextRef_module_struct_setter>(module_);
    return __fbthrift_field_module;
  }

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

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


class ThriftMetadata 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::enums,
    ::apache::thrift::ident::structs,
    ::apache::thrift::ident::exceptions,
    ::apache::thrift::ident::services
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,2,4,5,6};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftEnum>>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftStruct>>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftException>>,
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftService>>
  >;

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


 public:

  ThriftMetadata();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftMetadata(apache::thrift::FragileConstructor, ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum> enums__arg, ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct> structs__arg, ::std::map<::std::string, ::apache::thrift::metadata::ThriftException> exceptions__arg, ::std::map<::std::string, ::apache::thrift::metadata::ThriftService> services__arg);

  ThriftMetadata(ThriftMetadata&&) noexcept;

  ThriftMetadata(const ThriftMetadata& src);


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

  ~ThriftMetadata();

 private:
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum> __fbthrift_field_enums;
 private:
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct> __fbthrift_field_structs;
 private:
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftException> __fbthrift_field_exceptions;
 private:
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftService> __fbthrift_field_services;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> enums_ref() const& {
    return {this->__fbthrift_field_enums, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> enums_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_enums), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> enums_ref() & {
    return {this->__fbthrift_field_enums, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> enums_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_enums), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> enums() const& {
    return {this->__fbthrift_field_enums, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> enums() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_enums), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> enums() & {
    return {this->__fbthrift_field_enums, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> enums() && {
    return {static_cast<T&&>(this->__fbthrift_field_enums), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structs_ref() const& {
    return {this->__fbthrift_field_structs, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structs_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structs), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structs_ref() & {
    return {this->__fbthrift_field_structs, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structs_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_structs), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> structs() const& {
    return {this->__fbthrift_field_structs, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> structs() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_structs), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> structs() & {
    return {this->__fbthrift_field_structs, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> structs() && {
    return {static_cast<T&&>(this->__fbthrift_field_structs), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> exceptions_ref() const& {
    return {this->__fbthrift_field_exceptions, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> exceptions_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_exceptions), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> exceptions_ref() & {
    return {this->__fbthrift_field_exceptions, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> exceptions_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_exceptions), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> exceptions() const& {
    return {this->__fbthrift_field_exceptions, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> exceptions() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_exceptions), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> exceptions() & {
    return {this->__fbthrift_field_exceptions, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> exceptions() && {
    return {static_cast<T&&>(this->__fbthrift_field_exceptions), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> services_ref() const& {
    return {this->__fbthrift_field_services, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> services_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_services), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> services_ref() & {
    return {this->__fbthrift_field_services, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> services_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_services), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> services() const& {
    return {this->__fbthrift_field_services, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> services() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_services), __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> services() & {
    return {this->__fbthrift_field_services, __isset.at(3), __isset.bit(3)};
  }

  template <typename..., typename T = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> services() && {
    return {static_cast<T&&>(this->__fbthrift_field_services), __isset.at(3), __isset.bit(3)};
  }
  const ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>& get_enums() const&;
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum> get_enums() &&;

  template <typename T_ThriftMetadata_enums_struct_setter = ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>>
  [[deprecated("Use `FOO.enums_ref() = BAR;` instead of `FOO.set_enums(BAR);`")]]
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftEnum>& set_enums(T_ThriftMetadata_enums_struct_setter&& enums_) {
    enums_ref() = std::forward<T_ThriftMetadata_enums_struct_setter>(enums_);
    return __fbthrift_field_enums;
  }
  const ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>& get_structs() const&;
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct> get_structs() &&;

  template <typename T_ThriftMetadata_structs_struct_setter = ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>>
  [[deprecated("Use `FOO.structs_ref() = BAR;` instead of `FOO.set_structs(BAR);`")]]
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftStruct>& set_structs(T_ThriftMetadata_structs_struct_setter&& structs_) {
    structs_ref() = std::forward<T_ThriftMetadata_structs_struct_setter>(structs_);
    return __fbthrift_field_structs;
  }
  const ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>& get_exceptions() const&;
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftException> get_exceptions() &&;

  template <typename T_ThriftMetadata_exceptions_struct_setter = ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>>
  [[deprecated("Use `FOO.exceptions_ref() = BAR;` instead of `FOO.set_exceptions(BAR);`")]]
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftException>& set_exceptions(T_ThriftMetadata_exceptions_struct_setter&& exceptions_) {
    exceptions_ref() = std::forward<T_ThriftMetadata_exceptions_struct_setter>(exceptions_);
    return __fbthrift_field_exceptions;
  }
  const ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>& get_services() const&;
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftService> get_services() &&;

  template <typename T_ThriftMetadata_services_struct_setter = ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>>
  [[deprecated("Use `FOO.services_ref() = BAR;` instead of `FOO.set_services(BAR);`")]]
  ::std::map<::std::string, ::apache::thrift::metadata::ThriftService>& set_services(T_ThriftMetadata_services_struct_setter&& services_) {
    services_ref() = std::forward<T_ThriftMetadata_services_struct_setter>(services_);
    return __fbthrift_field_services;
  }

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

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


class ThriftServiceMetadataResponse 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 folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static const folly::StringPiece __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::context,
    ::apache::thrift::ident::metadata,
    ::apache::thrift::ident::services
  >;

  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::struct_t<::apache::thrift::metadata::ThriftServiceContext>,
    ::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftMetadata>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::metadata::ThriftServiceContextRef>>
  >;

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


 public:

  ThriftServiceMetadataResponse();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  ThriftServiceMetadataResponse(apache::thrift::FragileConstructor, ::apache::thrift::metadata::ThriftServiceContext context__arg, ::apache::thrift::metadata::ThriftMetadata metadata__arg, ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef> services__arg);

  ThriftServiceMetadataResponse(ThriftServiceMetadataResponse&&) noexcept;

  ThriftServiceMetadataResponse(const ThriftServiceMetadataResponse& src);


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

  ~ThriftServiceMetadataResponse();

 private:
  ::apache::thrift::metadata::ThriftServiceContext __fbthrift_field_context;
 private:
  ::apache::thrift::metadata::ThriftMetadata __fbthrift_field_metadata;
 private:
  ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef> __fbthrift_field_services;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> context_ref() const& {
    return {this->__fbthrift_field_context, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> context_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_context), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> context_ref() & {
    return {this->__fbthrift_field_context, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> context_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_context), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> context() const& {
    return {this->__fbthrift_field_context, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> context() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_context), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> context() & {
    return {this->__fbthrift_field_context, __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftServiceContext>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> context() && {
    return {static_cast<T&&>(this->__fbthrift_field_context), __isset.at(0), __isset.bit(0)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> metadata_ref() const& {
    return {this->__fbthrift_field_metadata, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> metadata_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_metadata), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> metadata_ref() & {
    return {this->__fbthrift_field_metadata, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> metadata_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_metadata), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> metadata() const& {
    return {this->__fbthrift_field_metadata, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> metadata() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_metadata), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> metadata() & {
    return {this->__fbthrift_field_metadata, __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::apache::thrift::metadata::ThriftMetadata>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> metadata() && {
    return {static_cast<T&&>(this->__fbthrift_field_metadata), __isset.at(1), __isset.bit(1)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> services_ref() const& {
    return {this->__fbthrift_field_services, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> services_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_services), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> services_ref() & {
    return {this->__fbthrift_field_services, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> services_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_services), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> services() const& {
    return {this->__fbthrift_field_services, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> services() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_services), __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> services() & {
    return {this->__fbthrift_field_services, __isset.at(2), __isset.bit(2)};
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> services() && {
    return {static_cast<T&&>(this->__fbthrift_field_services), __isset.at(2), __isset.bit(2)};
  }
  const ::apache::thrift::metadata::ThriftServiceContext& get_context() const&;
  ::apache::thrift::metadata::ThriftServiceContext get_context() &&;

  template <typename T_ThriftServiceMetadataResponse_context_struct_setter = ::apache::thrift::metadata::ThriftServiceContext>
  [[deprecated("Use `FOO.context_ref() = BAR;` instead of `FOO.set_context(BAR);`")]]
  ::apache::thrift::metadata::ThriftServiceContext& set_context(T_ThriftServiceMetadataResponse_context_struct_setter&& context_) {
    context_ref() = std::forward<T_ThriftServiceMetadataResponse_context_struct_setter>(context_);
    return __fbthrift_field_context;
  }
  const ::apache::thrift::metadata::ThriftMetadata& get_metadata() const&;
  ::apache::thrift::metadata::ThriftMetadata get_metadata() &&;

  template <typename T_ThriftServiceMetadataResponse_metadata_struct_setter = ::apache::thrift::metadata::ThriftMetadata>
  [[deprecated("Use `FOO.metadata_ref() = BAR;` instead of `FOO.set_metadata(BAR);`")]]
  ::apache::thrift::metadata::ThriftMetadata& set_metadata(T_ThriftServiceMetadataResponse_metadata_struct_setter&& metadata_) {
    metadata_ref() = std::forward<T_ThriftServiceMetadataResponse_metadata_struct_setter>(metadata_);
    return __fbthrift_field_metadata;
  }
  const ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>& get_services() const&;
  ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef> get_services() &&;

  template <typename T_ThriftServiceMetadataResponse_services_struct_setter = ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>>
  [[deprecated("Use `FOO.services_ref() = BAR;` instead of `FOO.set_services(BAR);`")]]
  ::std::vector<::apache::thrift::metadata::ThriftServiceContextRef>& set_services(T_ThriftServiceMetadataResponse_services_struct_setter&& services_) {
    services_ref() = std::forward<T_ThriftServiceMetadataResponse_services_struct_setter>(services_);
    return __fbthrift_field_services;
  }

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

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


}}} // apache::thrift::metadata

namespace apache { namespace thrift {

template <> struct TEnumDataStorage<::apache::thrift::metadata::ThriftConstValue::Type>;

template <> struct TEnumTraits<::apache::thrift::metadata::ThriftConstValue::Type> {
  using type = ::apache::thrift::metadata::ThriftConstValue::Type;

  static constexpr std::size_t const size = 7;
  static folly::Range<type const*> const values;
  static folly::Range<folly::StringPiece const*> const names;

  static bool findName(type value, folly::StringPiece* out) noexcept;
  static bool findValue(folly::StringPiece name, type* out) noexcept;

#if FOLLY_HAS_STRING_VIEW
  static bool findName(type value, std::string_view* out) noexcept {
    folly::StringPiece outp;
    return findName(value, &outp) && ((*out = outp), true);
  }
#endif
  static char const* findName(type value) noexcept {
    folly::StringPiece ret;
    (void)findName(value, &ret);
    return ret.data();
  }
};

template <> struct TEnumDataStorage<::apache::thrift::metadata::ThriftType::Type>;

template <> struct TEnumTraits<::apache::thrift::metadata::ThriftType::Type> {
  using type = ::apache::thrift::metadata::ThriftType::Type;

  static constexpr std::size_t const size = 10;
  static folly::Range<type const*> const values;
  static folly::Range<folly::StringPiece const*> const names;

  static bool findName(type value, folly::StringPiece* out) noexcept;
  static bool findValue(folly::StringPiece name, type* out) noexcept;

#if FOLLY_HAS_STRING_VIEW
  static bool findName(type value, std::string_view* out) noexcept {
    folly::StringPiece outp;
    return findName(value, &outp) && ((*out = outp), true);
  }
#endif
  static char const* findName(type value) noexcept {
    folly::StringPiece ret;
    (void)findName(value, &ret);
    return ret.data();
  }
};
}} // apache::thrift
