/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.09.23.00/thrift/lib/thrift/frozen.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 "folly/sorted_vector_types.h"

namespace apache {
namespace thrift {
namespace ident {
struct layoutId;
struct offset;
struct size;
struct bits;
struct fields;
struct typeName;
struct fileVersion;
struct relaxTypeChecks;
struct layouts;
struct rootLayout;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_layoutId
#define APACHE_THRIFT_ACCESSOR_layoutId
APACHE_THRIFT_DEFINE_ACCESSOR(layoutId);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_offset
#define APACHE_THRIFT_ACCESSOR_offset
APACHE_THRIFT_DEFINE_ACCESSOR(offset);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_size
#define APACHE_THRIFT_ACCESSOR_size
APACHE_THRIFT_DEFINE_ACCESSOR(size);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_bits
#define APACHE_THRIFT_ACCESSOR_bits
APACHE_THRIFT_DEFINE_ACCESSOR(bits);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fields
#define APACHE_THRIFT_ACCESSOR_fields
APACHE_THRIFT_DEFINE_ACCESSOR(fields);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_typeName
#define APACHE_THRIFT_ACCESSOR_typeName
APACHE_THRIFT_DEFINE_ACCESSOR(typeName);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_fileVersion
#define APACHE_THRIFT_ACCESSOR_fileVersion
APACHE_THRIFT_DEFINE_ACCESSOR(fileVersion);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_relaxTypeChecks
#define APACHE_THRIFT_ACCESSOR_relaxTypeChecks
APACHE_THRIFT_DEFINE_ACCESSOR(relaxTypeChecks);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_layouts
#define APACHE_THRIFT_ACCESSOR_layouts
APACHE_THRIFT_DEFINE_ACCESSOR(layouts);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_rootLayout
#define APACHE_THRIFT_ACCESSOR_rootLayout
APACHE_THRIFT_DEFINE_ACCESSOR(rootLayout);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums

// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::frozen::schema {
class Field;
class Layout;
class Schema;
} // namespace apache::thrift::frozen::schema
// 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::frozen::schema {
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_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.09.23.00/thrift/lib/thrift/frozen.thrift", "name": "Field", "kind": "struct" } */
class Field final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::layoutId,
    ::apache::thrift::ident::offset
  >;

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

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


 public:

  Field() :
      __fbthrift_field_layoutId(),
      __fbthrift_field_offset(static_cast<::std::int16_t>(0)) {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  Field(apache::thrift::FragileConstructor, ::std::int16_t layoutId__arg, ::std::int16_t offset__arg);

  Field(Field&&) = default;

  Field(const Field&) = default;


  Field& operator=(Field&&) = default;

  Field& operator=(const Field&) = default;
 private:
  ::std::int16_t __fbthrift_field_layoutId;
 private:
  ::std::int16_t __fbthrift_field_offset;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "layoutId" } */
  ::std::int16_t get_layoutId() const {
    return __fbthrift_field_layoutId;
  }

  /** Glean { "field": "layoutId" } */
  [[deprecated("Use `FOO.layoutId() = BAR;` instead of `FOO.set_layoutId(BAR);`")]]
  ::std::int16_t& set_layoutId(::std::int16_t layoutId_) {
    layoutId_ref() = layoutId_;
    return __fbthrift_field_layoutId;
  }

  /** Glean { "field": "offset" } */
  ::std::int16_t get_offset() const {
    return __fbthrift_field_offset;
  }

  /** Glean { "field": "offset" } */
  [[deprecated("Use `FOO.offset() = BAR;` instead of `FOO.set_offset(BAR);`")]]
  ::std::int16_t& set_offset(::std::int16_t offset_) {
    offset_ref() = offset_;
    return __fbthrift_field_offset;
  }

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

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


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

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::size,
    ::apache::thrift::ident::bits,
    ::apache::thrift::ident::fields,
    ::apache::thrift::ident::typeName
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3,4};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::i16_t,
    ::apache::thrift::type::cpp_type<folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::apache::thrift::frozen::schema::Field>>>,
    ::apache::thrift::type::string_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 4;

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

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

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

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

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


