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

#include "components/optimization_guide/proto/features/history_query.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 HistoryQueryResponse::_Internal {
 public:
};

constexpr HistoryQueryResponse::ParseTableT_ HistoryQueryResponse::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistoryQueryResponse,
                            _impl_._cached_size_),  // no hasbits
      0, // no _extensions_
      0, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967295,  // skipmap
      offsetof(ParseTableT_, field_names),  // no field_entries
      0,  // 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::HistoryQueryResponse>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, // no field_entries, or aux_entries
    {{
    }},
  };
}


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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST HistoryQueryResponseGlobalsTypeInternal HistoryQueryResponse_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* HistoryQueryResponse_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return HistoryQueryResponse_globals_.GetClassData();
#else
  return HistoryQueryResponse_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class HistoryQueryRequest::_Internal {
 public:
};

constexpr HistoryQueryRequest::ParseTableT_ HistoryQueryRequest::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistoryQueryRequest,
                            _impl_._cached_size_),  // no hasbits
      0, // no _extensions_
      0, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967295,  // skipmap
      offsetof(ParseTableT_, field_names),  // no field_entries
      0,  // 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::HistoryQueryRequest>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, // no field_entries, or aux_entries
    {{
    }},
  };
}


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

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

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

constexpr PassageData::ParseTableT_ PassageData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PassageData, _impl_._has_bits_),
      0, // no _extensions_
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // 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::PassageData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // .optimization_guide.proto.Embedding embedding = 1 [features = {
      {::_pbi::TcParser::FastMtS1,
       {10, 1, 0,
        PROTOBUF_FIELD_OFFSET(PassageData, _impl_.embedding_)}},
      // string text = 2 [features = {
      {::_pbi::TcParser::FastUS1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(PassageData, _impl_.text_)}},
      // float score = 3 [features = {
      {::_pbi::TcParser::FastF32S1,
       {29, 2, 0,
        PROTOBUF_FIELD_OFFSET(PassageData, _impl_.score_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .optimization_guide.proto.Embedding embedding = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(PassageData, _impl_.embedding_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // string text = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(PassageData, _impl_.text_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // float score = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(PassageData, _impl_.score_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::Embedding>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::Embedding_globals_},
        #endif
    }},
    {{
      "\44\0\4\0\0\0\0\0"
      "optimization_guide.proto.PassageData"
      "text"
    }},
  };
}


inline constexpr PassageData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        text_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        embedding_{nullptr},
        score_{0} {}

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

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

constexpr DocumentShown::ParseTableT_ DocumentShown::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_._has_bits_),
      0, // no _extensions_
      6, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967233,  // skipmap
      offsetof(ParseTableT_, field_entries),
      5,  // 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::DocumentShown>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // string url = 2 [features = {
      {::_pbi::TcParser::FastUS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.url_)}},
      // repeated .optimization_guide.proto.PassageData passages = 3;
      {::_pbi::TcParser::FastMtR1,
       {26, 0, 0,
        PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.passages_)}},
      // bool was_clicked = 4 [features = {
      {::_pbi::TcParser::FastV8S1,
       {32, 2, 0,
        PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.was_clicked_)}},
      // float best_embedding_score = 5 [features = {
      {::_pbi::TcParser::FastF32S1,
       {45, 3, 0,
        PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.best_embedding_score_)}},
      // float total_document_score = 6 [features = {
      {::_pbi::TcParser::FastF32S1,
       {53, 4, 0,
        PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.total_document_score_)}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // string url = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.url_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // repeated .optimization_guide.proto.PassageData passages = 3;
      {PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.passages_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // bool was_clicked = 4 [features = {
      {PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.was_clicked_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // float best_embedding_score = 5 [features = {
      {PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.best_embedding_score_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // float total_document_score = 6 [features = {
      {PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.total_document_score_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::PassageData>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::PassageData_globals_},
        #endif
    }},
    {{
      "\46\3\0\0\0\0\0\0"
      "optimization_guide.proto.DocumentShown"
      "url"
    }},
  };
}


