// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: proto/segment_manifest.proto
// Protobuf C++ Version: 6.33.2

#include "proto/segment_manifest.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/wire_format.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace orion {
namespace proto {

inline constexpr ANNIndex::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        embedding_index_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        hnsw_index_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        fid_{::uint64_t{0u}} {}

template <typename>
PROTOBUF_CONSTEXPR ANNIndex::ANNIndex(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(ANNIndex_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct ANNIndexDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ANNIndexDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~ANNIndexDefaultTypeInternal() {}
  union {
    ANNIndex _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ANNIndexDefaultTypeInternal _ANNIndex_default_instance_;

inline constexpr SegmentManifest::Impl_::Impl_(
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        ann_indexes_{},
        metadata_index_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        postings_index_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        feature_info_index_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        id_{::uint64_t{0u}} {}

template <typename>
PROTOBUF_CONSTEXPR SegmentManifest::SegmentManifest(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(SegmentManifest_class_data_.base()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(::_pbi::ConstantInitialized()) {
}
struct SegmentManifestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SegmentManifestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~SegmentManifestDefaultTypeInternal() {}
  union {
    SegmentManifest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SegmentManifestDefaultTypeInternal _SegmentManifest_default_instance_;
}  // namespace proto
}  // namespace orion
static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
    file_level_enum_descriptors_proto_2fsegment_5fmanifest_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
    file_level_service_descriptors_proto_2fsegment_5fmanifest_2eproto = nullptr;
const ::uint32_t
    TableStruct_proto_2fsegment_5fmanifest_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
        protodesc_cold) = {
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::orion::proto::ANNIndex, _impl_._has_bits_),
        6, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::orion::proto::ANNIndex, _impl_.fid_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::ANNIndex, _impl_.embedding_index_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::ANNIndex, _impl_.hnsw_index_),
        2,
        0,
        1,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_._has_bits_),
        8, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_.id_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_.metadata_index_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_.postings_index_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_.ann_indexes_),
        PROTOBUF_FIELD_OFFSET(::orion::proto::SegmentManifest, _impl_.feature_info_index_),
        4,
        1,
        2,
        0,
        3,
};

static const ::_pbi::MigrationSchema
    schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        {0, sizeof(::orion::proto::ANNIndex)},
        {9, sizeof(::orion::proto::SegmentManifest)},
};
static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
    &::orion::proto::_ANNIndex_default_instance_._instance,
    &::orion::proto::_SegmentManifest_default_instance_._instance,
};
const char descriptor_table_protodef_proto_2fsegment_5fmanifest_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
    protodesc_cold) = {
    "\n\034proto/segment_manifest.proto\022\013orion.pr"
    "oto\"D\n\010ANNIndex\022\013\n\003fid\030\001 \001(\004\022\027\n\017embeddin"
    "g_index\030\002 \001(\t\022\022\n\nhnsw_index\030\003 \001(\t\"\225\001\n\017Se"
    "gmentManifest\022\n\n\002id\030\001 \001(\004\022\026\n\016metadata_in"
    "dex\030\002 \001(\t\022\026\n\016postings_index\030\003 \001(\t\022*\n\013ann"
    "_indexes\030\004 \003(\0132\025.orion.proto.ANNIndex\022\032\n"
    "\022feature_info_index\030\005 \001(\tb\006proto3"
};
static ::absl::once_flag descriptor_table_proto_2fsegment_5fmanifest_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_proto_2fsegment_5fmanifest_2eproto = {
    false,
    false,
    273,
    descriptor_table_protodef_proto_2fsegment_5fmanifest_2eproto,
    "proto/segment_manifest.proto",
    &descriptor_table_proto_2fsegment_5fmanifest_2eproto_once,
    nullptr,
    0,
    2,
    schemas,
    file_default_instances,
    TableStruct_proto_2fsegment_5fmanifest_2eproto::offsets,
    file_level_enum_descriptors_proto_2fsegment_5fmanifest_2eproto,
    file_level_service_descriptors_proto_2fsegment_5fmanifest_2eproto,
};
namespace orion {
namespace proto {
// ===================================================================

class ANNIndex::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<ANNIndex>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_._has_bits_);
};

