tulip.pb.cc 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: tulip.proto
  3. #include "tulip.pb.h"
  4. #include <algorithm>
  5. #include "google/protobuf/io/coded_stream.h"
  6. #include "google/protobuf/extension_set.h"
  7. #include "google/protobuf/wire_format_lite.h"
  8. #include "google/protobuf/descriptor.h"
  9. #include "google/protobuf/generated_message_reflection.h"
  10. #include "google/protobuf/reflection_ops.h"
  11. #include "google/protobuf/wire_format.h"
  12. #include "google/protobuf/generated_message_tctable_impl.h"
  13. // @@protoc_insertion_point(includes)
  14. // Must be included last.
  15. #include "google/protobuf/port_def.inc"
  16. PROTOBUF_PRAGMA_INIT_SEG
  17. namespace _pb = ::google::protobuf;
  18. namespace _pbi = ::google::protobuf::internal;
  19. namespace _fl = ::google::protobuf::internal::field_layout;
  20. namespace mint {
  21. namespace tulip {
  22. namespace v1 {
  23. template <typename>
  24. PROTOBUF_CONSTEXPR SearchRequest_Page::SearchRequest_Page(::_pbi::ConstantInitialized)
  25. : _impl_{
  26. /*decltype(_impl_.index_)*/ 0,
  27. /*decltype(_impl_.size_)*/ 0,
  28. /*decltype(_impl_._cached_size_)*/ {},
  29. } {}
  30. struct SearchRequest_PageDefaultTypeInternal {
  31. PROTOBUF_CONSTEXPR SearchRequest_PageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  32. ~SearchRequest_PageDefaultTypeInternal() {}
  33. union {
  34. SearchRequest_Page _instance;
  35. };
  36. };
  37. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  38. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRequest_PageDefaultTypeInternal _SearchRequest_Page_default_instance_;
  39. template <typename>
  40. PROTOBUF_CONSTEXPR SearchRequest::SearchRequest(::_pbi::ConstantInitialized)
  41. : _impl_{
  42. /*decltype(_impl_._has_bits_)*/ {},
  43. /*decltype(_impl_._cached_size_)*/ {},
  44. /*decltype(_impl_.keywords_)*/ {},
  45. /*decltype(_impl_.page_)*/ nullptr,
  46. /*decltype(_impl_.book_)*/ 0,
  47. } {}
  48. struct SearchRequestDefaultTypeInternal {
  49. PROTOBUF_CONSTEXPR SearchRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  50. ~SearchRequestDefaultTypeInternal() {}
  51. union {
  52. SearchRequest _instance;
  53. };
  54. };
  55. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  56. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchRequestDefaultTypeInternal _SearchRequest_default_instance_;
  57. template <typename>
  58. PROTOBUF_CONSTEXPR SearchResponse_Item::SearchResponse_Item(::_pbi::ConstantInitialized)
  59. : _impl_{
  60. /*decltype(_impl_.highlight_)*/ {
  61. &::_pbi::fixed_address_empty_string,
  62. ::_pbi::ConstantInitialized{},
  63. },
  64. /*decltype(_impl_.content_)*/ {
  65. &::_pbi::fixed_address_empty_string,
  66. ::_pbi::ConstantInitialized{},
  67. },
  68. /*decltype(_impl_.rank_)*/ 0,
  69. /*decltype(_impl_.book_)*/ 0,
  70. /*decltype(_impl_.paragraph_)*/ 0,
  71. /*decltype(_impl_._cached_size_)*/ {},
  72. } {}
  73. struct SearchResponse_ItemDefaultTypeInternal {
  74. PROTOBUF_CONSTEXPR SearchResponse_ItemDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  75. ~SearchResponse_ItemDefaultTypeInternal() {}
  76. union {
  77. SearchResponse_Item _instance;
  78. };
  79. };
  80. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  81. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResponse_ItemDefaultTypeInternal _SearchResponse_Item_default_instance_;
  82. template <typename>
  83. PROTOBUF_CONSTEXPR SearchResponse::SearchResponse(::_pbi::ConstantInitialized)
  84. : _impl_{
  85. /*decltype(_impl_._has_bits_)*/ {},
  86. /*decltype(_impl_._cached_size_)*/ {},
  87. /*decltype(_impl_.items_)*/ {},
  88. /*decltype(_impl_.page_)*/ nullptr,
  89. /*decltype(_impl_.total_)*/ 0,
  90. } {}
  91. struct SearchResponseDefaultTypeInternal {
  92. PROTOBUF_CONSTEXPR SearchResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  93. ~SearchResponseDefaultTypeInternal() {}
  94. union {
  95. SearchResponse _instance;
  96. };
  97. };
  98. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  99. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResponseDefaultTypeInternal _SearchResponse_default_instance_;
  100. } // namespace v1
  101. } // namespace tulip
  102. } // namespace mint
  103. static ::_pb::Metadata file_level_metadata_tulip_2eproto[4];
  104. static constexpr const ::_pb::EnumDescriptor**
  105. file_level_enum_descriptors_tulip_2eproto = nullptr;
  106. static constexpr const ::_pb::ServiceDescriptor**
  107. file_level_service_descriptors_tulip_2eproto = nullptr;
  108. const ::uint32_t TableStruct_tulip_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  109. protodesc_cold) = {
  110. ~0u, // no _has_bits_
  111. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _internal_metadata_),
  112. ~0u, // no _extensions_
  113. ~0u, // no _oneof_case_
  114. ~0u, // no _weak_field_map_
  115. ~0u, // no _inlined_string_donated_
  116. ~0u, // no _split_
  117. ~0u, // no sizeof(Split)
  118. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _impl_.index_),
  119. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest_Page, _impl_.size_),
  120. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_._has_bits_),
  121. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _internal_metadata_),
  122. ~0u, // no _extensions_
  123. ~0u, // no _oneof_case_
  124. ~0u, // no _weak_field_map_
  125. ~0u, // no _inlined_string_donated_
  126. ~0u, // no _split_
  127. ~0u, // no sizeof(Split)
  128. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.keywords_),
  129. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.book_),
  130. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchRequest, _impl_.page_),
  131. ~0u,
  132. ~0u,
  133. 0,
  134. ~0u, // no _has_bits_
  135. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _internal_metadata_),
  136. ~0u, // no _extensions_
  137. ~0u, // no _oneof_case_
  138. ~0u, // no _weak_field_map_
  139. ~0u, // no _inlined_string_donated_
  140. ~0u, // no _split_
  141. ~0u, // no sizeof(Split)
  142. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.rank_),
  143. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.highlight_),
  144. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.book_),
  145. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.paragraph_),
  146. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse_Item, _impl_.content_),
  147. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_._has_bits_),
  148. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _internal_metadata_),
  149. ~0u, // no _extensions_
  150. ~0u, // no _oneof_case_
  151. ~0u, // no _weak_field_map_
  152. ~0u, // no _inlined_string_donated_
  153. ~0u, // no _split_
  154. ~0u, // no sizeof(Split)
  155. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.items_),
  156. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.page_),
  157. PROTOBUF_FIELD_OFFSET(::mint::tulip::v1::SearchResponse, _impl_.total_),
  158. ~0u,
  159. 0,
  160. ~0u,
  161. };
  162. static const ::_pbi::MigrationSchema
  163. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  164. {0, -1, -1, sizeof(::mint::tulip::v1::SearchRequest_Page)},
  165. {10, 21, -1, sizeof(::mint::tulip::v1::SearchRequest)},
  166. {24, -1, -1, sizeof(::mint::tulip::v1::SearchResponse_Item)},
  167. {37, 48, -1, sizeof(::mint::tulip::v1::SearchResponse)},
  168. };
  169. static const ::_pb::Message* const file_default_instances[] = {
  170. &::mint::tulip::v1::_SearchRequest_Page_default_instance_._instance,
  171. &::mint::tulip::v1::_SearchRequest_default_instance_._instance,
  172. &::mint::tulip::v1::_SearchResponse_Item_default_instance_._instance,
  173. &::mint::tulip::v1::_SearchResponse_default_instance_._instance,
  174. };
  175. const char descriptor_table_protodef_tulip_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  176. "\n\013tulip.proto\022\rmint.tulip.v1\"\223\001\n\rSearchR"
  177. "equest\022\020\n\010keywords\030\001 \003(\t\022\014\n\004book\030\002 \001(\005\0224"
  178. "\n\004page\030c \001(\0132!.mint.tulip.v1.SearchReque"
  179. "st.PageH\000\210\001\001\032#\n\004Page\022\r\n\005index\030\001 \001(\005\022\014\n\004s"
  180. "ize\030\002 \001(\005B\007\n\005_page\"\336\001\n\016SearchResponse\0221\n"
  181. "\005items\030\001 \003(\0132\".mint.tulip.v1.SearchRespo"
  182. "nse.Item\022/\n\004page\030b \001(\0132!.mint.tulip.v1.S"
  183. "earchRequest.Page\022\r\n\005total\030c \001(\005\032Y\n\004Item"
  184. "\022\014\n\004rank\030\001 \001(\005\022\021\n\thighlight\030\002 \001(\t\022\014\n\004boo"
  185. "k\030\003 \001(\005\022\021\n\tparagraph\030\004 \001(\005\022\017\n\007content\030\005 "
  186. "\001(\t2O\n\006Search\022E\n\004Pali\022\034.mint.tulip.v1.Se"
  187. "archRequest\032\035.mint.tulip.v1.SearchRespon"
  188. "se\"\000B2\n.com.github.iapt_platform.mint.pl"
  189. "ugins.tulip.v1P\001b\006proto3"
  190. };
  191. static ::absl::once_flag descriptor_table_tulip_2eproto_once;
  192. const ::_pbi::DescriptorTable descriptor_table_tulip_2eproto = {
  193. false,
  194. false,
  195. 544,
  196. descriptor_table_protodef_tulip_2eproto,
  197. "tulip.proto",
  198. &descriptor_table_tulip_2eproto_once,
  199. nullptr,
  200. 0,
  201. 4,
  202. schemas,
  203. file_default_instances,
  204. TableStruct_tulip_2eproto::offsets,
  205. file_level_metadata_tulip_2eproto,
  206. file_level_enum_descriptors_tulip_2eproto,
  207. file_level_service_descriptors_tulip_2eproto,
  208. };
  209. // This function exists to be marked as weak.
  210. // It can significantly speed up compilation by breaking up LLVM's SCC
  211. // in the .pb.cc translation units. Large translation units see a
  212. // reduction of more than 35% of walltime for optimized builds. Without
  213. // the weak attribute all the messages in the file, including all the
  214. // vtables and everything they use become part of the same SCC through
  215. // a cycle like:
  216. // GetMetadata -> descriptor table -> default instances ->
  217. // vtables -> GetMetadata
  218. // By adding a weak function here we break the connection from the
  219. // individual vtables back into the descriptor table.
  220. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_tulip_2eproto_getter() {
  221. return &descriptor_table_tulip_2eproto;
  222. }
  223. // Force running AddDescriptors() at dynamic initialization time.
  224. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  225. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_tulip_2eproto(&descriptor_table_tulip_2eproto);
  226. namespace mint {
  227. namespace tulip {
  228. namespace v1 {
  229. // ===================================================================
  230. class SearchRequest_Page::_Internal {
  231. public:
  232. };
  233. SearchRequest_Page::SearchRequest_Page(::google::protobuf::Arena* arena)
  234. : ::google::protobuf::Message(arena) {
  235. SharedCtor(arena);
  236. // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchRequest.Page)
  237. }
  238. SearchRequest_Page::SearchRequest_Page(const SearchRequest_Page& from)
  239. : ::google::protobuf::Message(), _impl_(from._impl_) {
  240. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  241. from._internal_metadata_);
  242. // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchRequest.Page)
  243. }
  244. inline void SearchRequest_Page::SharedCtor(::_pb::Arena* arena) {
  245. (void)arena;
  246. new (&_impl_) Impl_{
  247. decltype(_impl_.index_){0},
  248. decltype(_impl_.size_){0},
  249. /*decltype(_impl_._cached_size_)*/ {},
  250. };
  251. }
  252. SearchRequest_Page::~SearchRequest_Page() {
  253. // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchRequest.Page)
  254. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  255. SharedDtor();
  256. }
  257. inline void SearchRequest_Page::SharedDtor() {
  258. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  259. }
  260. void SearchRequest_Page::SetCachedSize(int size) const {
  261. _impl_._cached_size_.Set(size);
  262. }
  263. PROTOBUF_NOINLINE void SearchRequest_Page::Clear() {
  264. // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchRequest.Page)
  265. ::uint32_t cached_has_bits = 0;
  266. // Prevent compiler warnings about cached_has_bits being unused
  267. (void) cached_has_bits;
  268. ::memset(&_impl_.index_, 0, static_cast<::size_t>(
  269. reinterpret_cast<char*>(&_impl_.size_) -
  270. reinterpret_cast<char*>(&_impl_.index_)) + sizeof(_impl_.size_));
  271. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  272. }
  273. const char* SearchRequest_Page::_InternalParse(
  274. const char* ptr, ::_pbi::ParseContext* ctx) {
  275. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  276. return ptr;
  277. }
  278. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  279. const ::_pbi::TcParseTable<1, 2, 0, 0, 2> SearchRequest_Page::_table_ = {
  280. {
  281. 0, // no _has_bits_
  282. 0, // no _extensions_
  283. 2, 8, // max_field_number, fast_idx_mask
  284. offsetof(decltype(_table_), field_lookup_table),
  285. 4294967292, // skipmap
  286. offsetof(decltype(_table_), field_entries),
  287. 2, // num_field_entries
  288. 0, // num_aux_entries
  289. offsetof(decltype(_table_), field_names), // no aux_entries
  290. &_SearchRequest_Page_default_instance_._instance,
  291. ::_pbi::TcParser::GenericFallback, // fallback
  292. }, {{
  293. // int32 size = 2;
  294. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest_Page, _impl_.size_), 63>(),
  295. {16, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_)}},
  296. // int32 index = 1;
  297. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest_Page, _impl_.index_), 63>(),
  298. {8, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_)}},
  299. }}, {{
  300. 65535, 65535
  301. }}, {{
  302. // int32 index = 1;
  303. {PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_), 0, 0,
  304. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  305. // int32 size = 2;
  306. {PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_), 0, 0,
  307. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  308. }},
  309. // no aux_entries
  310. {{
  311. }},
  312. };
  313. ::uint8_t* SearchRequest_Page::_InternalSerialize(
  314. ::uint8_t* target,
  315. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  316. // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchRequest.Page)
  317. ::uint32_t cached_has_bits = 0;
  318. (void)cached_has_bits;
  319. // int32 index = 1;
  320. if (this->_internal_index() != 0) {
  321. target = ::google::protobuf::internal::WireFormatLite::
  322. WriteInt32ToArrayWithField<1>(
  323. stream, this->_internal_index(), target);
  324. }
  325. // int32 size = 2;
  326. if (this->_internal_size() != 0) {
  327. target = ::google::protobuf::internal::WireFormatLite::
  328. WriteInt32ToArrayWithField<2>(
  329. stream, this->_internal_size(), target);
  330. }
  331. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  332. target =
  333. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  334. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  335. }
  336. // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchRequest.Page)
  337. return target;
  338. }
  339. ::size_t SearchRequest_Page::ByteSizeLong() const {
  340. // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchRequest.Page)
  341. ::size_t total_size = 0;
  342. ::uint32_t cached_has_bits = 0;
  343. // Prevent compiler warnings about cached_has_bits being unused
  344. (void) cached_has_bits;
  345. // int32 index = 1;
  346. if (this->_internal_index() != 0) {
  347. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  348. this->_internal_index());
  349. }
  350. // int32 size = 2;
  351. if (this->_internal_size() != 0) {
  352. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  353. this->_internal_size());
  354. }
  355. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  356. }
  357. const ::google::protobuf::Message::ClassData SearchRequest_Page::_class_data_ = {
  358. ::google::protobuf::Message::CopyWithSourceCheck,
  359. SearchRequest_Page::MergeImpl
  360. };
  361. const ::google::protobuf::Message::ClassData*SearchRequest_Page::GetClassData() const { return &_class_data_; }
  362. void SearchRequest_Page::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  363. auto* const _this = static_cast<SearchRequest_Page*>(&to_msg);
  364. auto& from = static_cast<const SearchRequest_Page&>(from_msg);
  365. // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchRequest.Page)
  366. ABSL_DCHECK_NE(&from, _this);
  367. ::uint32_t cached_has_bits = 0;
  368. (void) cached_has_bits;
  369. if (from._internal_index() != 0) {
  370. _this->_internal_set_index(from._internal_index());
  371. }
  372. if (from._internal_size() != 0) {
  373. _this->_internal_set_size(from._internal_size());
  374. }
  375. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  376. }
  377. void SearchRequest_Page::CopyFrom(const SearchRequest_Page& from) {
  378. // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchRequest.Page)
  379. if (&from == this) return;
  380. Clear();
  381. MergeFrom(from);
  382. }
  383. PROTOBUF_NOINLINE bool SearchRequest_Page::IsInitialized() const {
  384. return true;
  385. }
  386. void SearchRequest_Page::InternalSwap(SearchRequest_Page* other) {
  387. using std::swap;
  388. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  389. ::google::protobuf::internal::memswap<
  390. PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.size_)
  391. + sizeof(SearchRequest_Page::_impl_.size_)
  392. - PROTOBUF_FIELD_OFFSET(SearchRequest_Page, _impl_.index_)>(
  393. reinterpret_cast<char*>(&_impl_.index_),
  394. reinterpret_cast<char*>(&other->_impl_.index_));
  395. }
  396. ::google::protobuf::Metadata SearchRequest_Page::GetMetadata() const {
  397. return ::_pbi::AssignDescriptors(
  398. &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
  399. file_level_metadata_tulip_2eproto[0]);
  400. }
  401. // ===================================================================
  402. class SearchRequest::_Internal {
  403. public:
  404. using HasBits = decltype(std::declval<SearchRequest>()._impl_._has_bits_);
  405. static constexpr ::int32_t kHasBitsOffset =
  406. 8 * PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_._has_bits_);
  407. static const ::mint::tulip::v1::SearchRequest_Page& page(const SearchRequest* msg);
  408. static void set_has_page(HasBits* has_bits) {
  409. (*has_bits)[0] |= 1u;
  410. }
  411. };
  412. const ::mint::tulip::v1::SearchRequest_Page& SearchRequest::_Internal::page(const SearchRequest* msg) {
  413. return *msg->_impl_.page_;
  414. }
  415. SearchRequest::SearchRequest(::google::protobuf::Arena* arena)
  416. : ::google::protobuf::Message(arena) {
  417. SharedCtor(arena);
  418. // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchRequest)
  419. }
  420. SearchRequest::SearchRequest(const SearchRequest& from) : ::google::protobuf::Message() {
  421. SearchRequest* const _this = this;
  422. (void)_this;
  423. new (&_impl_) Impl_{
  424. decltype(_impl_._has_bits_){from._impl_._has_bits_},
  425. /*decltype(_impl_._cached_size_)*/ {},
  426. decltype(_impl_.keywords_){from._impl_.keywords_},
  427. decltype(_impl_.page_){nullptr},
  428. decltype(_impl_.book_){},
  429. };
  430. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  431. from._internal_metadata_);
  432. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  433. _this->_impl_.page_ = new ::mint::tulip::v1::SearchRequest_Page(*from._impl_.page_);
  434. }
  435. _this->_impl_.book_ = from._impl_.book_;
  436. // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchRequest)
  437. }
  438. inline void SearchRequest::SharedCtor(::_pb::Arena* arena) {
  439. (void)arena;
  440. new (&_impl_) Impl_{
  441. decltype(_impl_._has_bits_){},
  442. /*decltype(_impl_._cached_size_)*/ {},
  443. decltype(_impl_.keywords_){arena},
  444. decltype(_impl_.page_){nullptr},
  445. decltype(_impl_.book_){0},
  446. };
  447. }
  448. SearchRequest::~SearchRequest() {
  449. // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchRequest)
  450. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  451. SharedDtor();
  452. }
  453. inline void SearchRequest::SharedDtor() {
  454. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  455. _internal_mutable_keywords()->~RepeatedPtrField();
  456. if (this != internal_default_instance()) delete _impl_.page_;
  457. }
  458. void SearchRequest::SetCachedSize(int size) const {
  459. _impl_._cached_size_.Set(size);
  460. }
  461. PROTOBUF_NOINLINE void SearchRequest::Clear() {
  462. // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchRequest)
  463. ::uint32_t cached_has_bits = 0;
  464. // Prevent compiler warnings about cached_has_bits being unused
  465. (void) cached_has_bits;
  466. _internal_mutable_keywords()->Clear();
  467. cached_has_bits = _impl_._has_bits_[0];
  468. if (cached_has_bits & 0x00000001u) {
  469. ABSL_DCHECK(_impl_.page_ != nullptr);
  470. _impl_.page_->Clear();
  471. }
  472. _impl_.book_ = 0;
  473. _impl_._has_bits_.Clear();
  474. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  475. }
  476. const char* SearchRequest::_InternalParse(
  477. const char* ptr, ::_pbi::ParseContext* ctx) {
  478. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  479. return ptr;
  480. }
  481. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  482. const ::_pbi::TcParseTable<2, 3, 1, 44, 7> SearchRequest::_table_ = {
  483. {
  484. PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_._has_bits_),
  485. 0, // no _extensions_
  486. 99, 24, // max_field_number, fast_idx_mask
  487. offsetof(decltype(_table_), field_lookup_table),
  488. 4294967292, // skipmap
  489. offsetof(decltype(_table_), field_entries),
  490. 3, // num_field_entries
  491. 1, // num_aux_entries
  492. offsetof(decltype(_table_), aux_entries),
  493. &_SearchRequest_default_instance_._instance,
  494. ::_pbi::TcParser::GenericFallback, // fallback
  495. }, {{
  496. {::_pbi::TcParser::MiniParse, {}},
  497. // repeated string keywords = 1;
  498. {::_pbi::TcParser::FastUR1,
  499. {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.keywords_)}},
  500. // int32 book = 2;
  501. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchRequest, _impl_.book_), 63>(),
  502. {16, 63, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_)}},
  503. // optional .mint.tulip.v1.SearchRequest.Page page = 99;
  504. {::_pbi::TcParser::FastMtS2,
  505. {1690, 0, 0, PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_)}},
  506. }}, {{
  507. 99, 0, 1,
  508. 65534, 2,
  509. 65535, 65535
  510. }}, {{
  511. // repeated string keywords = 1;
  512. {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.keywords_), -1, 0,
  513. (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
  514. // int32 book = 2;
  515. {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_), -1, 0,
  516. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  517. // optional .mint.tulip.v1.SearchRequest.Page page = 99;
  518. {PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_), _Internal::kHasBitsOffset + 0, 0,
  519. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  520. }}, {{
  521. {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchRequest_Page>()},
  522. }}, {{
  523. "\33\10\0\0\0\0\0\0"
  524. "mint.tulip.v1.SearchRequest"
  525. "keywords"
  526. }},
  527. };
  528. ::uint8_t* SearchRequest::_InternalSerialize(
  529. ::uint8_t* target,
  530. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  531. // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchRequest)
  532. ::uint32_t cached_has_bits = 0;
  533. (void)cached_has_bits;
  534. // repeated string keywords = 1;
  535. for (int i = 0, n = this->_internal_keywords_size(); i < n; ++i) {
  536. const auto& s = this->_internal_keywords().Get(i);
  537. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  538. s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchRequest.keywords");
  539. target = stream->WriteString(1, s, target);
  540. }
  541. // int32 book = 2;
  542. if (this->_internal_book() != 0) {
  543. target = ::google::protobuf::internal::WireFormatLite::
  544. WriteInt32ToArrayWithField<2>(
  545. stream, this->_internal_book(), target);
  546. }
  547. cached_has_bits = _impl_._has_bits_[0];
  548. // optional .mint.tulip.v1.SearchRequest.Page page = 99;
  549. if (cached_has_bits & 0x00000001u) {
  550. target = ::google::protobuf::internal::WireFormatLite::
  551. InternalWriteMessage(99, _Internal::page(this),
  552. _Internal::page(this).GetCachedSize(), target, stream);
  553. }
  554. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  555. target =
  556. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  557. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  558. }
  559. // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchRequest)
  560. return target;
  561. }
  562. ::size_t SearchRequest::ByteSizeLong() const {
  563. // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchRequest)
  564. ::size_t total_size = 0;
  565. ::uint32_t cached_has_bits = 0;
  566. // Prevent compiler warnings about cached_has_bits being unused
  567. (void) cached_has_bits;
  568. // repeated string keywords = 1;
  569. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_keywords().size());
  570. for (int i = 0, n = _internal_keywords().size(); i < n; ++i) {
  571. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  572. _internal_keywords().Get(i));
  573. }
  574. // optional .mint.tulip.v1.SearchRequest.Page page = 99;
  575. cached_has_bits = _impl_._has_bits_[0];
  576. if (cached_has_bits & 0x00000001u) {
  577. total_size += 2 +
  578. ::google::protobuf::internal::WireFormatLite::MessageSize(
  579. *_impl_.page_);
  580. }
  581. // int32 book = 2;
  582. if (this->_internal_book() != 0) {
  583. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  584. this->_internal_book());
  585. }
  586. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  587. }
  588. const ::google::protobuf::Message::ClassData SearchRequest::_class_data_ = {
  589. ::google::protobuf::Message::CopyWithSourceCheck,
  590. SearchRequest::MergeImpl
  591. };
  592. const ::google::protobuf::Message::ClassData*SearchRequest::GetClassData() const { return &_class_data_; }
  593. void SearchRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  594. auto* const _this = static_cast<SearchRequest*>(&to_msg);
  595. auto& from = static_cast<const SearchRequest&>(from_msg);
  596. // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchRequest)
  597. ABSL_DCHECK_NE(&from, _this);
  598. ::uint32_t cached_has_bits = 0;
  599. (void) cached_has_bits;
  600. _this->_internal_mutable_keywords()->MergeFrom(from._internal_keywords());
  601. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  602. _this->_internal_mutable_page()->::mint::tulip::v1::SearchRequest_Page::MergeFrom(
  603. from._internal_page());
  604. }
  605. if (from._internal_book() != 0) {
  606. _this->_internal_set_book(from._internal_book());
  607. }
  608. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  609. }
  610. void SearchRequest::CopyFrom(const SearchRequest& from) {
  611. // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchRequest)
  612. if (&from == this) return;
  613. Clear();
  614. MergeFrom(from);
  615. }
  616. PROTOBUF_NOINLINE bool SearchRequest::IsInitialized() const {
  617. return true;
  618. }
  619. void SearchRequest::InternalSwap(SearchRequest* other) {
  620. using std::swap;
  621. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  622. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  623. _impl_.keywords_.InternalSwap(&other->_impl_.keywords_);
  624. ::google::protobuf::internal::memswap<
  625. PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.book_)
  626. + sizeof(SearchRequest::_impl_.book_)
  627. - PROTOBUF_FIELD_OFFSET(SearchRequest, _impl_.page_)>(
  628. reinterpret_cast<char*>(&_impl_.page_),
  629. reinterpret_cast<char*>(&other->_impl_.page_));
  630. }
  631. ::google::protobuf::Metadata SearchRequest::GetMetadata() const {
  632. return ::_pbi::AssignDescriptors(
  633. &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
  634. file_level_metadata_tulip_2eproto[1]);
  635. }
  636. // ===================================================================
  637. class SearchResponse_Item::_Internal {
  638. public:
  639. };
  640. SearchResponse_Item::SearchResponse_Item(::google::protobuf::Arena* arena)
  641. : ::google::protobuf::Message(arena) {
  642. SharedCtor(arena);
  643. // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchResponse.Item)
  644. }
  645. SearchResponse_Item::SearchResponse_Item(const SearchResponse_Item& from) : ::google::protobuf::Message() {
  646. SearchResponse_Item* const _this = this;
  647. (void)_this;
  648. new (&_impl_) Impl_{
  649. decltype(_impl_.highlight_){},
  650. decltype(_impl_.content_){},
  651. decltype(_impl_.rank_){},
  652. decltype(_impl_.book_){},
  653. decltype(_impl_.paragraph_){},
  654. /*decltype(_impl_._cached_size_)*/ {},
  655. };
  656. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  657. from._internal_metadata_);
  658. _impl_.highlight_.InitDefault();
  659. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  660. _impl_.highlight_.Set("", GetArenaForAllocation());
  661. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  662. if (!from._internal_highlight().empty()) {
  663. _this->_impl_.highlight_.Set(from._internal_highlight(), _this->GetArenaForAllocation());
  664. }
  665. _impl_.content_.InitDefault();
  666. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  667. _impl_.content_.Set("", GetArenaForAllocation());
  668. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  669. if (!from._internal_content().empty()) {
  670. _this->_impl_.content_.Set(from._internal_content(), _this->GetArenaForAllocation());
  671. }
  672. ::memcpy(&_impl_.rank_, &from._impl_.rank_,
  673. static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.paragraph_) -
  674. reinterpret_cast<char*>(&_impl_.rank_)) + sizeof(_impl_.paragraph_));
  675. // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchResponse.Item)
  676. }
  677. inline void SearchResponse_Item::SharedCtor(::_pb::Arena* arena) {
  678. (void)arena;
  679. new (&_impl_) Impl_{
  680. decltype(_impl_.highlight_){},
  681. decltype(_impl_.content_){},
  682. decltype(_impl_.rank_){0},
  683. decltype(_impl_.book_){0},
  684. decltype(_impl_.paragraph_){0},
  685. /*decltype(_impl_._cached_size_)*/ {},
  686. };
  687. _impl_.highlight_.InitDefault();
  688. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  689. _impl_.highlight_.Set("", GetArenaForAllocation());
  690. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  691. _impl_.content_.InitDefault();
  692. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  693. _impl_.content_.Set("", GetArenaForAllocation());
  694. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  695. }
  696. SearchResponse_Item::~SearchResponse_Item() {
  697. // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchResponse.Item)
  698. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  699. SharedDtor();
  700. }
  701. inline void SearchResponse_Item::SharedDtor() {
  702. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  703. _impl_.highlight_.Destroy();
  704. _impl_.content_.Destroy();
  705. }
  706. void SearchResponse_Item::SetCachedSize(int size) const {
  707. _impl_._cached_size_.Set(size);
  708. }
  709. PROTOBUF_NOINLINE void SearchResponse_Item::Clear() {
  710. // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchResponse.Item)
  711. ::uint32_t cached_has_bits = 0;
  712. // Prevent compiler warnings about cached_has_bits being unused
  713. (void) cached_has_bits;
  714. _impl_.highlight_.ClearToEmpty();
  715. _impl_.content_.ClearToEmpty();
  716. ::memset(&_impl_.rank_, 0, static_cast<::size_t>(
  717. reinterpret_cast<char*>(&_impl_.paragraph_) -
  718. reinterpret_cast<char*>(&_impl_.rank_)) + sizeof(_impl_.paragraph_));
  719. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  720. }
  721. const char* SearchResponse_Item::_InternalParse(
  722. const char* ptr, ::_pbi::ParseContext* ctx) {
  723. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  724. return ptr;
  725. }
  726. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  727. const ::_pbi::TcParseTable<3, 5, 0, 58, 2> SearchResponse_Item::_table_ = {
  728. {
  729. 0, // no _has_bits_
  730. 0, // no _extensions_
  731. 5, 56, // max_field_number, fast_idx_mask
  732. offsetof(decltype(_table_), field_lookup_table),
  733. 4294967264, // skipmap
  734. offsetof(decltype(_table_), field_entries),
  735. 5, // num_field_entries
  736. 0, // num_aux_entries
  737. offsetof(decltype(_table_), field_names), // no aux_entries
  738. &_SearchResponse_Item_default_instance_._instance,
  739. ::_pbi::TcParser::GenericFallback, // fallback
  740. }, {{
  741. {::_pbi::TcParser::MiniParse, {}},
  742. // int32 rank = 1;
  743. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.rank_), 63>(),
  744. {8, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_)}},
  745. // string highlight = 2;
  746. {::_pbi::TcParser::FastUS1,
  747. {18, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.highlight_)}},
  748. // int32 book = 3;
  749. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.book_), 63>(),
  750. {24, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.book_)}},
  751. // int32 paragraph = 4;
  752. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(SearchResponse_Item, _impl_.paragraph_), 63>(),
  753. {32, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_)}},
  754. // string content = 5;
  755. {::_pbi::TcParser::FastUS1,
  756. {42, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.content_)}},
  757. {::_pbi::TcParser::MiniParse, {}},
  758. {::_pbi::TcParser::MiniParse, {}},
  759. }}, {{
  760. 65535, 65535
  761. }}, {{
  762. // int32 rank = 1;
  763. {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_), 0, 0,
  764. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  765. // string highlight = 2;
  766. {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.highlight_), 0, 0,
  767. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  768. // int32 book = 3;
  769. {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.book_), 0, 0,
  770. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  771. // int32 paragraph = 4;
  772. {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_), 0, 0,
  773. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  774. // string content = 5;
  775. {PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.content_), 0, 0,
  776. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  777. }},
  778. // no aux_entries
  779. {{
  780. "\41\0\11\0\0\7\0\0"
  781. "mint.tulip.v1.SearchResponse.Item"
  782. "highlight"
  783. "content"
  784. }},
  785. };
  786. ::uint8_t* SearchResponse_Item::_InternalSerialize(
  787. ::uint8_t* target,
  788. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  789. // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchResponse.Item)
  790. ::uint32_t cached_has_bits = 0;
  791. (void)cached_has_bits;
  792. // int32 rank = 1;
  793. if (this->_internal_rank() != 0) {
  794. target = ::google::protobuf::internal::WireFormatLite::
  795. WriteInt32ToArrayWithField<1>(
  796. stream, this->_internal_rank(), target);
  797. }
  798. // string highlight = 2;
  799. if (!this->_internal_highlight().empty()) {
  800. const std::string& _s = this->_internal_highlight();
  801. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  802. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchResponse.Item.highlight");
  803. target = stream->WriteStringMaybeAliased(2, _s, target);
  804. }
  805. // int32 book = 3;
  806. if (this->_internal_book() != 0) {
  807. target = ::google::protobuf::internal::WireFormatLite::
  808. WriteInt32ToArrayWithField<3>(
  809. stream, this->_internal_book(), target);
  810. }
  811. // int32 paragraph = 4;
  812. if (this->_internal_paragraph() != 0) {
  813. target = ::google::protobuf::internal::WireFormatLite::
  814. WriteInt32ToArrayWithField<4>(
  815. stream, this->_internal_paragraph(), target);
  816. }
  817. // string content = 5;
  818. if (!this->_internal_content().empty()) {
  819. const std::string& _s = this->_internal_content();
  820. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  821. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "mint.tulip.v1.SearchResponse.Item.content");
  822. target = stream->WriteStringMaybeAliased(5, _s, target);
  823. }
  824. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  825. target =
  826. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  827. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  828. }
  829. // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchResponse.Item)
  830. return target;
  831. }
  832. ::size_t SearchResponse_Item::ByteSizeLong() const {
  833. // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchResponse.Item)
  834. ::size_t total_size = 0;
  835. ::uint32_t cached_has_bits = 0;
  836. // Prevent compiler warnings about cached_has_bits being unused
  837. (void) cached_has_bits;
  838. // string highlight = 2;
  839. if (!this->_internal_highlight().empty()) {
  840. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  841. this->_internal_highlight());
  842. }
  843. // string content = 5;
  844. if (!this->_internal_content().empty()) {
  845. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  846. this->_internal_content());
  847. }
  848. // int32 rank = 1;
  849. if (this->_internal_rank() != 0) {
  850. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  851. this->_internal_rank());
  852. }
  853. // int32 book = 3;
  854. if (this->_internal_book() != 0) {
  855. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  856. this->_internal_book());
  857. }
  858. // int32 paragraph = 4;
  859. if (this->_internal_paragraph() != 0) {
  860. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  861. this->_internal_paragraph());
  862. }
  863. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  864. }
  865. const ::google::protobuf::Message::ClassData SearchResponse_Item::_class_data_ = {
  866. ::google::protobuf::Message::CopyWithSourceCheck,
  867. SearchResponse_Item::MergeImpl
  868. };
  869. const ::google::protobuf::Message::ClassData*SearchResponse_Item::GetClassData() const { return &_class_data_; }
  870. void SearchResponse_Item::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  871. auto* const _this = static_cast<SearchResponse_Item*>(&to_msg);
  872. auto& from = static_cast<const SearchResponse_Item&>(from_msg);
  873. // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchResponse.Item)
  874. ABSL_DCHECK_NE(&from, _this);
  875. ::uint32_t cached_has_bits = 0;
  876. (void) cached_has_bits;
  877. if (!from._internal_highlight().empty()) {
  878. _this->_internal_set_highlight(from._internal_highlight());
  879. }
  880. if (!from._internal_content().empty()) {
  881. _this->_internal_set_content(from._internal_content());
  882. }
  883. if (from._internal_rank() != 0) {
  884. _this->_internal_set_rank(from._internal_rank());
  885. }
  886. if (from._internal_book() != 0) {
  887. _this->_internal_set_book(from._internal_book());
  888. }
  889. if (from._internal_paragraph() != 0) {
  890. _this->_internal_set_paragraph(from._internal_paragraph());
  891. }
  892. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  893. }
  894. void SearchResponse_Item::CopyFrom(const SearchResponse_Item& from) {
  895. // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchResponse.Item)
  896. if (&from == this) return;
  897. Clear();
  898. MergeFrom(from);
  899. }
  900. PROTOBUF_NOINLINE bool SearchResponse_Item::IsInitialized() const {
  901. return true;
  902. }
  903. void SearchResponse_Item::InternalSwap(SearchResponse_Item* other) {
  904. using std::swap;
  905. auto* lhs_arena = GetArenaForAllocation();
  906. auto* rhs_arena = other->GetArenaForAllocation();
  907. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  908. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.highlight_, lhs_arena,
  909. &other->_impl_.highlight_, rhs_arena);
  910. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.content_, lhs_arena,
  911. &other->_impl_.content_, rhs_arena);
  912. ::google::protobuf::internal::memswap<
  913. PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.paragraph_)
  914. + sizeof(SearchResponse_Item::_impl_.paragraph_)
  915. - PROTOBUF_FIELD_OFFSET(SearchResponse_Item, _impl_.rank_)>(
  916. reinterpret_cast<char*>(&_impl_.rank_),
  917. reinterpret_cast<char*>(&other->_impl_.rank_));
  918. }
  919. ::google::protobuf::Metadata SearchResponse_Item::GetMetadata() const {
  920. return ::_pbi::AssignDescriptors(
  921. &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
  922. file_level_metadata_tulip_2eproto[2]);
  923. }
  924. // ===================================================================
  925. class SearchResponse::_Internal {
  926. public:
  927. using HasBits = decltype(std::declval<SearchResponse>()._impl_._has_bits_);
  928. static constexpr ::int32_t kHasBitsOffset =
  929. 8 * PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_._has_bits_);
  930. static const ::mint::tulip::v1::SearchRequest_Page& page(const SearchResponse* msg);
  931. static void set_has_page(HasBits* has_bits) {
  932. (*has_bits)[0] |= 1u;
  933. }
  934. };
  935. const ::mint::tulip::v1::SearchRequest_Page& SearchResponse::_Internal::page(const SearchResponse* msg) {
  936. return *msg->_impl_.page_;
  937. }
  938. SearchResponse::SearchResponse(::google::protobuf::Arena* arena)
  939. : ::google::protobuf::Message(arena) {
  940. SharedCtor(arena);
  941. // @@protoc_insertion_point(arena_constructor:mint.tulip.v1.SearchResponse)
  942. }
  943. SearchResponse::SearchResponse(const SearchResponse& from) : ::google::protobuf::Message() {
  944. SearchResponse* const _this = this;
  945. (void)_this;
  946. new (&_impl_) Impl_{
  947. decltype(_impl_._has_bits_){from._impl_._has_bits_},
  948. /*decltype(_impl_._cached_size_)*/ {},
  949. decltype(_impl_.items_){from._impl_.items_},
  950. decltype(_impl_.page_){nullptr},
  951. decltype(_impl_.total_){},
  952. };
  953. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  954. from._internal_metadata_);
  955. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  956. _this->_impl_.page_ = new ::mint::tulip::v1::SearchRequest_Page(*from._impl_.page_);
  957. }
  958. _this->_impl_.total_ = from._impl_.total_;
  959. // @@protoc_insertion_point(copy_constructor:mint.tulip.v1.SearchResponse)
  960. }
  961. inline void SearchResponse::SharedCtor(::_pb::Arena* arena) {
  962. (void)arena;
  963. new (&_impl_) Impl_{
  964. decltype(_impl_._has_bits_){},
  965. /*decltype(_impl_._cached_size_)*/ {},
  966. decltype(_impl_.items_){arena},
  967. decltype(_impl_.page_){nullptr},
  968. decltype(_impl_.total_){0},
  969. };
  970. }
  971. SearchResponse::~SearchResponse() {
  972. // @@protoc_insertion_point(destructor:mint.tulip.v1.SearchResponse)
  973. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  974. SharedDtor();
  975. }
  976. inline void SearchResponse::SharedDtor() {
  977. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  978. _impl_.items_.~RepeatedPtrField();
  979. if (this != internal_default_instance()) delete _impl_.page_;
  980. }
  981. void SearchResponse::SetCachedSize(int size) const {
  982. _impl_._cached_size_.Set(size);
  983. }
  984. PROTOBUF_NOINLINE void SearchResponse::Clear() {
  985. // @@protoc_insertion_point(message_clear_start:mint.tulip.v1.SearchResponse)
  986. ::uint32_t cached_has_bits = 0;
  987. // Prevent compiler warnings about cached_has_bits being unused
  988. (void) cached_has_bits;
  989. _internal_mutable_items()->Clear();
  990. cached_has_bits = _impl_._has_bits_[0];
  991. if (cached_has_bits & 0x00000001u) {
  992. ABSL_DCHECK(_impl_.page_ != nullptr);
  993. _impl_.page_->Clear();
  994. }
  995. _impl_.total_ = 0;
  996. _impl_._has_bits_.Clear();
  997. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  998. }
  999. const char* SearchResponse::_InternalParse(
  1000. const char* ptr, ::_pbi::ParseContext* ctx) {
  1001. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  1002. return ptr;
  1003. }
  1004. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  1005. const ::_pbi::TcParseTable<2, 3, 2, 0, 7> SearchResponse::_table_ = {
  1006. {
  1007. PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_._has_bits_),
  1008. 0, // no _extensions_
  1009. 99, 24, // max_field_number, fast_idx_mask
  1010. offsetof(decltype(_table_), field_lookup_table),
  1011. 4294967294, // skipmap
  1012. offsetof(decltype(_table_), field_entries),
  1013. 3, // num_field_entries
  1014. 2, // num_aux_entries
  1015. offsetof(decltype(_table_), aux_entries),
  1016. &_SearchResponse_default_instance_._instance,
  1017. ::_pbi::TcParser::GenericFallback, // fallback
  1018. }, {{
  1019. {::_pbi::TcParser::MiniParse, {}},
  1020. // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
  1021. {::_pbi::TcParser::FastMtR1,
  1022. {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.items_)}},
  1023. // .mint.tulip.v1.SearchRequest.Page page = 98;
  1024. {::_pbi::TcParser::FastMtS2,
  1025. {1682, 0, 1, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_)}},
  1026. // int32 total = 99;
  1027. {::_pbi::TcParser::FastV32S2,
  1028. {1688, 63, 0, PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_)}},
  1029. }}, {{
  1030. 98, 0, 1,
  1031. 65532, 1,
  1032. 65535, 65535
  1033. }}, {{
  1034. // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
  1035. {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.items_), -1, 0,
  1036. (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  1037. // .mint.tulip.v1.SearchRequest.Page page = 98;
  1038. {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_), _Internal::kHasBitsOffset + 0, 1,
  1039. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  1040. // int32 total = 99;
  1041. {PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_), -1, 0,
  1042. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  1043. }}, {{
  1044. {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchResponse_Item>()},
  1045. {::_pbi::TcParser::GetTable<::mint::tulip::v1::SearchRequest_Page>()},
  1046. }}, {{
  1047. }},
  1048. };
  1049. ::uint8_t* SearchResponse::_InternalSerialize(
  1050. ::uint8_t* target,
  1051. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  1052. // @@protoc_insertion_point(serialize_to_array_start:mint.tulip.v1.SearchResponse)
  1053. ::uint32_t cached_has_bits = 0;
  1054. (void)cached_has_bits;
  1055. // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
  1056. for (unsigned i = 0,
  1057. n = static_cast<unsigned>(this->_internal_items_size()); i < n; i++) {
  1058. const auto& repfield = this->_internal_items().Get(i);
  1059. target = ::google::protobuf::internal::WireFormatLite::
  1060. InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  1061. }
  1062. cached_has_bits = _impl_._has_bits_[0];
  1063. // .mint.tulip.v1.SearchRequest.Page page = 98;
  1064. if (cached_has_bits & 0x00000001u) {
  1065. target = ::google::protobuf::internal::WireFormatLite::
  1066. InternalWriteMessage(98, _Internal::page(this),
  1067. _Internal::page(this).GetCachedSize(), target, stream);
  1068. }
  1069. // int32 total = 99;
  1070. if (this->_internal_total() != 0) {
  1071. target = stream->EnsureSpace(target);
  1072. target = ::_pbi::WireFormatLite::WriteInt32ToArray(
  1073. 99, this->_internal_total(), target);
  1074. }
  1075. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1076. target =
  1077. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1078. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  1079. }
  1080. // @@protoc_insertion_point(serialize_to_array_end:mint.tulip.v1.SearchResponse)
  1081. return target;
  1082. }
  1083. ::size_t SearchResponse::ByteSizeLong() const {
  1084. // @@protoc_insertion_point(message_byte_size_start:mint.tulip.v1.SearchResponse)
  1085. ::size_t total_size = 0;
  1086. ::uint32_t cached_has_bits = 0;
  1087. // Prevent compiler warnings about cached_has_bits being unused
  1088. (void) cached_has_bits;
  1089. // repeated .mint.tulip.v1.SearchResponse.Item items = 1;
  1090. total_size += 1UL * this->_internal_items_size();
  1091. for (const auto& msg : this->_internal_items()) {
  1092. total_size +=
  1093. ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
  1094. }
  1095. // .mint.tulip.v1.SearchRequest.Page page = 98;
  1096. cached_has_bits = _impl_._has_bits_[0];
  1097. if (cached_has_bits & 0x00000001u) {
  1098. total_size += 2 +
  1099. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1100. *_impl_.page_);
  1101. }
  1102. // int32 total = 99;
  1103. if (this->_internal_total() != 0) {
  1104. total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
  1105. this->_internal_total());
  1106. }
  1107. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1108. }
  1109. const ::google::protobuf::Message::ClassData SearchResponse::_class_data_ = {
  1110. ::google::protobuf::Message::CopyWithSourceCheck,
  1111. SearchResponse::MergeImpl
  1112. };
  1113. const ::google::protobuf::Message::ClassData*SearchResponse::GetClassData() const { return &_class_data_; }
  1114. void SearchResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1115. auto* const _this = static_cast<SearchResponse*>(&to_msg);
  1116. auto& from = static_cast<const SearchResponse&>(from_msg);
  1117. // @@protoc_insertion_point(class_specific_merge_from_start:mint.tulip.v1.SearchResponse)
  1118. ABSL_DCHECK_NE(&from, _this);
  1119. ::uint32_t cached_has_bits = 0;
  1120. (void) cached_has_bits;
  1121. _this->_internal_mutable_items()->MergeFrom(from._internal_items());
  1122. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  1123. _this->_internal_mutable_page()->::mint::tulip::v1::SearchRequest_Page::MergeFrom(
  1124. from._internal_page());
  1125. }
  1126. if (from._internal_total() != 0) {
  1127. _this->_internal_set_total(from._internal_total());
  1128. }
  1129. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1130. }
  1131. void SearchResponse::CopyFrom(const SearchResponse& from) {
  1132. // @@protoc_insertion_point(class_specific_copy_from_start:mint.tulip.v1.SearchResponse)
  1133. if (&from == this) return;
  1134. Clear();
  1135. MergeFrom(from);
  1136. }
  1137. PROTOBUF_NOINLINE bool SearchResponse::IsInitialized() const {
  1138. return true;
  1139. }
  1140. void SearchResponse::InternalSwap(SearchResponse* other) {
  1141. using std::swap;
  1142. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1143. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  1144. _impl_.items_.InternalSwap(&other->_impl_.items_);
  1145. ::google::protobuf::internal::memswap<
  1146. PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.total_)
  1147. + sizeof(SearchResponse::_impl_.total_)
  1148. - PROTOBUF_FIELD_OFFSET(SearchResponse, _impl_.page_)>(
  1149. reinterpret_cast<char*>(&_impl_.page_),
  1150. reinterpret_cast<char*>(&other->_impl_.page_));
  1151. }
  1152. ::google::protobuf::Metadata SearchResponse::GetMetadata() const {
  1153. return ::_pbi::AssignDescriptors(
  1154. &descriptor_table_tulip_2eproto_getter, &descriptor_table_tulip_2eproto_once,
  1155. file_level_metadata_tulip_2eproto[3]);
  1156. }
  1157. // @@protoc_insertion_point(namespace_scope)
  1158. } // namespace v1
  1159. } // namespace tulip
  1160. } // namespace mint
  1161. namespace google {
  1162. namespace protobuf {
  1163. } // namespace protobuf
  1164. } // namespace google
  1165. // @@protoc_insertion_point(global_scope)
  1166. #include "google/protobuf/port_undef.inc"