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

#include "aim_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 lens {
class ContextTurnMetadata_TabMetadata::_Internal {
 public:
  using HasBits = decltype(::std::declval<ContextTurnMetadata_TabMetadata>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ContextTurnMetadata_TabMetadata, _impl_._has_bits_);
};

constexpr ContextTurnMetadata_TabMetadata::ParseTableT_ ContextTurnMetadata_TabMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextTurnMetadata_TabMetadata, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      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<::lens::ContextTurnMetadata_TabMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // bool is_active_tab = 1;
      {::_pbi::TcParser::FastV8S1,
       {8, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextTurnMetadata_TabMetadata, _impl_.is_active_tab_)}},
    }}, {{
      65535, 65535
    }}, {{
      // bool is_active_tab = 1;
      {PROTOBUF_FIELD_OFFSET(ContextTurnMetadata_TabMetadata, _impl_.is_active_tab_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
    }},
    // no aux_entries
    {{
    }},
  };
}


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

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

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

constexpr ContextMetadata::ParseTableT_ ContextMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextMetadata, _impl_._has_bits_),
      0, // no _extensions_
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      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<::lens::ContextMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // string pdf_title = 1;
      {::_pbi::TcParser::FastUS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextMetadata, _impl_.pdf_title_)}},
    }}, {{
      65535, 65535
    }}, {{
      // string pdf_title = 1;
      {PROTOBUF_FIELD_OFFSET(ContextMetadata, _impl_.pdf_title_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
      "\24\11\0\0\0\0\0\0"
      "lens.ContextMetadata"
      "pdf_title"
    }},
  };
}


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

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

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

constexpr ContextTurnMetadata::ParseTableT_ ContextTurnMetadata::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ContextTurnMetadata, _impl_._has_bits_),
      0, // no _extensions_
      2, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::lens::ContextTurnMetadata>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // int64 context_id = 1;
      {::_pbi::TcParser::FastV64S1,
       {8, 0, 0,
        PROTOBUF_FIELD_OFFSET(ContextTurnMetadata, _impl_.context_id_)}},
    }}, {{
      65535, 65535
    }}, {{
      // int64 context_id = 1;
      {PROTOBUF_FIELD_OFFSET(ContextTurnMetadata, _impl_.context_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
      // .lens.ContextTurnMetadata.TabMetadata tab_metadata = 2;
      {PROTOBUF_FIELD_OFFSET(ContextTurnMetadata, _impl_.metadata_.tab_metadata_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::ContextTurnMetadata_TabMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::ContextTurnMetadata_TabMetadata_globals_},
        #endif
    }},
    {{
    }},
  };
}


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

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

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

constexpr LensImageQueryData::ParseTableT_ LensImageQueryData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_._has_bits_),
      0, // no _extensions_
      10, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294966324,  // skipmap
      offsetof(ParseTableT_, field_entries),
      7,  // num_field_entries
      4,  // 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<::lens::LensImageQueryData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // .lens.ContextMetadata context_metadata = 8;
      {::_pbi::TcParser::FastMtS1,
       {66, 4, 2,
        PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.context_metadata_)}},
      // string search_session_id = 1;
      {::_pbi::TcParser::FastUS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.search_session_id_)}},
      // .lens.LensOverlayRequestId request_id = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 2, 0,
        PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.request_id_)}},
      {::_pbi::TcParser::MiniParse, {}},
      // .lens.LensOverlayVisualInputType visual_input_type = 4 [deprecated = true];
      {::_pbi::TcParser::FastEvS1,
       {32, 5, 3,
        PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.visual_input_type_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // .lens.LensOverlayVisualSearchInteractionData visual_search_interaction_data = 7;
      {::_pbi::TcParser::FastMtS1,
       {58, 3, 1,
        PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.visual_search_interaction_data_)}},
    }}, {{
      65535, 65535
    }}, {{
      // string search_session_id = 1;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.search_session_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // .lens.LensOverlayRequestId request_id = 2;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.request_id_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .lens.LensOverlayVisualInputType visual_input_type = 4 [deprecated = true];
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.visual_input_type_), _Internal::kHasBitsOffset + 5, 3, (0 | ::_fl::kFcOptional | ::_fl::kEnum)},
      // .lens.LensOverlayVisualSearchInteractionData visual_search_interaction_data = 7;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.visual_search_interaction_data_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .lens.ContextMetadata context_metadata = 8;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.context_metadata_), _Internal::kHasBitsOffset + 4, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // .lens.LensOverlayContextualInputUploadType contextual_input_upload_type = 9;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.contextual_input_upload_type_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // string drive_id = 10;
      {PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.drive_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::LensOverlayRequestId>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::LensOverlayRequestId_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::LensOverlayVisualSearchInteractionData>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::LensOverlayVisualSearchInteractionData_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::ContextMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::ContextMetadata_globals_},
        #endif
        {::_pbi::FieldAuxEnumData{}, ::lens::LensOverlayVisualInputType_internal_data_},
    }},
    {{
      "\27\21\0\0\0\0\0\10"
      "lens.LensImageQueryData"
      "search_session_id"
      "drive_id"
    }},
  };
}