ANNIndex::ANNIndex(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, ANNIndex_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:orion.proto.ANNIndex)
}
PROTOBUF_NDEBUG_INLINE ANNIndex::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::orion::proto::ANNIndex& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        embedding_index_(arena, from.embedding_index_),
        hnsw_index_(arena, from.hnsw_index_) {}

ANNIndex::ANNIndex(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const ANNIndex& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, ANNIndex_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ANNIndex* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.fid_ = from._impl_.fid_;

  // @@protoc_insertion_point(copy_constructor:orion.proto.ANNIndex)
}
PROTOBUF_NDEBUG_INLINE ANNIndex::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        embedding_index_(arena),
        hnsw_index_(arena) {}

inline void ANNIndex::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.fid_ = {};
}
ANNIndex::~ANNIndex() {
  // @@protoc_insertion_point(destructor:orion.proto.ANNIndex)
  SharedDtor(*this);
}
inline void ANNIndex::SharedDtor(MessageLite& self) {
  ANNIndex& this_ = static_cast<ANNIndex&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.embedding_index_.Destroy();
  this_._impl_.hnsw_index_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL ANNIndex::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ANNIndex(arena);
}
constexpr auto ANNIndex::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ANNIndex),
                                            alignof(ANNIndex));
}
constexpr auto ANNIndex::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_ANNIndex_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &ANNIndex::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<ANNIndex>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ANNIndex::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<ANNIndex>(), &ANNIndex::ByteSizeLong,
              &ANNIndex::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_._cached_size_),
          false,
      },
      &ANNIndex::kDescriptorMethods,
      &descriptor_table_proto_2fsegment_5fmanifest_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull ANNIndex_class_data_ =
        ANNIndex::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ANNIndex::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&ANNIndex_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(ANNIndex_class_data_.tc_table);
  return ANNIndex_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 3, 0, 54, 2>