 public:

  Layout();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  Layout(apache::thrift::FragileConstructor, ::std::int32_t size__arg, ::std::int16_t bits__arg, folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> fields__arg, ::std::string typeName__arg);

  Layout(Layout&&) noexcept;

  Layout(const Layout& src);


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

  ~Layout();

 private:
  ::std::int32_t __fbthrift_field_size;
 private:
  ::std::int16_t __fbthrift_field_bits;
 private:
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> __fbthrift_field_fields;
 private:
  ::std::string __fbthrift_field_typeName;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields_ref() const& {
    return {this->__fbthrift_field_fields, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields_ref() & {
    return {this->__fbthrift_field_fields, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> fields() const& {
    return {this->__fbthrift_field_fields, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> fields() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_fields), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> fields() & {
    return {this->__fbthrift_field_fields, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "fields" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> fields() && {
    return {static_cast<T&&>(this->__fbthrift_field_fields), __isset.at(2), __isset.bit(2)};
  }

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

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

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

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

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

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

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

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

  /** Glean { "field": "size" } */
  ::std::int32_t get_size() const {
    return __fbthrift_field_size;
  }

  /** Glean { "field": "size" } */
  [[deprecated("Use `FOO.size() = BAR;` instead of `FOO.set_size(BAR);`")]]
  ::std::int32_t& set_size(::std::int32_t size_) {
    size_ref() = size_;
    return __fbthrift_field_size;
  }

  /** Glean { "field": "bits" } */
  ::std::int16_t get_bits() const {
    return __fbthrift_field_bits;
  }

  /** Glean { "field": "bits" } */
  [[deprecated("Use `FOO.bits() = BAR;` instead of `FOO.set_bits(BAR);`")]]
  ::std::int16_t& set_bits(::std::int16_t bits_) {
    bits_ref() = bits_;
    return __fbthrift_field_bits;
  }
  /** Glean { "field": "fields" } */
  const folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>& get_fields() const&;
  /** Glean { "field": "fields" } */
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field> get_fields() &&;

  /** Glean { "field": "fields" } */
  template <typename T_Layout_fields_struct_setter = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>>
  [[deprecated("Use `FOO.fields() = BAR;` instead of `FOO.set_fields(BAR);`")]]
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Field>& set_fields(T_Layout_fields_struct_setter&& fields_) {
    fields_ref() = std::forward<T_Layout_fields_struct_setter>(fields_);
    return __fbthrift_field_fields;
  }

  /** Glean { "field": "typeName" } */
  const ::std::string& get_typeName() const& {
    return __fbthrift_field_typeName;
  }

  /** Glean { "field": "typeName" } */
  ::std::string get_typeName() && {
    return std::move(__fbthrift_field_typeName);
  }

  /** Glean { "field": "typeName" } */
  template <typename T_Layout_typeName_struct_setter = ::std::string>
  [[deprecated("Use `FOO.typeName() = BAR;` instead of `FOO.set_typeName(BAR);`")]]
  ::std::string& set_typeName(T_Layout_typeName_struct_setter&& typeName_) {
    typeName_ref() = std::forward<T_Layout_typeName_struct_setter>(typeName_);
    return __fbthrift_field_typeName;
  }

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

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


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

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::fileVersion,
    ::apache::thrift::ident::relaxTypeChecks,
    ::apache::thrift::ident::layouts,
    ::apache::thrift::ident::rootLayout
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,4,1,2,3};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::i32_t,
    ::apache::thrift::type::bool_t,
    ::apache::thrift::type::cpp_type<folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>, ::apache::thrift::type::map<::apache::thrift::type::i16_t, ::apache::thrift::type::struct_t<::apache::thrift::frozen::schema::Layout>>>,
    ::apache::thrift::type::i16_t
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 4;

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

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

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

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

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


 public:

  Schema();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  Schema(apache::thrift::FragileConstructor, ::std::int32_t fileVersion__arg, bool relaxTypeChecks__arg, folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> layouts__arg, ::std::int16_t rootLayout__arg);

  Schema(Schema&&) noexcept;

  Schema(const Schema& src);


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

  ~Schema();

 private:
  ::std::int32_t __fbthrift_field_fileVersion;
 private:
  bool __fbthrift_field_relaxTypeChecks;
 private:
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> __fbthrift_field_layouts;
 private:
  ::std::int16_t __fbthrift_field_rootLayout;
 private:
  apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "relaxTypeChecks" } */
  template <typename..., typename T = bool>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> relaxTypeChecks_ref() & {
    return {this->__fbthrift_field_relaxTypeChecks, __isset.at(1), __isset.bit(1)};
  }

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

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

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

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

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

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> layouts_ref() const& {
    return {this->__fbthrift_field_layouts, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> layouts_ref() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_layouts), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> layouts_ref() & {
    return {this->__fbthrift_field_layouts, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> layouts_ref() && {
    return {static_cast<T&&>(this->__fbthrift_field_layouts), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> layouts() const& {
    return {this->__fbthrift_field_layouts, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&&> layouts() const&& {
    return {static_cast<const T&&>(this->__fbthrift_field_layouts), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> layouts() & {
    return {this->__fbthrift_field_layouts, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "layouts" } */
  template <typename..., typename T = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  FOLLY_ERASE ::apache::thrift::field_ref<T&&> layouts() && {
    return {static_cast<T&&>(this->__fbthrift_field_layouts), __isset.at(2), __isset.bit(2)};
  }

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

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

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

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

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

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

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

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

  /** Glean { "field": "fileVersion" } */
  ::std::int32_t get_fileVersion() const {
    return __fbthrift_field_fileVersion;
  }

  /** Glean { "field": "fileVersion" } */
  [[deprecated("Use `FOO.fileVersion() = BAR;` instead of `FOO.set_fileVersion(BAR);`")]]
  ::std::int32_t& set_fileVersion(::std::int32_t fileVersion_) {
    fileVersion_ref() = fileVersion_;
    return __fbthrift_field_fileVersion;
  }

  /** Glean { "field": "relaxTypeChecks" } */
  bool get_relaxTypeChecks() const {
    return __fbthrift_field_relaxTypeChecks;
  }

  /** Glean { "field": "relaxTypeChecks" } */
  [[deprecated("Use `FOO.relaxTypeChecks() = BAR;` instead of `FOO.set_relaxTypeChecks(BAR);`")]]
  bool& set_relaxTypeChecks(bool relaxTypeChecks_) {
    relaxTypeChecks_ref() = relaxTypeChecks_;
    return __fbthrift_field_relaxTypeChecks;
  }
  /** Glean { "field": "layouts" } */
  const folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>& get_layouts() const&;
  /** Glean { "field": "layouts" } */
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout> get_layouts() &&;

  /** Glean { "field": "layouts" } */
  template <typename T_Schema_layouts_struct_setter = folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>>
  [[deprecated("Use `FOO.layouts() = BAR;` instead of `FOO.set_layouts(BAR);`")]]
  folly::sorted_vector_map<::std::int16_t, ::apache::thrift::frozen::schema::Layout>& set_layouts(T_Schema_layouts_struct_setter&& layouts_) {
    layouts_ref() = std::forward<T_Schema_layouts_struct_setter>(layouts_);
    return __fbthrift_field_layouts;
  }

  /** Glean { "field": "rootLayout" } */
  ::std::int16_t get_rootLayout() const {
    return __fbthrift_field_rootLayout;
  }

  /** Glean { "field": "rootLayout" } */
  [[deprecated("Use `FOO.rootLayout() = BAR;` instead of `FOO.set_rootLayout(BAR);`")]]
  ::std::int16_t& set_rootLayout(::std::int16_t rootLayout_) {
    rootLayout_ref() = rootLayout_;
    return __fbthrift_field_rootLayout;
  }

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

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


} // namespace apache::thrift::frozen::schema