inline constexpr LensImageQueryData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        search_session_id_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        drive_id_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        request_id_{nullptr},
        visual_search_interaction_data_{nullptr},
        context_metadata_{nullptr},
        visual_input_type_{static_cast< ::lens::LensOverlayVisualInputType >(0)},
        contextual_input_upload_type_{static_cast< ::lens::LensOverlayContextualInputUploadType >(0)} {}

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

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

constexpr QueryPayload::ParseTableT_ QueryPayload::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_._has_bits_),
      0, // no _extensions_
      17, 120,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294869616,  // skipmap
      offsetof(ParseTableT_, field_entries),
      12,  // num_field_entries
      4,  // 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<::lens::QueryPayload>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // string query_text = 1;
      {::_pbi::TcParser::FastUS1,
       {10, 2, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.query_text_)}},
      // repeated .lens.LensImageQueryData lens_image_query_data = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 0, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.lens_image_query_data_)}},
      // .lens.QueryPayload.QueryTextSource query_text_source = 3;
      {::_pbi::TcParser::FastV32S1,
       {24, 4, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.query_text_source_)}},
      // bool use_research_agent = 4;
      {::_pbi::TcParser::FastV8S1,
       {32, 5, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_research_agent_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // .lens.AddedInputs added_inputs = 8;
      {::_pbi::TcParser::FastMtS1,
       {66, 3, 1,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.added_inputs_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // bool use_canvas = 11;
      {::_pbi::TcParser::FastV8S1,
       {88, 6, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_canvas_)}},
      // bool use_image_generation = 12;
      {::_pbi::TcParser::FastV8S1,
       {96, 7, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_image_generation_)}},
      // .lens.ModelMode model_mode = 13;
      {::_pbi::TcParser::FastV32S1,
       {104, 8, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.model_mode_)}},
      // repeated .lens.ContextTurnMetadata context_turn_metadata = 14;
      {::_pbi::TcParser::FastMtR1,
       {114, 1, 2,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.context_turn_metadata_)}},
      // .lens.ToolMode tool_mode = 15;
      {::_pbi::TcParser::FastV32S1,
       {120, 9, 0,
        PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.tool_mode_)}},
    }}, {{
      65535, 65535
    }}, {{
      // string query_text = 1;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.query_text_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // repeated .lens.LensImageQueryData lens_image_query_data = 2;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.lens_image_query_data_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // .lens.QueryPayload.QueryTextSource query_text_source = 3;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.query_text_source_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // bool use_research_agent = 4;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_research_agent_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // .lens.AddedInputs added_inputs = 8;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.added_inputs_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // map<string, string> cgi_params = 9;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.cgi_params_), _Internal::kHasBitsOffset + 10, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
      // bool use_canvas = 11;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_canvas_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // bool use_image_generation = 12;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.use_image_generation_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // .lens.ModelMode model_mode = 13;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.model_mode_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // repeated .lens.ContextTurnMetadata context_turn_metadata = 14;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.context_turn_metadata_), _Internal::kHasBitsOffset + 1, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // .lens.ToolMode tool_mode = 15;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.tool_mode_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kOpenEnum)},
      // repeated string expired_lens_ids = 17;
      {PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.expired_lens_ids_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::LensImageQueryData>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::LensImageQueryData_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::AddedInputs>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::AddedInputs_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::lens::ContextTurnMetadata>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::lens::ContextTurnMetadata_globals_},
        #endif
        {::_pbi::TcParser::GetMapAuxInfo(
            1, 0, 9, 9, 1)},
    }},
    {{
      "\21\12\0\0\0\0\12\0\0\0\0\0\20\0\0\0"
      "lens.QueryPayload"
      "query_text"
      "cgi_params"
      "expired_lens_ids"
    }},
  };
}


inline constexpr QueryPayload::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        lens_image_query_data_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.lens_image_query_data_)>()
         }
        ,
        context_turn_metadata_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.context_turn_metadata_)>()
         }
        ,
        query_text_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        added_inputs_{nullptr},
        query_text_source_{static_cast< ::lens::QueryPayload_QueryTextSource >(0)},
        use_research_agent_{false},
        use_canvas_{false},
        use_image_generation_{false},
        model_mode_{static_cast< ::lens::ModelMode >(0)},
        tool_mode_{static_cast< ::lens::ToolMode >(0)},
        cgi_params_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.cgi_params_)>()
         }
        ,
        expired_lens_ids_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.expired_lens_ids_)>()
         }
     {}

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST QueryPayloadGlobalsTypeInternal QueryPayload_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* QueryPayload_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return QueryPayload_globals_.GetClassData();
#else
  return QueryPayload_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace lens
