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

#pragma once

#include <thrift/lib/cpp2/gen/module_types_h.h>
#include "thrift/lib/thrift/gen-cpp2/id_types.h"
#include "thrift/lib/thrift/gen-cpp2/type_id_types.h"
#include "thrift/lib/thrift/gen-cpp2/record_types.h"
#include "thrift/lib/thrift/detail/TypeSystemAdapter.h"
#include "folly/container/F14Map.h"

namespace apache::thrift {
namespace ident {
struct id;
struct name;
struct identity;
struct presence;
struct type;
struct customDefaultPartialRecord;
struct annotations;
struct fields;
struct isSealed;
struct annotations;
struct fields;
struct isSealed;
struct annotations;
struct name;
struct datum;
struct annotations;
struct values;
struct annotations;
struct targetType;
struct annotations;
struct structDef;
struct unionDef;
struct enumDef;
struct opaqueAliasDef;
struct locator;
struct name;
struct definition;
struct sourceInfo;
struct types;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_id
#define APACHE_THRIFT_ACCESSOR_id
APACHE_THRIFT_DEFINE_ACCESSOR(id);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_identity
#define APACHE_THRIFT_ACCESSOR_identity
APACHE_THRIFT_DEFINE_ACCESSOR(identity);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_presence
#define APACHE_THRIFT_ACCESSOR_presence
APACHE_THRIFT_DEFINE_ACCESSOR(presence);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_customDefaultPartialRecord
#define APACHE_THRIFT_ACCESSOR_customDefaultPartialRecord
APACHE_THRIFT_DEFINE_ACCESSOR(customDefaultPartialRecord);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_isSealed
#define APACHE_THRIFT_ACCESSOR_isSealed
APACHE_THRIFT_DEFINE_ACCESSOR(isSealed);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_isSealed
#define APACHE_THRIFT_ACCESSOR_isSealed
APACHE_THRIFT_DEFINE_ACCESSOR(isSealed);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_datum
#define APACHE_THRIFT_ACCESSOR_datum
APACHE_THRIFT_DEFINE_ACCESSOR(datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_values
#define APACHE_THRIFT_ACCESSOR_values
APACHE_THRIFT_DEFINE_ACCESSOR(values);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_targetType
#define APACHE_THRIFT_ACCESSOR_targetType
APACHE_THRIFT_DEFINE_ACCESSOR(targetType);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_annotations
#define APACHE_THRIFT_ACCESSOR_annotations
APACHE_THRIFT_DEFINE_ACCESSOR(annotations);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_structDef
#define APACHE_THRIFT_ACCESSOR_structDef
APACHE_THRIFT_DEFINE_ACCESSOR(structDef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_unionDef
#define APACHE_THRIFT_ACCESSOR_unionDef
APACHE_THRIFT_DEFINE_ACCESSOR(unionDef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_enumDef
#define APACHE_THRIFT_ACCESSOR_enumDef
APACHE_THRIFT_DEFINE_ACCESSOR(enumDef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_opaqueAliasDef
#define APACHE_THRIFT_ACCESSOR_opaqueAliasDef
APACHE_THRIFT_DEFINE_ACCESSOR(opaqueAliasDef);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_locator
#define APACHE_THRIFT_ACCESSOR_locator
APACHE_THRIFT_DEFINE_ACCESSOR(locator);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_definition
#define APACHE_THRIFT_ACCESSOR_definition
APACHE_THRIFT_DEFINE_ACCESSOR(definition);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_sourceInfo
#define APACHE_THRIFT_ACCESSOR_sourceInfo
APACHE_THRIFT_DEFINE_ACCESSOR(sourceInfo);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_types
#define APACHE_THRIFT_ACCESSOR_types
APACHE_THRIFT_DEFINE_ACCESSOR(types);
#endif
} // namespace detail
} // namespace apache::thrift

// BEGIN declare_enums
namespace apache::thrift::type_system {

/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "PresenceQualifier", "kind": "enum" } */
enum class PresenceQualifier {
  DEFAULT_INITIALIZED = 0,
  UNQUALIFIED = 1,
  OPTIONAL_ = 2,
  TERSE = 3,
};

} // namespace apache::thrift::type_system

template<> struct std::hash<::apache::thrift::type_system::PresenceQualifier> :
  ::apache::thrift::detail::enum_hash<::apache::thrift::type_system::PresenceQualifier> {};

namespace apache::thrift {

template <> struct TEnumTraits<::apache::thrift::type_system::PresenceQualifier> {
  using type = ::apache::thrift::type_system::PresenceQualifier;

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

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

  FOLLY_ERASE static std::string_view typeName() noexcept {
    return "PresenceQualifier";
  }

  FOLLY_ERASE static constexpr std::string_view moduleName() noexcept {
    return "type_system";
  }

  static constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/PresenceQualifier";

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

  static const std::vector<std::any>& annotations() noexcept;
  static const std::vector<std::any>& enumValueAnnotations(::apache::thrift::type_system::PresenceQualifier) noexcept;
};

} // namespace apache::thrift
// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::type_system {
class FieldIdentityStruct;
class SerializableFieldDefinition;
class SerializableStructDefinition;
class SerializableUnionDefinition;
class SerializableEnumValueDefinition;
class SerializableEnumDefinition;
class SerializableOpaqueAliasDefinition;
class SerializableTypeDefinition;
class SerializableThriftSourceInfo;
class SerializableTypeDefinitionEntry;
class SerializableTypeSystem;
} // namespace apache::thrift::type_system
// END forward_declare
namespace apache::thrift::detail::annotation {
} // namespace apache::thrift::detail::annotation

namespace apache::thrift::detail::qualifier {
} // namespace apache::thrift::detail::qualifier

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

/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "FieldId", "kind": "typedef" } */
using FieldId = ::apache::thrift::type::FieldId;
/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "FieldName", "kind": "typedef" } */
using FieldName = ::std::string;

