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

namespace apache::thrift {
namespace ident {
struct standard;
struct custom;
struct id;
struct compressed;
struct name;
struct params;
struct protocol;
struct compression;
struct id;
struct uncompressed_data_size_bytes;
struct compression_parameters;
} // namespace ident
namespace detail {
#ifndef APACHE_THRIFT_ACCESSOR_standard
#define APACHE_THRIFT_ACCESSOR_standard
APACHE_THRIFT_DEFINE_ACCESSOR(standard);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_custom
#define APACHE_THRIFT_ACCESSOR_custom
APACHE_THRIFT_DEFINE_ACCESSOR(custom);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_id
#define APACHE_THRIFT_ACCESSOR_id
APACHE_THRIFT_DEFINE_ACCESSOR(id);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_compressed
#define APACHE_THRIFT_ACCESSOR_compressed
APACHE_THRIFT_DEFINE_ACCESSOR(compressed);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_name
#define APACHE_THRIFT_ACCESSOR_name
APACHE_THRIFT_DEFINE_ACCESSOR(name);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_params
#define APACHE_THRIFT_ACCESSOR_params
APACHE_THRIFT_DEFINE_ACCESSOR(params);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_protocol
#define APACHE_THRIFT_ACCESSOR_protocol
APACHE_THRIFT_DEFINE_ACCESSOR(protocol);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_compression
#define APACHE_THRIFT_ACCESSOR_compression
APACHE_THRIFT_DEFINE_ACCESSOR(compression);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_id
#define APACHE_THRIFT_ACCESSOR_id
APACHE_THRIFT_DEFINE_ACCESSOR(id);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_uncompressed_data_size_bytes
#define APACHE_THRIFT_ACCESSOR_uncompressed_data_size_bytes
APACHE_THRIFT_DEFINE_ACCESSOR(uncompressed_data_size_bytes);
#endif
#ifndef APACHE_THRIFT_ACCESSOR_compression_parameters
#define APACHE_THRIFT_ACCESSOR_compression_parameters
APACHE_THRIFT_DEFINE_ACCESSOR(compression_parameters);
#endif
} // namespace detail
} // namespace apache::thrift