namespace lens {
PROTOBUF_CONSTINIT const uint32_t QueryPayload_QueryTextSource_internal_data_[] = {
    196608u, 0u, };
static const char QueryPayload_QueryTextSource_names[] = {
    "QUERY_TEXT_SOURCE_KEYBOARD_INPUT"
    "QUERY_TEXT_SOURCE_UNSPECIFIED"
    "QUERY_TEXT_SOURCE_VOICE_INPUT"
};

static const ::google::protobuf::internal::EnumEntry QueryPayload_QueryTextSource_entries[] = {
    {{&QueryPayload_QueryTextSource_names[0], 32}, 1},
    {{&QueryPayload_QueryTextSource_names[32], 29}, 0},
    {{&QueryPayload_QueryTextSource_names[61], 29}, 2},
};

static const int QueryPayload_QueryTextSource_entries_by_number[] = {
    1,  // 0 -> QUERY_TEXT_SOURCE_UNSPECIFIED
    0,  // 1 -> QUERY_TEXT_SOURCE_KEYBOARD_INPUT
    2,  // 2 -> QUERY_TEXT_SOURCE_VOICE_INPUT
};

bool QueryPayload_QueryTextSource_Parse(::absl::string_view name,
                                  QueryPayload_QueryTextSource* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      QueryPayload_QueryTextSource_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<QueryPayload_QueryTextSource>(int_value);
  }
  return success;
}
::absl::string_view QueryPayload_QueryTextSource_Name(QueryPayload_QueryTextSource value) {
  int idx = ::google::protobuf::internal::LookUpEnumName(QueryPayload_QueryTextSource_entries,
                                  QueryPayload_QueryTextSource_entries_by_number,
                                  3, value);
  return idx == -1
             ? ""
             : QueryPayload_QueryTextSource_entries[QueryPayload_QueryTextSource_entries_by_number[idx]]
                   .name;
}
PROTOBUF_CONSTINIT const uint32_t ModelMode_internal_data_[] = {
    262144u, 0u, };
static const char ModelMode_names[] = {
    "MODEL_MODE_GEMINI_PRO"
    "MODEL_MODE_GEMINI_PRO_AUTOROUTE"
    "MODEL_MODE_GEMINI_REGULAR"
    "MODEL_MODE_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry ModelMode_entries[] = {
    {{&ModelMode_names[0], 21}, 2},
    {{&ModelMode_names[21], 31}, 3},
    {{&ModelMode_names[52], 25}, 1},
    {{&ModelMode_names[77], 22}, 0},
};

static const int ModelMode_entries_by_number[] = {
    3,  // 0 -> MODEL_MODE_UNSPECIFIED
    2,  // 1 -> MODEL_MODE_GEMINI_REGULAR
    0,  // 2 -> MODEL_MODE_GEMINI_PRO
    1,  // 3 -> MODEL_MODE_GEMINI_PRO_AUTOROUTE
};

bool ModelMode_Parse(::absl::string_view name,
                                  ModelMode* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      ModelMode_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<ModelMode>(int_value);
  }
  return success;
}
::absl::string_view ModelMode_Name(ModelMode value) {
  int idx = ::google::protobuf::internal::LookUpEnumName(ModelMode_entries,
                                  ModelMode_entries_by_number,
                                  4, value);
  return idx == -1
             ? ""
             : ModelMode_entries[ModelMode_entries_by_number[idx]]
                   .name;
}
PROTOBUF_CONSTINIT const uint32_t ToolMode_internal_data_[] = {
    786432u, 0u, };
static const char ToolMode_names[] = {
    "TOOL_MODE_AGENT_TASK"
    "TOOL_MODE_AIM"
    "TOOL_MODE_AIM_GEN_PROMPT"
    "TOOL_MODE_CANVAS"
    "TOOL_MODE_DEEP_BROWSE"
    "TOOL_MODE_DEEP_SEARCH"
    "TOOL_MODE_DISABLE_SUGGEST"
    "TOOL_MODE_GEMINI_PRO"
    "TOOL_MODE_IMAGE_GEN"
    "TOOL_MODE_IMAGE_GEN_SELFIE"
    "TOOL_MODE_IMAGE_GEN_UPLOAD"
    "TOOL_MODE_UNSPECIFIED"
};

static const ::google::protobuf::internal::EnumEntry ToolMode_entries[] = {
    {{&ToolMode_names[0], 20}, 11},
    {{&ToolMode_names[20], 13}, 9},
    {{&ToolMode_names[33], 24}, 10},
    {{&ToolMode_names[57], 16}, 2},
    {{&ToolMode_names[73], 21}, 5},
    {{&ToolMode_names[94], 21}, 1},
    {{&ToolMode_names[115], 25}, 8},
    {{&ToolMode_names[140], 20}, 3},
    {{&ToolMode_names[160], 19}, 4},
    {{&ToolMode_names[179], 26}, 6},
    {{&ToolMode_names[205], 26}, 7},
    {{&ToolMode_names[231], 21}, 0},
};