/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "FieldIdentityStruct", "kind": "struct" } */
class FieldIdentityStruct 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/FieldIdentity";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::id,
    ::apache::thrift::ident::name
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::type::detail::StrongIntegerAdapter<::apache::thrift::type::FieldId>, ::apache::thrift::type::i16_t>,
    ::apache::thrift::type::string_t
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = FieldIdentityStruct;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  FieldIdentityStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  FieldIdentityStruct(apache::thrift::FragileConstructor, ::apache::thrift::type_system::FieldId id__arg, ::apache::thrift::type_system::FieldName name__arg);

  FieldIdentityStruct(FieldIdentityStruct&&) noexcept;
  FieldIdentityStruct(const FieldIdentityStruct& src);


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

  ~FieldIdentityStruct();

 private:
  ::apache::thrift::type_system::FieldId __fbthrift_field_id;
 private:
  ::apache::thrift::type_system::FieldName __fbthrift_field_name;

 public:

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

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> id_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_id};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> id_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_id};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> id_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_id)};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> id() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_id};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> id() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_id};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> id() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_id)};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_name)};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldName>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__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<FieldIdentityStruct>;
  friend void swap(FieldIdentityStruct& a, FieldIdentityStruct& b);
};

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

using FieldIdentity = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::type_system::detail::FieldIdentityAdapter, ::apache::thrift::type_system::FieldIdentityStruct>;


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableFieldDefinition", "kind": "struct" } */
class SerializableFieldDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableFieldDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 5;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2,3,4,5};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::identity,
    ::apache::thrift::ident::presence,
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::customDefaultPartialRecord,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::FieldIdentityAdapter, ::apache::thrift::type::struct_t<::apache::thrift::type_system::FieldIdentityStruct>>,
    ::apache::thrift::type::enum_t<::apache::thrift::type_system::PresenceQualifier>,
    ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>,
    ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableFieldDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableFieldDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableFieldDefinition(apache::thrift::FragileConstructor, ::apache::thrift::type_system::FieldIdentity identity__arg, ::apache::thrift::type_system::PresenceQualifier presence__arg, ::apache::thrift::type_system::TypeId type__arg, ::apache::thrift::type_system::SerializableRecordUnion customDefaultPartialRecord__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableFieldDefinition(SerializableFieldDefinition&&) noexcept;
  SerializableFieldDefinition(const SerializableFieldDefinition& src);


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

  ~SerializableFieldDefinition();

 private:
  ::apache::thrift::type_system::FieldIdentity __fbthrift_field_identity;
 private:
  ::apache::thrift::type_system::PresenceQualifier __fbthrift_field_presence;
 private:
  ::apache::thrift::type_system::TypeId __fbthrift_field_type;
 private:
  ::apache::thrift::type_system::SerializableRecordUnion __fbthrift_field_customDefaultPartialRecord;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> identity_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_identity};
  }

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> identity_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_identity};
  }

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> identity_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_identity)};
  }

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> identity() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_identity};
  }

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> identity() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_identity};
  }

  /** Glean { "field": "identity" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::FieldIdentity>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> identity() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_identity)};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> presence_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_presence};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> presence_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_presence};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> presence_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_presence)};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> presence() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_presence};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> presence() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_presence};
  }

  /** Glean { "field": "presence" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::PresenceQualifier>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> presence() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_presence)};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> type_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_type};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> type_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_type};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> type_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_type)};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> type() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_type};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> type() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_type};
  }

  /** Glean { "field": "type" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> type() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_type)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> customDefaultPartialRecord_ref() const& {
    return {this->__fbthrift_field_customDefaultPartialRecord, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> customDefaultPartialRecord_ref() & {
    return {this->__fbthrift_field_customDefaultPartialRecord, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> customDefaultPartialRecord_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_customDefaultPartialRecord), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> customDefaultPartialRecord() const& {
    return {this->__fbthrift_field_customDefaultPartialRecord, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> customDefaultPartialRecord() & {
    return {this->__fbthrift_field_customDefaultPartialRecord, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> customDefaultPartialRecord() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_customDefaultPartialRecord), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "customDefaultPartialRecord" } */
  [[deprecated("Use `FOO.customDefaultPartialRecord().value()` instead of `FOO.get_customDefaultPartialRecord()`")]]
  const ::apache::thrift::type_system::SerializableRecordUnion* get_customDefaultPartialRecord() const&;

  /** Glean { "field": "customDefaultPartialRecord" } */
  [[deprecated("Use `FOO.customDefaultPartialRecord().value()` instead of `FOO.get_customDefaultPartialRecord()`")]]
  ::apache::thrift::type_system::SerializableRecordUnion* get_customDefaultPartialRecord() &;

  ::apache::thrift::type_system::SerializableRecordUnion* get_customDefaultPartialRecord() && = delete;

  /** Glean { "field": "customDefaultPartialRecord" } */
  template <typename T_SerializableFieldDefinition_customDefaultPartialRecord_struct_setter = ::apache::thrift::type_system::SerializableRecordUnion>
  [[deprecated("Use `FOO.customDefaultPartialRecord() = BAR` instead of `FOO.set_customDefaultPartialRecord(BAR)`")]]
  ::apache::thrift::type_system::SerializableRecordUnion& set_customDefaultPartialRecord(T_SerializableFieldDefinition_customDefaultPartialRecord_struct_setter&& customDefaultPartialRecord_) {
    customDefaultPartialRecord_ref() = std::forward<T_SerializableFieldDefinition_customDefaultPartialRecord_struct_setter>(customDefaultPartialRecord_);
    return __fbthrift_field_customDefaultPartialRecord;
  }

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

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableStructDefinition", "kind": "struct" } */
class SerializableStructDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableStructDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 3;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,2,3,4};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::fields,
    ::apache::thrift::ident::isSealed,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableFieldDefinition>>,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableStructDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableStructDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableStructDefinition(apache::thrift::FragileConstructor, ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition> fields__arg, bool isSealed__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableStructDefinition(SerializableStructDefinition&&) noexcept;

  SerializableStructDefinition(const SerializableStructDefinition& src);


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

  ~SerializableStructDefinition();

 private:
  ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition> __fbthrift_field_fields;
 private:
  bool __fbthrift_field_isSealed;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;

 public:

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

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> fields_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> fields_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> fields_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_fields)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> fields() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> fields() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> fields() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_fields)};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> isSealed_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> isSealed_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> isSealed_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_isSealed)};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> isSealed() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> isSealed() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> isSealed() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_isSealed)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_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<SerializableStructDefinition>;
  friend void swap(SerializableStructDefinition& a, SerializableStructDefinition& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableUnionDefinition", "kind": "struct" } */
class SerializableUnionDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableUnionDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 3;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,2,3,4};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::fields,
    ::apache::thrift::ident::isSealed,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableFieldDefinition>>,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableUnionDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableUnionDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableUnionDefinition(apache::thrift::FragileConstructor, ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition> fields__arg, bool isSealed__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableUnionDefinition(SerializableUnionDefinition&&) noexcept;

  SerializableUnionDefinition(const SerializableUnionDefinition& src);


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

  ~SerializableUnionDefinition();

 private:
  ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition> __fbthrift_field_fields;
 private:
  bool __fbthrift_field_isSealed;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;

 public:

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

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> fields_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> fields_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> fields_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_fields)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> fields() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> fields() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_fields};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableFieldDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> fields() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_fields)};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> isSealed_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> isSealed_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> isSealed_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_isSealed)};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> isSealed() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> isSealed() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_isSealed};
  }

  /** Glean { "field": "isSealed" } */
  template <typename..., typename fbthrift_T = bool>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> isSealed() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_isSealed)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_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<SerializableUnionDefinition>;
  friend void swap(SerializableUnionDefinition& a, SerializableUnionDefinition& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableEnumValueDefinition", "kind": "struct" } */
class SerializableEnumValueDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableEnumValueDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 3;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2,3};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::name,
    ::apache::thrift::ident::datum,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableEnumValueDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableEnumValueDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableEnumValueDefinition(apache::thrift::FragileConstructor, ::std::string name__arg, ::std::int32_t datum__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableEnumValueDefinition(SerializableEnumValueDefinition&&) noexcept;

  SerializableEnumValueDefinition(const SerializableEnumValueDefinition& src);


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

  ~SerializableEnumValueDefinition();

 private:
  ::std::string __fbthrift_field_name;
 private:
  ::std::int32_t __fbthrift_field_datum;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;

 public:

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

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_name)};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_name)};
  }

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

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

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

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

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

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

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_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<SerializableEnumValueDefinition>;
  friend void swap(SerializableEnumValueDefinition& a, SerializableEnumValueDefinition& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableEnumDefinition", "kind": "struct" } */
class SerializableEnumDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableEnumDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,2,3};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::values,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableEnumValueDefinition>>,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableEnumDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableEnumDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableEnumDefinition(apache::thrift::FragileConstructor, ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition> values__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableEnumDefinition(SerializableEnumDefinition&&) noexcept;

  SerializableEnumDefinition(const SerializableEnumDefinition& src);


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

  ~SerializableEnumDefinition();

 private:
  ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition> __fbthrift_field_values;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;

 public:

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

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> values_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_values};
  }

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> values_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_values};
  }

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> values_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_values)};
  }

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> values() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_values};
  }

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> values() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_values};
  }

  /** Glean { "field": "values" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type_system::SerializableEnumValueDefinition>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> values() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_values)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_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<SerializableEnumDefinition>;
  friend void swap(SerializableEnumDefinition& a, SerializableEnumDefinition& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableOpaqueAliasDefinition", "kind": "struct" } */
class SerializableOpaqueAliasDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableOpaqueAliasDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,2,3};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::targetType,
    ::apache::thrift::ident::annotations
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::type_system::detail::TypeIdAdapter, ::apache::thrift::type::union_t<::apache::thrift::type_system::TypeIdUnion>>,
    ::apache::thrift::type::cpp_type<folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableOpaqueAliasDefinition;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableOpaqueAliasDefinition();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableOpaqueAliasDefinition(apache::thrift::FragileConstructor, ::apache::thrift::type_system::TypeId targetType__arg, folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> annotations__arg);

  SerializableOpaqueAliasDefinition(SerializableOpaqueAliasDefinition&&) noexcept;
  SerializableOpaqueAliasDefinition(const SerializableOpaqueAliasDefinition& src);


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

  ~SerializableOpaqueAliasDefinition();

 private:
  ::apache::thrift::type_system::TypeId __fbthrift_field_targetType;
 private:
  folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion> __fbthrift_field_annotations;

 public:

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

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> targetType_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_targetType};
  }

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> targetType_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_targetType};
  }

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> targetType_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_targetType)};
  }

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> targetType() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_targetType};
  }

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> targetType() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_targetType};
  }

  /** Glean { "field": "targetType" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::TypeId>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> targetType() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_targetType)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_annotations)};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> annotations() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> annotations() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_annotations};
  }

  /** Glean { "field": "annotations" } */
  template <typename..., typename fbthrift_T = folly::F14FastMap<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> annotations() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_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<SerializableOpaqueAliasDefinition>;
  friend void swap(SerializableOpaqueAliasDefinition& a, SerializableOpaqueAliasDefinition& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableTypeDefinition", "kind": "union" } */
class SerializableTypeDefinition 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableTypeDefinition";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 4;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2,3,4};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::structDef,
    ::apache::thrift::ident::unionDef,
    ::apache::thrift::ident::enumDef,
    ::apache::thrift::ident::opaqueAliasDef
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableStructDefinition>,
    ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableUnionDefinition>,
    ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableEnumDefinition>,
    ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableOpaqueAliasDefinition>
  >;
  void __fbthrift_clear();
  void __fbthrift_destruct();
  bool __fbthrift_is_empty() const;

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


 public:
  enum class Type : int {
    __EMPTY__ = 0,
    structDef = 1,
    unionDef = 2,
    enumDef = 3,
    opaqueAliasDef = 4,
  } ;

  SerializableTypeDefinition()
      : fbthrift_type_(folly::to_underlying(Type::__EMPTY__)) {}

  SerializableTypeDefinition(SerializableTypeDefinition&& rhs) noexcept
      : fbthrift_type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::structDef:
      {
        set_structDef(std::move(rhs.value_.structDef));
        break;
      }
      case Type::unionDef:
      {
        set_unionDef(std::move(rhs.value_.unionDef));
        break;
      }
      case Type::enumDef:
      {
        set_enumDef(std::move(rhs.value_.enumDef));
        break;
      }
      case Type::opaqueAliasDef:
      {
        set_opaqueAliasDef(std::move(rhs.value_.opaqueAliasDef));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  SerializableTypeDefinition(const SerializableTypeDefinition& rhs);

  SerializableTypeDefinition& operator=(SerializableTypeDefinition&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        __fbthrift_clear();
        return *this;
      }
      case Type::structDef:
      {
        set_structDef(std::move(rhs.value_.structDef));
        break;
      }
      case Type::unionDef:
      {
        set_unionDef(std::move(rhs.value_.unionDef));
        break;
      }
      case Type::enumDef:
      {
        set_enumDef(std::move(rhs.value_.enumDef));
        break;
      }
      case Type::opaqueAliasDef:
      {
        set_opaqueAliasDef(std::move(rhs.value_.opaqueAliasDef));
        break;
      }
      default:
      {
        assert(false);
        __fbthrift_clear();
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  SerializableTypeDefinition& operator=(const SerializableTypeDefinition& rhs);

  ~SerializableTypeDefinition();

  union storage_type {
    ::apache::thrift::type_system::SerializableStructDefinition structDef;
    ::apache::thrift::type_system::SerializableUnionDefinition unionDef;
    ::apache::thrift::type_system::SerializableEnumDefinition enumDef;
    ::apache::thrift::type_system::SerializableOpaqueAliasDefinition opaqueAliasDef;

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

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

  /** Glean { "field": "structDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableStructDefinition& set_structDef(::apache::thrift::type_system::SerializableStructDefinition const &t) {
    using T0 = ::apache::thrift::type_system::SerializableStructDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::structDef);
    ::new (std::addressof(value_.structDef)) T(t);
    return value_.structDef;
  }

  /** Glean { "field": "structDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableStructDefinition& set_structDef(::apache::thrift::type_system::SerializableStructDefinition&& t) {
    using T0 = ::apache::thrift::type_system::SerializableStructDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::structDef);
    ::new (std::addressof(value_.structDef)) T(std::move(t));
    return value_.structDef;
  }

  /** Glean { "field": "structDef" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type_system::SerializableStructDefinition, T...>> ::apache::thrift::type_system::SerializableStructDefinition& set_structDef(T&&... t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::structDef);
    ::new (std::addressof(value_.structDef)) ::apache::thrift::type_system::SerializableStructDefinition(std::forward<T>(t)...);
    return value_.structDef;
  }

  /** Glean { "field": "unionDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableUnionDefinition& set_unionDef(::apache::thrift::type_system::SerializableUnionDefinition const &t) {
    using T0 = ::apache::thrift::type_system::SerializableUnionDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::unionDef);
    ::new (std::addressof(value_.unionDef)) T(t);
    return value_.unionDef;
  }

  /** Glean { "field": "unionDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableUnionDefinition& set_unionDef(::apache::thrift::type_system::SerializableUnionDefinition&& t) {
    using T0 = ::apache::thrift::type_system::SerializableUnionDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::unionDef);
    ::new (std::addressof(value_.unionDef)) T(std::move(t));
    return value_.unionDef;
  }

  /** Glean { "field": "unionDef" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type_system::SerializableUnionDefinition, T...>> ::apache::thrift::type_system::SerializableUnionDefinition& set_unionDef(T&&... t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::unionDef);
    ::new (std::addressof(value_.unionDef)) ::apache::thrift::type_system::SerializableUnionDefinition(std::forward<T>(t)...);
    return value_.unionDef;
  }

  /** Glean { "field": "enumDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableEnumDefinition& set_enumDef(::apache::thrift::type_system::SerializableEnumDefinition const &t) {
    using T0 = ::apache::thrift::type_system::SerializableEnumDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::enumDef);
    ::new (std::addressof(value_.enumDef)) T(t);
    return value_.enumDef;
  }

  /** Glean { "field": "enumDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableEnumDefinition& set_enumDef(::apache::thrift::type_system::SerializableEnumDefinition&& t) {
    using T0 = ::apache::thrift::type_system::SerializableEnumDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::enumDef);
    ::new (std::addressof(value_.enumDef)) T(std::move(t));
    return value_.enumDef;
  }

  /** Glean { "field": "enumDef" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type_system::SerializableEnumDefinition, T...>> ::apache::thrift::type_system::SerializableEnumDefinition& set_enumDef(T&&... t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::enumDef);
    ::new (std::addressof(value_.enumDef)) ::apache::thrift::type_system::SerializableEnumDefinition(std::forward<T>(t)...);
    return value_.enumDef;
  }

  /** Glean { "field": "opaqueAliasDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableOpaqueAliasDefinition& set_opaqueAliasDef(::apache::thrift::type_system::SerializableOpaqueAliasDefinition const &t) {
    using T0 = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::opaqueAliasDef);
    ::new (std::addressof(value_.opaqueAliasDef)) T(t);
    return value_.opaqueAliasDef;
  }

  /** Glean { "field": "opaqueAliasDef" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::apache::thrift::type_system::SerializableOpaqueAliasDefinition& set_opaqueAliasDef(::apache::thrift::type_system::SerializableOpaqueAliasDefinition&& t) {
    using T0 = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::opaqueAliasDef);
    ::new (std::addressof(value_.opaqueAliasDef)) T(std::move(t));
    return value_.opaqueAliasDef;
  }

  /** Glean { "field": "opaqueAliasDef" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type_system::SerializableOpaqueAliasDefinition, T...>> ::apache::thrift::type_system::SerializableOpaqueAliasDefinition& set_opaqueAliasDef(T&&... t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::opaqueAliasDef);
    ::new (std::addressof(value_.opaqueAliasDef)) ::apache::thrift::type_system::SerializableOpaqueAliasDefinition(std::forward<T>(t)...);
    return value_.opaqueAliasDef;
  }

  /** Glean { "field": "structDef" } */
  ::apache::thrift::type_system::SerializableStructDefinition const& get_structDef() const {
    if (getType() != Type::structDef) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.structDef;
  }

  /** Glean { "field": "unionDef" } */
  ::apache::thrift::type_system::SerializableUnionDefinition const& get_unionDef() const {
    if (getType() != Type::unionDef) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.unionDef;
  }

  /** Glean { "field": "enumDef" } */
  ::apache::thrift::type_system::SerializableEnumDefinition const& get_enumDef() const {
    if (getType() != Type::enumDef) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.enumDef;
  }

  /** Glean { "field": "opaqueAliasDef" } */
  ::apache::thrift::type_system::SerializableOpaqueAliasDefinition const& get_opaqueAliasDef() const {
    if (getType() != Type::opaqueAliasDef) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.opaqueAliasDef;
  }

  ::apache::thrift::type_system::SerializableStructDefinition& mutable_structDef() {
    assert(getType() == Type::structDef);
    return value_.structDef;
  }

  ::apache::thrift::type_system::SerializableUnionDefinition& mutable_unionDef() {
    assert(getType() == Type::unionDef);
    return value_.unionDef;
  }

  ::apache::thrift::type_system::SerializableEnumDefinition& mutable_enumDef() {
    assert(getType() == Type::enumDef);
    return value_.enumDef;
  }

  ::apache::thrift::type_system::SerializableOpaqueAliasDefinition& mutable_opaqueAliasDef() {
    assert(getType() == Type::opaqueAliasDef);
    return value_.opaqueAliasDef;
  }

  template <typename..., typename T = ::apache::thrift::type_system::SerializableStructDefinition>
  T move_structDef() {
    assert(getType() == Type::structDef);
    return std::move(value_.structDef);
  }

  template <typename..., typename T = ::apache::thrift::type_system::SerializableUnionDefinition>
  T move_unionDef() {
    assert(getType() == Type::unionDef);
    return std::move(value_.unionDef);
  }

  template <typename..., typename T = ::apache::thrift::type_system::SerializableEnumDefinition>
  T move_enumDef() {
    assert(getType() == Type::enumDef);
    return std::move(value_.enumDef);
  }

  template <typename..., typename T = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition>
  T move_opaqueAliasDef() {
    assert(getType() == Type::opaqueAliasDef);
    return std::move(value_.opaqueAliasDef);
  }

  /** Glean { "field": "structDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableStructDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> structDef_ref() const& {
    return {value_.structDef, fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "structDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableStructDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> structDef_ref() & {
    return {value_.structDef, fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "structDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableStructDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> structDef_ref() && {
    return {std::move(value_.structDef), fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "structDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<const ::apache::thrift::type_system::SerializableStructDefinition&> structDef() const& {
    return {value_.structDef, fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "structDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableStructDefinition&> structDef() & {
    return {value_.structDef, fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "structDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableStructDefinition&&> structDef() && {
    return {std::move(value_.structDef), fbthrift_type_, folly::to_underlying(Type::structDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "unionDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableUnionDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> unionDef_ref() const& {
    return {value_.unionDef, fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "unionDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableUnionDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> unionDef_ref() & {
    return {value_.unionDef, fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "unionDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableUnionDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> unionDef_ref() && {
    return {std::move(value_.unionDef), fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "unionDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<const ::apache::thrift::type_system::SerializableUnionDefinition&> unionDef() const& {
    return {value_.unionDef, fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "unionDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableUnionDefinition&> unionDef() & {
    return {value_.unionDef, fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "unionDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableUnionDefinition&&> unionDef() && {
    return {std::move(value_.unionDef), fbthrift_type_, folly::to_underlying(Type::unionDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "enumDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableEnumDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> enumDef_ref() const& {
    return {value_.enumDef, fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "enumDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableEnumDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> enumDef_ref() & {
    return {value_.enumDef, fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "enumDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableEnumDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> enumDef_ref() && {
    return {std::move(value_.enumDef), fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "enumDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<const ::apache::thrift::type_system::SerializableEnumDefinition&> enumDef() const& {
    return {value_.enumDef, fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "enumDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableEnumDefinition&> enumDef() & {
    return {value_.enumDef, fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "enumDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableEnumDefinition&&> enumDef() && {
    return {std::move(value_.enumDef), fbthrift_type_, folly::to_underlying(Type::enumDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "opaqueAliasDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> opaqueAliasDef_ref() const& {
    return {value_.opaqueAliasDef, fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "opaqueAliasDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> opaqueAliasDef_ref() & {
    return {value_.opaqueAliasDef, fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "opaqueAliasDef" } */
  template <typename..., typename T = ::apache::thrift::type_system::SerializableOpaqueAliasDefinition>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> opaqueAliasDef_ref() && {
    return {std::move(value_.opaqueAliasDef), fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "opaqueAliasDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<const ::apache::thrift::type_system::SerializableOpaqueAliasDefinition&> opaqueAliasDef() const& {
    return {value_.opaqueAliasDef, fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "opaqueAliasDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableOpaqueAliasDefinition&> opaqueAliasDef() & {
    return {value_.opaqueAliasDef, fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "opaqueAliasDef" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type_system::SerializableOpaqueAliasDefinition&&> opaqueAliasDef() && {
    return {std::move(value_.opaqueAliasDef), fbthrift_type_, folly::to_underlying(Type::opaqueAliasDef), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  Type getType() const { return static_cast<Type>(fbthrift_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> fbthrift_type_;

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

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

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableThriftSourceInfo", "kind": "struct" } */
class SerializableThriftSourceInfo 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableThriftSourceInfo";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,2,3};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::locator,
    ::apache::thrift::ident::name
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::string_t
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableThriftSourceInfo;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableThriftSourceInfo();

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

  SerializableThriftSourceInfo(SerializableThriftSourceInfo&&) noexcept;

  SerializableThriftSourceInfo(const SerializableThriftSourceInfo& src);


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

  ~SerializableThriftSourceInfo();

 private:
  ::std::string __fbthrift_field_locator;
 private:
  ::std::string __fbthrift_field_name;

 public:

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

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> locator_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_locator};
  }

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> locator_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_locator};
  }

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> locator_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_locator)};
  }

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> locator() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_locator};
  }

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> locator() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_locator};
  }

  /** Glean { "field": "locator" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> locator() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_locator)};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_name)};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> name() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> name() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_name};
  }

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> name() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__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<SerializableThriftSourceInfo>;
  friend void swap(SerializableThriftSourceInfo& a, SerializableThriftSourceInfo& b);
};

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableTypeDefinitionEntry", "kind": "struct" } */
class SerializableTypeDefinitionEntry 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableTypeDefinitionEntry";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::definition,
    ::apache::thrift::ident::sourceInfo
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableTypeDefinition>,
    ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableThriftSourceInfo>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableTypeDefinitionEntry;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableTypeDefinitionEntry() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableTypeDefinitionEntry(apache::thrift::FragileConstructor, ::apache::thrift::type_system::SerializableTypeDefinition definition__arg, ::apache::thrift::type_system::SerializableThriftSourceInfo sourceInfo__arg);

  SerializableTypeDefinitionEntry(SerializableTypeDefinitionEntry&&) noexcept;

  SerializableTypeDefinitionEntry(const SerializableTypeDefinitionEntry& src);


  SerializableTypeDefinitionEntry& operator=(SerializableTypeDefinitionEntry&&) noexcept;
  SerializableTypeDefinitionEntry& operator=(const SerializableTypeDefinitionEntry& src);
 private:
  ::apache::thrift::type_system::SerializableTypeDefinition __fbthrift_field_definition;
 private:
  ::apache::thrift::type_system::SerializableThriftSourceInfo __fbthrift_field_sourceInfo;
 private:
  apache::thrift::detail::isset_bitset<1, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> definition_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_definition};
  }

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> definition_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_definition};
  }

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> definition_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_definition)};
  }

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> definition() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_definition};
  }

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> definition() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_definition};
  }

  /** Glean { "field": "definition" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableTypeDefinition>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> definition() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_definition)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> sourceInfo_ref() const& {
    return {this->__fbthrift_field_sourceInfo, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> sourceInfo_ref() & {
    return {this->__fbthrift_field_sourceInfo, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> sourceInfo_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_sourceInfo), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> sourceInfo() const& {
    return {this->__fbthrift_field_sourceInfo, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> sourceInfo() & {
    return {this->__fbthrift_field_sourceInfo, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> sourceInfo() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_sourceInfo), __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "sourceInfo" } */
  [[deprecated("Use `FOO.sourceInfo().value()` instead of `FOO.get_sourceInfo()`")]]
  const ::apache::thrift::type_system::SerializableThriftSourceInfo* get_sourceInfo() const&;

  /** Glean { "field": "sourceInfo" } */
  [[deprecated("Use `FOO.sourceInfo().value()` instead of `FOO.get_sourceInfo()`")]]
  ::apache::thrift::type_system::SerializableThriftSourceInfo* get_sourceInfo() &;

  ::apache::thrift::type_system::SerializableThriftSourceInfo* get_sourceInfo() && = delete;

  /** Glean { "field": "sourceInfo" } */
  template <typename T_SerializableTypeDefinitionEntry_sourceInfo_struct_setter = ::apache::thrift::type_system::SerializableThriftSourceInfo>
  [[deprecated("Use `FOO.sourceInfo() = BAR` instead of `FOO.set_sourceInfo(BAR)`")]]
  ::apache::thrift::type_system::SerializableThriftSourceInfo& set_sourceInfo(T_SerializableTypeDefinitionEntry_sourceInfo_struct_setter&& sourceInfo_) {
    sourceInfo_ref() = std::forward<T_SerializableTypeDefinitionEntry_sourceInfo_struct_setter>(sourceInfo_);
    return __fbthrift_field_sourceInfo;
  }

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

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


