/**
 * 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/any_rep.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 "thrift/lib/thrift/gen-cpp2/standard_types.h"

namespace apache {
namespace thrift {
namespace ident {
struct type;
struct protocol;
struct data;
struct type;
struct protocol;
struct data;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_protocol
#define APACHE_THRIFT_ACCESSOR_protocol
APACHE_THRIFT_DEFINE_ACCESSOR(protocol);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_data
#define APACHE_THRIFT_ACCESSOR_data
APACHE_THRIFT_DEFINE_ACCESSOR(data);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_type
#define APACHE_THRIFT_ACCESSOR_type
APACHE_THRIFT_DEFINE_ACCESSOR(type);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_protocol
#define APACHE_THRIFT_ACCESSOR_protocol
APACHE_THRIFT_DEFINE_ACCESSOR(protocol);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_data
#define APACHE_THRIFT_ACCESSOR_data
APACHE_THRIFT_DEFINE_ACCESSOR(data);
#endif
} // namespace detail
} // namespace thrift
} // namespace apache

// BEGIN declare_enums

// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::type {
class AnyStruct;
class SemiAnyStruct;
} // namespace apache::thrift::type
// 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 {
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/any_rep.thrift", "name": "AnyStruct", "kind": "struct" } */
class AnyStruct 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();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::protocol,
    ::apache::thrift::ident::data
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::InlineAdapter<::apache::thrift::type::Type>, ::apache::thrift::type::struct_t<::apache::thrift::type::TypeStruct>>,
    ::apache::thrift::type::adapted<::apache::thrift::InlineAdapter<::apache::thrift::type::Protocol>, ::apache::thrift::type::union_t<::apache::thrift::type::ProtocolUnion>>,
    ::apache::thrift::type::cpp_type<folly::IOBuf, ::apache::thrift::type::binary_t>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 3;

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

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

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

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

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


 public:

  AnyStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  AnyStruct(apache::thrift::FragileConstructor, ::apache::thrift::type::Type type__arg, ::apache::thrift::type::Protocol protocol__arg, ::apache::thrift::type::ByteBuffer data__arg);

  AnyStruct(AnyStruct&&) noexcept;
  AnyStruct(const AnyStruct& src);


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

  ~AnyStruct();

 private:
  ::apache::thrift::type::Type __fbthrift_field_type;
 private:
  ::apache::thrift::type::Protocol __fbthrift_field_protocol;
 private:
  ::apache::thrift::type::ByteBuffer __fbthrift_field_data;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const AnyStruct&) const;
  bool operator<(const AnyStruct&) 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": "protocol" } */
  template <typename..., typename T = ::apache::thrift::type::Protocol>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> protocol_ref() const& {
    return {this->__fbthrift_field_protocol, __isset.at(1), __isset.bit(1)};
  }

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::type::ByteBuffer>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> data_ref() & {
    return {this->__fbthrift_field_data, __isset.at(2), __isset.bit(2)};
  }

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

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

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

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

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

  /** Glean { "field": "data" } */
  const ::apache::thrift::type::ByteBuffer& get_data() const& {
    return __fbthrift_field_data;
  }

  /** Glean { "field": "data" } */
  ::apache::thrift::type::ByteBuffer get_data() && {
    return std::move(__fbthrift_field_data);
  }

  /** Glean { "field": "data" } */
  template <typename T_AnyStruct_data_struct_setter = ::apache::thrift::type::ByteBuffer>
  [[deprecated("Use `FOO.data() = BAR;` instead of `FOO.set_data(BAR);`")]]
  ::apache::thrift::type::ByteBuffer& set_data(T_AnyStruct_data_struct_setter&& data_) {
    data_ref() = std::forward<T_AnyStruct_data_struct_setter>(data_);
    return __fbthrift_field_data;
  }

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

template <class Protocol_>
unsigned long AnyStruct::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/any_rep.thrift", "name": "SemiAnyStruct", "kind": "struct" } */
class SemiAnyStruct 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();
  using __fbthrift_reflection_ident_list = folly::tag_t<
    ::apache::thrift::ident::type,
    ::apache::thrift::ident::protocol,
    ::apache::thrift::ident::data
  >;

  static constexpr std::int16_t __fbthrift_reflection_field_id_list[] = {0,1,2,3};
  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::adapted<::apache::thrift::InlineAdapter<::apache::thrift::type::Type>, ::apache::thrift::type::struct_t<::apache::thrift::type::TypeStruct>>,
    ::apache::thrift::type::adapted<::apache::thrift::InlineAdapter<::apache::thrift::type::Protocol>, ::apache::thrift::type::union_t<::apache::thrift::type::ProtocolUnion>>,
    ::apache::thrift::type::cpp_type<folly::IOBuf, ::apache::thrift::type::binary_t>
  >;

  static constexpr std::size_t __fbthrift_field_size_v = 3;

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

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

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

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

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


 public:

  SemiAnyStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  SemiAnyStruct(apache::thrift::FragileConstructor, ::apache::thrift::type::Type type__arg, ::apache::thrift::type::Protocol protocol__arg, ::apache::thrift::type::ByteBuffer data__arg);

  SemiAnyStruct(SemiAnyStruct&&) noexcept;
  SemiAnyStruct(const SemiAnyStruct& src);


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

  ~SemiAnyStruct();

 private:
  ::apache::thrift::type::Type __fbthrift_field_type;
 private:
  ::apache::thrift::type::Protocol __fbthrift_field_protocol;
 private:
  ::apache::thrift::type::ByteBuffer __fbthrift_field_data;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

  bool operator==(const SemiAnyStruct&) const;
  bool operator<(const SemiAnyStruct&) 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": "protocol" } */
  template <typename..., typename T = ::apache::thrift::type::Protocol>
  FOLLY_ERASE ::apache::thrift::field_ref<const T&> protocol_ref() const& {
    return {this->__fbthrift_field_protocol, __isset.at(1), __isset.bit(1)};
  }

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "data" } */
  template <typename..., typename T = ::apache::thrift::type::ByteBuffer>
  FOLLY_ERASE ::apache::thrift::field_ref<T&> data_ref() & {
    return {this->__fbthrift_field_data, __isset.at(2), __isset.bit(2)};
  }

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

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

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

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

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

  /** Glean { "field": "data" } */
  const ::apache::thrift::type::ByteBuffer& get_data() const& {
    return __fbthrift_field_data;
  }

  /** Glean { "field": "data" } */
  ::apache::thrift::type::ByteBuffer get_data() && {
    return std::move(__fbthrift_field_data);
  }

  /** Glean { "field": "data" } */
  template <typename T_SemiAnyStruct_data_struct_setter = ::apache::thrift::type::ByteBuffer>
  [[deprecated("Use `FOO.data() = BAR;` instead of `FOO.set_data(BAR);`")]]
  ::apache::thrift::type::ByteBuffer& set_data(T_SemiAnyStruct_data_struct_setter&& data_) {
    data_ref() = std::forward<T_SemiAnyStruct_data_struct_setter>(data_);
    return __fbthrift_field_data;
  }

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

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


} // namespace apache::thrift::type
