| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: tulip.proto
- #include "tulip.pb.h"
- #include <algorithm>
- #include "google/protobuf/io/coded_stream.h"
- #include "google/protobuf/extension_set.h"
- #include "google/protobuf/wire_format_lite.h"
- #include "google/protobuf/descriptor.h"
- #include "google/protobuf/generated_message_reflection.h"
- #include "google/protobuf/reflection_ops.h"
- #include "google/protobuf/wire_format.h"
- #include "google/protobuf/generated_message_tctable_impl.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 mint {
- namespace tulip {
- namespace v1 {
- template <typename>
- PROTOBUF_CONSTEXPR SearchRequest_Page::SearchRequest_Page(::_pbi::ConstantInitialized)
- : _impl_{
- /*decltype(_impl_.index_)*/ 0,
- /*decltype(_impl_.size_)*/ 0,
- /*decltype(_impl_._cached_size_)*/ {},
- } {}
- struct SearchRequest_PageDefaultTypeInternal {
- PROTOBUF_CONSTEXPR SearchRequest_PageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
- ~SearchRequest_PageDefaultTypeInternal() {}
- union {
- SearchRequest_Page _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRequest_PageDefaultTypeInternal _SearchRequest_Page_default_instance_;
- template <typename>
- PROTOBUF_CONSTEXPR SearchRequest::SearchRequest(::_pbi::ConstantInitialized)
- : _impl_{
- /*decltype(_impl_._has_bits_)*/ {},
- /*decltype(_impl_._cached_size_)*/ {},
- /*decltype(_impl_.keywords_)*/ {},
- /*decltype(_impl_.page_)*/ nullptr,
- /*decltype(_impl_.book_)*/ 0,
- } {}
- struct SearchRequestDefaultTypeInternal {
- PROTOBUF_CONSTEXPR SearchRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
- ~SearchRequestDefaultTypeInternal() {}
- union {
- SearchRequest _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRequestDefaultTypeInternal _SearchRequest_default_instance_;
- template <typename>
- PROTOBUF_CONSTEXPR SearchResponse_Item::SearchResponse_Item(::_pbi::ConstantInitialized)
- : _impl_{
- /*decltype(_impl_.highlight_)*/ {
- &::_pbi::fixed_address_empty_string,
- ::_pbi::ConstantInitialized{},
- },
- /*decltype(_impl_.content_)*/ {
- &::_pbi::fixed_address_empty_string,
- ::_pbi::ConstantInitialized{},
- },
- /*decltype(_impl_.rank_)*/ 0,
- /*decltype(_impl_.book_)*/ 0,
- /*decltype(_impl_.paragraph_)*/ 0,
- /*decltype(_impl_._cached_size_)*/ {},
- } {}
- struct SearchResponse_ItemDefaultTypeInternal {
- PROTOBUF_CONSTEXPR SearchResponse_ItemDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
- ~SearchResponse_ItemDefaultTypeInternal() {}
- union {
- SearchResponse_Item _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResponse_ItemDefaultTypeInternal _SearchResponse_Item_default_instance_;
- template <typename>
- PROTOBUF_CONSTEXPR SearchResponse::SearchResponse(::_pbi::ConstantInitialized)
- : _impl_{
- /*decltype(_impl_._has_bits_)*/ {},
- /*decltype(_impl_._cached_size_)*/ {},
- /*decltype(_impl_.items_)*/ {},
- /*decltype(_impl_.page_)*/ nullptr,
- /*decltype(_impl_.total_)*/ 0,
- } {}
- struct SearchResponseDefaultTypeInternal {
- PROTOBUF_CONSTEXPR SearchResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
- ~SearchResponseDefaultTypeInternal() {}
- union {
- SearchResponse _instance;
- };
- };
- PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResponseDefaultTypeInternal _SearchResponse_default_instance_;
- } // namespace v1
- } // namespace tulip
- } // namespace mint
- static ::_pb::Metadata file_level_metadata_tulip_2eproto[4];
- static constexpr const ::_pb::EnumDescriptor**
- file_level_enum_descriptors_tulip_2eproto = nullptr;
- static constexpr const ::_pb::ServiceDescriptor**
- file_level_service_descriptors_tulip_2eproto = nullptr;
- const ::uint32_t TableStruct_tulip_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
- protodesc_cold) = {
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ~0u, // no _split_
- ~0u, // no sizeof(Split)
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _impl_.index_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _impl_.size_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_._has_bits_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ~0u, // no _split_
- ~0u, // no sizeof(Split)
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.keywords_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.book_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.page_),
- ~0u,
- ~0u,
- 0,
- ~0u, // no _has_bits_
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ~0u, // no _split_
- ~0u, // no sizeof(Split)
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.rank_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.highlight_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.book_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.paragraph_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.content_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_._has_bits_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- ~0u, // no _inlined_string_donated_
- ~0u, // no _split_
- ~0u, // no sizeof(Split)
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.items_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.page_),
- PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.total_),
- ~0u,
- 0,
- ~0u,
- };
- static const ::_pbi::MigrationSchema
- schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- {0, -1, -1, sizeof(::mint::tulip::v1::SearchRequest_Page)},
- {10, 21, -1, sizeof(::mint::tulip::v1::SearchRequest)},
- {24, -1, -1, sizeof(::mint::tulip::v1::SearchResponse_Item)},
- {37, 48, -1, sizeof(::mint::tulip::v1::SearchResponse)},
- };
- static const ::_pb::Message* const file_default_instances[] = {
- &::mint::tulip::v1::_SearchRequest_Page_default_instance_._instance,
- &::mint::tulip::v1::_SearchRequest_default_instance_._instance,
- &::mint::tulip::v1::_SearchResponse_Item_default_instance_._instance,
- &::mint::tulip::v1::_SearchResponse_default_instance_._instance,
- };
- const char descriptor_table_protodef_tulip_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
- "\n\013tulip.proto\022\rmint.tulip.v1\"\223\001\n\rSearchR"
- "equest\022\020\n\010keywords\030\001 \003(\t\022\014\n\004book\030\002 \001(\005\0224"
- "\n\004page\030c \001(\0132!.mint.tulip.v1.SearchReque"
- "st.PageH\000\210\001\001\032#\n\004Page\022\r\n\005index\030\001 \001(\005\022\014\n\004s"
- "ize\030\002 \001(\005B\007\n\005_page\"\336\001\n\016SearchResponse\0221\n"
- "\005items\030\001 \003(\0132\".mint.tulip.v1.SearchRespo"
- "nse.Item\022/\n\004page\030b \001(\0132!.mint.tulip.v1.S"
- "earchRequest.Page\022\r\n\005total\030c \001(\005\032Y\n\004Item"
- "\022\014\n\004rank\030\001 \001(\005\022\021\n\thighlight\030\002 \001(\t\022\014\n\004boo"
- "k\030\003 \001(\005\022\021\n\tparagraph\030\004 \001(\005\022\017\n\007content\030\005 "
- "\001(\t2O\n\006Search\022E\n\004Pali\022\034.mint.tulip.v1.Se"
- "archRequest\032\035.mint.tulip.v1.SearchRespon"
- "se\"\000B2\n.com.github.iapt_platform.mint.pl"
- "ugins.tulip.v1P\001b\006proto3"
- };
- static ::absl::once_flag descriptor_table_tulip_2eproto_once;
- const ::_pbi::DescriptorTable descriptor_table_tulip_2eproto = {
- false,
- false,
- 544,
- descriptor_table_protodef_tulip_2eproto,
- "tulip.proto",
- &descriptor_table_tulip_2eproto_once,
- nullptr,
- 0,
- 4,
- schemas,
- file_default_instances,
- TableStruct_tulip_2eproto::offsets,
- file_level_metadata_tulip_2eproto,
- file_level_enum_descriptors_tulip_2eproto,
- file_level_service_descriptors_tulip_2eproto,
- };
- // This function exists to be marked as weak.
- // It can significantly speed up compilation by breaking up LLVM's SCC
- // in the .pb.cc translation units. Large translation units see a
- // reduction of more than 35% of walltime for optimized builds. Without
- // the weak attribute all the messages in the file, including all the
- // vtables and everything they use become part of the same SCC through
- // a cycle like:
- // GetMetadata -> descriptor table -> default instances ->
- // vtables -> GetMetadata
- // By adding a weak function here we break the connection from the
- // individual vtables back into the descriptor table.
- PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_tulip_2eproto_getter() {
- return &descriptor_table_tulip_2eproto;
- }
- // Force running AddDescriptors() at dynamic initialization time.
- PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
- static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_tulip_2eproto(&descriptor_table_tulip_2eproto);
- namespace mint {
- namespace tulip {
- namespace v1 {
- // ===================================================================
- class SearchRequest_Page::_Internal {
- public:
- };
- SearchRequest_Page::SearchRequest_Page(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(arena) {
- SharedCtor(arena);
- // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchRequest.Page)
- }
- SearchRequest_Page::SearchRequest_Page(const SearchRequest_Page& from)
- : ::google::protobuf::Message(), _impl_(from._impl_) {
- _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
- from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchRequest.Page)
- }
- inline void SearchRequest_Page::SharedCtor(::_pb::Arena* arena) {
- (void)arena;
- new (&_impl_) Impl_{
- decltype(_impl_.index_){0},
- decltype(_impl_.size_){0},
- /*decltype(_impl_._cached_size_)*/ {},
- };
- }
- SearchRequest_Page::~SearchRequest_Page() {
- // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchRequest.Page)
- _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
- SharedDtor();
- }
- inline void SearchRequest_Page::SharedDtor() {
- ABSL_DCHECK(GetArenaForAllocation() == nullptr);
- }
- void SearchRequest_Page::SetCachedSize(int size) const {
- _impl_._cached_size_.Set(size);
- }
- PROTOBUF_NOINLINE void SearchRequest_Page::Clear() {
- // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchRequest.Page)
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- ::memset(&_impl_.index_, 0, static_cast<::size_t>(
- reinterpret_cast<char*>(&_impl_.size_) -
- reinterpret_cast<char*>(&_impl_.index_)) + sizeof(_impl_.size_));
- _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
- }
- const char* SearchRequest_Page::_InternalParse(
- const char* ptr, ::_pbi::ParseContext* ctx) {
- ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
- return ptr;
- }
- PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
- const ::_pbi::TcParseTable<1, 2, 0, 0, 2> SearchRequest_Page::_table_ = {
- {
- 0, // no _has_bits_
- 0, // no _extensions_
- 2, 8, // max_field_number, fast_idx_mask
- offsetof(decltype(_table_), field_lookup_table),
- 4294967292, // skipmap
- offsetof(decltype(_table_), field_entries),
- 2, // num_field_entries
- 0, // num_aux_entries
- offsetof(decltype(_table_), field_names), // no aux_entries
- &_SearchRequest_Page_default_instance_._instance,
- ::_pbi::TcParser::GenericFallback, // fallback
- }, {{
- // int32 size = 2;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest_Page, _impl_.size_), 63>(),
- {16, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_)}},
- // int32 index = 1;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest_Page, _impl_.index_), 63>(),
- {8, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_)}},
- }}, {{
- 65535, 65535
- }}, {{
- // int32 index = 1;
- {PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- // int32 size = 2;
- {PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- }},
- // no aux_entries
- {{
- }},
- };
- ::uint8_t* SearchRequest_Page::_InternalSerialize(
- ::uint8_t* target,
- ::google::protobuf::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchRequest.Page)
- ::uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
- // int32 index = 1;
- if (this->_internal_index() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<1>(
- stream, this->_internal_index(), target);
- }
- // int32 size = 2;
- if (this->_internal_size() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<2>(
- stream, this->_internal_size(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target =
- ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchRequest.Page)
- return target;
- }
- ::size_t SearchRequest_Page::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchRequest.Page)
- ::size_t total_size = 0;
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // int32 index = 1;
- if (this->_internal_index() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_index());
- }
- // int32 size = 2;
- if (this->_internal_size() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_size());
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
- }
- const ::google::protobuf::Message::ClassData SearchRequest_Page::_class_data_ = {
- ::google::protobuf::Message::CopyWithSourceCheck,
- SearchRequest_Page::MergeImpl
- };
- const ::google::protobuf::Message::ClassData*SearchRequest_Page::GetClassData() const { return &_class_data_; }
- void SearchRequest_Page::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
- auto* const _this = static_cast<SearchRequest_Page*>(&to_msg);
- auto& from = static_cast<const SearchRequest_Page&>(from_msg);
- // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchRequest.Page)
- ABSL_DCHECK_NE(&from, _this);
- ::uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- if (from._internal_index() != 0) {
- _this->_internal_set_index(from._internal_index());
- }
- if (from._internal_size() != 0) {
- _this->_internal_set_size(from._internal_size());
- }
- _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
- }
- void SearchRequest_Page::CopyFrom(const SearchRequest_Page& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchRequest.Page)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- PROTOBUF_NOINLINE bool SearchRequest_Page::IsInitialized() const {
- return true;
- }
- void SearchRequest_Page::InternalSwap(SearchRequest_Page* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::google::protobuf::internal::memswap<
- PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_)
- + sizeof(SearchRequest_Page::_impl_.size_)
- - PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_)>(
- reinterpret_cast<char*>(&_impl_.index_),
- reinterpret_cast<char*>(&other->_impl_.index_));
- }
- ::google::protobuf::Metadata SearchRequest_Page::GetMetadata() const {
- return ::_pbi::AssignDescriptors(
- &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
- file_level_metadata_tulip_2eproto[0]);
- }
- // ===================================================================
- class SearchRequest::_Internal {
- public:
- using HasBits = decltype(std::declval<SearchRequest>()._impl_._has_bits_);
- static constexpr ::int32_t kHasBitsOffset =
- 8 * PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_._has_bits_);
- static const ::mint::tulip::v1::SearchRequest_Page& page(const SearchRequest* msg);
- static void set_has_page(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- const ::mint::tulip::v1::SearchRequest_Page& SearchRequest::_Internal::page(const SearchRequest* msg) {
- return *msg->_impl_.page_;
- }
- SearchRequest::SearchRequest(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(arena) {
- SharedCtor(arena);
- // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchRequest)
- }
- SearchRequest::SearchRequest(const SearchRequest& from) : ::google::protobuf::Message() {
- SearchRequest* const _this = this;
- (void)_this;
- new (&_impl_) Impl_{
- decltype(_impl_._has_bits_){from._impl_._has_bits_},
- /*decltype(_impl_._cached_size_)*/ {},
- decltype(_impl_.keywords_){from._impl_.keywords_},
- decltype(_impl_.page_){nullptr},
- decltype(_impl_.book_){},
- };
- _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
- from._internal_metadata_);
- if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
- _this->_impl_.page_ = new ::mint::tulip::v1::SearchRequest_Page(*from._impl_.page_);
- }
- _this->_impl_.book_ = from._impl_.book_;
- // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchRequest)
- }
- inline void SearchRequest::SharedCtor(::_pb::Arena* arena) {
- (void)arena;
- new (&_impl_) Impl_{
- decltype(_impl_._has_bits_){},
- /*decltype(_impl_._cached_size_)*/ {},
- decltype(_impl_.keywords_){arena},
- decltype(_impl_.page_){nullptr},
- decltype(_impl_.book_){0},
- };
- }
- SearchRequest::~SearchRequest() {
- // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchRequest)
- _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
- SharedDtor();
- }
- inline void SearchRequest::SharedDtor() {
- ABSL_DCHECK(GetArenaForAllocation() == nullptr);
- _internal_mutable_keywords()->~RepeatedPtrField();
- if (this != internal_default_instance()) delete _impl_.page_;
- }
- void SearchRequest::SetCachedSize(int size) const {
- _impl_._cached_size_.Set(size);
- }
- PROTOBUF_NOINLINE void SearchRequest::Clear() {
- // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchRequest)
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- _internal_mutable_keywords()->Clear();
- cached_has_bits = _impl_._has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- ABSL_DCHECK(_impl_.page_ != nullptr);
- _impl_.page_->Clear();
- }
- _impl_.book_ = 0;
- _impl_._has_bits_.Clear();
- _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
- }
- const char* SearchRequest::_InternalParse(
- const char* ptr, ::_pbi::ParseContext* ctx) {
- ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
- return ptr;
- }
- PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
- const ::_pbi::TcParseTable<2, 3, 1, 44, 7> SearchRequest::_table_ = {
- {
- PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_._has_bits_),
- 0, // no _extensions_
- 99, 24, // max_field_number, fast_idx_mask
- offsetof(decltype(_table_), field_lookup_table),
- 4294967292, // skipmap
- offsetof(decltype(_table_), field_entries),
- 3, // num_field_entries
- 1, // num_aux_entries
- offsetof(decltype(_table_), aux_entries),
- &_SearchRequest_default_instance_._instance,
- ::_pbi::TcParser::GenericFallback, // fallback
- }, {{
- {::_pbi::TcParser::MiniParse, {}},
- // repeated string keywords = 1;
- {::_pbi::TcParser::FastUR1,
- {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.keywords_)}},
- // int32 book = 2;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest, _impl_.book_), 63>(),
- {16, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_)}},
- // optional .mint.tulip.v1.SearchRequest.Page page = 99;
- {::_pbi::TcParser::FastMtS2,
- {1690, 0, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_)}},
- }}, {{
- 99, 0, 1,
- 65534, 2,
- 65535, 65535
- }}, {{
- // repeated string keywords = 1;
- {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.keywords_), -1, 0,
- (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
- // int32 book = 2;
- {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_), -1, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- // optional .mint.tulip.v1.SearchRequest.Page page = 99;
- {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_), _Internal::kHasBitsOffset + 0, 0,
- (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
- }}, {{
- {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchRequest_Page>()},
- }}, {{
- "\33\10\0\0\0\0\0\0"
- "mint.tulip.v1.SearchRequest"
- "keywords"
- }},
- };
- ::uint8_t* SearchRequest::_InternalSerialize(
- ::uint8_t* target,
- ::google::protobuf::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchRequest)
- ::uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
- // repeated string keywords = 1;
- for (int i = 0, n = this->_internal_keywords_size(); i < n; ++i) {
- const auto& s = this->_internal_keywords().Get(i);
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchRequest.keywords");
- target = stream->WriteString(1, s, target);
- }
- // int32 book = 2;
- if (this->_internal_book() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<2>(
- stream, this->_internal_book(), target);
- }
- cached_has_bits = _impl_._has_bits_[0];
- // optional .mint.tulip.v1.SearchRequest.Page page = 99;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessage(99, _Internal::page(this),
- _Internal::page(this).GetCachedSize(), target, stream);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target =
- ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchRequest)
- return target;
- }
- ::size_t SearchRequest::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchRequest)
- ::size_t total_size = 0;
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated string keywords = 1;
- total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_keywords().size());
- for (int i = 0, n = _internal_keywords().size(); i < n; ++i) {
- total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
- _internal_keywords().Get(i));
- }
- // optional .mint.tulip.v1.SearchRequest.Page page = 99;
- cached_has_bits = _impl_._has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *_impl_.page_);
- }
- // int32 book = 2;
- if (this->_internal_book() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_book());
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
- }
- const ::google::protobuf::Message::ClassData SearchRequest::_class_data_ = {
- ::google::protobuf::Message::CopyWithSourceCheck,
- SearchRequest::MergeImpl
- };
- const ::google::protobuf::Message::ClassData*SearchRequest::GetClassData() const { return &_class_data_; }
- void SearchRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
- auto* const _this = static_cast<SearchRequest*>(&to_msg);
- auto& from = static_cast<const SearchRequest&>(from_msg);
- // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchRequest)
- ABSL_DCHECK_NE(&from, _this);
- ::uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- _this->_internal_mutable_keywords()->MergeFrom(from._internal_keywords());
- if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
- _this->_internal_mutable_page()->::mint::tulip::v1::SearchRequest_Page::MergeFrom(
- from._internal_page());
- }
- if (from._internal_book() != 0) {
- _this->_internal_set_book(from._internal_book());
- }
- _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
- }
- void SearchRequest::CopyFrom(const SearchRequest& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchRequest)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- PROTOBUF_NOINLINE bool SearchRequest::IsInitialized() const {
- return true;
- }
- void SearchRequest::InternalSwap(SearchRequest* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
- _impl_.keywords_.InternalSwap(&other->_impl_.keywords_);
- ::google::protobuf::internal::memswap<
- PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_)
- + sizeof(SearchRequest::_impl_.book_)
- - PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_)>(
- reinterpret_cast<char*>(&_impl_.page_),
- reinterpret_cast<char*>(&other->_impl_.page_));
- }
- ::google::protobuf::Metadata SearchRequest::GetMetadata() const {
- return ::_pbi::AssignDescriptors(
- &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
- file_level_metadata_tulip_2eproto[1]);
- }
- // ===================================================================
- class SearchResponse_Item::_Internal {
- public:
- };
- SearchResponse_Item::SearchResponse_Item(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(arena) {
- SharedCtor(arena);
- // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchResponse.Item)
- }
- SearchResponse_Item::SearchResponse_Item(const SearchResponse_Item& from) : ::google::protobuf::Message() {
- SearchResponse_Item* const _this = this;
- (void)_this;
- new (&_impl_) Impl_{
- decltype(_impl_.highlight_){},
- decltype(_impl_.content_){},
- decltype(_impl_.rank_){},
- decltype(_impl_.book_){},
- decltype(_impl_.paragraph_){},
- /*decltype(_impl_._cached_size_)*/ {},
- };
- _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
- from._internal_metadata_);
- _impl_.highlight_.InitDefault();
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- _impl_.highlight_.Set("", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (!from._internal_highlight().empty()) {
- _this->_impl_.highlight_.Set(from._internal_highlight(), _this->GetArenaForAllocation());
- }
- _impl_.content_.InitDefault();
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- _impl_.content_.Set("", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- if (!from._internal_content().empty()) {
- _this->_impl_.content_.Set(from._internal_content(), _this->GetArenaForAllocation());
- }
- ::memcpy(&_impl_.rank_, &from._impl_.rank_,
- static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.paragraph_) -
- reinterpret_cast<char*>(&_impl_.rank_)) + sizeof(_impl_.paragraph_));
- // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchResponse.Item)
- }
- inline void SearchResponse_Item::SharedCtor(::_pb::Arena* arena) {
- (void)arena;
- new (&_impl_) Impl_{
- decltype(_impl_.highlight_){},
- decltype(_impl_.content_){},
- decltype(_impl_.rank_){0},
- decltype(_impl_.book_){0},
- decltype(_impl_.paragraph_){0},
- /*decltype(_impl_._cached_size_)*/ {},
- };
- _impl_.highlight_.InitDefault();
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- _impl_.highlight_.Set("", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- _impl_.content_.InitDefault();
- #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
- _impl_.content_.Set("", GetArenaForAllocation());
- #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
- }
- SearchResponse_Item::~SearchResponse_Item() {
- // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchResponse.Item)
- _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
- SharedDtor();
- }
- inline void SearchResponse_Item::SharedDtor() {
- ABSL_DCHECK(GetArenaForAllocation() == nullptr);
- _impl_.highlight_.Destroy();
- _impl_.content_.Destroy();
- }
- void SearchResponse_Item::SetCachedSize(int size) const {
- _impl_._cached_size_.Set(size);
- }
- PROTOBUF_NOINLINE void SearchResponse_Item::Clear() {
- // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchResponse.Item)
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- _impl_.highlight_.ClearToEmpty();
- _impl_.content_.ClearToEmpty();
- ::memset(&_impl_.rank_, 0, static_cast<::size_t>(
- reinterpret_cast<char*>(&_impl_.paragraph_) -
- reinterpret_cast<char*>(&_impl_.rank_)) + sizeof(_impl_.paragraph_));
- _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
- }
- const char* SearchResponse_Item::_InternalParse(
- const char* ptr, ::_pbi::ParseContext* ctx) {
- ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
- return ptr;
- }
- PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
- const ::_pbi::TcParseTable<3, 5, 0, 58, 2> SearchResponse_Item::_table_ = {
- {
- 0, // no _has_bits_
- 0, // no _extensions_
- 5, 56, // max_field_number, fast_idx_mask
- offsetof(decltype(_table_), field_lookup_table),
- 4294967264, // skipmap
- offsetof(decltype(_table_), field_entries),
- 5, // num_field_entries
- 0, // num_aux_entries
- offsetof(decltype(_table_), field_names), // no aux_entries
- &_SearchResponse_Item_default_instance_._instance,
- ::_pbi::TcParser::GenericFallback, // fallback
- }, {{
- {::_pbi::TcParser::MiniParse, {}},
- // int32 rank = 1;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.rank_), 63>(),
- {8, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_)}},
- // string highlight = 2;
- {::_pbi::TcParser::FastUS1,
- {18, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.highlight_)}},
- // int32 book = 3;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.book_), 63>(),
- {24, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.book_)}},
- // int32 paragraph = 4;
- {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.paragraph_), 63>(),
- {32, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_)}},
- // string content = 5;
- {::_pbi::TcParser::FastUS1,
- {42, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.content_)}},
- {::_pbi::TcParser::MiniParse, {}},
- {::_pbi::TcParser::MiniParse, {}},
- }}, {{
- 65535, 65535
- }}, {{
- // int32 rank = 1;
- {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- // string highlight = 2;
- {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.highlight_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
- // int32 book = 3;
- {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.book_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- // int32 paragraph = 4;
- {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- // string content = 5;
- {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.content_), 0, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
- }},
- // no aux_entries
- {{
- "\41\0\11\0\0\7\0\0"
- "mint.tulip.v1.SearchResponse.Item"
- "highlight"
- "content"
- }},
- };
- ::uint8_t* SearchResponse_Item::_InternalSerialize(
- ::uint8_t* target,
- ::google::protobuf::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchResponse.Item)
- ::uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
- // int32 rank = 1;
- if (this->_internal_rank() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<1>(
- stream, this->_internal_rank(), target);
- }
- // string highlight = 2;
- if (!this->_internal_highlight().empty()) {
- const std::string& _s = this->_internal_highlight();
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchResponse.Item.highlight");
- target = stream->WriteStringMaybeAliased(2, _s, target);
- }
- // int32 book = 3;
- if (this->_internal_book() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<3>(
- stream, this->_internal_book(), target);
- }
- // int32 paragraph = 4;
- if (this->_internal_paragraph() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArrayWithField<4>(
- stream, this->_internal_paragraph(), target);
- }
- // string content = 5;
- if (!this->_internal_content().empty()) {
- const std::string& _s = this->_internal_content();
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchResponse.Item.content");
- target = stream->WriteStringMaybeAliased(5, _s, target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target =
- ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchResponse.Item)
- return target;
- }
- ::size_t SearchResponse_Item::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchResponse.Item)
- ::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 highlight = 2;
- if (!this->_internal_highlight().empty()) {
- total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
- this->_internal_highlight());
- }
- // string content = 5;
- if (!this->_internal_content().empty()) {
- total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
- this->_internal_content());
- }
- // int32 rank = 1;
- if (this->_internal_rank() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_rank());
- }
- // int32 book = 3;
- if (this->_internal_book() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_book());
- }
- // int32 paragraph = 4;
- if (this->_internal_paragraph() != 0) {
- total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
- this->_internal_paragraph());
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
- }
- const ::google::protobuf::Message::ClassData SearchResponse_Item::_class_data_ = {
- ::google::protobuf::Message::CopyWithSourceCheck,
- SearchResponse_Item::MergeImpl
- };
- const ::google::protobuf::Message::ClassData*SearchResponse_Item::GetClassData() const { return &_class_data_; }
- void SearchResponse_Item::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
- auto* const _this = static_cast<SearchResponse_Item*>(&to_msg);
- auto& from = static_cast<const SearchResponse_Item&>(from_msg);
- // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchResponse.Item)
- ABSL_DCHECK_NE(&from, _this);
- ::uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- if (!from._internal_highlight().empty()) {
- _this->_internal_set_highlight(from._internal_highlight());
- }
- if (!from._internal_content().empty()) {
- _this->_internal_set_content(from._internal_content());
- }
- if (from._internal_rank() != 0) {
- _this->_internal_set_rank(from._internal_rank());
- }
- if (from._internal_book() != 0) {
- _this->_internal_set_book(from._internal_book());
- }
- if (from._internal_paragraph() != 0) {
- _this->_internal_set_paragraph(from._internal_paragraph());
- }
- _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
- }
- void SearchResponse_Item::CopyFrom(const SearchResponse_Item& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchResponse.Item)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- PROTOBUF_NOINLINE bool SearchResponse_Item::IsInitialized() const {
- return true;
- }
- void SearchResponse_Item::InternalSwap(SearchResponse_Item* other) {
- using std::swap;
- auto* lhs_arena = GetArenaForAllocation();
- auto* rhs_arena = other->GetArenaForAllocation();
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.highlight_, lhs_arena,
- &other->_impl_.highlight_, rhs_arena);
- ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.content_, lhs_arena,
- &other->_impl_.content_, rhs_arena);
- ::google::protobuf::internal::memswap<
- PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_)
- + sizeof(SearchResponse_Item::_impl_.paragraph_)
- - PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_)>(
- reinterpret_cast<char*>(&_impl_.rank_),
- reinterpret_cast<char*>(&other->_impl_.rank_));
- }
- ::google::protobuf::Metadata SearchResponse_Item::GetMetadata() const {
- return ::_pbi::AssignDescriptors(
- &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
- file_level_metadata_tulip_2eproto[2]);
- }
- // ===================================================================
- class SearchResponse::_Internal {
- public:
- using HasBits = decltype(std::declval<SearchResponse>()._impl_._has_bits_);
- static constexpr ::int32_t kHasBitsOffset =
- 8 * PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_._has_bits_);
- static const ::mint::tulip::v1::SearchRequest_Page& page(const SearchResponse* msg);
- static void set_has_page(HasBits* has_bits) {
- (*has_bits)[0] |= 1u;
- }
- };
- const ::mint::tulip::v1::SearchRequest_Page& SearchResponse::_Internal::page(const SearchResponse* msg) {
- return *msg->_impl_.page_;
- }
- SearchResponse::SearchResponse(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(arena) {
- SharedCtor(arena);
- // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchResponse)
- }
- SearchResponse::SearchResponse(const SearchResponse& from) : ::google::protobuf::Message() {
- SearchResponse* const _this = this;
- (void)_this;
- new (&_impl_) Impl_{
- decltype(_impl_._has_bits_){from._impl_._has_bits_},
- /*decltype(_impl_._cached_size_)*/ {},
- decltype(_impl_.items_){from._impl_.items_},
- decltype(_impl_.page_){nullptr},
- decltype(_impl_.total_){},
- };
- _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
- from._internal_metadata_);
- if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
- _this->_impl_.page_ = new ::mint::tulip::v1::SearchRequest_Page(*from._impl_.page_);
- }
- _this->_impl_.total_ = from._impl_.total_;
- // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchResponse)
- }
- inline void SearchResponse::SharedCtor(::_pb::Arena* arena) {
- (void)arena;
- new (&_impl_) Impl_{
- decltype(_impl_._has_bits_){},
- /*decltype(_impl_._cached_size_)*/ {},
- decltype(_impl_.items_){arena},
- decltype(_impl_.page_){nullptr},
- decltype(_impl_.total_){0},
- };
- }
- SearchResponse::~SearchResponse() {
- // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchResponse)
- _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
- SharedDtor();
- }
- inline void SearchResponse::SharedDtor() {
- ABSL_DCHECK(GetArenaForAllocation() == nullptr);
- _impl_.items_.~RepeatedPtrField();
- if (this != internal_default_instance()) delete _impl_.page_;
- }
- void SearchResponse::SetCachedSize(int size) const {
- _impl_._cached_size_.Set(size);
- }
- PROTOBUF_NOINLINE void SearchResponse::Clear() {
- // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchResponse)
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- _internal_mutable_items()->Clear();
- cached_has_bits = _impl_._has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- ABSL_DCHECK(_impl_.page_ != nullptr);
- _impl_.page_->Clear();
- }
- _impl_.total_ = 0;
- _impl_._has_bits_.Clear();
- _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
- }
- const char* SearchResponse::_InternalParse(
- const char* ptr, ::_pbi::ParseContext* ctx) {
- ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
- return ptr;
- }
- PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
- const ::_pbi::TcParseTable<2, 3, 2, 0, 7> SearchResponse::_table_ = {
- {
- PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_._has_bits_),
- 0, // no _extensions_
- 99, 24, // max_field_number, fast_idx_mask
- offsetof(decltype(_table_), field_lookup_table),
- 4294967294, // skipmap
- offsetof(decltype(_table_), field_entries),
- 3, // num_field_entries
- 2, // num_aux_entries
- offsetof(decltype(_table_), aux_entries),
- &_SearchResponse_default_instance_._instance,
- ::_pbi::TcParser::GenericFallback, // fallback
- }, {{
- {::_pbi::TcParser::MiniParse, {}},
- // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
- {::_pbi::TcParser::FastMtR1,
- {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.items_)}},
- // .mint.tulip.v1.SearchRequest.Page page = 98;
- {::_pbi::TcParser::FastMtS2,
- {1682, 0, 1, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_)}},
- // int32 total = 99;
- {::_pbi::TcParser::FastV32S2,
- {1688, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_)}},
- }}, {{
- 98, 0, 1,
- 65532, 1,
- 65535, 65535
- }}, {{
- // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
- {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.items_), -1, 0,
- (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
- // .mint.tulip.v1.SearchRequest.Page page = 98;
- {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_), _Internal::kHasBitsOffset + 0, 1,
- (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
- // int32 total = 99;
- {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_), -1, 0,
- (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
- }}, {{
- {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchResponse_Item>()},
- {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchRequest_Page>()},
- }}, {{
- }},
- };
- ::uint8_t* SearchResponse::_InternalSerialize(
- ::uint8_t* target,
- ::google::protobuf::io::EpsCopyOutputStream* stream) const {
- // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchResponse)
- ::uint32_t cached_has_bits = 0;
- (void)cached_has_bits;
- // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
- for (unsigned i = 0,
- n = static_cast<unsigned>(this->_internal_items_size()); i < n; i++) {
- const auto& repfield = this->_internal_items().Get(i);
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
- }
- cached_has_bits = _impl_._has_bits_[0];
- // .mint.tulip.v1.SearchRequest.Page page = 98;
- if (cached_has_bits & 0x00000001u) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessage(98, _Internal::page(this),
- _Internal::page(this).GetCachedSize(), target, stream);
- }
- // int32 total = 99;
- if (this->_internal_total() != 0) {
- target = stream->EnsureSpace(target);
- target = ::_pbi::WireFormatLite::WriteInt32ToArray(
- 99, this->_internal_total(), target);
- }
- if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
- target =
- ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
- _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
- }
- // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchResponse)
- return target;
- }
- ::size_t SearchResponse::ByteSizeLong() const {
- // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchResponse)
- ::size_t total_size = 0;
- ::uint32_t cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
- // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
- total_size += 1UL * this->_internal_items_size();
- for (const auto& msg : this->_internal_items()) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
- }
- // .mint.tulip.v1.SearchRequest.Page page = 98;
- cached_has_bits = _impl_._has_bits_[0];
- if (cached_has_bits & 0x00000001u) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *_impl_.page_);
- }
- // int32 total = 99;
- if (this->_internal_total() != 0) {
- total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
- this->_internal_total());
- }
- return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
- }
- const ::google::protobuf::Message::ClassData SearchResponse::_class_data_ = {
- ::google::protobuf::Message::CopyWithSourceCheck,
- SearchResponse::MergeImpl
- };
- const ::google::protobuf::Message::ClassData*SearchResponse::GetClassData() const { return &_class_data_; }
- void SearchResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
- auto* const _this = static_cast<SearchResponse*>(&to_msg);
- auto& from = static_cast<const SearchResponse&>(from_msg);
- // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchResponse)
- ABSL_DCHECK_NE(&from, _this);
- ::uint32_t cached_has_bits = 0;
- (void) cached_has_bits;
- _this->_internal_mutable_items()->MergeFrom(from._internal_items());
- if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
- _this->_internal_mutable_page()->::mint::tulip::v1::SearchRequest_Page::MergeFrom(
- from._internal_page());
- }
- if (from._internal_total() != 0) {
- _this->_internal_set_total(from._internal_total());
- }
- _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
- }
- void SearchResponse::CopyFrom(const SearchResponse& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchResponse)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- PROTOBUF_NOINLINE bool SearchResponse::IsInitialized() const {
- return true;
- }
- void SearchResponse::InternalSwap(SearchResponse* other) {
- using std::swap;
- _internal_metadata_.InternalSwap(&other->_internal_metadata_);
- swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
- _impl_.items_.InternalSwap(&other->_impl_.items_);
- ::google::protobuf::internal::memswap<
- PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_)
- + sizeof(SearchResponse::_impl_.total_)
- - PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_)>(
- reinterpret_cast<char*>(&_impl_.page_),
- reinterpret_cast<char*>(&other->_impl_.page_));
- }
- ::google::protobuf::Metadata SearchResponse::GetMetadata() const {
- return ::_pbi::AssignDescriptors(
- &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
- file_level_metadata_tulip_2eproto[3]);
- }
- // @@protoc_insertion_point(namespace_scope)
- } // namespace v1
- } // namespace tulip
- } // namespace mint
- namespace google {
- namespace protobuf {
- } // namespace protobuf
- } // namespace google
- // @@protoc_insertion_point(global_scope)
- #include "google/protobuf/port_undef.inc"
|