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

#include "components/sync/protocol/bookmark_model_metadata.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/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.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 sync_pb {
class BookmarkMetadata::_Internal {
 public:
  using HasBits = decltype(::std::declval<BookmarkMetadata>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_._has_bits_);
};

constexpr BookmarkMetadata::ParseTableT_ BookmarkMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::BookmarkMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional .sync_pb.EntityMetadata metadata = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.metadata_)}},
      // optional int64 id = 1;
      {::_pbi::TcParser::FastV64S1,
       {8, 1, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional int64 id = 1;
      {PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // optional .sync_pb.EntityMetadata metadata = 2;
      {PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.metadata_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::EntityMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::EntityMetadata_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr BookmarkMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        metadata_{nullptr},
        id_{::int64_t{0}} {}

template <typename>
constexpr BookmarkMetadata::BookmarkMetadata(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL BookmarkMetadata::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) BookmarkMetadata(arena);
}
constexpr auto BookmarkMetadata::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(BookmarkMetadata), alignof(BookmarkMetadata));
}
constexpr auto BookmarkMetadata::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &BookmarkMetadata::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<BookmarkMetadata>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &BookmarkMetadata::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<BookmarkMetadata>(), &BookmarkMetadata::ByteSizeLong,
              &BookmarkMetadata::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_._cached_size_),
          true,
      },
      "sync_pb.BookmarkMetadata",
  };
}
struct BookmarkMetadataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr BookmarkMetadataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 BookmarkMetadata_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(BookmarkMetadata::InternalGenerateClassData_(
            _default, &BookmarkMetadata_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<BookmarkMetadata>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~BookmarkMetadataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) BookmarkMetadata _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<BookmarkMetadata>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(BookmarkMetadataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST BookmarkMetadataGlobalsTypeInternal BookmarkMetadata_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* BookmarkMetadata_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return BookmarkMetadata_globals_.GetClassData();
#else
  return BookmarkMetadata_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class BookmarkModelMetadata::_Internal {
 public:
  using HasBits = decltype(::std::declval<BookmarkModelMetadata>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_._has_bits_);
};

constexpr BookmarkModelMetadata::ParseTableT_ BookmarkModelMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_._has_bits_),
      0, // no _extensions_
      10, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966300,  // skipmap
      offsetof(ParseTableT_, field_entries),
      7,  // num_field_entries
      2,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sync_pb::BookmarkModelMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
      {::_pbi::TcParser::FastV64S1,
       {64, 3, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.max_version_among_ignored_updates_due_to_missing_parent_)}},
      // optional .sync_pb.DataTypeState data_type_state = 1;
      {::_pbi::TcParser::FastMtS1,
       {10, 1, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.data_type_state_)}},
      // repeated .sync_pb.BookmarkMetadata bookmarks_metadata = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 1,
        PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.bookmarks_metadata_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // optional bool bookmarks_hierarchy_fields_reuploaded = 6;
      {::_pbi::TcParser::FastV8S1,
       {48, 5, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.bookmarks_hierarchy_fields_reuploaded_)}},
      // optional int64 num_ignored_updates_due_to_missing_parent = 7;
      {::_pbi::TcParser::FastV64S1,
       {56, 2, 0,
        PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.num_ignored_updates_due_to_missing_parent_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional .sync_pb.DataTypeState data_type_state = 1;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.data_type_state_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .sync_pb.BookmarkMetadata bookmarks_metadata = 2;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.bookmarks_metadata_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional bool bookmarks_hierarchy_fields_reuploaded = 6;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.bookmarks_hierarchy_fields_reuploaded_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional int64 num_ignored_updates_due_to_missing_parent = 7;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.num_ignored_updates_due_to_missing_parent_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.max_version_among_ignored_updates_due_to_missing_parent_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // optional bool last_initial_merge_remote_updates_exceeded_limit = 9;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.last_initial_merge_remote_updates_exceeded_limit_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional int64 initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros = 10;
      {PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::DataTypeState>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::DataTypeState_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sync_pb::BookmarkMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sync_pb::BookmarkMetadata_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr BookmarkModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        bookmarks_metadata_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sync_pb::BookmarkModelMetadata,
            PROTOBUF_FIELD_OFFSET(::sync_pb::BookmarkModelMetadata, _impl_.bookmarks_metadata_)>()
         }
        ,
        data_type_state_{nullptr},
        num_ignored_updates_due_to_missing_parent_{::int64_t{0}},
        max_version_among_ignored_updates_due_to_missing_parent_{::int64_t{0}},
        initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros_{::int64_t{0}},
        bookmarks_hierarchy_fields_reuploaded_{false},
        last_initial_merge_remote_updates_exceeded_limit_{false} {}

template <typename>
constexpr BookmarkModelMetadata::BookmarkModelMetadata(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL BookmarkModelMetadata::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) BookmarkModelMetadata(arena);
}
constexpr auto BookmarkModelMetadata::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(BookmarkModelMetadata), alignof(BookmarkModelMetadata));
}
constexpr auto BookmarkModelMetadata::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &BookmarkModelMetadata::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<BookmarkModelMetadata>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &BookmarkModelMetadata::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<BookmarkModelMetadata>(), &BookmarkModelMetadata::ByteSizeLong,
              &BookmarkModelMetadata::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_._cached_size_),
          true,
      },
      "sync_pb.BookmarkModelMetadata",
  };
}
struct BookmarkModelMetadataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr BookmarkModelMetadataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 BookmarkModelMetadata_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(BookmarkModelMetadata::InternalGenerateClassData_(
            _default, &BookmarkModelMetadata_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<BookmarkModelMetadata>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~BookmarkModelMetadataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) BookmarkModelMetadata _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<BookmarkModelMetadata>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(BookmarkModelMetadataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST BookmarkModelMetadataGlobalsTypeInternal BookmarkModelMetadata_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* BookmarkModelMetadata_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return BookmarkModelMetadata_globals_.GetClassData();
#else
  return BookmarkModelMetadata_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace sync_pb
namespace sync_pb {
// ===================================================================

void BookmarkMetadata::clear_metadata() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.metadata_ != nullptr) _impl_.metadata_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000001U);
}
BookmarkMetadata::BookmarkMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, BookmarkMetadata_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.BookmarkMetadata)
}
PROTOBUF_NDEBUG_INLINE BookmarkMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::BookmarkMetadata& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