static const int ToolMode_entries_by_number[] = {
    11,  // 0 -> TOOL_MODE_UNSPECIFIED
    5,  // 1 -> TOOL_MODE_DEEP_SEARCH
    3,  // 2 -> TOOL_MODE_CANVAS
    7,  // 3 -> TOOL_MODE_GEMINI_PRO
    8,  // 4 -> TOOL_MODE_IMAGE_GEN
    4,  // 5 -> TOOL_MODE_DEEP_BROWSE
    9,  // 6 -> TOOL_MODE_IMAGE_GEN_SELFIE
    10,  // 7 -> TOOL_MODE_IMAGE_GEN_UPLOAD
    6,  // 8 -> TOOL_MODE_DISABLE_SUGGEST
    1,  // 9 -> TOOL_MODE_AIM
    2,  // 10 -> TOOL_MODE_AIM_GEN_PROMPT
    0,  // 11 -> TOOL_MODE_AGENT_TASK
};

bool ToolMode_Parse(::absl::string_view name,
                                  ToolMode* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      ToolMode_entries, 12, name, &int_value);
  if (success) {
    *value = static_cast<ToolMode>(int_value);
  }
  return success;
}
::absl::string_view ToolMode_Name(ToolMode value) {
  int idx = ::google::protobuf::internal::LookUpEnumName(ToolMode_entries,
                                  ToolMode_entries_by_number,
                                  12, value);
  return idx == -1
             ? ""
             : ToolMode_entries[ToolMode_entries_by_number[idx]]
                   .name;
}
// ===================================================================

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

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ContextMetadata* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ContextMetadata_class_data_ =
    ContextMetadata::InternalGenerateClassData_(ContextMetadata_globals_._default);

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

  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.pdf_title_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // string pdf_title = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::absl::string_view _s = this_._internal_pdf_title();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.ContextMetadata.pdf_title");
    target = stream->WriteStringMaybeAliased(1, _s, 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:lens.ContextMetadata)
  return target;
}

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

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

   {
    // string pdf_title = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_pdf_title());
    }
  }
  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 ContextMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextMetadata*>(&to_msg);
  auto& from = static_cast<const ContextMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:lens.ContextMetadata)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_internal_set_pdf_title(from._internal_pdf_title());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void ContextMetadata::InternalSwap(ContextMetadata* 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_.pdf_title_.InternalSwap(&_impl_.pdf_title_, &other->_impl_.pdf_title_, arena);
}

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

