/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/record.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/standard_types.h"

namespace apache::thrift {
namespace ident {
struct boolDatum;
struct int8Datum;
struct int16Datum;
struct int32Datum;
struct int64Datum;
struct float32Datum;
struct float64Datum;
struct textDatum;
struct byteArrayDatum;
struct fieldSetDatum;
struct listDatum;
struct setDatum;
struct mapDatum;
struct key;
struct value;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_boolDatum
#define APACHE_THRIFT_ACCESSOR_boolDatum
APACHE_THRIFT_DEFINE_ACCESSOR(boolDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_int8Datum
#define APACHE_THRIFT_ACCESSOR_int8Datum
APACHE_THRIFT_DEFINE_ACCESSOR(int8Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_int16Datum
#define APACHE_THRIFT_ACCESSOR_int16Datum
APACHE_THRIFT_DEFINE_ACCESSOR(int16Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_int32Datum
#define APACHE_THRIFT_ACCESSOR_int32Datum
APACHE_THRIFT_DEFINE_ACCESSOR(int32Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_int64Datum
#define APACHE_THRIFT_ACCESSOR_int64Datum
APACHE_THRIFT_DEFINE_ACCESSOR(int64Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_float32Datum
#define APACHE_THRIFT_ACCESSOR_float32Datum
APACHE_THRIFT_DEFINE_ACCESSOR(float32Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_float64Datum
#define APACHE_THRIFT_ACCESSOR_float64Datum
APACHE_THRIFT_DEFINE_ACCESSOR(float64Datum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_textDatum
#define APACHE_THRIFT_ACCESSOR_textDatum
APACHE_THRIFT_DEFINE_ACCESSOR(textDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_byteArrayDatum
#define APACHE_THRIFT_ACCESSOR_byteArrayDatum
APACHE_THRIFT_DEFINE_ACCESSOR(byteArrayDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fieldSetDatum
#define APACHE_THRIFT_ACCESSOR_fieldSetDatum
APACHE_THRIFT_DEFINE_ACCESSOR(fieldSetDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_listDatum
#define APACHE_THRIFT_ACCESSOR_listDatum
APACHE_THRIFT_DEFINE_ACCESSOR(listDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_setDatum
#define APACHE_THRIFT_ACCESSOR_setDatum
APACHE_THRIFT_DEFINE_ACCESSOR(setDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_mapDatum
#define APACHE_THRIFT_ACCESSOR_mapDatum
APACHE_THRIFT_DEFINE_ACCESSOR(mapDatum);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_key
#define APACHE_THRIFT_ACCESSOR_key
APACHE_THRIFT_DEFINE_ACCESSOR(key);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_value
#define APACHE_THRIFT_ACCESSOR_value
APACHE_THRIFT_DEFINE_ACCESSOR(value);
#endif
} // namespace detail
} // namespace apache::thrift

// BEGIN declare_enums
// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::type_system {
class SerializableRecordUnion;
class SerializableRecordMapEntry;
} // 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/record.thrift", "name": "SerializableRecordUnion", "kind": "union" } */
class SerializableRecordUnion 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/SerializableRecord";
  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 "record";
  }
  static constexpr std::size_t __fbthrift_num_fields = 13;

  static constexpr const int16_t __fbthrift_reflection_field_ids[] = {0,1,2,3,5,6,7,8,9,10,11,12,13,14};

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::boolDatum,
    ::apache::thrift::ident::int8Datum,
    ::apache::thrift::ident::int16Datum,
    ::apache::thrift::ident::int32Datum,
    ::apache::thrift::ident::int64Datum,
    ::apache::thrift::ident::float32Datum,
    ::apache::thrift::ident::float64Datum,
    ::apache::thrift::ident::textDatum,
    ::apache::thrift::ident::byteArrayDatum,
    ::apache::thrift::ident::fieldSetDatum,
    ::apache::thrift::ident::listDatum,
    ::apache::thrift::ident::setDatum,
    ::apache::thrift::ident::mapDatum
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::byte_t,
    ::apache::thrift::type::i16_t,
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i64_t,
    ::apache::thrift::type::float_t,
    ::apache::thrift::type::double_t,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::cpp_type<folly::IOBuf, ::apache::thrift::type::binary_t>,
    ::apache::thrift::type::map<::apache::thrift::type::adapted<::apache::thrift::type::detail::StrongIntegerAdapter<::apache::thrift::type::FieldId>, ::apache::thrift::type::i16_t>, ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>,
    ::apache::thrift::type::list<::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>,
    ::apache::thrift::type::list<::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::type_system::SerializableRecordMapEntry>>
  >;
  void __fbthrift_clear();
  void __fbthrift_destruct();
  bool __fbthrift_is_empty() const;

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


 public:
  enum class Type : int {
    __EMPTY__ = 0,
    boolDatum = 1,
    int8Datum = 2,
    int16Datum = 3,
    int32Datum = 5,
    int64Datum = 6,
    float32Datum = 7,
    float64Datum = 8,
    textDatum = 9,
    byteArrayDatum = 10,
    fieldSetDatum = 11,
    listDatum = 12,
    setDatum = 13,
    mapDatum = 14,
  } ;

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

  SerializableRecordUnion(SerializableRecordUnion&& rhs) noexcept
      : fbthrift_type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::boolDatum:
      {
        set_boolDatum(std::move(rhs.value_.boolDatum));
        break;
      }
      case Type::int8Datum:
      {
        set_int8Datum(std::move(rhs.value_.int8Datum));
        break;
      }
      case Type::int16Datum:
      {
        set_int16Datum(std::move(rhs.value_.int16Datum));
        break;
      }
      case Type::int32Datum:
      {
        set_int32Datum(std::move(rhs.value_.int32Datum));
        break;
      }
      case Type::int64Datum:
      {
        set_int64Datum(std::move(rhs.value_.int64Datum));
        break;
      }
      case Type::float32Datum:
      {
        set_float32Datum(std::move(rhs.value_.float32Datum));
        break;
      }
      case Type::float64Datum:
      {
        set_float64Datum(std::move(rhs.value_.float64Datum));
        break;
      }
      case Type::textDatum:
      {
        set_textDatum(std::move(rhs.value_.textDatum));
        break;
      }
      case Type::byteArrayDatum:
      {
        set_byteArrayDatum(std::move(*rhs.value_.byteArrayDatum));
        break;
      }
      case Type::fieldSetDatum:
      {
        set_fieldSetDatum(std::move(rhs.value_.fieldSetDatum));
        break;
      }
      case Type::listDatum:
      {
        set_listDatum(std::move(rhs.value_.listDatum));
        break;
      }
      case Type::setDatum:
      {
        set_setDatum(std::move(rhs.value_.setDatum));
        break;
      }
      case Type::mapDatum:
      {
        set_mapDatum(std::move(rhs.value_.mapDatum));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  SerializableRecordUnion(const SerializableRecordUnion& rhs);

  SerializableRecordUnion& operator=(SerializableRecordUnion&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        __fbthrift_clear();
        return *this;
      }
      case Type::boolDatum:
      {
        set_boolDatum(std::move(rhs.value_.boolDatum));
        break;
      }
      case Type::int8Datum:
      {
        set_int8Datum(std::move(rhs.value_.int8Datum));
        break;
      }
      case Type::int16Datum:
      {
        set_int16Datum(std::move(rhs.value_.int16Datum));
        break;
      }
      case Type::int32Datum:
      {
        set_int32Datum(std::move(rhs.value_.int32Datum));
        break;
      }
      case Type::int64Datum:
      {
        set_int64Datum(std::move(rhs.value_.int64Datum));
        break;
      }
      case Type::float32Datum:
      {
        set_float32Datum(std::move(rhs.value_.float32Datum));
        break;
      }
      case Type::float64Datum:
      {
        set_float64Datum(std::move(rhs.value_.float64Datum));
        break;
      }
      case Type::textDatum:
      {
        set_textDatum(std::move(rhs.value_.textDatum));
        break;
      }
      case Type::byteArrayDatum:
      {
        set_byteArrayDatum(std::move(*rhs.value_.byteArrayDatum));
        break;
      }
      case Type::fieldSetDatum:
      {
        set_fieldSetDatum(std::move(rhs.value_.fieldSetDatum));
        break;
      }
      case Type::listDatum:
      {
        set_listDatum(std::move(rhs.value_.listDatum));
        break;
      }
      case Type::setDatum:
      {
        set_setDatum(std::move(rhs.value_.setDatum));
        break;
      }
      case Type::mapDatum:
      {
        set_mapDatum(std::move(rhs.value_.mapDatum));
        break;
      }
      default:
      {
        assert(false);
        __fbthrift_clear();
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  SerializableRecordUnion& operator=(const SerializableRecordUnion& rhs);

  ~SerializableRecordUnion();

  union storage_type {
    bool boolDatum;
    ::std::int8_t int8Datum;
    ::std::int16_t int16Datum;
    ::std::int32_t int32Datum;
    ::std::int64_t int64Datum;
    float float32Datum;
    double float64Datum;
    ::std::string textDatum;
    ::std::unique_ptr<::apache::thrift::type::ByteBuffer> byteArrayDatum;
    ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion> fieldSetDatum;
    ::std::vector<::apache::thrift::type_system::SerializableRecordUnion> listDatum;
    ::std::vector<::apache::thrift::type_system::SerializableRecordUnion> setDatum;
    ::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry> mapDatum;

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

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

  /** Glean { "field": "boolDatum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  bool& set_boolDatum(bool t = bool()) {
    using T0 = bool;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::boolDatum);
    ::new (std::addressof(value_.boolDatum)) T(t);
    return value_.boolDatum;
  }


  /** Glean { "field": "int8Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::std::int8_t& set_int8Datum(::std::int8_t t = ::std::int8_t()) {
    using T0 = ::std::int8_t;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::int8Datum);
    ::new (std::addressof(value_.int8Datum)) T(t);
    return value_.int8Datum;
  }


  /** Glean { "field": "int16Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::std::int16_t& set_int16Datum(::std::int16_t t = ::std::int16_t()) {
    using T0 = ::std::int16_t;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::int16Datum);
    ::new (std::addressof(value_.int16Datum)) T(t);
    return value_.int16Datum;
  }


  /** Glean { "field": "int32Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::std::int32_t& set_int32Datum(::std::int32_t t = ::std::int32_t()) {
    using T0 = ::std::int32_t;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::int32Datum);
    ::new (std::addressof(value_.int32Datum)) T(t);
    return value_.int32Datum;
  }


  /** Glean { "field": "int64Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  ::std::int64_t& set_int64Datum(::std::int64_t t = ::std::int64_t()) {
    using T0 = ::std::int64_t;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::int64Datum);
    ::new (std::addressof(value_.int64Datum)) T(t);
    return value_.int64Datum;
  }


  /** Glean { "field": "float32Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  float& set_float32Datum(float t = float()) {
    using T0 = float;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::float32Datum);
    ::new (std::addressof(value_.float32Datum)) T(t);
    return value_.float32Datum;
  }


  /** Glean { "field": "float64Datum" } */
  template <typename... A> requires (sizeof...(A) == 0)
  double& set_float64Datum(double t = double()) {
    using T0 = double;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::float64Datum);
    ::new (std::addressof(value_.float64Datum)) T(t);
    return value_.float64Datum;
  }


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

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

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


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

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

  /** Glean { "field": "byteArrayDatum" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type::ByteBuffer, T...>> ::std::unique_ptr<::apache::thrift::type::ByteBuffer>& set_byteArrayDatum(T&&... t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::byteArrayDatum);
    ::new (std::addressof(value_.byteArrayDatum)) ::std::unique_ptr<::apache::thrift::type::ByteBuffer>(new ::std::unique_ptr<::apache::thrift::type::ByteBuffer>::element_type(std::forward<T>(t)...));
    return value_.byteArrayDatum;
  }

  /** Glean { "field": "byteArrayDatum" } */
  ::std::unique_ptr<::apache::thrift::type::ByteBuffer>& set_byteArrayDatum(::std::unique_ptr<::apache::thrift::type::ByteBuffer> t) {
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::byteArrayDatum);
    ::new (std::addressof(value_.byteArrayDatum)) ::std::unique_ptr<::apache::thrift::type::ByteBuffer>(std::move(t));
    return value_.byteArrayDatum;
  }

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

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "boolDatum" } */
  bool const& get_boolDatum() const {
    if (getType() != Type::boolDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.boolDatum;
  }

  /** Glean { "field": "int8Datum" } */
  ::std::int8_t const& get_int8Datum() const {
    if (getType() != Type::int8Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.int8Datum;
  }

  /** Glean { "field": "int16Datum" } */
  ::std::int16_t const& get_int16Datum() const {
    if (getType() != Type::int16Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.int16Datum;
  }

  /** Glean { "field": "int32Datum" } */
  ::std::int32_t const& get_int32Datum() const {
    if (getType() != Type::int32Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.int32Datum;
  }

  /** Glean { "field": "int64Datum" } */
  ::std::int64_t const& get_int64Datum() const {
    if (getType() != Type::int64Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.int64Datum;
  }

  /** Glean { "field": "float32Datum" } */
  float const& get_float32Datum() const {
    if (getType() != Type::float32Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.float32Datum;
  }

  /** Glean { "field": "float64Datum" } */
  double const& get_float64Datum() const {
    if (getType() != Type::float64Datum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.float64Datum;
  }

  /** Glean { "field": "textDatum" } */
  ::std::string const& get_textDatum() const {
    if (getType() != Type::textDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.textDatum;
  }

  /** Glean { "field": "byteArrayDatum" } */
  ::std::unique_ptr<::apache::thrift::type::ByteBuffer> const& get_byteArrayDatum() const {
    if (getType() != Type::byteArrayDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.byteArrayDatum;
  }

  /** Glean { "field": "fieldSetDatum" } */
  ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion> const& get_fieldSetDatum() const {
    if (getType() != Type::fieldSetDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.fieldSetDatum;
  }

  /** Glean { "field": "listDatum" } */
  ::std::vector<::apache::thrift::type_system::SerializableRecordUnion> const& get_listDatum() const {
    if (getType() != Type::listDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.listDatum;
  }

  /** Glean { "field": "setDatum" } */
  ::std::vector<::apache::thrift::type_system::SerializableRecordUnion> const& get_setDatum() const {
    if (getType() != Type::setDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.setDatum;
  }

  /** Glean { "field": "mapDatum" } */
  ::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry> const& get_mapDatum() const {
    if (getType() != Type::mapDatum) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.mapDatum;
  }

  bool& mutable_boolDatum() {
    assert(getType() == Type::boolDatum);
    return value_.boolDatum;
  }

  ::std::int8_t& mutable_int8Datum() {
    assert(getType() == Type::int8Datum);
    return value_.int8Datum;
  }

  ::std::int16_t& mutable_int16Datum() {
    assert(getType() == Type::int16Datum);
    return value_.int16Datum;
  }

  ::std::int32_t& mutable_int32Datum() {
    assert(getType() == Type::int32Datum);
    return value_.int32Datum;
  }

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

  float& mutable_float32Datum() {
    assert(getType() == Type::float32Datum);
    return value_.float32Datum;
  }

  double& mutable_float64Datum() {
    assert(getType() == Type::float64Datum);
    return value_.float64Datum;
  }

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

  ::std::unique_ptr<::apache::thrift::type::ByteBuffer>& mutable_byteArrayDatum() {
    assert(getType() == Type::byteArrayDatum);
    return value_.byteArrayDatum;
  }

  ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>& mutable_fieldSetDatum() {
    assert(getType() == Type::fieldSetDatum);
    return value_.fieldSetDatum;
  }

  ::std::vector<::apache::thrift::type_system::SerializableRecordUnion>& mutable_listDatum() {
    assert(getType() == Type::listDatum);
    return value_.listDatum;
  }

  ::std::vector<::apache::thrift::type_system::SerializableRecordUnion>& mutable_setDatum() {
    assert(getType() == Type::setDatum);
    return value_.setDatum;
  }

  ::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry>& mutable_mapDatum() {
    assert(getType() == Type::mapDatum);
    return value_.mapDatum;
  }

  template <typename..., typename T = bool>
  T move_boolDatum() {
    assert(getType() == Type::boolDatum);
    return std::move(value_.boolDatum);
  }

  template <typename..., typename T = ::std::int8_t>
  T move_int8Datum() {
    assert(getType() == Type::int8Datum);
    return std::move(value_.int8Datum);
  }

  template <typename..., typename T = ::std::int16_t>
  T move_int16Datum() {
    assert(getType() == Type::int16Datum);
    return std::move(value_.int16Datum);
  }

  template <typename..., typename T = ::std::int32_t>
  T move_int32Datum() {
    assert(getType() == Type::int32Datum);
    return std::move(value_.int32Datum);
  }

  template <typename..., typename T = ::std::int64_t>
  T move_int64Datum() {
    assert(getType() == Type::int64Datum);
    return std::move(value_.int64Datum);
  }

  template <typename..., typename T = float>
  T move_float32Datum() {
    assert(getType() == Type::float32Datum);
    return std::move(value_.float32Datum);
  }

  template <typename..., typename T = double>
  T move_float64Datum() {
    assert(getType() == Type::float64Datum);
    return std::move(value_.float64Datum);
  }

  template <typename..., typename T = ::std::string>
  T move_textDatum() {
    assert(getType() == Type::textDatum);
    return std::move(value_.textDatum);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::type::ByteBuffer>>
  T move_byteArrayDatum() {
    assert(getType() == Type::byteArrayDatum);
    return std::move(value_.byteArrayDatum);
  }

  template <typename..., typename T = ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>>
  T move_fieldSetDatum() {
    assert(getType() == Type::fieldSetDatum);
    return std::move(value_.fieldSetDatum);
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::type_system::SerializableRecordUnion>>
  T move_listDatum() {
    assert(getType() == Type::listDatum);
    return std::move(value_.listDatum);
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::type_system::SerializableRecordUnion>>
  T move_setDatum() {
    assert(getType() == Type::setDatum);
    return std::move(value_.setDatum);
  }

  template <typename..., typename T = ::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry>>
  T move_mapDatum() {
    assert(getType() == Type::mapDatum);
    return std::move(value_.mapDatum);
  }

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

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

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

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

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

  /** Glean { "field": "boolDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<bool&&> boolDatum() && {
    return {std::move(value_.boolDatum), fbthrift_type_, folly::to_underlying(Type::boolDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "int8Datum" } */
  template <typename..., typename T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> int8Datum_ref() const& {
    return {value_.int8Datum, fbthrift_type_, folly::to_underlying(Type::int8Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "int8Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::int8_t&&> int8Datum() && {
    return {std::move(value_.int8Datum), fbthrift_type_, folly::to_underlying(Type::int8Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "int16Datum" } */
  template <typename..., typename T = ::std::int16_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> int16Datum_ref() const& {
    return {value_.int16Datum, fbthrift_type_, folly::to_underlying(Type::int16Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "int16Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::int16_t&&> int16Datum() && {
    return {std::move(value_.int16Datum), fbthrift_type_, folly::to_underlying(Type::int16Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "int32Datum" } */
  template <typename..., typename T = ::std::int32_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> int32Datum_ref() const& {
    return {value_.int32Datum, fbthrift_type_, folly::to_underlying(Type::int32Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "int32Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::int32_t&&> int32Datum() && {
    return {std::move(value_.int32Datum), fbthrift_type_, folly::to_underlying(Type::int32Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "int64Datum" } */
  template <typename..., typename T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> int64Datum_ref() const& {
    return {value_.int64Datum, fbthrift_type_, folly::to_underlying(Type::int64Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "int64Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::int64_t&&> int64Datum() && {
    return {std::move(value_.int64Datum), fbthrift_type_, folly::to_underlying(Type::int64Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "float32Datum" } */
  template <typename..., typename T = float>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> float32Datum_ref() const& {
    return {value_.float32Datum, fbthrift_type_, folly::to_underlying(Type::float32Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "float32Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<float&&> float32Datum() && {
    return {std::move(value_.float32Datum), fbthrift_type_, folly::to_underlying(Type::float32Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "float64Datum" } */
  template <typename..., typename T = double>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> float64Datum_ref() const& {
    return {value_.float64Datum, fbthrift_type_, folly::to_underlying(Type::float64Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "float64Datum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<double&&> float64Datum() && {
    return {std::move(value_.float64Datum), fbthrift_type_, folly::to_underlying(Type::float64Datum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "textDatum" } */
  template <typename..., typename T = ::std::string>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> textDatum_ref() const& {
    return {value_.textDatum, fbthrift_type_, folly::to_underlying(Type::textDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "textDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::string&&> textDatum() && {
    return {std::move(value_.textDatum), fbthrift_type_, folly::to_underlying(Type::textDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "byteArrayDatum" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::type::ByteBuffer>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> byteArrayDatum_ref() const& {
    return {value_.byteArrayDatum, fbthrift_type_, folly::to_underlying(Type::byteArrayDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "byteArrayDatum" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::type::ByteBuffer>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> byteArrayDatum_ref() & {
    return {value_.byteArrayDatum, fbthrift_type_, folly::to_underlying(Type::byteArrayDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

  /** Glean { "field": "byteArrayDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<const ::std::unique_ptr<::apache::thrift::type::ByteBuffer>&> byteArrayDatum() const& {
    return {value_.byteArrayDatum, fbthrift_type_, folly::to_underlying(Type::byteArrayDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "byteArrayDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::unique_ptr<::apache::thrift::type::ByteBuffer>&> byteArrayDatum() & {
    return {value_.byteArrayDatum, fbthrift_type_, folly::to_underlying(Type::byteArrayDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "byteArrayDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::unique_ptr<::apache::thrift::type::ByteBuffer>&&> byteArrayDatum() && {
    return {std::move(value_.byteArrayDatum), fbthrift_type_, folly::to_underlying(Type::byteArrayDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "fieldSetDatum" } */
  template <typename..., typename T = ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> fieldSetDatum_ref() const& {
    return {value_.fieldSetDatum, fbthrift_type_, folly::to_underlying(Type::fieldSetDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "fieldSetDatum" } */
  template <typename..., typename T = ::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> fieldSetDatum_ref() & {
    return {value_.fieldSetDatum, fbthrift_type_, folly::to_underlying(Type::fieldSetDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

  /** Glean { "field": "fieldSetDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>&> fieldSetDatum() & {
    return {value_.fieldSetDatum, fbthrift_type_, folly::to_underlying(Type::fieldSetDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "fieldSetDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::map<::apache::thrift::type::FieldId, ::apache::thrift::type_system::SerializableRecordUnion>&&> fieldSetDatum() && {
    return {std::move(value_.fieldSetDatum), fbthrift_type_, folly::to_underlying(Type::fieldSetDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "listDatum" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::type_system::SerializableRecordUnion>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> listDatum_ref() const& {
    return {value_.listDatum, fbthrift_type_, folly::to_underlying(Type::listDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "setDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::vector<::apache::thrift::type_system::SerializableRecordUnion>&&> setDatum() && {
    return {std::move(value_.setDatum), fbthrift_type_, folly::to_underlying(Type::setDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "mapDatum" } */
  template <typename..., typename T = ::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> mapDatum_ref() const& {
    return {value_.mapDatum, fbthrift_type_, folly::to_underlying(Type::mapDatum), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "mapDatum" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::std::vector<::apache::thrift::type_system::SerializableRecordMapEntry>&&> mapDatum() && {
    return {std::move(value_.mapDatum), fbthrift_type_, folly::to_underlying(Type::mapDatum), 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<SerializableRecordUnion>;
  friend void swap(SerializableRecordUnion& a, SerializableRecordUnion& b);
};

template <class Protocol_>
unsigned long SerializableRecordUnion::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/record.thrift", "name": "SerializableRecordMapEntry", "kind": "struct" } */
class SerializableRecordMapEntry 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/SerializableRecordMapEntry";
  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 "record";
  }
  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::key,
    ::apache::thrift::ident::value
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::union_t<::apache::thrift::type_system::SerializableRecordUnion>,
    ::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 = SerializableRecordMapEntry;
  static constexpr bool __fbthrift_cpp2_is_union =
    false;


 public:

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

  SerializableRecordMapEntry(SerializableRecordMapEntry&&) noexcept;

  SerializableRecordMapEntry(const SerializableRecordMapEntry& src);


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

 public:

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

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

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

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

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

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

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

  /** Glean { "field": "value" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::field_ref<const fbthrift_T&> value_ref() const& {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "value" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> value_ref() & {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "value" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&&> value_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_value), __isset.at(1), __isset.bit(1)};
  }

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

  /** Glean { "field": "value" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type_system::SerializableRecordUnion>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> value() & {
    return {this->__fbthrift_field_value, __isset.at(1), __isset.bit(1)};
  }

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

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

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

  /** Glean { "field": "key" } */
  template <typename T_SerializableRecordMapEntry_key_struct_setter = ::apache::thrift::type_system::SerializableRecordUnion>
  [[deprecated("Use `FOO.key() = BAR` instead of `FOO.set_key(BAR)`")]]
  ::apache::thrift::type_system::SerializableRecordUnion& set_key(T_SerializableRecordMapEntry_key_struct_setter&& key_) {
    key_ref() = std::forward<T_SerializableRecordMapEntry_key_struct_setter>(key_);
    return __fbthrift_field_key;
  }

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

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

  /** Glean { "field": "value" } */
  template <typename T_SerializableRecordMapEntry_value_struct_setter = ::apache::thrift::type_system::SerializableRecordUnion>
  [[deprecated("Use `FOO.value() = BAR` instead of `FOO.set_value(BAR)`")]]
  ::apache::thrift::type_system::SerializableRecordUnion& set_value(T_SerializableRecordMapEntry_value_struct_setter&& value_) {
    value_ref() = std::forward<T_SerializableRecordMapEntry_value_struct_setter>(value_);
    return __fbthrift_field_value;
  }

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

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

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

template <class Protocol_>
unsigned long SerializableRecordMapEntry::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::SerializableRecordUnion::Type>;

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

  static constexpr std::size_t const size = 13;
  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::boolDatum; }
  static constexpr type max() { return type::mapDatum; }
};
} // namespace apache::thrift

namespace apache::thrift::detail {
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableRecordUnion, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -8980310613638045858;
  static constexpr ::std::string_view definitionKey = {"\x0f\x79\x58\x03\xd8\x6d\x09\xc5\xf7\x9d\x07\xc9\xb3\xe0\x75\x8b", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type_system::SerializableRecordMapEntry, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -8980310613638045858;
  static constexpr ::std::string_view definitionKey = {"\x7a\x50\xf7\xdd\x87\x7e\xdc\x04\x98\x48\xca\xad\x8e\x53\xfb\x14", 16};
};
} // namespace apache::thrift::detail
