/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.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/type_types.h"
#include "folly/container/F14Map.h"
#include <thrift/lib/thrift/TypeToMaskAdapter.h>

namespace apache {
namespace thrift {
namespace ident {
struct type;
struct mask;
struct excludes;
struct includes;
struct excludes_map;
struct includes_map;
struct excludes_string_map;
struct includes_string_map;
struct excludes_type;
struct includes_type;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_mask
#define APACHE_THRIFT_ACCESSOR_mask
APACHE_THRIFT_DEFINE_ACCESSOR(mask);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_excludes
#define APACHE_THRIFT_ACCESSOR_excludes
APACHE_THRIFT_DEFINE_ACCESSOR(excludes);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_includes
#define APACHE_THRIFT_ACCESSOR_includes
APACHE_THRIFT_DEFINE_ACCESSOR(includes);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_excludes_map
#define APACHE_THRIFT_ACCESSOR_excludes_map
APACHE_THRIFT_DEFINE_ACCESSOR(excludes_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_includes_map
#define APACHE_THRIFT_ACCESSOR_includes_map
APACHE_THRIFT_DEFINE_ACCESSOR(includes_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_excludes_string_map
#define APACHE_THRIFT_ACCESSOR_excludes_string_map
APACHE_THRIFT_DEFINE_ACCESSOR(excludes_string_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_includes_string_map
#define APACHE_THRIFT_ACCESSOR_includes_string_map
APACHE_THRIFT_DEFINE_ACCESSOR(includes_string_map);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_excludes_type
#define APACHE_THRIFT_ACCESSOR_excludes_type
APACHE_THRIFT_DEFINE_ACCESSOR(excludes_type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_includes_type
#define APACHE_THRIFT_ACCESSOR_includes_type
APACHE_THRIFT_DEFINE_ACCESSOR(includes_type);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums

// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::protocol {
class TypeAndMaskEntry;
class Mask;
} // namespace apache::thrift::protocol
// 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::protocol {
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/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "FieldIdToMask", "kind": "typedef" } */
typedef ::folly::F14FastMap<::std::int16_t, ::apache::thrift::protocol::Mask> FieldIdToMask;
/** Glean {"file": "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "MapIdToMask", "kind": "typedef" } */
typedef ::folly::F14FastMap<::std::int64_t, ::apache::thrift::protocol::Mask> MapIdToMask;
/** Glean {"file": "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "MapStringToMask", "kind": "typedef" } */
typedef ::folly::F14FastMap<::std::string, ::apache::thrift::protocol::Mask> MapStringToMask;
/** Glean {"file": "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "MapTypeToMask", "kind": "typedef" } */
typedef ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::protocol::detail::TypeToMaskAdapter<
      ::apache::thrift::protocol::TypeAndMaskEntry,
      ::apache::thrift::protocol::Mask
    >, ::std::vector<::apache::thrift::protocol::TypeAndMaskEntry>> MapTypeToMask;

/** Glean {"file": "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "Mask", "kind": "union" } */
class Mask final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "field_mask";
  }
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::excludes,
    ::apache::thrift::ident::includes,
    ::apache::thrift::ident::excludes_map,
    ::apache::thrift::ident::includes_map,
    ::apache::thrift::ident::excludes_string_map,
    ::apache::thrift::ident::includes_string_map,
    ::apache::thrift::ident::excludes_type,
    ::apache::thrift::ident::includes_type
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4,5,6,7,8};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::int16_t, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::int16_t, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::int64_t, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::int64_t, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::i64_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::string, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::cpp_type<::folly::F14FastMap<::std::string, ::apache::thrift::protocol::Mask>, ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>>>,
    ::apache::thrift::type::adapted<::apache::thrift::protocol::detail::TypeToMaskAdapter<
      ::apache::thrift::protocol::TypeAndMaskEntry,
      ::apache::thrift::protocol::Mask
    >, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::protocol::TypeAndMaskEntry>>>,
    ::apache::thrift::type::adapted<::apache::thrift::protocol::detail::TypeToMaskAdapter<
      ::apache::thrift::protocol::TypeAndMaskEntry,
      ::apache::thrift::protocol::Mask
    >, ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::protocol::TypeAndMaskEntry>>>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 8;

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

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

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

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

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


 public:
  enum class Type : int {
    __EMPTY__ = 0,
    excludes = 1,
    includes = 2,
    excludes_map = 3,
    includes_map = 4,
    excludes_string_map = 5,
    includes_string_map = 6,
    excludes_type = 7,
    includes_type = 8,
  } ;

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

