// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: greptime/v1/index/bloom_filter.proto

#include "greptime/v1/index/bloom_filter.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.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)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace greptime {
namespace v1 {
namespace index {
PROTOBUF_CONSTEXPR BloomFilterMeta::BloomFilterMeta(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.segment_loc_indices_)*/{}
  , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0}
  , /*decltype(_impl_.bloom_filter_locs_)*/{}
  , /*decltype(_impl_.rows_per_segment_)*/uint64_t{0u}
  , /*decltype(_impl_.segment_count_)*/uint64_t{0u}
  , /*decltype(_impl_.row_count_)*/uint64_t{0u}
  , /*decltype(_impl_.bloom_filter_size_)*/uint64_t{0u}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BloomFilterMetaDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BloomFilterMetaDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BloomFilterMetaDefaultTypeInternal() {}
  union {
    BloomFilterMeta _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BloomFilterMetaDefaultTypeInternal _BloomFilterMeta_default_instance_;
PROTOBUF_CONSTEXPR BloomFilterLoc::BloomFilterLoc(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.offset_)*/uint64_t{0u}
  , /*decltype(_impl_.size_)*/uint64_t{0u}
  , /*decltype(_impl_.element_count_)*/uint64_t{0u}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BloomFilterLocDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BloomFilterLocDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BloomFilterLocDefaultTypeInternal() {}
  union {
    BloomFilterLoc _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BloomFilterLocDefaultTypeInternal _BloomFilterLoc_default_instance_;
}  // namespace index
}  // namespace v1
}  // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[2];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = nullptr;

const uint32_t TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.rows_per_segment_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.segment_count_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.row_count_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.bloom_filter_size_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.segment_loc_indices_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterMeta, _impl_.bloom_filter_locs_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.offset_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.size_),
  PROTOBUF_FIELD_OFFSET(::greptime::v1::index::BloomFilterLoc, _impl_.element_count_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::greptime::v1::index::BloomFilterMeta)},
  { 12, -1, -1, sizeof(::greptime::v1::index::BloomFilterLoc)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::greptime::v1::index::_BloomFilterMeta_default_instance_._instance,
  &::greptime::v1::index::_BloomFilterLoc_default_instance_._instance,
};

const char descriptor_table_protodef_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n$greptime/v1/index/bloom_filter.proto\022\021"
  "greptime.v1.index\"\313\001\n\017BloomFilterMeta\022\030\n"
  "\020rows_per_segment\030\001 \001(\004\022\025\n\rsegment_count"
  "\030\002 \001(\004\022\021\n\trow_count\030\003 \001(\004\022\031\n\021bloom_filte"
  "r_size\030\004 \001(\004\022\033\n\023segment_loc_indices\030\005 \003("
  "\004\022<\n\021bloom_filter_locs\030\006 \003(\0132!.greptime."
  "v1.index.BloomFilterLoc\"E\n\016BloomFilterLo"
  "c\022\016\n\006offset\030\001 \001(\004\022\014\n\004size\030\002 \001(\004\022\025\n\releme"
  "nt_count\030\003 \001(\004B=Z;github.com/GreptimeTea"
  "m/greptime-proto/go/greptime/v1/indexb\006p"
  "roto3"
  ;
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto = {
    false, false, 405, descriptor_table_protodef_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto,
    "greptime/v1/index/bloom_filter.proto",
    &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once, nullptr, 0, 2,
    schemas, file_default_instances, TableStruct_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto::offsets,
    file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto, file_level_enum_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto,
    file_level_service_descriptors_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter() {
  return &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto(&descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto);
namespace greptime {
namespace v1 {
namespace index {

// ===================================================================

class BloomFilterMeta::_Internal {
 public:
};

BloomFilterMeta::BloomFilterMeta(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:greptime.v1.index.BloomFilterMeta)
}
BloomFilterMeta::BloomFilterMeta(const BloomFilterMeta& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BloomFilterMeta* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.segment_loc_indices_){from._impl_.segment_loc_indices_}
    , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0}
    , decltype(_impl_.bloom_filter_locs_){from._impl_.bloom_filter_locs_}
    , decltype(_impl_.rows_per_segment_){}
    , decltype(_impl_.segment_count_){}
    , decltype(_impl_.row_count_){}
    , decltype(_impl_.bloom_filter_size_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.rows_per_segment_, &from._impl_.rows_per_segment_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.bloom_filter_size_) -
    reinterpret_cast<char*>(&_impl_.rows_per_segment_)) + sizeof(_impl_.bloom_filter_size_));
  // @@protoc_insertion_point(copy_constructor:greptime.v1.index.BloomFilterMeta)
}