BookmarkMetadata::BookmarkMetadata(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const BookmarkMetadata& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, BookmarkMetadata_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  BookmarkMetadata* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.metadata_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_)
                : nullptr;
  _impl_.id_ = from._impl_.id_;

  // @@protoc_insertion_point(copy_constructor:sync_pb.BookmarkMetadata)
}
PROTOBUF_NDEBUG_INLINE BookmarkMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void BookmarkMetadata::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, metadata_),
           0,
           offsetof(Impl_, id_) -
               offsetof(Impl_, metadata_) +
               sizeof(Impl_::id_));
}
BookmarkMetadata::~BookmarkMetadata() {
  // @@protoc_insertion_point(destructor:sync_pb.BookmarkMetadata)
  SharedDtor(*this);
}
inline void BookmarkMetadata::SharedDtor(MessageLite& self) {
  BookmarkMetadata& this_ = static_cast<BookmarkMetadata&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.metadata_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite BookmarkMetadata_class_data_ =
    BookmarkMetadata::InternalGenerateClassData_(BookmarkMetadata_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
BookmarkMetadata::GetClassData() const {
  return BookmarkMetadata_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
BookmarkMetadata::GetClassData() const {
  return BookmarkMetadata_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const BookmarkMetadata::ParseTableT_
    BookmarkMetadata::_table_ =
        BookmarkMetadata::InternalGenerateParseTable_(BookmarkMetadata_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void BookmarkMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.BookmarkMetadata)
  ::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 (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(_impl_.metadata_ != nullptr);
    _impl_.metadata_->Clear();
  }
  _impl_.id_ = ::int64_t{0};
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional int64 id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
            stream, this_._internal_id(), target);
  }

  // optional .sync_pb.EntityMetadata metadata = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.metadata_, this_._impl_.metadata_->GetCachedSize(), target,
        stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.BookmarkMetadata)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t BookmarkMetadata::ByteSizeLong(const MessageLite& base) {
  const BookmarkMetadata& this_ = static_cast<const BookmarkMetadata&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t BookmarkMetadata::ByteSizeLong() const {
  const BookmarkMetadata& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.BookmarkMetadata)
  ::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, 0x00000003U)) {
    // optional .sync_pb.EntityMetadata metadata = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.metadata_);
    }
    // optional int64 id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_id());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void BookmarkMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<BookmarkMetadata*>(&to_msg);
  auto& from = static_cast<const BookmarkMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.BookmarkMetadata)
  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, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(from._impl_.metadata_ != nullptr);
      if (_this->_impl_.metadata_ == nullptr) {
        _this->_impl_.metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_);
      } else {
        _this->_impl_.metadata_->MergeFrom(*from._impl_.metadata_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.id_ = from._impl_.id_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void BookmarkMetadata::InternalSwap(BookmarkMetadata* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.id_)
      + sizeof(BookmarkMetadata::_impl_.id_)
      - PROTOBUF_FIELD_OFFSET(BookmarkMetadata, _impl_.metadata_)>(
          reinterpret_cast<char*>(&_impl_.metadata_),
          reinterpret_cast<char*>(&other->_impl_.metadata_));
}

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

void BookmarkModelMetadata::clear_data_type_state() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.data_type_state_ != nullptr) _impl_.data_type_state_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
BookmarkModelMetadata::BookmarkModelMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, BookmarkModelMetadata_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sync_pb.BookmarkModelMetadata)
}
PROTOBUF_NDEBUG_INLINE BookmarkModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sync_pb::BookmarkModelMetadata& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        bookmarks_metadata_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sync_pb::BookmarkModelMetadata,
              PROTOBUF_FIELD_OFFSET(::sync_pb::BookmarkModelMetadata, _impl_.bookmarks_metadata_)>()
          , from.bookmarks_metadata_
        }
     {}