// BEGIN declare_enums
// END declare_enums
// BEGIN forward_declare
namespace apache::thrift::type {
class ProtocolUnion;
class TypeStruct;
class CompressedProtocolStruct;
class CompressionSpecStruct;
} // 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/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/type_rep.thrift", "name": "ProtocolUnion", "kind": "union" } */
class ProtocolUnion final  {
 private:
  friend struct ::apache::thrift::detail::st::struct_private_access;
  template<class> friend struct ::apache::thrift::detail::invoke_reffer;

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type/Protocol";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_rep";
  }
  static constexpr std::size_t __fbthrift_num_fields = 4;

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

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::standard,
    ::apache::thrift::ident::custom,
    ::apache::thrift::ident::id,
    ::apache::thrift::ident::compressed
  >;

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::enum_t<::apache::thrift::type::StandardProtocol>,
    ::apache::thrift::type::string_t,
    ::apache::thrift::type::adapted<::apache::thrift::type::detail::StrongIntegerAdapter<::apache::thrift::type::ProtocolId>, ::apache::thrift::type::i64_t>,
    ::apache::thrift::type::struct_t<::apache::thrift::type::CompressedProtocolStruct>
  >;
  void __fbthrift_clear();
  void __fbthrift_destruct();
  bool __fbthrift_is_empty() const;

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


 public:
  enum class Type : int {
    __EMPTY__ = 0,
    standard = 1,
    custom = 2,
    id = 3,
    compressed = 4,
  } ;

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

  ProtocolUnion(ProtocolUnion&& rhs) noexcept
      : fbthrift_type_(folly::to_underlying(Type::__EMPTY__)) {
    if (this == &rhs) { return; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        return;
      }
      case Type::standard:
      {
        set_standard(std::move(rhs.value_.standard));
        break;
      }
      case Type::custom:
      {
        set_custom(std::move(rhs.value_.custom));
        break;
      }
      case Type::id:
      {
        set_id(std::move(rhs.value_.id));
        break;
      }
      case Type::compressed:
      {
        set_compressed(std::move(*rhs.value_.compressed));
        break;
      }
      default:
      {
        assert(false);
        break;
      }
    }
    apache::thrift::clear(rhs);
  }

  ProtocolUnion(const ProtocolUnion& rhs);

  ProtocolUnion& operator=(ProtocolUnion&& rhs) noexcept {
    if (this == &rhs) { return *this; }
    switch (rhs.getType()) {
      case Type::__EMPTY__:
      {
        __fbthrift_clear();
        return *this;
      }
      case Type::standard:
      {
        set_standard(std::move(rhs.value_.standard));
        break;
      }
      case Type::custom:
      {
        set_custom(std::move(rhs.value_.custom));
        break;
      }
      case Type::id:
      {
        set_id(std::move(rhs.value_.id));
        break;
      }
      case Type::compressed:
      {
        set_compressed(std::move(*rhs.value_.compressed));
        break;
      }
      default:
      {
        assert(false);
        __fbthrift_clear();
      }
    }
    apache::thrift::clear(rhs);
    return *this;
  }

  ProtocolUnion& operator=(const ProtocolUnion& rhs);

  ~ProtocolUnion();

  union storage_type {
    ::apache::thrift::type::StandardProtocol standard;
    ::std::string custom;
    ::apache::thrift::type::ProtocolId id;
    ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct> compressed;

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

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

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


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

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

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


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

 private:
  ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>& set_compressed(::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct> t);
  ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>& set_compressed(::apache::thrift::type::CompressedProtocolStruct const &t);
  ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>& set_compressed(::apache::thrift::type::CompressedProtocolStruct&& t);
  /** Glean { "field": "compressed" } */
  template<typename... T, typename = ::apache::thrift::safe_overload_t<::apache::thrift::type::CompressedProtocolStruct, T...>> ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>& set_compressed(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)), ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>, void>;
    __fbthrift_clear();
    fbthrift_type_ = folly::to_underlying(Type::compressed);
    ::new (std::addressof(value_.compressed)) ref_(typename ref_::element_type(std::forward<T>(t)...));
    return value_.compressed;
  }
 public:

  /** Glean { "field": "standard" } */
  ::apache::thrift::type::StandardProtocol const& get_standard() const {
    if (getType() != Type::standard) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.standard;
  }

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

  /** Glean { "field": "id" } */
  ::apache::thrift::type::ProtocolId const& get_id() const {
    if (getType() != Type::id) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return value_.id;
  }

  /** Glean { "field": "compressed" } */
  ::apache::thrift::type::CompressedProtocolStruct const& get_compressed() const {
    if (getType() != Type::compressed) {
      ::apache::thrift::detail::throw_on_bad_union_field_access();
    }
    return *value_.compressed;
  }

  ::apache::thrift::type::StandardProtocol& mutable_standard() {
    assert(getType() == Type::standard);
    return value_.standard;
  }

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

  ::apache::thrift::type::ProtocolId& mutable_id() {
    assert(getType() == Type::id);
    return value_.id;
  }

  ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>& mutable_compressed() {
    assert(getType() == Type::compressed);
    return value_.compressed;
  }

  template <typename..., typename T = ::apache::thrift::type::StandardProtocol>
  T move_standard() {
    assert(getType() == Type::standard);
    return std::move(value_.standard);
  }

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

  template <typename..., typename T = ::apache::thrift::type::ProtocolId>
  T move_id() {
    assert(getType() == Type::id);
    return std::move(value_.id);
  }

  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>>
  T move_compressed() {
    assert(getType() == Type::compressed);
    return std::move(value_.compressed);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  /** Glean { "field": "id" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::type::ProtocolId&&> id() && {
    return {std::move(value_.id), fbthrift_type_, folly::to_underlying(Type::id), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  /** Glean { "field": "compressed" } */
  template <typename..., typename T = ::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>>
  FOLLY_ERASE ::apache::thrift::union_field_ref<const T&> compressed_ref() const& {
    return {value_.compressed, fbthrift_type_, folly::to_underlying(Type::compressed), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }

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

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

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

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

  /** Glean { "field": "compressed" } */
  FOLLY_ERASE ::apache::thrift::union_field_ref<::apache::thrift::detail::boxed_value_ptr<::apache::thrift::type::CompressedProtocolStruct>&&> compressed() && {
    return {std::move(value_.compressed), fbthrift_type_, folly::to_underlying(Type::compressed), this, ::apache::thrift::detail::union_field_ref_owner_vtable_for<decltype(*this)>};
  }
  Type getType() const { return static_cast<Type>(fbthrift_type_); }

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

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

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

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


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

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type/Type";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_rep";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

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

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

  using __fbthrift_reflection_type_tags = folly::tag_t<
    ::apache::thrift::type::union_t<::apache::thrift::type::TypeName>,
    ::apache::thrift::type::list<::apache::thrift::type::struct_t<::apache::thrift::type::TypeStruct>>
  >;
  void __fbthrift_clear();
  void __fbthrift_clear_terse_fields();
  bool __fbthrift_is_empty() const;

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


 public:

  TypeStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  TypeStruct(apache::thrift::FragileConstructor, ::apache::thrift::type::TypeName name__arg, ::std::vector<::apache::thrift::type::TypeStruct> params__arg);

  TypeStruct(TypeStruct&&) noexcept;

  TypeStruct(const TypeStruct& src);


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

  ~TypeStruct();

 private:
  ::apache::thrift::type::TypeName __fbthrift_field_name;
 private:
  ::std::vector<::apache::thrift::type::TypeStruct> __fbthrift_field_params;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

  /** Glean { "field": "name" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type::TypeName>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> name_ref() & {
    return {this->__fbthrift_field_name, __isset.at(0), __isset.bit(0)};
  }

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

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

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

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

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const fbthrift_T&> params_ref() const& {
    return {this->__fbthrift_field_params, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> params_ref() & {
    return {this->__fbthrift_field_params, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&&> params_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_params), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<const fbthrift_T&> params() const& {
    return {this->__fbthrift_field_params, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> params() & {
    return {this->__fbthrift_field_params, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "params" } */
  template <typename..., typename fbthrift_T = ::std::vector<::apache::thrift::type::TypeStruct>>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&&> params() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_params), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "name" } */
  [[deprecated("Use `FOO.name().value()` instead of `FOO.get_name()`")]]
  const ::apache::thrift::type::TypeName& get_name() const&;

  /** Glean { "field": "name" } */
  [[deprecated("Use `FOO.name().value()` instead of `FOO.get_name()`")]]
  ::apache::thrift::type::TypeName get_name() &&;

  /** Glean { "field": "name" } */
  template <typename T_TypeStruct_name_struct_setter = ::apache::thrift::type::TypeName>
  [[deprecated("Use `FOO.name() = BAR` instead of `FOO.set_name(BAR)`")]]
  ::apache::thrift::type::TypeName& set_name(T_TypeStruct_name_struct_setter&& name_) {
    name_ref() = std::forward<T_TypeStruct_name_struct_setter>(name_);
    return __fbthrift_field_name;
  }

  /** Glean { "field": "params" } */
  [[deprecated("Use `FOO.params().value()` instead of `FOO.get_params()`")]]
  const ::std::vector<::apache::thrift::type::TypeStruct>& get_params() const&;

  /** Glean { "field": "params" } */
  [[deprecated("Use `FOO.params().value()` instead of `FOO.get_params()`")]]
  ::std::vector<::apache::thrift::type::TypeStruct> get_params() &&;

  /** Glean { "field": "params" } */
  template <typename T_TypeStruct_params_struct_setter = ::std::vector<::apache::thrift::type::TypeStruct>>
  [[deprecated("Use `FOO.params() = BAR` instead of `FOO.set_params(BAR)`")]]
  ::std::vector<::apache::thrift::type::TypeStruct>& set_params(T_TypeStruct_params_struct_setter&& params_) {
    params_ref() = std::forward<T_TypeStruct_params_struct_setter>(params_);
    return __fbthrift_field_params;
  }

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

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


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

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type/CompressionSpec";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_rep";
  }
  static constexpr std::size_t __fbthrift_num_fields = 3;

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

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

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

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


 public:

  CompressionSpecStruct();

  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompressionSpecStruct(apache::thrift::FragileConstructor, ::std::int8_t id__arg, ::std::int64_t uncompressed_data_size_bytes__arg, ::std::string compression_parameters__arg);

  CompressionSpecStruct(CompressionSpecStruct&&) noexcept;

  CompressionSpecStruct(const CompressionSpecStruct& src);


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

  ~CompressionSpecStruct();

 private:
  ::std::int8_t __fbthrift_field_id;
 private:
  ::std::int64_t __fbthrift_field_uncompressed_data_size_bytes;
 private:
  ::std::string __fbthrift_field_compression_parameters;
 private:
  apache::thrift::detail::isset_bitset<3, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::field_ref<const fbthrift_T&> id_ref() const& {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> id_ref() & {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&&> id_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_id), __isset.at(0), __isset.bit(0)};
  }

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

  /** Glean { "field": "id" } */
  template <typename..., typename fbthrift_T = ::std::int8_t>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> id() & {
    return {this->__fbthrift_field_id, __isset.at(0), __isset.bit(0)};
  }

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

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> uncompressed_data_size_bytes_ref() const& {
    return {this->__fbthrift_field_uncompressed_data_size_bytes, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> uncompressed_data_size_bytes_ref() & {
    return {this->__fbthrift_field_uncompressed_data_size_bytes, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> uncompressed_data_size_bytes_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_uncompressed_data_size_bytes), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> uncompressed_data_size_bytes() const& {
    return {this->__fbthrift_field_uncompressed_data_size_bytes, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> uncompressed_data_size_bytes() & {
    return {this->__fbthrift_field_uncompressed_data_size_bytes, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  template <typename..., typename fbthrift_T = ::std::int64_t>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> uncompressed_data_size_bytes() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_uncompressed_data_size_bytes), __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> compression_parameters_ref() const& {
    return {this->__fbthrift_field_compression_parameters, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> compression_parameters_ref() & {
    return {this->__fbthrift_field_compression_parameters, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> compression_parameters_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_compression_parameters), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<const fbthrift_T&> compression_parameters() const& {
    return {this->__fbthrift_field_compression_parameters, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&> compression_parameters() & {
    return {this->__fbthrift_field_compression_parameters, __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "compression_parameters" } */
  template <typename..., typename fbthrift_T = ::std::string>
  FOLLY_ERASE ::apache::thrift::optional_field_ref<fbthrift_T&&> compression_parameters() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_compression_parameters), __isset.at(2), __isset.bit(2)};
  }

  /** Glean { "field": "id" } */
  [[deprecated("Use `FOO.id().value()` instead of `FOO.get_id()`")]]
  ::std::int8_t get_id() const;

  /** Glean { "field": "id" } */
  [[deprecated("Use `FOO.id() = BAR` instead of `FOO.set_id(BAR)`")]]
  ::std::int8_t& set_id(::std::int8_t id_);

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  [[deprecated("Use `FOO.uncompressed_data_size_bytes().value()` instead of `FOO.get_uncompressed_data_size_bytes()`")]]
  const ::std::int64_t* get_uncompressed_data_size_bytes() const&;

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  [[deprecated("Use `FOO.uncompressed_data_size_bytes().value()` instead of `FOO.get_uncompressed_data_size_bytes()`")]]
  ::std::int64_t* get_uncompressed_data_size_bytes() &;

  ::std::int64_t* get_uncompressed_data_size_bytes() && = delete;

  /** Glean { "field": "uncompressed_data_size_bytes" } */
  [[deprecated("Use `FOO.uncompressed_data_size_bytes() = BAR` instead of `FOO.set_uncompressed_data_size_bytes(BAR)`")]]
  ::std::int64_t& set_uncompressed_data_size_bytes(::std::int64_t uncompressed_data_size_bytes_);

  /** Glean { "field": "compression_parameters" } */
  [[deprecated("Use `FOO.compression_parameters().value()` instead of `FOO.get_compression_parameters()`")]]
  const ::std::string* get_compression_parameters() const&;

  /** Glean { "field": "compression_parameters" } */
  [[deprecated("Use `FOO.compression_parameters().value()` instead of `FOO.get_compression_parameters()`")]]
  ::std::string* get_compression_parameters() &;

  ::std::string* get_compression_parameters() && = delete;

  /** Glean { "field": "compression_parameters" } */
  template <typename T_CompressionSpecStruct_compression_parameters_struct_setter = ::std::string>
  [[deprecated("Use `FOO.compression_parameters() = BAR` instead of `FOO.set_compression_parameters(BAR)`")]]
  ::std::string& set_compression_parameters(T_CompressionSpecStruct_compression_parameters_struct_setter&& compression_parameters_) {
    compression_parameters_ref() = std::forward<T_CompressionSpecStruct_compression_parameters_struct_setter>(compression_parameters_);
    return __fbthrift_field_compression_parameters;
  }

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

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


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

  //  used by a static_assert in the corresponding source
  static constexpr bool __fbthrift_cpp2_gen_json = false;
  static constexpr bool __fbthrift_cpp2_is_runtime_annotation = false;
  static constexpr folly::cstring_view __fbthrift_thrift_uri = "facebook.com/thrift/type/CompressedProtocol";
  static std::string_view __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord);
  static std::string_view __fbthrift_get_class_name();
  template <class ...>
  FOLLY_ERASE static constexpr std::string_view __fbthrift_get_module_name() noexcept {
    return "type_rep";
  }
  static constexpr std::size_t __fbthrift_num_fields = 2;

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

  using __fbthrift_reflection_idents = folly::tag_t<
    ::apache::thrift::ident::protocol,
    ::apache::thrift::ident::compression
  >;

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

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


 public:

  CompressedProtocolStruct() {
  }
  // FragileConstructor for use in initialization lists only.
  [[deprecated("This constructor is deprecated")]]
  CompressedProtocolStruct(apache::thrift::FragileConstructor, ::apache::thrift::type::ProtocolUnion protocol__arg, ::apache::thrift::type::CompressionSpecStruct compression__arg);

  CompressedProtocolStruct(CompressedProtocolStruct&&) noexcept;

  CompressedProtocolStruct(const CompressedProtocolStruct& src);


  CompressedProtocolStruct& operator=(CompressedProtocolStruct&&) noexcept;
  CompressedProtocolStruct& operator=(const CompressedProtocolStruct& src);
 private:
  ::apache::thrift::type::ProtocolUnion __fbthrift_field_protocol;
 private:
  ::apache::thrift::type::CompressionSpecStruct __fbthrift_field_compression;
 private:
  apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset;

 public:

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

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

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

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

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

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

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

  /** Glean { "field": "compression" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type::CompressionSpecStruct>
  FOLLY_ERASE ::apache::thrift::field_ref<const fbthrift_T&> compression_ref() const& {
    return {this->__fbthrift_field_compression, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "compression" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type::CompressionSpecStruct>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> compression_ref() & {
    return {this->__fbthrift_field_compression, __isset.at(1), __isset.bit(1)};
  }

  /** Glean { "field": "compression" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type::CompressionSpecStruct>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&&> compression_ref() && {
    return {static_cast<fbthrift_T&&>(this->__fbthrift_field_compression), __isset.at(1), __isset.bit(1)};
  }

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

  /** Glean { "field": "compression" } */
  template <typename..., typename fbthrift_T = ::apache::thrift::type::CompressionSpecStruct>
  FOLLY_ERASE ::apache::thrift::field_ref<fbthrift_T&> compression() & {
    return {this->__fbthrift_field_compression, __isset.at(1), __isset.bit(1)};
  }

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

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

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

  /** Glean { "field": "protocol" } */
  template <typename T_CompressedProtocolStruct_protocol_struct_setter = ::apache::thrift::type::ProtocolUnion>
  [[deprecated("Use `FOO.protocol() = BAR` instead of `FOO.set_protocol(BAR)`")]]
  ::apache::thrift::type::ProtocolUnion& set_protocol(T_CompressedProtocolStruct_protocol_struct_setter&& protocol_) {
    protocol_ref() = std::forward<T_CompressedProtocolStruct_protocol_struct_setter>(protocol_);
    return __fbthrift_field_protocol;
  }

  /** Glean { "field": "compression" } */
  [[deprecated("Use `FOO.compression().value()` instead of `FOO.get_compression()`")]]
  const ::apache::thrift::type::CompressionSpecStruct& get_compression() const&;

  /** Glean { "field": "compression" } */
  [[deprecated("Use `FOO.compression().value()` instead of `FOO.get_compression()`")]]
  ::apache::thrift::type::CompressionSpecStruct get_compression() &&;

  /** Glean { "field": "compression" } */
  template <typename T_CompressedProtocolStruct_compression_struct_setter = ::apache::thrift::type::CompressionSpecStruct>
  [[deprecated("Use `FOO.compression() = BAR` instead of `FOO.set_compression(BAR)`")]]
  ::apache::thrift::type::CompressionSpecStruct& set_compression(T_CompressedProtocolStruct_compression_struct_setter&& compression_) {
    compression_ref() = std::forward<T_CompressedProtocolStruct_compression_struct_setter>(compression_);
    return __fbthrift_field_compression;
  }

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

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


} // namespace apache::thrift::type

namespace apache::thrift {

template <> struct TEnumDataStorage<::apache::thrift::type::ProtocolUnion::Type>;

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

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

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

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

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

namespace apache::thrift::detail {
template <> struct TSchemaAssociation<::apache::thrift::type::ProtocolUnion, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = 4395441762824332950;
  static constexpr ::std::string_view definitionKey = {"\x1b\xaa\xcc\xc9\x20\x99\x15\x26\x1a\x25\xa4\x9c\x7e\x3a\xf3\xc3", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type::TypeStruct, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = 4395441762824332950;
  static constexpr ::std::string_view definitionKey = {"\x95\x75\x71\xf9\xd7\xde\x96\xab\xe2\x64\xa9\xea\x26\x04\x80\x38", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type::CompressedProtocolStruct, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = 4395441762824332950;
  static constexpr ::std::string_view definitionKey = {"\x3e\xe4\x97\xf2\x0b\xa3\x80\x31\x98\x2c\x49\xd2\xef\x98\xd1\xda", 16};
};
template <> struct TSchemaAssociation<::apache::thrift::type::CompressionSpecStruct, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = 4395441762824332950;
  static constexpr ::std::string_view definitionKey = {"\xb7\xc9\x62\x90\xd6\xb2\xc2\x64\x71\x73\x41\x09\xcb\xcc\xfd\x8c", 16};
};
} // namespace apache::thrift::detail