inline void BloomFilterMeta::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.segment_loc_indices_){arena}
    , /*decltype(_impl_._segment_loc_indices_cached_byte_size_)*/{0}
    , decltype(_impl_.bloom_filter_locs_){arena}
    , decltype(_impl_.rows_per_segment_){uint64_t{0u}}
    , decltype(_impl_.segment_count_){uint64_t{0u}}
    , decltype(_impl_.row_count_){uint64_t{0u}}
    , decltype(_impl_.bloom_filter_size_){uint64_t{0u}}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

BloomFilterMeta::~BloomFilterMeta() {
  // @@protoc_insertion_point(destructor:greptime.v1.index.BloomFilterMeta)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void BloomFilterMeta::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.segment_loc_indices_.~RepeatedField();
  _impl_.bloom_filter_locs_.~RepeatedPtrField();
}

void BloomFilterMeta::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void BloomFilterMeta::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.index.BloomFilterMeta)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.segment_loc_indices_.Clear();
  _impl_.bloom_filter_locs_.Clear();
  ::memset(&_impl_.rows_per_segment_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.bloom_filter_size_) -
      reinterpret_cast<char*>(&_impl_.rows_per_segment_)) + sizeof(_impl_.bloom_filter_size_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BloomFilterMeta::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint64 rows_per_segment = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.rows_per_segment_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint64 segment_count = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.segment_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint64 row_count = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _impl_.row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint64 bloom_filter_size = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.bloom_filter_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint64 segment_loc_indices = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(_internal_mutable_segment_loc_indices(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 40) {
          _internal_add_segment_loc_indices(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_bloom_filter_locs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* BloomFilterMeta::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.BloomFilterMeta)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint64 rows_per_segment = 1;
  if (this->_internal_rows_per_segment() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_rows_per_segment(), target);
  }

  // uint64 segment_count = 2;
  if (this->_internal_segment_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_segment_count(), target);
  }

  // uint64 row_count = 3;
  if (this->_internal_row_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_row_count(), target);
  }

  // uint64 bloom_filter_size = 4;
  if (this->_internal_bloom_filter_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_bloom_filter_size(), target);
  }

  // repeated uint64 segment_loc_indices = 5;
  {
    int byte_size = _impl_._segment_loc_indices_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteUInt64Packed(
          5, _internal_segment_loc_indices(), byte_size, target);
    }
  }

  // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_bloom_filter_locs_size()); i < n; i++) {
    const auto& repfield = this->_internal_bloom_filter_locs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.index.BloomFilterMeta)
  return target;
}

size_t BloomFilterMeta::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.BloomFilterMeta)
  size_t total_size = 0;

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

  // repeated uint64 segment_loc_indices = 5;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt64Size(this->_impl_.segment_loc_indices_);
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    int cached_size = ::_pbi::ToCachedSize(data_size);
    _impl_._segment_loc_indices_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated .greptime.v1.index.BloomFilterLoc bloom_filter_locs = 6;
  total_size += 1UL * this->_internal_bloom_filter_locs_size();
  for (const auto& msg : this->_impl_.bloom_filter_locs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // uint64 rows_per_segment = 1;
  if (this->_internal_rows_per_segment() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_rows_per_segment());
  }

  // uint64 segment_count = 2;
  if (this->_internal_segment_count() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_segment_count());
  }

  // uint64 row_count = 3;
  if (this->_internal_row_count() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_row_count());
  }

  // uint64 bloom_filter_size = 4;
  if (this->_internal_bloom_filter_size() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_bloom_filter_size());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BloomFilterMeta::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    BloomFilterMeta::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BloomFilterMeta::GetClassData() const { return &_class_data_; }


void BloomFilterMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<BloomFilterMeta*>(&to_msg);
  auto& from = static_cast<const BloomFilterMeta&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.BloomFilterMeta)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.segment_loc_indices_.MergeFrom(from._impl_.segment_loc_indices_);
  _this->_impl_.bloom_filter_locs_.MergeFrom(from._impl_.bloom_filter_locs_);
  if (from._internal_rows_per_segment() != 0) {
    _this->_internal_set_rows_per_segment(from._internal_rows_per_segment());
  }
  if (from._internal_segment_count() != 0) {
    _this->_internal_set_segment_count(from._internal_segment_count());
  }
  if (from._internal_row_count() != 0) {
    _this->_internal_set_row_count(from._internal_row_count());
  }
  if (from._internal_bloom_filter_size() != 0) {
    _this->_internal_set_bloom_filter_size(from._internal_bloom_filter_size());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void BloomFilterMeta::CopyFrom(const BloomFilterMeta& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.BloomFilterMeta)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BloomFilterMeta::IsInitialized() const {
  return true;
}

void BloomFilterMeta::InternalSwap(BloomFilterMeta* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.segment_loc_indices_.InternalSwap(&other->_impl_.segment_loc_indices_);
  _impl_.bloom_filter_locs_.InternalSwap(&other->_impl_.bloom_filter_locs_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BloomFilterMeta, _impl_.bloom_filter_size_)
      + sizeof(BloomFilterMeta::_impl_.bloom_filter_size_)
      - PROTOBUF_FIELD_OFFSET(BloomFilterMeta, _impl_.rows_per_segment_)>(
          reinterpret_cast<char*>(&_impl_.rows_per_segment_),
          reinterpret_cast<char*>(&other->_impl_.rows_per_segment_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BloomFilterMeta::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once,
      file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[0]);
}

// ===================================================================

class BloomFilterLoc::_Internal {
 public:
};

BloomFilterLoc::BloomFilterLoc(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:greptime.v1.index.BloomFilterLoc)
}
BloomFilterLoc::BloomFilterLoc(const BloomFilterLoc& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BloomFilterLoc* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.offset_){}
    , decltype(_impl_.size_){}
    , decltype(_impl_.element_count_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.offset_, &from._impl_.offset_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.element_count_) -
    reinterpret_cast<char*>(&_impl_.offset_)) + sizeof(_impl_.element_count_));
  // @@protoc_insertion_point(copy_constructor:greptime.v1.index.BloomFilterLoc)
}

inline void BloomFilterLoc::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.offset_){uint64_t{0u}}
    , decltype(_impl_.size_){uint64_t{0u}}
    , decltype(_impl_.element_count_){uint64_t{0u}}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

BloomFilterLoc::~BloomFilterLoc() {
  // @@protoc_insertion_point(destructor:greptime.v1.index.BloomFilterLoc)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void BloomFilterLoc::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void BloomFilterLoc::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void BloomFilterLoc::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.index.BloomFilterLoc)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&_impl_.offset_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.element_count_) -
      reinterpret_cast<char*>(&_impl_.offset_)) + sizeof(_impl_.element_count_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BloomFilterLoc::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // uint64 offset = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint64 size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _impl_.size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // uint64 element_count = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _impl_.element_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* BloomFilterLoc::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.BloomFilterLoc)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // uint64 offset = 1;
  if (this->_internal_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_offset(), target);
  }

  // uint64 size = 2;
  if (this->_internal_size() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_size(), target);
  }

  // uint64 element_count = 3;
  if (this->_internal_element_count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_element_count(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.index.BloomFilterLoc)
  return target;
}

size_t BloomFilterLoc::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.BloomFilterLoc)
  size_t total_size = 0;

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

  // uint64 offset = 1;
  if (this->_internal_offset() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_offset());
  }

  // uint64 size = 2;
  if (this->_internal_size() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_size());
  }

  // uint64 element_count = 3;
  if (this->_internal_element_count() != 0) {
    total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_element_count());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BloomFilterLoc::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    BloomFilterLoc::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BloomFilterLoc::GetClassData() const { return &_class_data_; }


void BloomFilterLoc::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<BloomFilterLoc*>(&to_msg);
  auto& from = static_cast<const BloomFilterLoc&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.BloomFilterLoc)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  if (from._internal_size() != 0) {
    _this->_internal_set_size(from._internal_size());
  }
  if (from._internal_element_count() != 0) {
    _this->_internal_set_element_count(from._internal_element_count());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void BloomFilterLoc::CopyFrom(const BloomFilterLoc& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.BloomFilterLoc)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BloomFilterLoc::IsInitialized() const {
  return true;
}

void BloomFilterLoc::InternalSwap(BloomFilterLoc* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BloomFilterLoc, _impl_.element_count_)
      + sizeof(BloomFilterLoc::_impl_.element_count_)
      - PROTOBUF_FIELD_OFFSET(BloomFilterLoc, _impl_.offset_)>(
          reinterpret_cast<char*>(&_impl_.offset_),
          reinterpret_cast<char*>(&other->_impl_.offset_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BloomFilterLoc::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto_once,
      file_level_metadata_greptime_2fv1_2findex_2fbloom_5ffilter_2eproto[1]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace index
}  // namespace v1
}  // namespace greptime
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::greptime::v1::index::BloomFilterMeta*
Arena::CreateMaybeMessage< ::greptime::v1::index::BloomFilterMeta >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::index::BloomFilterMeta >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::index::BloomFilterLoc*
Arena::CreateMaybeMessage< ::greptime::v1::index::BloomFilterLoc >(Arena* arena) {
  return Arena::CreateMessageInternal< ::greptime::v1::index::BloomFilterLoc >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