ANNIndex::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_._has_bits_),
    0, // no _extensions_
    3, 24,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967288,  // skipmap
    offsetof(decltype(_table_), field_entries),
    3,  // num_field_entries
    0,  // num_aux_entries
    offsetof(decltype(_table_), field_names),  // no aux_entries
    ANNIndex_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::orion::proto::ANNIndex>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // uint64 fid = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(ANNIndex, _impl_.fid_), 2>(),
     {8, 2, 0,
      PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.fid_)}},
    // string embedding_index = 2;
    {::_pbi::TcParser::FastUS1,
     {18, 0, 0,
      PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.embedding_index_)}},
    // string hnsw_index = 3;
    {::_pbi::TcParser::FastUS1,
     {26, 1, 0,
      PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.hnsw_index_)}},
  }}, {{
    65535, 65535
  }}, {{
    // uint64 fid = 1;
    {PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.fid_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
    // string embedding_index = 2;
    {PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.embedding_index_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // string hnsw_index = 3;
    {PROTOBUF_FIELD_OFFSET(ANNIndex, _impl_.hnsw_index_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
  }},
  // no aux_entries
  {{
    "\24\0\17\12\0\0\0\0"
    "orion.proto.ANNIndex"
    "embedding_index"
    "hnsw_index"
  }},
};
PROTOBUF_NOINLINE void ANNIndex::Clear() {
// @@protoc_insertion_point(message_clear_start:orion.proto.ANNIndex)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.embedding_index_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.hnsw_index_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.fid_ = ::uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL ANNIndex::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const ANNIndex& this_ = static_cast<const ANNIndex&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL ANNIndex::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const ANNIndex& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:orion.proto.ANNIndex)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // uint64 fid = 1;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (this_._internal_fid() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
          1, this_._internal_fid(), target);
    }
  }

  // string embedding_index = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    if (!this_._internal_embedding_index().empty()) {
      const ::std::string& _s = this_._internal_embedding_index();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "orion.proto.ANNIndex.embedding_index");
      target = stream->WriteStringMaybeAliased(2, _s, target);
    }
  }

  // string hnsw_index = 3;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (!this_._internal_hnsw_index().empty()) {
      const ::std::string& _s = this_._internal_hnsw_index();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "orion.proto.ANNIndex.hnsw_index");
      target = stream->WriteStringMaybeAliased(3, _s, target);
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:orion.proto.ANNIndex)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ANNIndex::ByteSizeLong(const MessageLite& base) {
  const ANNIndex& this_ = static_cast<const ANNIndex&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ANNIndex::ByteSizeLong() const {
  const ANNIndex& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:orion.proto.ANNIndex)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // string embedding_index = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!this_._internal_embedding_index().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_embedding_index());
      }
    }
    // string hnsw_index = 3;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!this_._internal_hnsw_index().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_hnsw_index());
      }
    }
    // uint64 fid = 1;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (this_._internal_fid() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
            this_._internal_fid());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void ANNIndex::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<ANNIndex*>(&to_msg);
  auto& from = static_cast<const ANNIndex&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:orion.proto.ANNIndex)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!from._internal_embedding_index().empty()) {
        _this->_internal_set_embedding_index(from._internal_embedding_index());
      } else {
        if (_this->_impl_.embedding_index_.IsDefault()) {
          _this->_internal_set_embedding_index("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!from._internal_hnsw_index().empty()) {
        _this->_internal_set_hnsw_index(from._internal_hnsw_index());
      } else {
        if (_this->_impl_.hnsw_index_.IsDefault()) {
          _this->_internal_set_hnsw_index("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (from._internal_fid() != 0) {
        _this->_impl_.fid_ = from._impl_.fid_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

void ANNIndex::CopyFrom(const ANNIndex& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:orion.proto.ANNIndex)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void ANNIndex::InternalSwap(ANNIndex* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.embedding_index_, &other->_impl_.embedding_index_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.hnsw_index_, &other->_impl_.hnsw_index_, arena);
  swap(_impl_.fid_, other->_impl_.fid_);
}

::google::protobuf::Metadata ANNIndex::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

class SegmentManifest::_Internal {
 public:
  using HasBits =
      decltype(::std::declval<SegmentManifest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_._has_bits_);
};

SegmentManifest::SegmentManifest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, SegmentManifest_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:orion.proto.SegmentManifest)
}
PROTOBUF_NDEBUG_INLINE SegmentManifest::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::orion::proto::SegmentManifest& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        ann_indexes_{visibility, arena, from.ann_indexes_},
        metadata_index_(arena, from.metadata_index_),
        postings_index_(arena, from.postings_index_),
        feature_info_index_(arena, from.feature_info_index_) {}

SegmentManifest::SegmentManifest(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const SegmentManifest& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, SegmentManifest_class_data_.base()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SegmentManifest* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.id_ = from._impl_.id_;

  // @@protoc_insertion_point(copy_constructor:orion.proto.SegmentManifest)
}
PROTOBUF_NDEBUG_INLINE SegmentManifest::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        ann_indexes_{visibility, arena},
        metadata_index_(arena),
        postings_index_(arena),
        feature_info_index_(arena) {}

inline void SegmentManifest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.id_ = {};
}
SegmentManifest::~SegmentManifest() {
  // @@protoc_insertion_point(destructor:orion.proto.SegmentManifest)
  SharedDtor(*this);
}
inline void SegmentManifest::SharedDtor(MessageLite& self) {
  SegmentManifest& this_ = static_cast<SegmentManifest&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.metadata_index_.Destroy();
  this_._impl_.postings_index_.Destroy();
  this_._impl_.feature_info_index_.Destroy();
  this_._impl_.~Impl_();
}

inline void* PROTOBUF_NONNULL SegmentManifest::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) SegmentManifest(arena);
}
constexpr auto SegmentManifest::InternalNewImpl_() {
  constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.ann_indexes_) +
          decltype(SegmentManifest::_impl_.ann_indexes_)::
              InternalGetArenaOffset(
                  ::google::protobuf::Message::internal_visibility()),
  });
  if (arena_bits.has_value()) {
    return ::google::protobuf::internal::MessageCreator::CopyInit(
        sizeof(SegmentManifest), alignof(SegmentManifest), *arena_bits);
  } else {
    return ::google::protobuf::internal::MessageCreator(&SegmentManifest::PlacementNew_,
                                 sizeof(SegmentManifest),
                                 alignof(SegmentManifest));
  }
}
constexpr auto SegmentManifest::InternalGenerateClassData_() {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &_SegmentManifest_default_instance_._instance,
          &_table_.header,
          nullptr,  // OnDemandRegisterArenaDtor
          nullptr,  // IsInitialized
          &SegmentManifest::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<SegmentManifest>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &SegmentManifest::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<SegmentManifest>(), &SegmentManifest::ByteSizeLong,
              &SegmentManifest::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_._cached_size_),
          false,
      },
      &SegmentManifest::kDescriptorMethods,
      &descriptor_table_proto_2fsegment_5fmanifest_2eproto,
      nullptr,  // tracker
  };
}

PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull SegmentManifest_class_data_ =
        SegmentManifest::InternalGenerateClassData_();

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SegmentManifest::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&SegmentManifest_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(SegmentManifest_class_data_.tc_table);
  return SegmentManifest_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 5, 1, 82, 2>
SegmentManifest::_table_ = {
  {
    PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_._has_bits_),
    0, // no _extensions_
    5, 56,  // max_field_number, fast_idx_mask
    offsetof(decltype(_table_), field_lookup_table),
    4294967264,  // skipmap
    offsetof(decltype(_table_), field_entries),
    5,  // num_field_entries
    1,  // num_aux_entries
    offsetof(decltype(_table_), aux_entries),
    SegmentManifest_class_data_.base(),
    nullptr,  // post_loop_handler
    ::_pbi::TcParser::GenericFallback,  // fallback
    #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
    ::_pbi::TcParser::GetTable<::orion::proto::SegmentManifest>(),  // to_prefetch
    #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
  }, {{
    {::_pbi::TcParser::MiniParse, {}},
    // uint64 id = 1;
    {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(SegmentManifest, _impl_.id_), 4>(),
     {8, 4, 0,
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.id_)}},
    // string metadata_index = 2;
    {::_pbi::TcParser::FastUS1,
     {18, 1, 0,
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.metadata_index_)}},
    // string postings_index = 3;
    {::_pbi::TcParser::FastUS1,
     {26, 2, 0,
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.postings_index_)}},
    // repeated .orion.proto.ANNIndex ann_indexes = 4;
    {::_pbi::TcParser::FastMtR1,
     {34, 0, 0,
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.ann_indexes_)}},
    // string feature_info_index = 5;
    {::_pbi::TcParser::FastUS1,
     {42, 3, 0,
      PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.feature_info_index_)}},
    {::_pbi::TcParser::MiniParse, {}},
    {::_pbi::TcParser::MiniParse, {}},
  }}, {{
    65535, 65535
  }}, {{
    // uint64 id = 1;
    {PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.id_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
    // string metadata_index = 2;
    {PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.metadata_index_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // string postings_index = 3;
    {PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.postings_index_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    // repeated .orion.proto.ANNIndex ann_indexes = 4;
    {PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.ann_indexes_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    // string feature_info_index = 5;
    {PROTOBUF_FIELD_OFFSET(SegmentManifest, _impl_.feature_info_index_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
  }},
  {{
      {::_pbi::TcParser::GetTable<::orion::proto::ANNIndex>()},
  }},
  {{
    "\33\0\16\16\0\22\0\0"
    "orion.proto.SegmentManifest"
    "metadata_index"
    "postings_index"
    "feature_info_index"
  }},
};
PROTOBUF_NOINLINE void SegmentManifest::Clear() {
// @@protoc_insertion_point(message_clear_start:orion.proto.SegmentManifest)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
    if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
      _impl_.ann_indexes_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.metadata_index_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.postings_index_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _impl_.feature_info_index_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.id_ = ::uint64_t{0u};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SegmentManifest::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const SegmentManifest& this_ = static_cast<const SegmentManifest&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SegmentManifest::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const SegmentManifest& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:orion.proto.SegmentManifest)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // uint64 id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    if (this_._internal_id() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
          1, this_._internal_id(), target);
    }
  }

  // string metadata_index = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (!this_._internal_metadata_index().empty()) {
      const ::std::string& _s = this_._internal_metadata_index();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "orion.proto.SegmentManifest.metadata_index");
      target = stream->WriteStringMaybeAliased(2, _s, target);
    }
  }

  // string postings_index = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (!this_._internal_postings_index().empty()) {
      const ::std::string& _s = this_._internal_postings_index();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "orion.proto.SegmentManifest.postings_index");
      target = stream->WriteStringMaybeAliased(3, _s, target);
    }
  }

  // repeated .orion.proto.ANNIndex ann_indexes = 4;
  if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_ann_indexes_size());
         i < n; i++) {
      const auto& repfield = this_._internal_ann_indexes().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              4, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // string feature_info_index = 5;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    if (!this_._internal_feature_info_index().empty()) {
      const ::std::string& _s = this_._internal_feature_info_index();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "orion.proto.SegmentManifest.feature_info_index");
      target = stream->WriteStringMaybeAliased(5, _s, target);
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:orion.proto.SegmentManifest)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SegmentManifest::ByteSizeLong(const MessageLite& base) {
  const SegmentManifest& this_ = static_cast<const SegmentManifest&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t SegmentManifest::ByteSizeLong() const {
  const SegmentManifest& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:orion.proto.SegmentManifest)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // repeated .orion.proto.ANNIndex ann_indexes = 4;
    if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_ann_indexes_size();
      for (const auto& msg : this_._internal_ann_indexes()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // string metadata_index = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!this_._internal_metadata_index().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_metadata_index());
      }
    }
    // string postings_index = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (!this_._internal_postings_index().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_postings_index());
      }
    }
    // string feature_info_index = 5;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (!this_._internal_feature_info_index().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_feature_info_index());
      }
    }
    // uint64 id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (this_._internal_id() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
            this_._internal_id());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void SegmentManifest::MergeImpl(::google::protobuf::MessageLite& to_msg,
                            const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this =
      static_cast<SegmentManifest*>(&to_msg);
  auto& from = static_cast<const SegmentManifest&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:orion.proto.SegmentManifest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_ann_indexes()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_ann_indexes());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!from._internal_metadata_index().empty()) {
        _this->_internal_set_metadata_index(from._internal_metadata_index());
      } else {
        if (_this->_impl_.metadata_index_.IsDefault()) {
          _this->_internal_set_metadata_index("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (!from._internal_postings_index().empty()) {
        _this->_internal_set_postings_index(from._internal_postings_index());
      } else {
        if (_this->_impl_.postings_index_.IsDefault()) {
          _this->_internal_set_postings_index("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (!from._internal_feature_info_index().empty()) {
        _this->_internal_set_feature_info_index(from._internal_feature_info_index());
      } else {
        if (_this->_impl_.feature_info_index_.IsDefault()) {
          _this->_internal_set_feature_info_index("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (from._internal_id() != 0) {
        _this->_impl_.id_ = from._impl_.id_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

void SegmentManifest::CopyFrom(const SegmentManifest& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:orion.proto.SegmentManifest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void SegmentManifest::InternalSwap(SegmentManifest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.ann_indexes_.InternalSwap(&other->_impl_.ann_indexes_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.metadata_index_, &other->_impl_.metadata_index_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.postings_index_, &other->_impl_.postings_index_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.feature_info_index_, &other->_impl_.feature_info_index_, arena);
  swap(_impl_.id_, other->_impl_.id_);
}

::google::protobuf::Metadata SegmentManifest::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// @@protoc_insertion_point(namespace_scope)
}  // namespace proto
}  // namespace orion
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
    _static_init2_ [[maybe_unused]] =
        (::_pbi::AddDescriptors(&descriptor_table_proto_2fsegment_5fmanifest_2eproto),
         ::std::false_type{});
#include "google/protobuf/port_undef.inc"