/** Glean {"file": "/opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_system.thrift", "name": "SerializableTypeSystem", "kind": "struct" } */
class SerializableTypeSystem 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 constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type_system/SerializableTypeSystem";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_system";
  }
  static constexpr std::size_t __fbthrift_num_fields = 1;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::types
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

 public:
  using __fbthrift_cpp2_type = SerializableTypeSystem;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

  SerializableTypeSystem();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SerializableTypeSystem(apache::thrift::FragileConstructor, ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry> types__arg);

  SerializableTypeSystem(SerializableTypeSystem&&) noexcept;

  SerializableTypeSystem(const SerializableTypeSystem& src);


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

  ~SerializableTypeSystem();

 private:
  ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry> __fbthrift_field_types;

 public:

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

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> types_ref() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_types};
  }

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> types_ref() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_types};
  }

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> types_ref() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_types)};
  }

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<const fbthrift_T&> types() const& {
    return ::apache::thrift::terse_field_ref<const fbthrift_T&>{this->__fbthrift_field_types};
  }

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&> types() & {
    return ::apache::thrift::terse_field_ref<fbthrift_T&>{this->__fbthrift_field_types};
  }

  /** Glean { "field": "types" } */
  template <typename..., typename fbthrift_T = ::std::map<::apache::thrift::type_system::Uri, ::apache::thrift::type_system::SerializableTypeDefinitionEntry>>
  FOLLY_ERASE ::apache::thrift::terse_field_ref<fbthrift_T&&> types() && {
    return ::apache::thrift::terse_field_ref<fbthrift_T&&>{static_cast<fbthrift_T&&>(this->__fbthrift_field_types)};
  }

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

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


} // namespace apache::thrift::type_system