BookmarkModelMetadata::BookmarkModelMetadata(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const BookmarkModelMetadata& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, BookmarkModelMetadata_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  BookmarkModelMetadata* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.data_type_state_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_type_state_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, num_ignored_updates_due_to_missing_parent_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, num_ignored_updates_due_to_missing_parent_),
           offsetof(Impl_, last_initial_merge_remote_updates_exceeded_limit_) -
               offsetof(Impl_, num_ignored_updates_due_to_missing_parent_) +
               sizeof(Impl_::last_initial_merge_remote_updates_exceeded_limit_));

  // @@protoc_insertion_point(copy_constructor:sync_pb.BookmarkModelMetadata)
}
PROTOBUF_NDEBUG_INLINE BookmarkModelMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        bookmarks_metadata_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sync_pb::BookmarkModelMetadata,
            PROTOBUF_FIELD_OFFSET(::sync_pb::BookmarkModelMetadata, _impl_.bookmarks_metadata_)>()
         }
     {}

inline void BookmarkModelMetadata::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, data_type_state_),
           0,
           offsetof(Impl_, last_initial_merge_remote_updates_exceeded_limit_) -
               offsetof(Impl_, data_type_state_) +
               sizeof(Impl_::last_initial_merge_remote_updates_exceeded_limit_));
}
BookmarkModelMetadata::~BookmarkModelMetadata() {
  // @@protoc_insertion_point(destructor:sync_pb.BookmarkModelMetadata)
  SharedDtor(*this);
}
inline void BookmarkModelMetadata::SharedDtor(MessageLite& self) {
  BookmarkModelMetadata& this_ = static_cast<BookmarkModelMetadata&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.data_type_state_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite BookmarkModelMetadata_class_data_ =
    BookmarkModelMetadata::InternalGenerateClassData_(BookmarkModelMetadata_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
BookmarkModelMetadata::GetClassData() const {
  return BookmarkModelMetadata_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
BookmarkModelMetadata::GetClassData() const {
  return BookmarkModelMetadata_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const BookmarkModelMetadata::ParseTableT_
    BookmarkModelMetadata::_table_ =
        BookmarkModelMetadata::InternalGenerateParseTable_(BookmarkModelMetadata_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void BookmarkModelMetadata::Clear() {
// @@protoc_insertion_point(message_clear_start:sync_pb.BookmarkModelMetadata)
  ::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_.bookmarks_metadata_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.data_type_state_ != nullptr);
      _impl_.data_type_state_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000007cU)) {
    ::memset(&_impl_.num_ignored_updates_due_to_missing_parent_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.last_initial_merge_remote_updates_exceeded_limit_) -
        reinterpret_cast<char*>(&_impl_.num_ignored_updates_due_to_missing_parent_)) + sizeof(_impl_.last_initial_merge_remote_updates_exceeded_limit_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional .sync_pb.DataTypeState data_type_state = 1;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.data_type_state_, this_._impl_.data_type_state_->GetCachedSize(), target,
        stream);
  }

  // repeated .sync_pb.BookmarkMetadata bookmarks_metadata = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_bookmarks_metadata_size());
         i < n; i++) {
      const auto& repfield = this_._internal_bookmarks_metadata().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // optional bool bookmarks_hierarchy_fields_reuploaded = 6;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        6, this_._internal_bookmarks_hierarchy_fields_reuploaded(), target);
  }

  // optional int64 num_ignored_updates_due_to_missing_parent = 7;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<7>(
            stream, this_._internal_num_ignored_updates_due_to_missing_parent(), target);
  }

  // optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<8>(
            stream, this_._internal_max_version_among_ignored_updates_due_to_missing_parent(), target);
  }

  // optional bool last_initial_merge_remote_updates_exceeded_limit = 9;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        9, this_._internal_last_initial_merge_remote_updates_exceeded_limit(), target);
  }

  // optional int64 initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros = 10;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<10>(
            stream, this_._internal_initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros(), target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sync_pb.BookmarkModelMetadata)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t BookmarkModelMetadata::ByteSizeLong(const MessageLite& base) {
  const BookmarkModelMetadata& this_ = static_cast<const BookmarkModelMetadata&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t BookmarkModelMetadata::ByteSizeLong() const {
  const BookmarkModelMetadata& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sync_pb.BookmarkModelMetadata)
  ::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];
  total_size += ::absl::popcount(0x00000060U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // repeated .sync_pb.BookmarkMetadata bookmarks_metadata = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_bookmarks_metadata_size();
      for (const auto& msg : this_._internal_bookmarks_metadata()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // optional .sync_pb.DataTypeState data_type_state = 1;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.data_type_state_);
    }
    // optional int64 num_ignored_updates_due_to_missing_parent = 7;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_num_ignored_updates_due_to_missing_parent());
    }
    // optional int64 max_version_among_ignored_updates_due_to_missing_parent = 8;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_max_version_among_ignored_updates_due_to_missing_parent());
    }
    // optional int64 initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros = 10;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void BookmarkModelMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<BookmarkModelMetadata*>(&to_msg);
  auto& from = static_cast<const BookmarkModelMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sync_pb.BookmarkModelMetadata)
  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, 0x0000007fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_bookmarks_metadata()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_bookmarks_metadata());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.data_type_state_ != nullptr);
      if (_this->_impl_.data_type_state_ == nullptr) {
        _this->_impl_.data_type_state_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.data_type_state_);
      } else {
        _this->_impl_.data_type_state_->MergeFrom(*from._impl_.data_type_state_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.num_ignored_updates_due_to_missing_parent_ = from._impl_.num_ignored_updates_due_to_missing_parent_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.max_version_among_ignored_updates_due_to_missing_parent_ = from._impl_.max_version_among_ignored_updates_due_to_missing_parent_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros_ = from._impl_.initial_merge_remote_updates_exceeded_limit_timestamp_windows_epoch_micros_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.bookmarks_hierarchy_fields_reuploaded_ = from._impl_.bookmarks_hierarchy_fields_reuploaded_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.last_initial_merge_remote_updates_exceeded_limit_ = from._impl_.last_initial_merge_remote_updates_exceeded_limit_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void BookmarkModelMetadata::InternalSwap(BookmarkModelMetadata* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.bookmarks_metadata_.InternalSwap(&other->_impl_.bookmarks_metadata_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.last_initial_merge_remote_updates_exceeded_limit_)
      + sizeof(BookmarkModelMetadata::_impl_.last_initial_merge_remote_updates_exceeded_limit_)
      - PROTOBUF_FIELD_OFFSET(BookmarkModelMetadata, _impl_.data_type_state_)>(
          reinterpret_cast<char*>(&_impl_.data_type_state_),
          reinterpret_cast<char*>(&other->_impl_.data_type_state_));
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace sync_pb
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