void LensImageQueryData::clear_request_id() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.request_id_ != nullptr) _impl_.request_id_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000004U);
}
void LensImageQueryData::clear_visual_search_interaction_data() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.visual_search_interaction_data_ != nullptr) _impl_.visual_search_interaction_data_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000008U);
}
LensImageQueryData::LensImageQueryData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, LensImageQueryData_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:lens.LensImageQueryData)
}
PROTOBUF_NDEBUG_INLINE LensImageQueryData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::lens::LensImageQueryData& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        search_session_id_(arena, from.search_session_id_),
        drive_id_(arena, from.drive_id_) {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  LensImageQueryData* 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_id_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.request_id_)
                : nullptr;
  _impl_.visual_search_interaction_data_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.visual_search_interaction_data_)
                : nullptr;
  _impl_.context_metadata_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.context_metadata_)
                : nullptr;
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, visual_input_type_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, visual_input_type_),
           offsetof(Impl_, contextual_input_upload_type_) -
               offsetof(Impl_, visual_input_type_) +
               sizeof(Impl_::contextual_input_upload_type_));

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

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite LensImageQueryData_class_data_ =
    LensImageQueryData::InternalGenerateClassData_(LensImageQueryData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
LensImageQueryData::GetClassData() const {
  return LensImageQueryData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
LensImageQueryData::GetClassData() const {
  return LensImageQueryData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const LensImageQueryData::ParseTableT_
    LensImageQueryData::_table_ =
        LensImageQueryData::InternalGenerateParseTable_(LensImageQueryData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void LensImageQueryData::Clear() {
// @@protoc_insertion_point(message_clear_start:lens.LensImageQueryData)
  ::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, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.search_session_id_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.drive_id_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.request_id_ != nullptr);
      _impl_.request_id_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.visual_search_interaction_data_ != nullptr);
      _impl_.visual_search_interaction_data_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.context_metadata_ != nullptr);
      _impl_.context_metadata_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000060U)) {
    ::memset(&_impl_.visual_input_type_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.contextual_input_upload_type_) -
        reinterpret_cast<char*>(&_impl_.visual_input_type_)) + sizeof(_impl_.contextual_input_upload_type_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // string search_session_id = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::absl::string_view _s = this_._internal_search_session_id();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.LensImageQueryData.search_session_id");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // .lens.LensOverlayRequestId request_id = 2;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.request_id_, this_._impl_.request_id_->GetCachedSize(), target,
        stream);
  }

  // .lens.LensOverlayVisualInputType visual_input_type = 4 [deprecated = true];
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this_._internal_visual_input_type(), target);
  }

  // .lens.LensOverlayVisualSearchInteractionData visual_search_interaction_data = 7;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        7, *this_._impl_.visual_search_interaction_data_, this_._impl_.visual_search_interaction_data_->GetCachedSize(), target,
        stream);
  }

  // .lens.ContextMetadata context_metadata = 8;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        8, *this_._impl_.context_metadata_, this_._impl_.context_metadata_->GetCachedSize(), target,
        stream);
  }

  // .lens.LensOverlayContextualInputUploadType contextual_input_upload_type = 9;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        9, this_._internal_contextual_input_upload_type(), target);
  }

  // string drive_id = 10;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::absl::string_view _s = this_._internal_drive_id();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.LensImageQueryData.drive_id");
    target = stream->WriteStringMaybeAliased(10, _s, 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:lens.LensImageQueryData)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t LensImageQueryData::ByteSizeLong(const MessageLite& base) {
  const LensImageQueryData& this_ = static_cast<const LensImageQueryData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t LensImageQueryData::ByteSizeLong() const {
  const LensImageQueryData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:lens.LensImageQueryData)
  ::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, 0x0000007fU)) {
    // string search_session_id = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_search_session_id());
    }
    // string drive_id = 10;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_drive_id());
    }
    // .lens.LensOverlayRequestId request_id = 2;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.request_id_);
    }
    // .lens.LensOverlayVisualSearchInteractionData visual_search_interaction_data = 7;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.visual_search_interaction_data_);
    }
    // .lens.ContextMetadata context_metadata = 8;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.context_metadata_);
    }
    // .lens.LensOverlayVisualInputType visual_input_type = 4 [deprecated = true];
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_visual_input_type());
    }
    // .lens.LensOverlayContextualInputUploadType contextual_input_upload_type = 9;
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_contextual_input_upload_type());
    }
  }
  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 LensImageQueryData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<LensImageQueryData*>(&to_msg);
  auto& from = static_cast<const LensImageQueryData&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:lens.LensImageQueryData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_search_session_id(from._internal_search_session_id());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_drive_id(from._internal_drive_id());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.request_id_ != nullptr);
      if (_this->_impl_.request_id_ == nullptr) {
        _this->_impl_.request_id_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.request_id_);
      } else {
        _this->_impl_.request_id_->MergeFrom(*from._impl_.request_id_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.visual_search_interaction_data_ != nullptr);
      if (_this->_impl_.visual_search_interaction_data_ == nullptr) {
        _this->_impl_.visual_search_interaction_data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.visual_search_interaction_data_);
      } else {
        _this->_impl_.visual_search_interaction_data_->MergeFrom(*from._impl_.visual_search_interaction_data_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.context_metadata_ != nullptr);
      if (_this->_impl_.context_metadata_ == nullptr) {
        _this->_impl_.context_metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.context_metadata_);
      } else {
        _this->_impl_.context_metadata_->MergeFrom(*from._impl_.context_metadata_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.visual_input_type_ = from._impl_.visual_input_type_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.contextual_input_upload_type_ = from._impl_.contextual_input_upload_type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void LensImageQueryData::InternalSwap(LensImageQueryData* 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_.search_session_id_.InternalSwap(&_impl_.search_session_id_, &other->_impl_.search_session_id_, arena);
  _impl_.drive_id_.InternalSwap(&_impl_.drive_id_, &other->_impl_.drive_id_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.contextual_input_upload_type_)
      + sizeof(LensImageQueryData::_impl_.contextual_input_upload_type_)
      - PROTOBUF_FIELD_OFFSET(LensImageQueryData, _impl_.request_id_)>(
          reinterpret_cast<char*>(&_impl_.request_id_),
          reinterpret_cast<char*>(&other->_impl_.request_id_));
}

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

ContextTurnMetadata_TabMetadata::ContextTurnMetadata_TabMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextTurnMetadata_TabMetadata_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:lens.ContextTurnMetadata.TabMetadata)
}
ContextTurnMetadata_TabMetadata::ContextTurnMetadata_TabMetadata(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ContextTurnMetadata_TabMetadata& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextTurnMetadata_TabMetadata_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 ContextTurnMetadata_TabMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void ContextTurnMetadata_TabMetadata::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.is_active_tab_ = {};
}
ContextTurnMetadata_TabMetadata::~ContextTurnMetadata_TabMetadata() {
  // @@protoc_insertion_point(destructor:lens.ContextTurnMetadata.TabMetadata)
  SharedDtor(*this);
}
inline void ContextTurnMetadata_TabMetadata::SharedDtor(MessageLite& self) {
  ContextTurnMetadata_TabMetadata& this_ = static_cast<ContextTurnMetadata_TabMetadata&>(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 ContextTurnMetadata_TabMetadata_class_data_ =
    ContextTurnMetadata_TabMetadata::InternalGenerateClassData_(ContextTurnMetadata_TabMetadata_globals_._default);

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

  _impl_.is_active_tab_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // bool is_active_tab = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        1, this_._internal_is_active_tab(), 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:lens.ContextTurnMetadata.TabMetadata)
  return target;
}

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

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

  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += static_cast<bool>(0x00000001U & cached_has_bits) * 2;
  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 ContextTurnMetadata_TabMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextTurnMetadata_TabMetadata*>(&to_msg);
  auto& from = static_cast<const ContextTurnMetadata_TabMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:lens.ContextTurnMetadata.TabMetadata)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_impl_.is_active_tab_ = from._impl_.is_active_tab_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void ContextTurnMetadata_TabMetadata::CopyFrom(const ContextTurnMetadata_TabMetadata& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:lens.ContextTurnMetadata.TabMetadata)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


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

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