inline constexpr DocumentShown::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        passages_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::DocumentShown,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::DocumentShown, _impl_.passages_)>()
         }
        ,
        url_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        was_clicked_{false},
        best_embedding_score_{0},
        total_document_score_{0} {}

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

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

constexpr HistoryQueryQuality::ParseTableT_ HistoryQueryQuality::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_._has_bits_),
      0, // no _extensions_
      10, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966272,  // skipmap
      offsetof(ParseTableT_, field_entries),
      10,  // 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<::optimization_guide::proto::HistoryQueryQuality>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated .optimization_guide.proto.DocumentShown top_documents_shown = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.top_documents_shown_)}},
      // uint32 num_entered_characters = 2 [features = {
      {::_pbi::TcParser::FastV32S1,
       {16, 4, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.num_entered_characters_)}},
      // .optimization_guide.proto.UiSurface ui_surface = 3 [features = {
      {::_pbi::TcParser::FastV32S1,
       {24, 5, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.ui_surface_)}},
      // string query = 4 [features = {
      {::_pbi::TcParser::FastUS1,
       {34, 1, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.query_)}},
      // .optimization_guide.proto.Embedding query_embedding = 5 [features = {
      {::_pbi::TcParser::FastMtS1,
       {42, 3, 1,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.query_embedding_)}},
      // int64 embedding_model_version = 6 [features = {
      {::_pbi::TcParser::FastV64S1,
       {48, 6, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.embedding_model_version_)}},
      // uint32 num_days = 7 [features = {
      {::_pbi::TcParser::FastV32S1,
       {56, 7, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.num_days_)}},
      // .optimization_guide.proto.UserFeedback user_feedback = 8 [features = {
      {::_pbi::TcParser::FastV32S1,
       {64, 8, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.user_feedback_)}},
      // string session_id = 9 [features = {
      {::_pbi::TcParser::FastUS1,
       {74, 2, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.session_id_)}},
      // .optimization_guide.proto.FinalModelStatus final_model_status = 10 [features = {
      {::_pbi::TcParser::FastV32S1,
       {80, 9, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.final_model_status_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .optimization_guide.proto.DocumentShown top_documents_shown = 1;
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.top_documents_shown_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // uint32 num_entered_characters = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.num_entered_characters_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // .optimization_guide.proto.UiSurface ui_surface = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.ui_surface_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // string query = 4 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.query_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // .optimization_guide.proto.Embedding query_embedding = 5 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.query_embedding_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // int64 embedding_model_version = 6 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.embedding_model_version_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // uint32 num_days = 7 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.num_days_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // .optimization_guide.proto.UserFeedback user_feedback = 8 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.user_feedback_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // string session_id = 9 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.session_id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // .optimization_guide.proto.FinalModelStatus final_model_status = 10 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.final_model_status_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::DocumentShown>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::DocumentShown_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::Embedding>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::Embedding_globals_},
        #endif
    }},
    {{
      "\54\0\0\0\5\0\0\0\0\12\0\0\0\0\0\0"
      "optimization_guide.proto.HistoryQueryQuality"
      "query"
      "session_id"
    }},
  };
}


inline constexpr HistoryQueryQuality::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        top_documents_shown_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::optimization_guide::proto::HistoryQueryQuality,
            PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::HistoryQueryQuality, _impl_.top_documents_shown_)>()
         }
        ,
        query_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        session_id_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        query_embedding_{nullptr},
        num_entered_characters_{0u},
        ui_surface_{static_cast< ::optimization_guide::proto::UiSurface >(0)},
        embedding_model_version_{::int64_t{0}},
        num_days_{0u},
        user_feedback_{static_cast< ::optimization_guide::proto::UserFeedback >(0)},
        final_model_status_{static_cast< ::optimization_guide::proto::FinalModelStatus >(0)} {}

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

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