  Mask(Mask&& rhs) noexcept
      : type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::excludes:
      {
        set_excludes(std::move(*rhs.value_.excludes));
        break;
      }
      case Type::includes:
      {
        set_includes(std::move(*rhs.value_.includes));
        break;
      }
      case Type::excludes_map:
      {
        set_excludes_map(std::move(*rhs.value_.excludes_map));
        break;
      }
      case Type::includes_map:
      {
        set_includes_map(std::move(*rhs.value_.includes_map));
        break;
      }
      case Type::excludes_string_map:
      {
        set_excludes_string_map(std::move(*rhs.value_.excludes_string_map));
        break;
      }
      case Type::includes_string_map:
      {
        set_includes_string_map(std::move(*rhs.value_.includes_string_map));
        break;
      }
      case Type::excludes_type:
      {
        set_excludes_type(std::move(rhs.value_.excludes_type));
        break;
      }
      case Type::includes_type:
      {
        set_includes_type(std::move(rhs.value_.includes_type));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  Mask(const Mask& rhs);

  Mask& operator=(Mask&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        __fbthrift_clear();
        return *this;
      }
      case Type::excludes:
      {
        set_excludes(std::move(*rhs.value_.excludes));
        break;
      }
      case Type::includes:
      {
        set_includes(std::move(*rhs.value_.includes));
        break;
      }
      case Type::excludes_map:
      {
        set_excludes_map(std::move(*rhs.value_.excludes_map));
        break;
      }
      case Type::includes_map:
      {
        set_includes_map(std::move(*rhs.value_.includes_map));
        break;
      }
      case Type::excludes_string_map:
      {
        set_excludes_string_map(std::move(*rhs.value_.excludes_string_map));
        break;
      }
      case Type::includes_string_map:
      {
        set_includes_string_map(std::move(*rhs.value_.includes_string_map));
        break;
      }
      case Type::excludes_type:
      {
        set_excludes_type(std::move(rhs.value_.excludes_type));
        break;
      }
      case Type::includes_type:
      {
        set_includes_type(std::move(rhs.value_.includes_type));
        break;
      }
      default:
      {
        assert(false);
        __fbthrift_clear();
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  Mask& operator=(const Mask& rhs);

  ~Mask();

  union storage_type {
    ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> excludes;
    ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> includes;
    ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> excludes_map;
    ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> includes_map;
    ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> excludes_string_map;
    ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> includes_string_map;
    ::apache::thrift::protocol::MapTypeToMask excludes_type;
    ::apache::thrift::protocol::MapTypeToMask includes_type;

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

  bool operator==(const Mask&) const;
  bool operator<(const Mask&) const;
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_excludes(::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_excludes(::apache::thrift::protocol::FieldIdToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_excludes(::apache::thrift::protocol::FieldIdToMask&& t);
  /** Glean { "field": "excludes" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::FieldIdToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_excludes(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes);
    ::new (std::addressof(value_.excludes)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.excludes;
  }
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_includes(::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_includes(::apache::thrift::protocol::FieldIdToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_includes(::apache::thrift::protocol::FieldIdToMask&& t);
  /** Glean { "field": "includes" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::FieldIdToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& set_includes(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes);
    ::new (std::addressof(value_.includes)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.includes;
  }
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_excludes_map(::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_excludes_map(::apache::thrift::protocol::MapIdToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_excludes_map(::apache::thrift::protocol::MapIdToMask&& t);
  /** Glean { "field": "excludes_map" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapIdToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_excludes_map(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes_map);
    ::new (std::addressof(value_.excludes_map)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.excludes_map;
  }
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_includes_map(::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_includes_map(::apache::thrift::protocol::MapIdToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_includes_map(::apache::thrift::protocol::MapIdToMask&& t);
  /** Glean { "field": "includes_map" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapIdToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& set_includes_map(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes_map);
    ::new (std::addressof(value_.includes_map)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.includes_map;
  }
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_excludes_string_map(::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_excludes_string_map(::apache::thrift::protocol::MapStringToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_excludes_string_map(::apache::thrift::protocol::MapStringToMask&& t);
  /** Glean { "field": "excludes_string_map" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapStringToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_excludes_string_map(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes_string_map);
    ::new (std::addressof(value_.excludes_string_map)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.excludes_string_map;
  }
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_includes_string_map(::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> t);
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_includes_string_map(::apache::thrift::protocol::MapStringToMask const &t);
  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_includes_string_map(::apache::thrift::protocol::MapStringToMask&& t);
  /** Glean { "field": "includes_string_map" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapStringToMask, T...>> ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& set_includes_string_map(T&&... t) {
    // defer resolution of ref_ in case ref_::element_type would here be incomplete
    using ref_ = folly::conditional_t<(sizeof...(T) < size_t(-1)), ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>, void>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes_string_map);
    ::new (std::addressof(value_.includes_string_map)) ref_(new typename ref_::element_type(std::forward<T>(t)...));
    return value_.includes_string_map;
  }

  /** Glean { "field": "excludes_type" } */
  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::protocol::MapTypeToMask& set_excludes_type(::apache::thrift::protocol::MapTypeToMask const &t) {
    using T0 = ::apache::thrift::protocol::MapTypeToMask;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes_type);
    ::new (std::addressof(value_.excludes_type)) T(t);
    return value_.excludes_type;
  }

  /** Glean { "field": "excludes_type" } */
  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::protocol::MapTypeToMask& set_excludes_type(::apache::thrift::protocol::MapTypeToMask&& t) {
    using T0 = ::apache::thrift::protocol::MapTypeToMask;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes_type);
    ::new (std::addressof(value_.excludes_type)) T(std::move(t));
    return value_.excludes_type;
  }

  /** Glean { "field": "excludes_type" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapTypeToMask, T...>> ::apache::thrift::protocol::MapTypeToMask& set_excludes_type(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::excludes_type);
    ::new (std::addressof(value_.excludes_type)) ::apache::thrift::protocol::MapTypeToMask(std::forward<T>(t)...);
    return value_.excludes_type;
  }

  /** Glean { "field": "includes_type" } */
  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::protocol::MapTypeToMask& set_includes_type(::apache::thrift::protocol::MapTypeToMask const &t) {
    using T0 = ::apache::thrift::protocol::MapTypeToMask;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes_type);
    ::new (std::addressof(value_.includes_type)) T(t);
    return value_.includes_type;
  }

  /** Glean { "field": "includes_type" } */
  template <typename... A, std::enable_if_t<!sizeof...(A), int> = 0>
  ::apache::thrift::protocol::MapTypeToMask& set_includes_type(::apache::thrift::protocol::MapTypeToMask&& t) {
    using T0 = ::apache::thrift::protocol::MapTypeToMask;
    using T = folly::type_t<T0, A...>;
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes_type);
    ::new (std::addressof(value_.includes_type)) T(std::move(t));
    return value_.includes_type;
  }

  /** Glean { "field": "includes_type" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::protocol::MapTypeToMask, T...>> ::apache::thrift::protocol::MapTypeToMask& set_includes_type(T&&... t) {
    __fbthrift_clear();
    type_ = folly::to_underlying(Type::includes_type);
    ::new (std::addressof(value_.includes_type)) ::apache::thrift::protocol::MapTypeToMask(std::forward<T>(t)...);
    return value_.includes_type;
  }

  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> const& get_excludes() const {
    if (getType() != Type::excludes) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.excludes;
  }

  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask> const& get_includes() const {
    if (getType() != Type::includes) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.includes;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> const& get_excludes_map() const {
    if (getType() != Type::excludes_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.excludes_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask> const& get_includes_map() const {
    if (getType() != Type::includes_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.includes_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> const& get_excludes_string_map() const {
    if (getType() != Type::excludes_string_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.excludes_string_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask> const& get_includes_string_map() const {
    if (getType() != Type::includes_string_map) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.includes_string_map;
  }

  ::apache::thrift::protocol::MapTypeToMask const& get_excludes_type() const {
    if (getType() != Type::excludes_type) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.excludes_type;
  }

  ::apache::thrift::protocol::MapTypeToMask const& get_includes_type() const {
    if (getType() != Type::includes_type) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.includes_type;
  }

  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& mutable_excludes() {
    assert(getType() == Type::excludes);
    return value_.excludes;
  }

  ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>& mutable_includes() {
    assert(getType() == Type::includes);
    return value_.includes;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& mutable_excludes_map() {
    assert(getType() == Type::excludes_map);
    return value_.excludes_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>& mutable_includes_map() {
    assert(getType() == Type::includes_map);
    return value_.includes_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& mutable_excludes_string_map() {
    assert(getType() == Type::excludes_string_map);
    return value_.excludes_string_map;
  }

  ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>& mutable_includes_string_map() {
    assert(getType() == Type::includes_string_map);
    return value_.includes_string_map;
  }

  ::apache::thrift::protocol::MapTypeToMask& mutable_excludes_type() {
    assert(getType() == Type::excludes_type);
    return value_.excludes_type;
  }

  ::apache::thrift::protocol::MapTypeToMask& mutable_includes_type() {
    assert(getType() == Type::includes_type);
    return value_.includes_type;
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  T move_excludes() {
    assert(getType() == Type::excludes);
    return std::move(value_.excludes);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  T move_includes() {
    assert(getType() == Type::includes);
    return std::move(value_.includes);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  T move_excludes_map() {
    assert(getType() == Type::excludes_map);
    return std::move(value_.excludes_map);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  T move_includes_map() {
    assert(getType() == Type::includes_map);
    return std::move(value_.includes_map);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  T move_excludes_string_map() {
    assert(getType() == Type::excludes_string_map);
    return std::move(value_.excludes_string_map);
  }

  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  T move_includes_string_map() {
    assert(getType() == Type::includes_string_map);
    return std::move(value_.includes_string_map);
  }

  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  T move_excludes_type() {
    assert(getType() == Type::excludes_type);
    return std::move(value_.excludes_type);
  }

  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  T move_includes_type() {
    assert(getType() == Type::includes_type);
    return std::move(value_.includes_type);
  }

  /** Glean { "field": "excludes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> excludes_ref() const& {
    return {value_.excludes, type_, folly::to_underlying(Type::excludes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> excludes_ref() const&& {
    return {std::move(value_.excludes), type_, folly::to_underlying(Type::excludes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> excludes_ref() & {
    return {value_.excludes, type_, folly::to_underlying(Type::excludes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> excludes_ref() && {
    return {std::move(value_.excludes), type_, folly::to_underlying(Type::excludes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "includes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> includes_ref() const& {
    return {value_.includes, type_, folly::to_underlying(Type::includes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> includes_ref() const&& {
    return {std::move(value_.includes), type_, folly::to_underlying(Type::includes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> includes_ref() & {
    return {value_.includes, type_, folly::to_underlying(Type::includes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::FieldIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> includes_ref() && {
    return {std::move(value_.includes), type_, folly::to_underlying(Type::includes), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "excludes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> excludes_map_ref() const& {
    return {value_.excludes_map, type_, folly::to_underlying(Type::excludes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> excludes_map_ref() const&& {
    return {std::move(value_.excludes_map), type_, folly::to_underlying(Type::excludes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> excludes_map_ref() & {
    return {value_.excludes_map, type_, folly::to_underlying(Type::excludes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> excludes_map_ref() && {
    return {std::move(value_.excludes_map), type_, folly::to_underlying(Type::excludes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "includes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> includes_map_ref() const& {
    return {value_.includes_map, type_, folly::to_underlying(Type::includes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> includes_map_ref() const&& {
    return {std::move(value_.includes_map), type_, folly::to_underlying(Type::includes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> includes_map_ref() & {
    return {value_.includes_map, type_, folly::to_underlying(Type::includes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapIdToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> includes_map_ref() && {
    return {std::move(value_.includes_map), type_, folly::to_underlying(Type::includes_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "excludes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> excludes_string_map_ref() const& {
    return {value_.excludes_string_map, type_, folly::to_underlying(Type::excludes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> excludes_string_map_ref() const&& {
    return {std::move(value_.excludes_string_map), type_, folly::to_underlying(Type::excludes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> excludes_string_map_ref() & {
    return {value_.excludes_string_map, type_, folly::to_underlying(Type::excludes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> excludes_string_map_ref() && {
    return {std::move(value_.excludes_string_map), type_, folly::to_underlying(Type::excludes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "includes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> includes_string_map_ref() const& {
    return {value_.includes_string_map, type_, folly::to_underlying(Type::includes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> includes_string_map_ref() const&& {
    return {std::move(value_.includes_string_map), type_, folly::to_underlying(Type::includes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> includes_string_map_ref() & {
    return {value_.includes_string_map, type_, folly::to_underlying(Type::includes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_string_map" } */
  template <typename..., typename T = ::std::unique_ptr<::apache::thrift::protocol::MapStringToMask>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> includes_string_map_ref() && {
    return {std::move(value_.includes_string_map), type_, folly::to_underlying(Type::includes_string_map), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "excludes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> excludes_type_ref() const& {
    return {value_.excludes_type, type_, folly::to_underlying(Type::excludes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> excludes_type_ref() const&& {
    return {std::move(value_.excludes_type), type_, folly::to_underlying(Type::excludes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> excludes_type_ref() & {
    return {value_.excludes_type, type_, folly::to_underlying(Type::excludes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "excludes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> excludes_type_ref() && {
    return {std::move(value_.excludes_type), type_, folly::to_underlying(Type::excludes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "includes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> includes_type_ref() const& {
    return {value_.includes_type, type_, folly::to_underlying(Type::includes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&&> includes_type_ref() const&& {
    return {std::move(value_.includes_type), type_, folly::to_underlying(Type::includes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&> includes_type_ref() & {
    return {value_.includes_type, type_, folly::to_underlying(Type::includes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

  /** Glean { "field": "includes_type" } */
  template <typename..., typename T = ::apache::thrift::protocol::MapTypeToMask>
  FOLLY_ERASE ::apache::thrift::union_field_ref<T&&> includes_type_ref() && {
    return {std::move(value_.includes_type), type_, folly::to_underlying(Type::includes_type), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  Type getType() const { return static_cast<Type>(type_); }

  template <class Protocol_>
  unsigned long read(Protocol_* iprot);
  template <class Protocol_>
  uint32_t serializedSize(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t serializedSizeZC(Protocol_ const* prot_) const;
  template <class Protocol_>
  uint32_t write(Protocol_* prot_) const;
 protected:
  storage_type value_;
  std::underlying_type_t<Type> type_;

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

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

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


/** Glean {"file": "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_fbthrift/fbthrift/work/fbthrift-2025.01.13.00/thrift/lib/thrift/field_mask.thrift", "name": "TypeAndMaskEntry", "kind": "struct" } */
class TypeAndMaskEntry final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static const char* __fbthrift_thrift_uri();
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "field_mask";
  }
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::mask
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::InlineAdapter<::apache::thrift::type::Type>, ::apache::thrift::type::struct_t<::apache::thrift::type::TypeStruct>>,
    ::apache::thrift::type::union_t<::apache::thrift::protocol::Mask>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 2;

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

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

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

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

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


 public:

  TypeAndMaskEntry() {
    ::apache::thrift::adapt_detail::construct<::apache::thrift::InlineAdapter<::apache::thrift::type::Type>, 1>(__fbthrift_field_type, *this);
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  TypeAndMaskEntry(apache::thrift::FragileConstructor, ::apache::thrift::type::Type type__arg, ::apache::thrift::protocol::Mask mask__arg);

  TypeAndMaskEntry(TypeAndMaskEntry&&) noexcept;
  TypeAndMaskEntry(const TypeAndMaskEntry& src);


  TypeAndMaskEntry& operator=(TypeAndMaskEntry&&) noexcept;
  TypeAndMaskEntry& operator=(const TypeAndMaskEntry& src);
 private:
  ::apache::thrift::type::Type __fbthrift_field_type;
 private:
  ::apache::thrift::protocol::Mask __fbthrift_field_mask;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "mask" } */
  template <typename..., typename T = ::apache::thrift::protocol::Mask>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> mask_ref() & {
    return {this->__fbthrift_field_mask, __isset.at(1), __isset.bit(1)};
  }

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

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

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

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

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

  /** Glean { "field": "mask" } */
  [[deprecated("Use `FOO.mask().value();` instead of `FOO.get_mask();`")]]
  const ::apache::thrift::protocol::Mask& get_mask() const&;

  /** Glean { "field": "mask" } */
  [[deprecated("Use `FOO.mask().value();` instead of `FOO.get_mask();`")]]
  ::apache::thrift::protocol::Mask get_mask() &&;

  /** Glean { "field": "mask" } */
  template <typename T_TypeAndMaskEntry_mask_struct_setter = ::apache::thrift::protocol::Mask>
  [[deprecated("Use `FOO.mask() = BAR;` instead of `FOO.set_mask(BAR);`")]]
  ::apache::thrift::protocol::Mask& set_mask(T_TypeAndMaskEntry_mask_struct_setter&& mask_) {
    mask_ref() = std::forward<T_TypeAndMaskEntry_mask_struct_setter>(mask_);
    return __fbthrift_field_mask;
  }

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

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


} // namespace apache::thrift::protocol

namespace apache { namespace thrift {

template <> struct TEnumDataStorage<::apache::thrift::protocol::Mask::Type>;

template <> struct TEnumTraits<::apache::thrift::protocol::Mask::Type> {
  using type = ::apache::thrift::protocol::Mask::Type;

  static constexpr std::size_t const size = 8;
  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();
  }
};
}} // apache::thrift
