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

#include "components/optimization_guide/proto/features/contextual_tasks_context.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 optimization_guide {
namespace proto {
class ContextualTasksTabContext::_Internal {
 public:
  using HasBits = decltype(::std::declval<ContextualTasksTabContext>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_._has_bits_);
};

constexpr ContextualTasksTabContext::ParseTableT_ ContextualTasksTabContext::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_._has_bits_),
      0, // no _extensions_
      9, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966784,  // skipmap
      offsetof(ParseTableT_, field_entries),
      9,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::optimization_guide::proto::ContextualTasksTabContext>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // float best_embedding_score = 1 [deprecated = true, features = {
      {::_pbi::TcParser::FastF32S1,
       {13, 2, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.best_embedding_score_)}},
      // int64 seconds_since_last_active = 2 [features = {
      {::_pbi::TcParser::FastV64S1,
       {16, 1, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.seconds_since_last_active_)}},
      // int64 number_of_common_words = 3 [features = {
      {::_pbi::TcParser::FastV64S1,
       {24, 4, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.number_of_common_words_)}},
      // float aggregate_tab_score = 4 [features = {
      {::_pbi::TcParser::FastF32S1,
       {37, 3, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.aggregate_tab_score_)}},
      // bool was_explicitly_chosen = 5 [features = {
      {::_pbi::TcParser::FastV8S1,
       {40, 6, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.was_explicitly_chosen_)}},
      // int64 seconds_of_last_visit = 6 [features = {
      {::_pbi::TcParser::FastV64S1,
       {48, 5, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.seconds_of_last_visit_)}},
      // float query_title_similarity = 7 [features = {
      {::_pbi::TcParser::FastF32S1,
       {61, 7, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.query_title_similarity_)}},
      // repeated float query_passage_similarities = 8;
      {::_pbi::TcParser::FastF32P1,
       {66, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.query_passage_similarities_)}},
      // float active_tab_title_similarity = 9 [features = {
      {::_pbi::TcParser::FastF32S1,
       {77, 8, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.active_tab_title_similarity_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // float best_embedding_score = 1 [deprecated = true, features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.best_embedding_score_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // int64 seconds_since_last_active = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.seconds_since_last_active_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int64 number_of_common_words = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.number_of_common_words_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // float aggregate_tab_score = 4 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.aggregate_tab_score_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // bool was_explicitly_chosen = 5 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.was_explicitly_chosen_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // int64 seconds_of_last_visit = 6 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.seconds_of_last_visit_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // float query_title_similarity = 7 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.query_title_similarity_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // repeated float query_passage_similarities = 8;
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.query_passage_similarities_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedFloat)},
      // float active_tab_title_similarity = 9 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.active_tab_title_similarity_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr ContextualTasksTabContext::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        query_passage_similarities_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::ContextualTasksTabContext,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksTabContext, _impl_.query_passage_similarities_)>()
         }
        ,
        seconds_since_last_active_{::int64_t{0}},
        best_embedding_score_{0},
        aggregate_tab_score_{0},
        number_of_common_words_{::int64_t{0}},
        seconds_of_last_visit_{::int64_t{0}},
        was_explicitly_chosen_{false},
        query_title_similarity_{0},
        active_tab_title_similarity_{0} {}