constexpr HistoryQueryLoggingData::ParseTableT_ HistoryQueryLoggingData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_._has_bits_),
      0, // no _extensions_
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // num_field_entries
      3,  // 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::HistoryQueryLoggingData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // .optimization_guide.proto.HistoryQueryRequest request = 1 [features = {
      {::_pbi::TcParser::FastMtS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.request_)}},
      // .optimization_guide.proto.HistoryQueryResponse response = 2 [features = {
      {::_pbi::TcParser::FastMtS1,
       {18, 1, 1,
        PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.response_)}},
      // .optimization_guide.proto.HistoryQueryQuality quality = 3 [features = {
      {::_pbi::TcParser::FastMtS1,
       {26, 2, 2,
        PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.quality_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .optimization_guide.proto.HistoryQueryRequest request = 1 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.request_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .optimization_guide.proto.HistoryQueryResponse response = 2 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.response_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .optimization_guide.proto.HistoryQueryQuality quality = 3 [features = {
      {PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.quality_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::HistoryQueryRequest>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::HistoryQueryRequest_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::HistoryQueryResponse>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::HistoryQueryResponse_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::optimization_guide::proto::HistoryQueryQuality>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::optimization_guide::proto::HistoryQueryQuality_globals_},
        #endif
    }},
    {{
    }},
  };
}


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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST HistoryQueryLoggingDataGlobalsTypeInternal HistoryQueryLoggingData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* HistoryQueryLoggingData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return HistoryQueryLoggingData_globals_.GetClassData();
#else
  return HistoryQueryLoggingData_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 UiSurface_internal_data_[] = {
    262144u, 0u, };
static const char UiSurface_names[] = {
    "UI_SURFACE_HISTORY_PAGE"
    "UI_SURFACE_OMNIBOX_HISTORY_SCOPE"
    "UI_SURFACE_SIDE_PANEL"
    "UI_SURFACE_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry UiSurface_entries[] = {
    {{&UiSurface_names[0], 23}, 1},
    {{&UiSurface_names[23], 32}, 2},
    {{&UiSurface_names[55], 21}, 3},
    {{&UiSurface_names[76], 22}, 0},
};

static const int UiSurface_entries_by_number[] = {
    3,  // 0 -> UI_SURFACE_UNSPECIFIED
    0,  // 1 -> UI_SURFACE_HISTORY_PAGE
    1,  // 2 -> UI_SURFACE_OMNIBOX_HISTORY_SCOPE
    2,  // 3 -> UI_SURFACE_SIDE_PANEL
};

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