void ContextTurnMetadata::set_allocated_tab_metadata(::lens::ContextTurnMetadata_TabMetadata* PROTOBUF_NULLABLE tab_metadata) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_metadata();
  if (tab_metadata) {
    ::google::protobuf::Arena* submessage_arena = tab_metadata->GetArena();
    if (message_arena != submessage_arena) {
      tab_metadata = ::google::protobuf::internal::GetOwnedMessage(message_arena, tab_metadata, submessage_arena);
    }
    set_has_tab_metadata();
    _impl_.metadata_.tab_metadata_ = tab_metadata;
  }
  // @@protoc_insertion_point(field_set_allocated:lens.ContextTurnMetadata.tab_metadata)
}
ContextTurnMetadata::ContextTurnMetadata(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ContextTurnMetadata_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:lens.ContextTurnMetadata)
}
PROTOBUF_NDEBUG_INLINE ContextTurnMetadata::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::lens::ContextTurnMetadata& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        metadata_{},
        _oneof_case_{from._oneof_case_[0]} {}

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

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ContextTurnMetadata* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_.context_id_ = from._impl_.context_id_;
  switch (metadata_case()) {
    case METADATA_NOT_SET:
      break;
      case kTabMetadata:
        _impl_.metadata_.tab_metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_.tab_metadata_);
        break;
  }

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

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