template <typename>
constexpr ContextualTasksTabContext::ContextualTasksTabContext(::_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 ContextualTasksTabContext::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ContextualTasksTabContext(arena);
}
constexpr auto ContextualTasksTabContext::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ContextualTasksTabContext), alignof(ContextualTasksTabContext));
}
constexpr auto ContextualTasksTabContext::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
          &ContextualTasksTabContext::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ContextualTasksTabContext>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ContextualTasksTabContext::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ContextualTasksTabContext>(), &ContextualTasksTabContext::ByteSizeLong,
              &ContextualTasksTabContext::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.ContextualTasksTabContext",
  };
}
struct ContextualTasksTabContextGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ContextualTasksTabContextGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ContextualTasksTabContext_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ContextualTasksTabContext::InternalGenerateClassData_(
            _default, &ContextualTasksTabContext_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksTabContext>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ContextualTasksTabContextGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ContextualTasksTabContext _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksTabContext>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ContextualTasksTabContextGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr ContextualTasksContextQuality::ParseTableT_ ContextualTasksContextQuality::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_._has_bits_),
      0, // no _extensions_
      8, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967040,  // skipmap
      offsetof(ParseTableT_, field_entries),
      8,  // 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<::optimization_guide::proto::ContextualTasksContextQuality>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // int64 tab_selection_model_version = 8 [features = {
      {::_pbi::TcParser::FastV64S1,
       {64, 7, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.tab_selection_model_version_)}},
      // repeated .optimization_guide.proto.ContextualTasksTabContext eligible_tabs = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.eligible_tabs_)}},
      // .optimization_guide.proto.ContextualTasksSurface surface = 2 [features = {
      {::_pbi::TcParser::FastV32S1,
       {16, 3, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.surface_)}},
      // int64 embedding_model_version = 3 [features = {
      {::_pbi::TcParser::FastV64S1,
       {24, 2, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.embedding_model_version_)}},
      // int32 number_of_query_words = 4 [features = {
      {::_pbi::TcParser::FastV32S1,
       {32, 4, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.number_of_query_words_)}},
      // .optimization_guide.proto.TabSelectionMode tab_selection_mode = 5 [features = {
      {::_pbi::TcParser::FastV32S1,
       {40, 5, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.tab_selection_mode_)}},
      // float query_active_tab_title_similarity = 6 [features = {
      {::_pbi::TcParser::FastF32S1,
       {53, 6, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.query_active_tab_title_similarity_)}},
      // repeated float query_active_tab_passage_similarities = 7;
      {::_pbi::TcParser::FastF32P1,
       {58, 1, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.query_active_tab_passage_similarities_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .optimization_guide.proto.ContextualTasksTabContext eligible_tabs = 1;
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.eligible_tabs_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // .optimization_guide.proto.ContextualTasksSurface surface = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.surface_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // int64 embedding_model_version = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.embedding_model_version_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // int32 number_of_query_words = 4 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.number_of_query_words_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // .optimization_guide.proto.TabSelectionMode tab_selection_mode = 5 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.tab_selection_mode_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // float query_active_tab_title_similarity = 6 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.query_active_tab_title_similarity_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // repeated float query_active_tab_passage_similarities = 7;
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.query_active_tab_passage_similarities_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedFloat)},
      // int64 tab_selection_model_version = 8 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.tab_selection_model_version_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ContextualTasksTabContext>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ContextualTasksTabContext_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr ContextualTasksContextQuality::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        eligible_tabs_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::ContextualTasksContextQuality,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksContextQuality, _impl_.eligible_tabs_)>()
         }
        ,
        query_active_tab_passage_similarities_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::ContextualTasksContextQuality,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksContextQuality, _impl_.query_active_tab_passage_similarities_)>()
         }
        ,
        embedding_model_version_{::int64_t{0}},
        surface_{static_cast< ::optimization_guide::proto::ContextualTasksSurface >(0)},
        number_of_query_words_{0},
        tab_selection_mode_{static_cast< ::optimization_guide::proto::TabSelectionMode >(0)},
        query_active_tab_title_similarity_{0},
        tab_selection_model_version_{::int64_t{0}} {}