const ::std::string& UiSurface_Name(UiSurface value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      UiSurface_entries, UiSurface_entries_by_number, 4,
      UiSurface_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(UiSurface_entries,
                                  UiSurface_entries_by_number,
                                  4, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : UiSurface_strings[idx].get();
}
// ===================================================================

HistoryQueryLoggingData::HistoryQueryLoggingData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryLoggingData_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.HistoryQueryLoggingData)
}
PROTOBUF_NDEBUG_INLINE HistoryQueryLoggingData::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::HistoryQueryLoggingData& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

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

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

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite HistoryQueryLoggingData_class_data_ =
    HistoryQueryLoggingData::InternalGenerateClassData_(HistoryQueryLoggingData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryLoggingData::GetClassData() const {
  return HistoryQueryLoggingData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryLoggingData::GetClassData() const {
  return HistoryQueryLoggingData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistoryQueryLoggingData::ParseTableT_
    HistoryQueryLoggingData::_table_ =
        HistoryQueryLoggingData::InternalGenerateParseTable_(HistoryQueryLoggingData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistoryQueryLoggingData::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.HistoryQueryLoggingData)
  ::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, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(_impl_.request_ != nullptr);
      _impl_.request_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.response_ != nullptr);
      _impl_.response_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      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 HistoryQueryLoggingData::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const HistoryQueryLoggingData& this_ = static_cast<const HistoryQueryLoggingData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL HistoryQueryLoggingData::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const HistoryQueryLoggingData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:optimization_guide.proto.HistoryQueryLoggingData)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // .optimization_guide.proto.HistoryQueryRequest request = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.request_, this_._impl_.request_->GetCachedSize(), target,
        stream);
  }

  // .optimization_guide.proto.HistoryQueryResponse response = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.response_, this_._impl_.response_->GetCachedSize(), target,
        stream);
  }

  // .optimization_guide.proto.HistoryQueryQuality quality = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *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.HistoryQueryLoggingData)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // .optimization_guide.proto.HistoryQueryRequest request = 1 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.request_);
    }
    // .optimization_guide.proto.HistoryQueryResponse response = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.response_);
    }
    // .optimization_guide.proto.HistoryQueryQuality quality = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      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 HistoryQueryLoggingData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistoryQueryLoggingData*>(&to_msg);
  auto& from = static_cast<const HistoryQueryLoggingData&>(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.HistoryQueryLoggingData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      ABSL_DCHECK(from._impl_.request_ != nullptr);
      if (_this->_impl_.request_ == nullptr) {
        _this->_impl_.request_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.request_);
      } else {
        _this->_impl_.request_->MergeFrom(*from._impl_.request_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.response_ != nullptr);
      if (_this->_impl_.response_ == nullptr) {
        _this->_impl_.response_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.response_);
      } else {
        _this->_impl_.response_->MergeFrom(*from._impl_.response_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      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 HistoryQueryLoggingData::CopyFrom(const HistoryQueryLoggingData& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:optimization_guide.proto.HistoryQueryLoggingData)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void HistoryQueryLoggingData::InternalSwap(HistoryQueryLoggingData* 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(HistoryQueryLoggingData, _impl_.quality_)
      + sizeof(HistoryQueryLoggingData::_impl_.quality_)
      - PROTOBUF_FIELD_OFFSET(HistoryQueryLoggingData, _impl_.request_)>(
          reinterpret_cast<char*>(&_impl_.request_),
          reinterpret_cast<char*>(&other->_impl_.request_));
}

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

HistoryQueryRequest::HistoryQueryRequest(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryRequest_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.HistoryQueryRequest)
}
HistoryQueryRequest::HistoryQueryRequest(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HistoryQueryRequest& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryRequest_get_class_data()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE HistoryQueryRequest::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void HistoryQueryRequest::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
HistoryQueryRequest::~HistoryQueryRequest() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.HistoryQueryRequest)
  SharedDtor(*this);
}
inline void HistoryQueryRequest::SharedDtor(MessageLite& self) {
  HistoryQueryRequest& this_ = static_cast<HistoryQueryRequest&>(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 HistoryQueryRequest_class_data_ =
    HistoryQueryRequest::InternalGenerateClassData_(HistoryQueryRequest_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryRequest::GetClassData() const {
  return HistoryQueryRequest_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryRequest::GetClassData() const {
  return HistoryQueryRequest_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistoryQueryRequest::ParseTableT_
    HistoryQueryRequest::_table_ =
        HistoryQueryRequest::InternalGenerateParseTable_(HistoryQueryRequest_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistoryQueryRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.HistoryQueryRequest)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<::std::string>();
}

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

  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.HistoryQueryRequest)
  return target;
}

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

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

  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 HistoryQueryRequest::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistoryQueryRequest*>(&to_msg);
  auto& from = static_cast<const HistoryQueryRequest&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.HistoryQueryRequest)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void HistoryQueryRequest::InternalSwap(HistoryQueryRequest* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

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

HistoryQueryResponse::HistoryQueryResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryResponse_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.HistoryQueryResponse)
}
HistoryQueryResponse::HistoryQueryResponse(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const HistoryQueryResponse& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryResponse_get_class_data()),
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena),
#endif  // PROTOBUF_CUSTOM_VTABLE
      _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}