namespace apache::thrift {

template <> struct TEnumDataStorage<::apache::thrift::type_system::SerializableTypeDefinition::Type>;

template <> struct TEnumTraits<::apache::thrift::type_system::SerializableTypeDefinition::Type> {
  using type = ::apache::thrift::type_system::SerializableTypeDefinition::Type;

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

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

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

  static constexpr type min() { return type::structDef; }
  static constexpr type max() { return type::opaqueAliasDef; }
};
} // namespace apache::thrift

namespace apache::thrift::detail {
template <> struct TSchemaAssociation<::apache::thrift::type_system::FieldIdentityStruct, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x00\x0c\xec\xcb\xa2\xfd\xb2\x5a\xe4\x8c\x1d\x35\x2a\x55\x3c\x9f", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableFieldDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\xe7\x3d\x3b\x40\xd9\xea\x68\xae\x1a\x98\x22\xdb\x4d\x98\x9f\x34", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableStructDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x86\x12\xd9\xd2\xd5\xdb\xb3\xf0\x15\x19\x44\xeb\xe5\xb9\xd2\x20", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableUnionDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x94\x05\x44\xd9\xf6\xb7\x18\xc0\xb6\xe9\xf2\x61\x17\x46\xac\xbc", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableEnumValueDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x5f\x3a\xf4\x6b\x43\xfa\x95\x10\x3e\x00\x8b\xc0\x06\xe9\x1a\x3b", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableEnumDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x38\xec\x68\x9a\x0b\xac\xb5\xf7\xb6\xe5\xd4\xc7\xf8\x41\x1d\xe4", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableOpaqueAliasDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x75\xaa\x66\x98\xb0\xa4\x04\xd7\x12\x4a\x2f\xc8\xf0\x53\x29\x91", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableTypeDefinition, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\xd1\x10\x72\x3a\x0a\xf0\x5b\xb3\xa0\x5e\x9d\x8b\x28\x7e\x1b\x5d", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableThriftSourceInfo, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x8c\x91\xfd\x2d\xe8\xc2\x3c\x8a\xc6\x86\x94\x80\x83\xfc\x14\x8b", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableTypeDefinitionEntry, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x20\xf3\x5e\x71\x86\x93\xd5\xb1\x90\xe4\x9f\x5a\xa2\xd6\xd5\x5b", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableTypeSystem, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\x8f\x95\x46\x99\x7a\xb7\x87\x60\x11\xa2\xf2\x43\x94\xd1\x41\x82", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::PresenceQualifier, true> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7454516908998661115;
  static constexpr ::std::string_view definitionKey = {"\xfc\x59\x1a\xa3\x02\xa6\x2a\xd8\xed\x25\xca\x84\x7d\xaf\x70\xe5", 16};
};
} // namespace apache::thrift::detail