template <typename>
constexpr ContextualTasksContextQuality::ContextualTasksContextQuality(::_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 ContextualTasksContextQuality::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ContextualTasksContextQuality(arena);
}
constexpr auto ContextualTasksContextQuality::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ContextualTasksContextQuality), alignof(ContextualTasksContextQuality));
}
constexpr auto ContextualTasksContextQuality::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
          &ContextualTasksContextQuality::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ContextualTasksContextQuality>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ContextualTasksContextQuality::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ContextualTasksContextQuality>(), &ContextualTasksContextQuality::ByteSizeLong,
              &ContextualTasksContextQuality::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.ContextualTasksContextQuality",
  };
}
struct ContextualTasksContextQualityGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ContextualTasksContextQualityGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ContextualTasksContextQuality_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ContextualTasksContextQuality::InternalGenerateClassData_(
            _default, &ContextualTasksContextQuality_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksContextQuality>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ContextualTasksContextQualityGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ContextualTasksContextQuality _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksContextQuality>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ContextualTasksContextQualityGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

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

constexpr ContextualTasksContextLoggingData::ParseTableT_ ContextualTasksContextLoggingData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextualTasksContextLoggingData, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // 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<::optimization_guide::proto::ContextualTasksContextLoggingData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // .optimization_guide.proto.ContextualTasksContextQuality quality = 1 [features = {
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextualTasksContextLoggingData, _impl_.quality_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .optimization_guide.proto.ContextualTasksContextQuality quality = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(ContextualTasksContextLoggingData, _impl_.quality_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::ContextualTasksContextQuality>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::ContextualTasksContextQuality_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr ContextualTasksContextLoggingData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        quality_{nullptr} {}

template <typename>
constexpr ContextualTasksContextLoggingData::ContextualTasksContextLoggingData(::_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 ContextualTasksContextLoggingData::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ContextualTasksContextLoggingData(arena);
}
constexpr auto ContextualTasksContextLoggingData::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(ContextualTasksContextLoggingData), alignof(ContextualTasksContextLoggingData));
}
constexpr auto ContextualTasksContextLoggingData::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
          &ContextualTasksContextLoggingData::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ContextualTasksContextLoggingData>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ContextualTasksContextLoggingData::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ContextualTasksContextLoggingData>(), &ContextualTasksContextLoggingData::ByteSizeLong,
              &ContextualTasksContextLoggingData::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ContextualTasksContextLoggingData, _impl_._cached_size_),
          true,
      },
      "optimization_guide.proto.ContextualTasksContextLoggingData",
  };
}
struct ContextualTasksContextLoggingDataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ContextualTasksContextLoggingDataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ContextualTasksContextLoggingData_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ContextualTasksContextLoggingData::InternalGenerateClassData_(
            _default, &ContextualTasksContextLoggingData_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksContextLoggingData>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ContextualTasksContextLoggingDataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ContextualTasksContextLoggingData _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ContextualTasksContextLoggingData>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ContextualTasksContextLoggingDataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST ContextualTasksContextLoggingDataGlobalsTypeInternal ContextualTasksContextLoggingData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* ContextualTasksContextLoggingData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return ContextualTasksContextLoggingData_globals_.GetClassData();
#else
  return ContextualTasksContextLoggingData_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace proto
}  // namespace optimization_guide
namespace optimization_guide {
namespace proto {
PROTOBUF_CONSTINIT const uint32_t ContextualTasksSurface_internal_data_[] = {
    262144u, 0u, };
static const char ContextualTasksSurface_names[] = {
    "CONTEXTUAL_TASK_SURFACE_CONTEXTUAL_TASKS_UI"
    "CONTEXTUAL_TASK_SURFACE_NEW_TAB_PAGE"
    "CONTEXTUAL_TASK_SURFACE_OMNIBOX"
    "CONTEXTUAL_TASK_SURFACE_UNKNOWN"
};

static const ::google::protobuf::internal::EnumEntry ContextualTasksSurface_entries[] = {
    {{&ContextualTasksSurface_names[0], 43}, 3},
    {{&ContextualTasksSurface_names[43], 36}, 1},
    {{&ContextualTasksSurface_names[79], 31}, 2},
    {{&ContextualTasksSurface_names[110], 31}, 0},
};

static const int ContextualTasksSurface_entries_by_number[] = {
    3,  // 0 -> CONTEXTUAL_TASK_SURFACE_UNKNOWN
    1,  // 1 -> CONTEXTUAL_TASK_SURFACE_NEW_TAB_PAGE
    2,  // 2 -> CONTEXTUAL_TASK_SURFACE_OMNIBOX
    0,  // 3 -> CONTEXTUAL_TASK_SURFACE_CONTEXTUAL_TASKS_UI
};

bool ContextualTasksSurface_Parse(::absl::string_view name,
                                  ContextualTasksSurface* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      ContextualTasksSurface_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<ContextualTasksSurface>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    ContextualTasksSurface_strings[4] = {};

const ::std::string& ContextualTasksSurface_Name(ContextualTasksSurface value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      ContextualTasksSurface_entries, ContextualTasksSurface_entries_by_number, 4,
      ContextualTasksSurface_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(ContextualTasksSurface_entries,
                                  ContextualTasksSurface_entries_by_number,
                                  4, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : ContextualTasksSurface_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t TabSelectionMode_internal_data_[] = {
    327680u, 0u, };
static const char TabSelectionMode_names[] = {
    "TAB_SELECTION_MODE_STATIC_AND_ENGAGEMENT_SIGNALS"
    "TAB_SELECTION_MODE_STATIC_ML_MODEL"
    "TAB_SELECTION_MODE_STATIC_ML_MODEL_AND_ENGAGEMENT_SIGNALS"
    "TAB_SELECTION_MODE_STATIC_SIGNALS"
    "TAB_SELECTION_MODE_UNKNOWN"
};

static const ::google::protobuf::internal::EnumEntry TabSelectionMode_entries[] = {
    {{&TabSelectionMode_names[0], 48}, 2},
    {{&TabSelectionMode_names[48], 34}, 3},
    {{&TabSelectionMode_names[82], 57}, 4},
    {{&TabSelectionMode_names[139], 33}, 1},
    {{&TabSelectionMode_names[172], 26}, 0},
};

static const int TabSelectionMode_entries_by_number[] = {
    4,  // 0 -> TAB_SELECTION_MODE_UNKNOWN
    3,  // 1 -> TAB_SELECTION_MODE_STATIC_SIGNALS
    0,  // 2 -> TAB_SELECTION_MODE_STATIC_AND_ENGAGEMENT_SIGNALS
    1,  // 3 -> TAB_SELECTION_MODE_STATIC_ML_MODEL
    2,  // 4 -> TAB_SELECTION_MODE_STATIC_ML_MODEL_AND_ENGAGEMENT_SIGNALS
};

bool TabSelectionMode_Parse(::absl::string_view name,
                                  TabSelectionMode* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      TabSelectionMode_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<TabSelectionMode>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    TabSelectionMode_strings[5] = {};

const ::std::string& TabSelectionMode_Name(TabSelectionMode value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      TabSelectionMode_entries, TabSelectionMode_entries_by_number, 5,
      TabSelectionMode_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(TabSelectionMode_entries,
                                  TabSelectionMode_entries_by_number,
                                  5, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : TabSelectionMode_strings[idx].get();
}
// ===================================================================

ContextualTasksContextLoggingData::ContextualTasksContextLoggingData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextualTasksContextLoggingData_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.ContextualTasksContextLoggingData)
}
PROTOBUF_NDEBUG_INLINE ContextualTasksContextLoggingData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::ContextualTasksContextLoggingData& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ContextualTasksContextLoggingData* 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_.quality_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.quality_)
                : nullptr;

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

inline void ContextualTasksContextLoggingData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.quality_ = {};
}
ContextualTasksContextLoggingData::~ContextualTasksContextLoggingData() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.ContextualTasksContextLoggingData)
  SharedDtor(*this);
}
inline void ContextualTasksContextLoggingData::SharedDtor(MessageLite& self) {
  ContextualTasksContextLoggingData& this_ = static_cast<ContextualTasksContextLoggingData&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.quality_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ContextualTasksContextLoggingData_class_data_ =
    ContextualTasksContextLoggingData::InternalGenerateClassData_(ContextualTasksContextLoggingData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksContextLoggingData::GetClassData() const {
  return ContextualTasksContextLoggingData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksContextLoggingData::GetClassData() const {
  return ContextualTasksContextLoggingData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ContextualTasksContextLoggingData::ParseTableT_
    ContextualTasksContextLoggingData::_table_ =
        ContextualTasksContextLoggingData::InternalGenerateParseTable_(ContextualTasksContextLoggingData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ContextualTasksContextLoggingData::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.ContextualTasksContextLoggingData)
  ::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_.quality_ != nullptr);
    _impl_.quality_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // .optimization_guide.proto.ContextualTasksContextQuality quality = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.quality_, this_._impl_.quality_->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:optimization_guide.proto.ContextualTasksContextLoggingData)
  return target;
}

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

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

   {
    // .optimization_guide.proto.ContextualTasksContextQuality quality = 1 [features = {
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.quality_);
    }
  }
  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 ContextualTasksContextLoggingData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextualTasksContextLoggingData*>(&to_msg);
  auto& from = static_cast<const ContextualTasksContextLoggingData&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.ContextualTasksContextLoggingData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(from._impl_.quality_ != nullptr);
    if (_this->_impl_.quality_ == nullptr) {
      _this->_impl_.quality_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.quality_);
    } else {
      _this->_impl_.quality_->MergeFrom(*from._impl_.quality_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void ContextualTasksContextLoggingData::InternalSwap(ContextualTasksContextLoggingData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.quality_, other->_impl_.quality_);
}

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

ContextualTasksContextQuality::ContextualTasksContextQuality(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextualTasksContextQuality_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.ContextualTasksContextQuality)
}
PROTOBUF_NDEBUG_INLINE ContextualTasksContextQuality::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::ContextualTasksContextQuality& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        eligible_tabs_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::ContextualTasksContextQuality,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksContextQuality, _impl_.eligible_tabs_)>()
          , from.eligible_tabs_
        }
        ,
        query_active_tab_passage_similarities_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::ContextualTasksContextQuality,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksContextQuality, _impl_.query_active_tab_passage_similarities_)>()
          , from.query_active_tab_passage_similarities_
        }
     {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ContextualTasksContextQuality* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, embedding_model_version_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, embedding_model_version_),
           offsetof(Impl_, tab_selection_model_version_) -
               offsetof(Impl_, embedding_model_version_) +
               sizeof(Impl_::tab_selection_model_version_));

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ContextualTasksContextQuality_class_data_ =
    ContextualTasksContextQuality::InternalGenerateClassData_(ContextualTasksContextQuality_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksContextQuality::GetClassData() const {
  return ContextualTasksContextQuality_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksContextQuality::GetClassData() const {
  return ContextualTasksContextQuality_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ContextualTasksContextQuality::ParseTableT_
    ContextualTasksContextQuality::_table_ =
        ContextualTasksContextQuality::InternalGenerateParseTable_(ContextualTasksContextQuality_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ContextualTasksContextQuality::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.ContextualTasksContextQuality)
  ::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_.eligible_tabs_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.query_active_tab_passage_similarities_.Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000fcU)) {
    ::memset(&_impl_.embedding_model_version_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.tab_selection_model_version_) -
        reinterpret_cast<char*>(&_impl_.embedding_model_version_)) + sizeof(_impl_.tab_selection_model_version_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .optimization_guide.proto.ContextualTasksTabContext eligible_tabs = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_eligible_tabs_size());
         i < n; i++) {
      const auto& repfield = this_._internal_eligible_tabs().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // .optimization_guide.proto.ContextualTasksSurface surface = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this_._internal_surface(), target);
  }

  // int64 embedding_model_version = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
            stream, this_._internal_embedding_model_version(), target);
  }

  // int32 number_of_query_words = 4 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<4>(
            stream, this_._internal_number_of_query_words(), target);
  }

  // .optimization_guide.proto.TabSelectionMode tab_selection_mode = 5 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this_._internal_tab_selection_mode(), target);
  }

  // float query_active_tab_title_similarity = 6 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        6, this_._internal_query_active_tab_title_similarity(), target);
  }

  // repeated float query_active_tab_passage_similarities = 7;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (this_._internal_query_active_tab_passage_similarities_size() > 0) {
      target = stream->WriteFixedPacked(7, this_._internal_query_active_tab_passage_similarities(), target);
    }
  }

  // int64 tab_selection_model_version = 8 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<8>(
            stream, this_._internal_tab_selection_model_version(), 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:optimization_guide.proto.ContextualTasksContextQuality)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ContextualTasksContextQuality::ByteSizeLong(const MessageLite& base) {
  const ContextualTasksContextQuality& this_ = static_cast<const ContextualTasksContextQuality&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ContextualTasksContextQuality::ByteSizeLong() const {
  const ContextualTasksContextQuality& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.ContextualTasksContextQuality)
  ::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 += static_cast<bool>(0x00000040U & cached_has_bits) * 5;
  if (BatchCheckHasBit(cached_has_bits, 0x000000bfU)) {
    // repeated .optimization_guide.proto.ContextualTasksTabContext eligible_tabs = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_eligible_tabs_size();
      for (const auto& msg : this_._internal_eligible_tabs()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated float query_active_tab_passage_similarities = 7;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ::size_t data_size = ::size_t{4} *
          ::_pbi::FromIntSize(this_._internal_query_active_tab_passage_similarities_size());
      ::size_t tag_size = data_size == 0
          ? 0
          : 1 + ::_pbi::WireFormatLite::Int32Size(
                              static_cast<::int32_t>(data_size));
      total_size += tag_size + data_size;
    }
    // int64 embedding_model_version = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_embedding_model_version());
    }
    // .optimization_guide.proto.ContextualTasksSurface surface = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_surface());
    }
    // int32 number_of_query_words = 4 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_number_of_query_words());
    }
    // .optimization_guide.proto.TabSelectionMode tab_selection_mode = 5 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_tab_selection_mode());
    }
    // int64 tab_selection_model_version = 8 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_tab_selection_model_version());
    }
  }
  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 ContextualTasksContextQuality::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextualTasksContextQuality*>(&to_msg);
  auto& from = static_cast<const ContextualTasksContextQuality&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.ContextualTasksContextQuality)
  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, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_eligible_tabs()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_eligible_tabs());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_query_active_tab_passage_similarities()->MergeFrom(from._internal_query_active_tab_passage_similarities());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.embedding_model_version_ = from._impl_.embedding_model_version_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.surface_ = from._impl_.surface_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.number_of_query_words_ = from._impl_.number_of_query_words_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.tab_selection_mode_ = from._impl_.tab_selection_mode_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.query_active_tab_title_similarity_ = from._impl_.query_active_tab_title_similarity_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.tab_selection_model_version_ = from._impl_.tab_selection_model_version_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void ContextualTasksContextQuality::InternalSwap(ContextualTasksContextQuality* 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_.eligible_tabs_.InternalSwap(&other->_impl_.eligible_tabs_);
  _impl_.query_active_tab_passage_similarities_.InternalSwap(&other->_impl_.query_active_tab_passage_similarities_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.tab_selection_model_version_)
      + sizeof(ContextualTasksContextQuality::_impl_.tab_selection_model_version_)
      - PROTOBUF_FIELD_OFFSET(ContextualTasksContextQuality, _impl_.embedding_model_version_)>(
          reinterpret_cast<char*>(&_impl_.embedding_model_version_),
          reinterpret_cast<char*>(&other->_impl_.embedding_model_version_));
}

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