PROTOBUF_NDEBUG_INLINE HistoryQueryResponse::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void HistoryQueryResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
HistoryQueryResponse::~HistoryQueryResponse() {
  // @@protoc_insertion_point(destructor:optimization_guide.proto.HistoryQueryResponse)
  SharedDtor(*this);
}
inline void HistoryQueryResponse::SharedDtor(MessageLite& self) {
  HistoryQueryResponse& this_ = static_cast<HistoryQueryResponse&>(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 HistoryQueryResponse_class_data_ =
    HistoryQueryResponse::InternalGenerateClassData_(HistoryQueryResponse_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryResponse::GetClassData() const {
  return HistoryQueryResponse_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryResponse::GetClassData() const {
  return HistoryQueryResponse_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistoryQueryResponse::ParseTableT_
    HistoryQueryResponse::_table_ =
        HistoryQueryResponse::InternalGenerateParseTable_(HistoryQueryResponse_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistoryQueryResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.HistoryQueryResponse)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<::std::string>();
}

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

  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.HistoryQueryResponse)
  return target;
}

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

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

  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 HistoryQueryResponse::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistoryQueryResponse*>(&to_msg);
  auto& from = static_cast<const HistoryQueryResponse&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:optimization_guide.proto.HistoryQueryResponse)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void HistoryQueryResponse::InternalSwap(HistoryQueryResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

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

void HistoryQueryQuality::clear_query_embedding() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.query_embedding_ != nullptr) _impl_.query_embedding_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000008U);
}
HistoryQueryQuality::HistoryQueryQuality(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, HistoryQueryQuality_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.HistoryQueryQuality)
}
PROTOBUF_NDEBUG_INLINE HistoryQueryQuality::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::HistoryQueryQuality& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        top_documents_shown_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::HistoryQueryQuality,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::HistoryQueryQuality, _impl_.top_documents_shown_)>()
          , from.top_documents_shown_
        }
        ,
        query_(arena, from.query_),
        session_id_(arena, from.session_id_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  HistoryQueryQuality* 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_.query_embedding_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.query_embedding_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, num_entered_characters_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, num_entered_characters_),
           offsetof(Impl_, final_model_status_) -
               offsetof(Impl_, num_entered_characters_) +
               sizeof(Impl_::final_model_status_));

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite HistoryQueryQuality_class_data_ =
    HistoryQueryQuality::InternalGenerateClassData_(HistoryQueryQuality_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryQuality::GetClassData() const {
  return HistoryQueryQuality_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HistoryQueryQuality::GetClassData() const {
  return HistoryQueryQuality_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const HistoryQueryQuality::ParseTableT_
    HistoryQueryQuality::_table_ =
        HistoryQueryQuality::InternalGenerateParseTable_(HistoryQueryQuality_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void HistoryQueryQuality::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.HistoryQueryQuality)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.top_documents_shown_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.query_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.session_id_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.query_embedding_ != nullptr);
      _impl_.query_embedding_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000f0U)) {
    ::memset(&_impl_.num_entered_characters_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.num_days_) -
        reinterpret_cast<char*>(&_impl_.num_entered_characters_)) + sizeof(_impl_.num_days_));
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) {
    ::memset(&_impl_.user_feedback_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.final_model_status_) -
        reinterpret_cast<char*>(&_impl_.user_feedback_)) + sizeof(_impl_.final_model_status_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // uint32 num_entered_characters = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    if (this_._internal_num_entered_characters() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
          2, this_._internal_num_entered_characters(), target);
    }
  }

  // .optimization_guide.proto.UiSurface ui_surface = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    if (this_._internal_ui_surface() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteEnumToArray(
          3, this_._internal_ui_surface(), target);
    }
  }

  // string query = 4 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (!this_._internal_query().empty()) {
      const ::std::string& _s = this_._internal_query();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.HistoryQueryQuality.query");
      target = stream->WriteStringMaybeAliased(4, _s, target);
    }
  }

  // .optimization_guide.proto.Embedding query_embedding = 5 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        5, *this_._impl_.query_embedding_, this_._impl_.query_embedding_->GetCachedSize(), target,
        stream);
  }

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

  // uint32 num_days = 7 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
        7, this_._internal_num_days(), target);
  }

  // .optimization_guide.proto.UserFeedback user_feedback = 8 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    if (this_._internal_user_feedback() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteEnumToArray(
          8, this_._internal_user_feedback(), target);
    }
  }

  // string session_id = 9 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (!this_._internal_session_id().empty()) {
      const ::std::string& _s = this_._internal_session_id();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.HistoryQueryQuality.session_id");
      target = stream->WriteStringMaybeAliased(9, _s, target);
    }
  }

  // .optimization_guide.proto.FinalModelStatus final_model_status = 10 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000200U)) {
    if (this_._internal_final_model_status() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteEnumToArray(
          10, this_._internal_final_model_status(), 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.HistoryQueryQuality)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t HistoryQueryQuality::ByteSizeLong(const MessageLite& base) {
  const HistoryQueryQuality& this_ = static_cast<const HistoryQueryQuality&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t HistoryQueryQuality::ByteSizeLong() const {
  const HistoryQueryQuality& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:optimization_guide.proto.HistoryQueryQuality)
  ::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, 0x000000ffU)) {
    // repeated .optimization_guide.proto.DocumentShown top_documents_shown = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_top_documents_shown_size();
      for (const auto& msg : this_._internal_top_documents_shown()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // string query = 4 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!this_._internal_query().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_query());
      }
    }
    // string session_id = 9 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (!this_._internal_session_id().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_session_id());
      }
    }
    // .optimization_guide.proto.Embedding query_embedding = 5 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.query_embedding_);
    }
    // uint32 num_entered_characters = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (this_._internal_num_entered_characters() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
            this_._internal_num_entered_characters());
      }
    }
    // .optimization_guide.proto.UiSurface ui_surface = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      if (this_._internal_ui_surface() != 0) {
        total_size += 1 +
                      ::_pbi::WireFormatLite::EnumSize(this_._internal_ui_surface());
      }
    }
    // int64 embedding_model_version = 6 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      if (this_._internal_embedding_model_version() != 0) {
        total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
            this_._internal_embedding_model_version());
      }
    }
    // uint32 num_days = 7 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
          this_._internal_num_days());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) {
    // .optimization_guide.proto.UserFeedback user_feedback = 8 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      if (this_._internal_user_feedback() != 0) {
        total_size += 1 +
                      ::_pbi::WireFormatLite::EnumSize(this_._internal_user_feedback());
      }
    }
    // .optimization_guide.proto.FinalModelStatus final_model_status = 10 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      if (this_._internal_final_model_status() != 0) {
        total_size += 1 +
                      ::_pbi::WireFormatLite::EnumSize(this_._internal_final_model_status());
      }
    }
  }
  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 HistoryQueryQuality::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<HistoryQueryQuality*>(&to_msg);
  auto& from = static_cast<const HistoryQueryQuality&>(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.HistoryQueryQuality)
  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_top_documents_shown()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_top_documents_shown());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!from._internal_query().empty()) {
        _this->_internal_set_query(from._internal_query());
      } else {
        if (_this->_impl_.query_.IsDefault()) {
          _this->_internal_set_query("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (!from._internal_session_id().empty()) {
        _this->_internal_set_session_id(from._internal_session_id());
      } else {
        if (_this->_impl_.session_id_.IsDefault()) {
          _this->_internal_set_session_id("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.query_embedding_ != nullptr);
      if (_this->_impl_.query_embedding_ == nullptr) {
        _this->_impl_.query_embedding_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.query_embedding_);
      } else {
        _this->_impl_.query_embedding_->MergeFrom(*from._impl_.query_embedding_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (from._internal_num_entered_characters() != 0) {
        _this->_impl_.num_entered_characters_ = from._impl_.num_entered_characters_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      if (from._internal_ui_surface() != 0) {
        _this->_impl_.ui_surface_ = from._impl_.ui_surface_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      if (from._internal_embedding_model_version() != 0) {
        _this->_impl_.embedding_model_version_ = from._impl_.embedding_model_version_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.num_days_ = from._impl_.num_days_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000300U)) {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      if (from._internal_user_feedback() != 0) {
        _this->_impl_.user_feedback_ = from._impl_.user_feedback_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      if (from._internal_final_model_status() != 0) {
        _this->_impl_.final_model_status_ = from._impl_.final_model_status_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void HistoryQueryQuality::InternalSwap(HistoryQueryQuality* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.top_documents_shown_.InternalSwap(&other->_impl_.top_documents_shown_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.query_, &other->_impl_.query_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.session_id_, &other->_impl_.session_id_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.final_model_status_)
      + sizeof(HistoryQueryQuality::_impl_.final_model_status_)
      - PROTOBUF_FIELD_OFFSET(HistoryQueryQuality, _impl_.query_embedding_)>(
          reinterpret_cast<char*>(&_impl_.query_embedding_),
          reinterpret_cast<char*>(&other->_impl_.query_embedding_));
}

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

DocumentShown::DocumentShown(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, DocumentShown_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.DocumentShown)
}
PROTOBUF_NDEBUG_INLINE DocumentShown::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::DocumentShown& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        passages_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::optimization_guide::proto::DocumentShown,
              PROTOBUF_FIELD_OFFSET(::optimization_guide::proto::DocumentShown, _impl_.passages_)>()
          , from.passages_
        }
        ,
        url_(arena, from.url_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  DocumentShown* 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_, was_clicked_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, was_clicked_),
           offsetof(Impl_, total_document_score_) -
               offsetof(Impl_, was_clicked_) +
               sizeof(Impl_::total_document_score_));

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite DocumentShown_class_data_ =
    DocumentShown::InternalGenerateClassData_(DocumentShown_globals_._default);

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

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // string url = 2 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (!this_._internal_url().empty()) {
      const ::std::string& _s = this_._internal_url();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "optimization_guide.proto.DocumentShown.url");
      target = stream->WriteStringMaybeAliased(2, _s, target);
    }
  }

  // repeated .optimization_guide.proto.PassageData passages = 3;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_passages_size());
         i < n; i++) {
      const auto& repfield = this_._internal_passages().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              3, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // bool was_clicked = 4 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (this_._internal_was_clicked() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteBoolToArray(
          4, this_._internal_was_clicked(), target);
    }
  }

  // float best_embedding_score = 5 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    if (::absl::bit_cast<::uint32_t>(this_._internal_best_embedding_score()) != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteFloatToArray(
          5, this_._internal_best_embedding_score(), target);
    }
  }

  // float total_document_score = 6 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    if (::absl::bit_cast<::uint32_t>(this_._internal_total_document_score()) != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteFloatToArray(
          6, this_._internal_total_document_score(), 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.DocumentShown)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // repeated .optimization_guide.proto.PassageData passages = 3;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_passages_size();
      for (const auto& msg : this_._internal_passages()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // string url = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!this_._internal_url().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_url());
      }
    }
    // bool was_clicked = 4 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (this_._internal_was_clicked() != 0) {
        total_size += 2;
      }
    }
    // float best_embedding_score = 5 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (::absl::bit_cast<::uint32_t>(this_._internal_best_embedding_score()) != 0) {
        total_size += 5;
      }
    }
    // float total_document_score = 6 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (::absl::bit_cast<::uint32_t>(this_._internal_total_document_score()) != 0) {
        total_size += 5;
      }
    }
  }
  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 DocumentShown::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<DocumentShown*>(&to_msg);
  auto& from = static_cast<const DocumentShown&>(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.DocumentShown)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_passages()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_passages());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!from._internal_url().empty()) {
        _this->_internal_set_url(from._internal_url());
      } else {
        if (_this->_impl_.url_.IsDefault()) {
          _this->_internal_set_url("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (from._internal_was_clicked() != 0) {
        _this->_impl_.was_clicked_ = from._impl_.was_clicked_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (::absl::bit_cast<::uint32_t>(from._internal_best_embedding_score()) != 0) {
        _this->_impl_.best_embedding_score_ = from._impl_.best_embedding_score_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (::absl::bit_cast<::uint32_t>(from._internal_total_document_score()) != 0) {
        _this->_impl_.total_document_score_ = from._impl_.total_document_score_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void DocumentShown::InternalSwap(DocumentShown* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.passages_.InternalSwap(&other->_impl_.passages_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.url_, &other->_impl_.url_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.total_document_score_)
      + sizeof(DocumentShown::_impl_.total_document_score_)
      - PROTOBUF_FIELD_OFFSET(DocumentShown, _impl_.was_clicked_)>(
          reinterpret_cast<char*>(&_impl_.was_clicked_),
          reinterpret_cast<char*>(&other->_impl_.was_clicked_));
}

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

void PassageData::clear_embedding() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.embedding_ != nullptr) _impl_.embedding_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
PassageData::PassageData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, PassageData_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.PassageData)
}
PROTOBUF_NDEBUG_INLINE PassageData::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::PassageData& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        text_(arena, from.text_) {}

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

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

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite PassageData_class_data_ =
    PassageData::InternalGenerateClassData_(PassageData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PassageData::GetClassData() const {
  return PassageData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PassageData::GetClassData() const {
  return PassageData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const PassageData::ParseTableT_
    PassageData::_table_ =
        PassageData::InternalGenerateParseTable_(PassageData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void PassageData::Clear() {
// @@protoc_insertion_point(message_clear_start:optimization_guide.proto.PassageData)
  ::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_.text_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.embedding_ != nullptr);
      _impl_.embedding_->Clear();
    }
  }
  _impl_.score_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // .optimization_guide.proto.Embedding embedding = 1 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        1, *this_._impl_.embedding_, this_._impl_.embedding_->GetCachedSize(), target,
        stream);
  }

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

  // float score = 3 [features = {
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (::absl::bit_cast<::uint32_t>(this_._internal_score()) != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteFloatToArray(
          3, this_._internal_score(), 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.PassageData)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // string text = 2 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!this_._internal_text().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_text());
      }
    }
    // .optimization_guide.proto.Embedding embedding = 1 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.embedding_);
    }
    // float score = 3 [features = {
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (::absl::bit_cast<::uint32_t>(this_._internal_score()) != 0) {
        total_size += 5;
      }
    }
  }
  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 PassageData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PassageData*>(&to_msg);
  auto& from = static_cast<const PassageData&>(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.PassageData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!from._internal_text().empty()) {
        _this->_internal_set_text(from._internal_text());
      } else {
        if (_this->_impl_.text_.IsDefault()) {
          _this->_internal_set_text("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.embedding_ != nullptr);
      if (_this->_impl_.embedding_ == nullptr) {
        _this->_impl_.embedding_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.embedding_);
      } else {
        _this->_impl_.embedding_->MergeFrom(*from._impl_.embedding_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (::absl::bit_cast<::uint32_t>(from._internal_score()) != 0) {
        _this->_impl_.score_ = from._impl_.score_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void PassageData::InternalSwap(PassageData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.text_, &other->_impl_.text_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PassageData, _impl_.score_)
      + sizeof(PassageData::_impl_.score_)
      - PROTOBUF_FIELD_OFFSET(PassageData, _impl_.embedding_)>(
          reinterpret_cast<char*>(&_impl_.embedding_),
          reinterpret_cast<char*>(&other->_impl_.embedding_));
}

// @@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"