void ContextTurnMetadata::clear_metadata() {
// @@protoc_insertion_point(one_of_clear_start:lens.ContextTurnMetadata)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (metadata_case()) {
    case kTabMetadata: {
      if (GetArena() == nullptr) {
        delete _impl_.metadata_.tab_metadata_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        if (_impl_.metadata_.tab_metadata_ != nullptr) {
          _impl_.metadata_.tab_metadata_->Clear();
        }
      }
      break;
    }
    case METADATA_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = METADATA_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ContextTurnMetadata_class_data_ =
    ContextTurnMetadata::InternalGenerateClassData_(ContextTurnMetadata_globals_._default);

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

  _impl_.context_id_ = ::int64_t{0};
  clear_metadata();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

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

  // .lens.ContextTurnMetadata.TabMetadata tab_metadata = 2;
  if (this_.metadata_case() == kTabMetadata) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.metadata_.tab_metadata_, this_._impl_.metadata_.tab_metadata_->GetCachedSize(), target,
        stream);
  }

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

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

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

   {
    // int64 context_id = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
          this_._internal_context_id());
    }
  }
  switch (this_.metadata_case()) {
    // .lens.ContextTurnMetadata.TabMetadata tab_metadata = 2;
    case kTabMetadata: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.metadata_.tab_metadata_);
      break;
    }
    case METADATA_NOT_SET: {
      break;
    }
  }
  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 ContextTurnMetadata::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ContextTurnMetadata*>(&to_msg);
  auto& from = static_cast<const ContextTurnMetadata&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:lens.ContextTurnMetadata)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_impl_.context_id_ = from._impl_.context_id_;
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  if (const uint32_t oneof_from_case =
          from._impl_._oneof_case_[0]) {
    const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
    const bool oneof_needs_init = oneof_to_case != oneof_from_case;
    if (oneof_needs_init) {
      if (oneof_to_case != 0) {
        _this->clear_metadata();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kTabMetadata: {
        if (oneof_needs_init) {
          _this->_impl_.metadata_.tab_metadata_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.metadata_.tab_metadata_);
        } else {
          _this->_impl_.metadata_.tab_metadata_->MergeFrom(*from._impl_.metadata_.tab_metadata_);
        }
        break;
      }
      case METADATA_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


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

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

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

void QueryPayload::clear_added_inputs() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.added_inputs_ != nullptr) _impl_.added_inputs_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000008U);
}
QueryPayload::QueryPayload(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, QueryPayload_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:lens.QueryPayload)
}
PROTOBUF_NDEBUG_INLINE QueryPayload::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::lens::QueryPayload& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        lens_image_query_data_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::lens::QueryPayload,
              PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.lens_image_query_data_)>()
          , from.lens_image_query_data_
        }
        ,
        context_turn_metadata_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::lens::QueryPayload,
              PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.context_turn_metadata_)>()
          , from.context_turn_metadata_
        }
        ,
        query_text_(arena, from.query_text_),
        cgi_params_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::lens::QueryPayload,
              PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.cgi_params_)>()
          , from.cgi_params_
        }
        ,
        expired_lens_ids_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::lens::QueryPayload,
              PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.expired_lens_ids_)>()
          , from.expired_lens_ids_
        }
     {}

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

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

  // @@protoc_insertion_point(copy_constructor:lens.QueryPayload)
}
PROTOBUF_NDEBUG_INLINE QueryPayload::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        lens_image_query_data_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.lens_image_query_data_)>()
         }
        ,
        context_turn_metadata_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.context_turn_metadata_)>()
         }
        ,
        query_text_(arena),
        cgi_params_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.cgi_params_)>()
         }
        ,
        expired_lens_ids_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::lens::QueryPayload,
            PROTOBUF_FIELD_OFFSET(::lens::QueryPayload, _impl_.expired_lens_ids_)>()
         }
     {}

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

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite QueryPayload_class_data_ =
    QueryPayload::InternalGenerateClassData_(QueryPayload_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
QueryPayload::GetClassData() const {
  return QueryPayload_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
QueryPayload::GetClassData() const {
  return QueryPayload_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const QueryPayload::ParseTableT_
    QueryPayload::_table_ =
        QueryPayload::InternalGenerateParseTable_(QueryPayload_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void QueryPayload::Clear() {
// @@protoc_insertion_point(message_clear_start:lens.QueryPayload)
  ::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_.lens_image_query_data_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.context_turn_metadata_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.query_text_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.added_inputs_ != nullptr);
      _impl_.added_inputs_->Clear();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000f0U)) {
    ::memset(&_impl_.query_text_source_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.use_image_generation_) -
        reinterpret_cast<char*>(&_impl_.query_text_source_)) + sizeof(_impl_.use_image_generation_));
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) {
    ::memset(&_impl_.model_mode_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.tool_mode_) -
        reinterpret_cast<char*>(&_impl_.model_mode_)) + sizeof(_impl_.tool_mode_));
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      _impl_.cgi_params_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      _impl_.expired_lens_ids_.Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

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

  cached_has_bits = this_._impl_._has_bits_[0];
  // string query_text = 1;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::absl::string_view _s = this_._internal_query_text();
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.query_text");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // repeated .lens.LensImageQueryData lens_image_query_data = 2;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_lens_image_query_data_size());
         i < n; i++) {
      const auto& repfield = this_._internal_lens_image_query_data().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // .lens.QueryPayload.QueryTextSource query_text_source = 3;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this_._internal_query_text_source(), target);
  }

  // bool use_research_agent = 4;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        4, this_._internal_use_research_agent(), target);
  }

  // .lens.AddedInputs added_inputs = 8;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        8, *this_._impl_.added_inputs_, this_._impl_.added_inputs_->GetCachedSize(), target,
        stream);
  }

  // map<string, string> cgi_params = 9;
  if (CheckHasBit(cached_has_bits, 0x00000400U)) {
    if (!this_._internal_cgi_params().empty()) {
      using MapType = ::google::protobuf::Map<::std::string, ::std::string>;
      using WireHelper = _pbi::MapEntryFuncs<::std::string, ::std::string,
                                     _pbi::WireFormatLite::TYPE_STRING,
                                     _pbi::WireFormatLite::TYPE_STRING>;
      const auto& field = this_._internal_cgi_params();

      if (stream->IsSerializationDeterministic() && field.size() > 1) {
        for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
          target = WireHelper::InternalSerialize(
              9, entry.first, entry.second, target, stream);
          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
              entry.first.data(), static_cast<int>(entry.first.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.cgi_params");
          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
              entry.second.data(), static_cast<int>(entry.second.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.cgi_params");
        }
      } else {
        for (const auto& entry : field) {
          target = WireHelper::InternalSerialize(
              9, entry.first, entry.second, target, stream);
          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
              entry.first.data(), static_cast<int>(entry.first.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.cgi_params");
          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
              entry.second.data(), static_cast<int>(entry.second.length()),
 ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.cgi_params");
        }
      }
    }
  }

  // bool use_canvas = 11;
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        11, this_._internal_use_canvas(), target);
  }

  // bool use_image_generation = 12;
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        12, this_._internal_use_image_generation(), target);
  }

  // .lens.ModelMode model_mode = 13;
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        13, this_._internal_model_mode(), target);
  }

  // repeated .lens.ContextTurnMetadata context_turn_metadata = 14;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_context_turn_metadata_size());
         i < n; i++) {
      const auto& repfield = this_._internal_context_turn_metadata().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              14, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // .lens.ToolMode tool_mode = 15;
  if (CheckHasBit(cached_has_bits, 0x00000200U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        15, this_._internal_tool_mode(), target);
  }

  // repeated string expired_lens_ids = 17;
  if (CheckHasBit(cached_has_bits, 0x00000800U)) {
    for (int i = 0, n = this_._internal_expired_lens_ids_size(); i < n; ++i) {
      const auto& s = this_._internal_expired_lens_ids().Get(i);
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "lens.QueryPayload.expired_lens_ids");
      target = stream->WriteString(17, s, 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:lens.QueryPayload)
  return target;
}

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

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += ::absl::popcount(0x000000e0U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // repeated .lens.LensImageQueryData lens_image_query_data = 2;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_lens_image_query_data_size();
      for (const auto& msg : this_._internal_lens_image_query_data()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .lens.ContextTurnMetadata context_turn_metadata = 14;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1UL * this_._internal_context_turn_metadata_size();
      for (const auto& msg : this_._internal_context_turn_metadata()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // string query_text = 1;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_query_text());
    }
    // .lens.AddedInputs added_inputs = 8;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.added_inputs_);
    }
    // .lens.QueryPayload.QueryTextSource query_text_source = 3;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_query_text_source());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) {
    // .lens.ModelMode model_mode = 13;
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_model_mode());
    }
    // .lens.ToolMode tool_mode = 15;
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_tool_mode());
    }
    // map<string, string> cgi_params = 9;
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_cgi_params_size());
      for (const auto& entry : this_._internal_cgi_params()) {
        total_size += _pbi::MapEntryFuncs<::std::string, ::std::string,
                                       _pbi::WireFormatLite::TYPE_STRING,
                                       _pbi::WireFormatLite::TYPE_STRING>::ByteSizeLong(entry.first, entry.second);
      }
    }
    // repeated string expired_lens_ids = 17;
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      total_size +=
          2 * ::google::protobuf::internal::FromIntSize(this_._internal_expired_lens_ids().size());
      for (int i = 0, n = this_._internal_expired_lens_ids().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_expired_lens_ids().Get(i));
      }
    }
  }
  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 QueryPayload::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<QueryPayload*>(&to_msg);
  auto& from = static_cast<const QueryPayload&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:lens.QueryPayload)
  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_lens_image_query_data()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_lens_image_query_data());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_context_turn_metadata()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_context_turn_metadata());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_query_text(from._internal_query_text());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.added_inputs_ != nullptr);
      if (_this->_impl_.added_inputs_ == nullptr) {
        _this->_impl_.added_inputs_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.added_inputs_);
      } else {
        _this->_impl_.added_inputs_->MergeFrom(*from._impl_.added_inputs_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.query_text_source_ = from._impl_.query_text_source_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.use_research_agent_ = from._impl_.use_research_agent_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.use_canvas_ = from._impl_.use_canvas_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.use_image_generation_ = from._impl_.use_image_generation_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000f00U)) {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      _this->_impl_.model_mode_ = from._impl_.model_mode_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      _this->_impl_.tool_mode_ = from._impl_.tool_mode_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      _this->_impl_.cgi_params_.MergeFrom(from._impl_.cgi_params_);
    }
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      _this->_internal_mutable_expired_lens_ids()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_expired_lens_ids());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

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


void QueryPayload::InternalSwap(QueryPayload* 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_.lens_image_query_data_.InternalSwap(&other->_impl_.lens_image_query_data_);
  _impl_.context_turn_metadata_.InternalSwap(&other->_impl_.context_turn_metadata_);
  _impl_.query_text_.InternalSwap(&_impl_.query_text_, &other->_impl_.query_text_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.tool_mode_)
      + sizeof(QueryPayload::_impl_.tool_mode_)
      - PROTOBUF_FIELD_OFFSET(QueryPayload, _impl_.added_inputs_)>(
          reinterpret_cast<char*>(&_impl_.added_inputs_),
          reinterpret_cast<char*>(&other->_impl_.added_inputs_));
  _impl_.cgi_params_.InternalSwap(&other->_impl_.cgi_params_);
  _impl_.expired_lens_ids_.InternalSwap(&other->_impl_.expired_lens_ids_);
}

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