ContextualTasksTabContext::ContextualTasksTabContext(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextualTasksTabContext_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:optimization_guide.proto.ContextualTasksTabContext)
}
PROTOBUF_NDEBUG_INLINE ContextualTasksTabContext::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::optimization_guide::proto::ContextualTasksTabContext& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        query_passage_similarities_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::ContextualTasksTabContext,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::ContextualTasksTabContext, _impl_.query_passage_similarities_)>()
          , from.query_passage_similarities_
        }
     {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ContextualTasksTabContext* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, seconds_since_last_active_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, seconds_since_last_active_),
           offsetof(Impl_, active_tab_title_similarity_) -
               offsetof(Impl_, seconds_since_last_active_) +
               sizeof(Impl_::active_tab_title_similarity_));

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ContextualTasksTabContext_class_data_ =
    ContextualTasksTabContext::InternalGenerateClassData_(ContextualTasksTabContext_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksTabContext::GetClassData() const {
  return ContextualTasksTabContext_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ContextualTasksTabContext::GetClassData() const {
  return ContextualTasksTabContext_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ContextualTasksTabContext::ParseTableT_
    ContextualTasksTabContext::_table_ =
        ContextualTasksTabContext::InternalGenerateParseTable_(ContextualTasksTabContext_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ContextualTasksTabContext::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.ContextualTasksTabContext)
  ::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)) {
    _impl_.query_passage_similarities_.Clear();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000feU)) {
    ::memset(&_impl_.seconds_since_last_active_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.query_title_similarity_) -
        reinterpret_cast<char*>(&_impl_.seconds_since_last_active_)) + sizeof(_impl_.query_title_similarity_));
  }
  _impl_.active_tab_title_similarity_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // float best_embedding_score = 1 [deprecated = true, features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        1, this_._internal_best_embedding_score(), target);
  }

  // int64 seconds_since_last_active = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
            stream, this_._internal_seconds_since_last_active(), target);
  }

  // int64 number_of_common_words = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
            stream, this_._internal_number_of_common_words(), target);
  }

  // float aggregate_tab_score = 4 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        4, this_._internal_aggregate_tab_score(), target);
  }

  // bool was_explicitly_chosen = 5 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        5, this_._internal_was_explicitly_chosen(), target);
  }

  // int64 seconds_of_last_visit = 6 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<6>(
            stream, this_._internal_seconds_of_last_visit(), target);
  }

  // float query_title_similarity = 7 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        7, this_._internal_query_title_similarity(), target);
  }

  // repeated float query_passage_similarities = 8;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    if (this_._internal_query_passage_similarities_size() > 0) {
      target = stream->WriteFixedPacked(8, this_._internal_query_passage_similarities(), target);
    }
  }

  // float active_tab_title_similarity = 9 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        9, this_._internal_active_tab_title_similarity(), 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:optimization_guide.proto.ContextualTasksTabContext)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ContextualTasksTabContext::ByteSizeLong(const MessageLite& base) {
  const ContextualTasksTabContext& this_ = static_cast<const ContextualTasksTabContext&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ContextualTasksTabContext::ByteSizeLong() const {
  const ContextualTasksTabContext& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.ContextualTasksTabContext)
  ::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(0x0000018cU & cached_has_bits) * 5;
  total_size += static_cast<bool>(0x00000040U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x00000033U)) {
    // repeated float query_passage_similarities = 8;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ::size_t data_size = ::size_t{4} *
          ::_pbi::FromIntSize(this_._internal_query_passage_similarities_size());
      ::size_t tag_size = data_size == 0
          ? 0
          : 1 + ::_pbi::WireFormatLite::Int32Size(
                              static_cast<::int32_t>(data_size));
      total_size += tag_size + data_size;
    }
    // int64 seconds_since_last_active = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_seconds_since_last_active());
    }
    // int64 number_of_common_words = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_number_of_common_words());
    }
    // int64 seconds_of_last_visit = 6 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_seconds_of_last_visit());
    }
  }
  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 ContextualTasksTabContext::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextualTasksTabContext*>(&to_msg);
  auto& from = static_cast<const ContextualTasksTabContext&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.ContextualTasksTabContext)
  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, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_query_passage_similarities()->MergeFrom(from._internal_query_passage_similarities());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.seconds_since_last_active_ = from._impl_.seconds_since_last_active_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.best_embedding_score_ = from._impl_.best_embedding_score_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.aggregate_tab_score_ = from._impl_.aggregate_tab_score_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.number_of_common_words_ = from._impl_.number_of_common_words_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.seconds_of_last_visit_ = from._impl_.seconds_of_last_visit_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.was_explicitly_chosen_ = from._impl_.was_explicitly_chosen_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.query_title_similarity_ = from._impl_.query_title_similarity_;
    }
  }
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    _this->_impl_.active_tab_title_similarity_ = from._impl_.active_tab_title_similarity_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void ContextualTasksTabContext::InternalSwap(ContextualTasksTabContext* 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_.query_passage_similarities_.InternalSwap(&other->_impl_.query_passage_similarities_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.active_tab_title_similarity_)
      + sizeof(ContextualTasksTabContext::_impl_.active_tab_title_similarity_)
      - PROTOBUF_FIELD_OFFSET(ContextualTasksTabContext, _impl_.seconds_since_last_active_)>(
          reinterpret_cast<char*>(&_impl_.seconds_since_last_active_),
          reinterpret_cast<char*>(&other->_impl_.seconds_since_last_active_));
}

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