1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: icing/proto/initialize.proto
3
4 #include "icing/proto/initialize.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace icing {
22 namespace lib {
IcingSearchEngineFeatureInfoProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR IcingSearchEngineFeatureInfoProto::IcingSearchEngineFeatureInfoProto(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.feature_type_)*/0
28 , /*decltype(_impl_.needs_document_store_rebuild_)*/false
29 , /*decltype(_impl_.needs_schema_store_rebuild_)*/false
30 , /*decltype(_impl_.needs_term_index_rebuild_)*/false
31 , /*decltype(_impl_.needs_integer_index_rebuild_)*/false
32 , /*decltype(_impl_.needs_qualified_id_join_index_rebuild_)*/false
33 , /*decltype(_impl_.needs_embedding_index_rebuild_)*/false} {}
34 struct IcingSearchEngineFeatureInfoProtoDefaultTypeInternal {
IcingSearchEngineFeatureInfoProtoDefaultTypeInternalicing::lib::IcingSearchEngineFeatureInfoProtoDefaultTypeInternal35 PROTOBUF_CONSTEXPR IcingSearchEngineFeatureInfoProtoDefaultTypeInternal()
36 : _instance(::_pbi::ConstantInitialized{}) {}
~IcingSearchEngineFeatureInfoProtoDefaultTypeInternalicing::lib::IcingSearchEngineFeatureInfoProtoDefaultTypeInternal37 ~IcingSearchEngineFeatureInfoProtoDefaultTypeInternal() {}
38 union { // NOLINT(misc-non-private-member-variables-in-classes)
39 IcingSearchEngineFeatureInfoProto _instance;
40 };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IcingSearchEngineFeatureInfoProtoDefaultTypeInternal _IcingSearchEngineFeatureInfoProto_default_instance_;
IcingSearchEngineVersionProto(::_pbi::ConstantInitialized)43 PROTOBUF_CONSTEXPR IcingSearchEngineVersionProto::IcingSearchEngineVersionProto(
44 ::_pbi::ConstantInitialized): _impl_{
45 /*decltype(_impl_._has_bits_)*/{}
46 , /*decltype(_impl_._cached_size_)*/{}
47 , /*decltype(_impl_.enabled_features_)*/{}
48 , /*decltype(_impl_.version_)*/0
49 , /*decltype(_impl_.max_version_)*/0} {}
50 struct IcingSearchEngineVersionProtoDefaultTypeInternal {
IcingSearchEngineVersionProtoDefaultTypeInternalicing::lib::IcingSearchEngineVersionProtoDefaultTypeInternal51 PROTOBUF_CONSTEXPR IcingSearchEngineVersionProtoDefaultTypeInternal()
52 : _instance(::_pbi::ConstantInitialized{}) {}
~IcingSearchEngineVersionProtoDefaultTypeInternalicing::lib::IcingSearchEngineVersionProtoDefaultTypeInternal53 ~IcingSearchEngineVersionProtoDefaultTypeInternal() {}
54 union { // NOLINT(misc-non-private-member-variables-in-classes)
55 IcingSearchEngineVersionProto _instance;
56 };
57 };
58 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IcingSearchEngineVersionProtoDefaultTypeInternal _IcingSearchEngineVersionProto_default_instance_;
IcingSearchEngineOptions(::_pbi::ConstantInitialized)59 PROTOBUF_CONSTEXPR IcingSearchEngineOptions::IcingSearchEngineOptions(
60 ::_pbi::ConstantInitialized): _impl_{
61 /*decltype(_impl_._has_bits_)*/{}
62 , /*decltype(_impl_._cached_size_)*/{}
63 , /*decltype(_impl_.base_dir_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
64 , /*decltype(_impl_.optimize_rebuild_index_threshold_)*/0
65 , /*decltype(_impl_.document_store_namespace_id_fingerprint_)*/false
66 , /*decltype(_impl_.allow_circular_schema_definitions_)*/false
67 , /*decltype(_impl_.pre_mapping_fbv_)*/false
68 , /*decltype(_impl_.use_persistent_hash_map_)*/false
69 , /*decltype(_impl_.orphan_blob_time_to_live_ms_)*/::int64_t{0}
70 , /*decltype(_impl_.lite_index_sort_at_indexing_)*/false
71 , /*decltype(_impl_.use_new_qualified_id_join_index_)*/false
72 , /*decltype(_impl_.build_property_existence_metadata_hits_)*/false
73 , /*decltype(_impl_.enable_blob_store_)*/false
74 , /*decltype(_impl_.enable_schema_database_)*/false
75 , /*decltype(_impl_.enable_scorable_properties_)*/false
76 , /*decltype(_impl_.enable_embedding_quantization_)*/false
77 , /*decltype(_impl_.enable_repeated_field_joins_)*/false
78 , /*decltype(_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_)*/false
79 , /*decltype(_impl_.blob_store_compression_level_)*/3
80 , /*decltype(_impl_.max_token_length_)*/30
81 , /*decltype(_impl_.index_merge_size_)*/1048576
82 , /*decltype(_impl_.compression_level_)*/3
83 , /*decltype(_impl_.integer_index_bucket_split_threshold_)*/65536
84 , /*decltype(_impl_.lite_index_sort_size_)*/8192
85 , /*decltype(_impl_.enable_embedding_index_)*/true} {}
86 struct IcingSearchEngineOptionsDefaultTypeInternal {
IcingSearchEngineOptionsDefaultTypeInternalicing::lib::IcingSearchEngineOptionsDefaultTypeInternal87 PROTOBUF_CONSTEXPR IcingSearchEngineOptionsDefaultTypeInternal()
88 : _instance(::_pbi::ConstantInitialized{}) {}
~IcingSearchEngineOptionsDefaultTypeInternalicing::lib::IcingSearchEngineOptionsDefaultTypeInternal89 ~IcingSearchEngineOptionsDefaultTypeInternal() {}
90 union { // NOLINT(misc-non-private-member-variables-in-classes)
91 IcingSearchEngineOptions _instance;
92 };
93 };
94 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IcingSearchEngineOptionsDefaultTypeInternal _IcingSearchEngineOptions_default_instance_;
InitializeResultProto(::_pbi::ConstantInitialized)95 PROTOBUF_CONSTEXPR InitializeResultProto::InitializeResultProto(
96 ::_pbi::ConstantInitialized): _impl_{
97 /*decltype(_impl_._has_bits_)*/{}
98 , /*decltype(_impl_._cached_size_)*/{}
99 , /*decltype(_impl_.status_)*/nullptr
100 , /*decltype(_impl_.initialize_stats_)*/nullptr} {}
101 struct InitializeResultProtoDefaultTypeInternal {
InitializeResultProtoDefaultTypeInternalicing::lib::InitializeResultProtoDefaultTypeInternal102 PROTOBUF_CONSTEXPR InitializeResultProtoDefaultTypeInternal()
103 : _instance(::_pbi::ConstantInitialized{}) {}
~InitializeResultProtoDefaultTypeInternalicing::lib::InitializeResultProtoDefaultTypeInternal104 ~InitializeResultProtoDefaultTypeInternal() {}
105 union { // NOLINT(misc-non-private-member-variables-in-classes)
106 InitializeResultProto _instance;
107 };
108 };
109 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InitializeResultProtoDefaultTypeInternal _InitializeResultProto_default_instance_;
110 } // namespace lib
111 } // namespace icing
112 namespace icing {
113 namespace lib {
IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_IsValid(int value)114 bool IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_IsValid(int value) {
115 switch (value) {
116 case 0:
117 case 1:
118 case 2:
119 case 3:
120 case 4:
121 case 5:
122 case 6:
123 return true;
124 default:
125 return false;
126 }
127 }
128
129 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_strings[7] = {};
130
131 static const char IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names[] =
132 "FEATURE_EMBEDDING_INDEX"
133 "FEATURE_EMBEDDING_QUANTIZATION"
134 "FEATURE_HAS_PROPERTY_OPERATOR"
135 "FEATURE_QUALIFIED_ID_JOIN_INDEX_V3_AND_DELETE_PROPAGATE_FROM"
136 "FEATURE_SCHEMA_DATABASE"
137 "FEATURE_SCORABLE_PROPERTIES"
138 "UNKNOWN";
139
140 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries[] = {
141 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 0, 23}, 2 },
142 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 23, 30}, 4 },
143 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 53, 29}, 1 },
144 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 82, 60}, 6 },
145 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 142, 23}, 5 },
146 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 165, 27}, 3 },
147 { {IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_names + 192, 7}, 0 },
148 };
149
150 static const int IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries_by_number[] = {
151 6, // 0 -> UNKNOWN
152 2, // 1 -> FEATURE_HAS_PROPERTY_OPERATOR
153 0, // 2 -> FEATURE_EMBEDDING_INDEX
154 5, // 3 -> FEATURE_SCORABLE_PROPERTIES
155 1, // 4 -> FEATURE_EMBEDDING_QUANTIZATION
156 4, // 5 -> FEATURE_SCHEMA_DATABASE
157 3, // 6 -> FEATURE_QUALIFIED_ID_JOIN_INDEX_V3_AND_DELETE_PROPAGATE_FROM
158 };
159
IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_Name(IcingSearchEngineFeatureInfoProto_FlaggedFeatureType value)160 const std::string& IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_Name(
161 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType value) {
162 static const bool dummy =
163 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
164 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries,
165 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries_by_number,
166 7, IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_strings);
167 (void) dummy;
168 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
169 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries,
170 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries_by_number,
171 7, value);
172 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
173 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_strings[idx].get();
174 }
IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,IcingSearchEngineFeatureInfoProto_FlaggedFeatureType * value)175 bool IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_Parse(
176 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, IcingSearchEngineFeatureInfoProto_FlaggedFeatureType* value) {
177 int int_value;
178 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
179 IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_entries, 7, name, &int_value);
180 if (success) {
181 *value = static_cast<IcingSearchEngineFeatureInfoProto_FlaggedFeatureType>(int_value);
182 }
183 return success;
184 }
185 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
186 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::UNKNOWN;
187 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_HAS_PROPERTY_OPERATOR;
188 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_EMBEDDING_INDEX;
189 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_SCORABLE_PROPERTIES;
190 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_EMBEDDING_QUANTIZATION;
191 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_SCHEMA_DATABASE;
192 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FEATURE_QUALIFIED_ID_JOIN_INDEX_V3_AND_DELETE_PROPAGATE_FROM;
193 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FlaggedFeatureType_MIN;
194 constexpr IcingSearchEngineFeatureInfoProto_FlaggedFeatureType IcingSearchEngineFeatureInfoProto::FlaggedFeatureType_MAX;
195 constexpr int IcingSearchEngineFeatureInfoProto::FlaggedFeatureType_ARRAYSIZE;
196 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
197
198 // ===================================================================
199
200 class IcingSearchEngineFeatureInfoProto::_Internal {
201 public:
202 using HasBits = decltype(std::declval<IcingSearchEngineFeatureInfoProto>()._impl_._has_bits_);
set_has_feature_type(HasBits * has_bits)203 static void set_has_feature_type(HasBits* has_bits) {
204 (*has_bits)[0] |= 1u;
205 }
set_has_needs_document_store_rebuild(HasBits * has_bits)206 static void set_has_needs_document_store_rebuild(HasBits* has_bits) {
207 (*has_bits)[0] |= 2u;
208 }
set_has_needs_schema_store_rebuild(HasBits * has_bits)209 static void set_has_needs_schema_store_rebuild(HasBits* has_bits) {
210 (*has_bits)[0] |= 4u;
211 }
set_has_needs_term_index_rebuild(HasBits * has_bits)212 static void set_has_needs_term_index_rebuild(HasBits* has_bits) {
213 (*has_bits)[0] |= 8u;
214 }
set_has_needs_integer_index_rebuild(HasBits * has_bits)215 static void set_has_needs_integer_index_rebuild(HasBits* has_bits) {
216 (*has_bits)[0] |= 16u;
217 }
set_has_needs_qualified_id_join_index_rebuild(HasBits * has_bits)218 static void set_has_needs_qualified_id_join_index_rebuild(HasBits* has_bits) {
219 (*has_bits)[0] |= 32u;
220 }
set_has_needs_embedding_index_rebuild(HasBits * has_bits)221 static void set_has_needs_embedding_index_rebuild(HasBits* has_bits) {
222 (*has_bits)[0] |= 64u;
223 }
224 };
225
IcingSearchEngineFeatureInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)226 IcingSearchEngineFeatureInfoProto::IcingSearchEngineFeatureInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
227 bool is_message_owned)
228 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
229 SharedCtor(arena, is_message_owned);
230 // @@protoc_insertion_point(arena_constructor:icing.lib.IcingSearchEngineFeatureInfoProto)
231 }
IcingSearchEngineFeatureInfoProto(const IcingSearchEngineFeatureInfoProto & from)232 IcingSearchEngineFeatureInfoProto::IcingSearchEngineFeatureInfoProto(const IcingSearchEngineFeatureInfoProto& from)
233 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
234 IcingSearchEngineFeatureInfoProto* const _this = this; (void)_this;
235 new (&_impl_) Impl_{
236 decltype(_impl_._has_bits_){from._impl_._has_bits_}
237 , /*decltype(_impl_._cached_size_)*/{}
238 , decltype(_impl_.feature_type_){}
239 , decltype(_impl_.needs_document_store_rebuild_){}
240 , decltype(_impl_.needs_schema_store_rebuild_){}
241 , decltype(_impl_.needs_term_index_rebuild_){}
242 , decltype(_impl_.needs_integer_index_rebuild_){}
243 , decltype(_impl_.needs_qualified_id_join_index_rebuild_){}
244 , decltype(_impl_.needs_embedding_index_rebuild_){}};
245
246 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
247 ::memcpy(&_impl_.feature_type_, &from._impl_.feature_type_,
248 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.needs_embedding_index_rebuild_) -
249 reinterpret_cast<char*>(&_impl_.feature_type_)) + sizeof(_impl_.needs_embedding_index_rebuild_));
250 // @@protoc_insertion_point(copy_constructor:icing.lib.IcingSearchEngineFeatureInfoProto)
251 }
252
SharedCtor(::_pb::Arena * arena,bool is_message_owned)253 inline void IcingSearchEngineFeatureInfoProto::SharedCtor(
254 ::_pb::Arena* arena, bool is_message_owned) {
255 (void)arena;
256 (void)is_message_owned;
257 new (&_impl_) Impl_{
258 decltype(_impl_._has_bits_){}
259 , /*decltype(_impl_._cached_size_)*/{}
260 , decltype(_impl_.feature_type_){0}
261 , decltype(_impl_.needs_document_store_rebuild_){false}
262 , decltype(_impl_.needs_schema_store_rebuild_){false}
263 , decltype(_impl_.needs_term_index_rebuild_){false}
264 , decltype(_impl_.needs_integer_index_rebuild_){false}
265 , decltype(_impl_.needs_qualified_id_join_index_rebuild_){false}
266 , decltype(_impl_.needs_embedding_index_rebuild_){false}
267 };
268 }
269
~IcingSearchEngineFeatureInfoProto()270 IcingSearchEngineFeatureInfoProto::~IcingSearchEngineFeatureInfoProto() {
271 // @@protoc_insertion_point(destructor:icing.lib.IcingSearchEngineFeatureInfoProto)
272 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
273 (void)arena;
274 return;
275 }
276 SharedDtor();
277 }
278
SharedDtor()279 inline void IcingSearchEngineFeatureInfoProto::SharedDtor() {
280 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
281 }
282
SetCachedSize(int size) const283 void IcingSearchEngineFeatureInfoProto::SetCachedSize(int size) const {
284 _impl_._cached_size_.Set(size);
285 }
286
Clear()287 void IcingSearchEngineFeatureInfoProto::Clear() {
288 // @@protoc_insertion_point(message_clear_start:icing.lib.IcingSearchEngineFeatureInfoProto)
289 ::uint32_t cached_has_bits = 0;
290 // Prevent compiler warnings about cached_has_bits being unused
291 (void) cached_has_bits;
292
293 cached_has_bits = _impl_._has_bits_[0];
294 if (cached_has_bits & 0x0000007fu) {
295 ::memset(&_impl_.feature_type_, 0, static_cast<size_t>(
296 reinterpret_cast<char*>(&_impl_.needs_embedding_index_rebuild_) -
297 reinterpret_cast<char*>(&_impl_.feature_type_)) + sizeof(_impl_.needs_embedding_index_rebuild_));
298 }
299 _impl_._has_bits_.Clear();
300 _internal_metadata_.Clear<std::string>();
301 }
302
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)303 const char* IcingSearchEngineFeatureInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
304 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
305 _Internal::HasBits has_bits{};
306 while (!ctx->Done(&ptr)) {
307 ::uint32_t tag;
308 ptr = ::_pbi::ReadTag(ptr, &tag);
309 switch (tag >> 3) {
310 // optional .icing.lib.IcingSearchEngineFeatureInfoProto.FlaggedFeatureType feature_type = 1;
311 case 1:
312 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
313 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
314 CHK_(ptr);
315 if (PROTOBUF_PREDICT_TRUE(::icing::lib::IcingSearchEngineFeatureInfoProto_FlaggedFeatureType_IsValid(val))) {
316 _internal_set_feature_type(static_cast<::icing::lib::IcingSearchEngineFeatureInfoProto_FlaggedFeatureType>(val));
317 } else {
318 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
319 }
320 } else {
321 goto handle_unusual;
322 }
323 continue;
324 // optional bool needs_document_store_rebuild = 2;
325 case 2:
326 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
327 _Internal::set_has_needs_document_store_rebuild(&has_bits);
328 _impl_.needs_document_store_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
329 CHK_(ptr);
330 } else {
331 goto handle_unusual;
332 }
333 continue;
334 // optional bool needs_schema_store_rebuild = 3;
335 case 3:
336 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
337 _Internal::set_has_needs_schema_store_rebuild(&has_bits);
338 _impl_.needs_schema_store_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
339 CHK_(ptr);
340 } else {
341 goto handle_unusual;
342 }
343 continue;
344 // optional bool needs_term_index_rebuild = 4;
345 case 4:
346 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
347 _Internal::set_has_needs_term_index_rebuild(&has_bits);
348 _impl_.needs_term_index_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
349 CHK_(ptr);
350 } else {
351 goto handle_unusual;
352 }
353 continue;
354 // optional bool needs_integer_index_rebuild = 5;
355 case 5:
356 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
357 _Internal::set_has_needs_integer_index_rebuild(&has_bits);
358 _impl_.needs_integer_index_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
359 CHK_(ptr);
360 } else {
361 goto handle_unusual;
362 }
363 continue;
364 // optional bool needs_qualified_id_join_index_rebuild = 6;
365 case 6:
366 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
367 _Internal::set_has_needs_qualified_id_join_index_rebuild(&has_bits);
368 _impl_.needs_qualified_id_join_index_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
369 CHK_(ptr);
370 } else {
371 goto handle_unusual;
372 }
373 continue;
374 // optional bool needs_embedding_index_rebuild = 7;
375 case 7:
376 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
377 _Internal::set_has_needs_embedding_index_rebuild(&has_bits);
378 _impl_.needs_embedding_index_rebuild_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
379 CHK_(ptr);
380 } else {
381 goto handle_unusual;
382 }
383 continue;
384 default:
385 goto handle_unusual;
386 } // switch
387 handle_unusual:
388 if ((tag == 0) || ((tag & 7) == 4)) {
389 CHK_(ptr);
390 ctx->SetLastTag(tag);
391 goto message_done;
392 }
393 ptr = UnknownFieldParse(
394 tag,
395 _internal_metadata_.mutable_unknown_fields<std::string>(),
396 ptr, ctx);
397 CHK_(ptr != nullptr);
398 } // while
399 message_done:
400 _impl_._has_bits_.Or(has_bits);
401 return ptr;
402 failure:
403 ptr = nullptr;
404 goto message_done;
405 #undef CHK_
406 }
407
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const408 ::uint8_t* IcingSearchEngineFeatureInfoProto::_InternalSerialize(
409 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
410 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.IcingSearchEngineFeatureInfoProto)
411 ::uint32_t cached_has_bits = 0;
412 (void) cached_has_bits;
413
414 cached_has_bits = _impl_._has_bits_[0];
415 // optional .icing.lib.IcingSearchEngineFeatureInfoProto.FlaggedFeatureType feature_type = 1;
416 if (cached_has_bits & 0x00000001u) {
417 target = stream->EnsureSpace(target);
418 target = ::_pbi::WireFormatLite::WriteEnumToArray(
419 1, this->_internal_feature_type(), target);
420 }
421
422 // optional bool needs_document_store_rebuild = 2;
423 if (cached_has_bits & 0x00000002u) {
424 target = stream->EnsureSpace(target);
425 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_needs_document_store_rebuild(), target);
426 }
427
428 // optional bool needs_schema_store_rebuild = 3;
429 if (cached_has_bits & 0x00000004u) {
430 target = stream->EnsureSpace(target);
431 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_needs_schema_store_rebuild(), target);
432 }
433
434 // optional bool needs_term_index_rebuild = 4;
435 if (cached_has_bits & 0x00000008u) {
436 target = stream->EnsureSpace(target);
437 target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_needs_term_index_rebuild(), target);
438 }
439
440 // optional bool needs_integer_index_rebuild = 5;
441 if (cached_has_bits & 0x00000010u) {
442 target = stream->EnsureSpace(target);
443 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_needs_integer_index_rebuild(), target);
444 }
445
446 // optional bool needs_qualified_id_join_index_rebuild = 6;
447 if (cached_has_bits & 0x00000020u) {
448 target = stream->EnsureSpace(target);
449 target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_needs_qualified_id_join_index_rebuild(), target);
450 }
451
452 // optional bool needs_embedding_index_rebuild = 7;
453 if (cached_has_bits & 0x00000040u) {
454 target = stream->EnsureSpace(target);
455 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_needs_embedding_index_rebuild(), target);
456 }
457
458 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
459 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
460 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
461 }
462 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.IcingSearchEngineFeatureInfoProto)
463 return target;
464 }
465
ByteSizeLong() const466 size_t IcingSearchEngineFeatureInfoProto::ByteSizeLong() const {
467 // @@protoc_insertion_point(message_byte_size_start:icing.lib.IcingSearchEngineFeatureInfoProto)
468 size_t total_size = 0;
469
470 ::uint32_t cached_has_bits = 0;
471 // Prevent compiler warnings about cached_has_bits being unused
472 (void) cached_has_bits;
473
474 cached_has_bits = _impl_._has_bits_[0];
475 if (cached_has_bits & 0x0000007fu) {
476 // optional .icing.lib.IcingSearchEngineFeatureInfoProto.FlaggedFeatureType feature_type = 1;
477 if (cached_has_bits & 0x00000001u) {
478 total_size += 1 +
479 ::_pbi::WireFormatLite::EnumSize(this->_internal_feature_type());
480 }
481
482 // optional bool needs_document_store_rebuild = 2;
483 if (cached_has_bits & 0x00000002u) {
484 total_size += 1 + 1;
485 }
486
487 // optional bool needs_schema_store_rebuild = 3;
488 if (cached_has_bits & 0x00000004u) {
489 total_size += 1 + 1;
490 }
491
492 // optional bool needs_term_index_rebuild = 4;
493 if (cached_has_bits & 0x00000008u) {
494 total_size += 1 + 1;
495 }
496
497 // optional bool needs_integer_index_rebuild = 5;
498 if (cached_has_bits & 0x00000010u) {
499 total_size += 1 + 1;
500 }
501
502 // optional bool needs_qualified_id_join_index_rebuild = 6;
503 if (cached_has_bits & 0x00000020u) {
504 total_size += 1 + 1;
505 }
506
507 // optional bool needs_embedding_index_rebuild = 7;
508 if (cached_has_bits & 0x00000040u) {
509 total_size += 1 + 1;
510 }
511
512 }
513 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
514 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
515 }
516 int cached_size = ::_pbi::ToCachedSize(total_size);
517 SetCachedSize(cached_size);
518 return total_size;
519 }
520
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)521 void IcingSearchEngineFeatureInfoProto::CheckTypeAndMergeFrom(
522 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
523 MergeFrom(*::_pbi::DownCast<const IcingSearchEngineFeatureInfoProto*>(
524 &from));
525 }
526
MergeFrom(const IcingSearchEngineFeatureInfoProto & from)527 void IcingSearchEngineFeatureInfoProto::MergeFrom(const IcingSearchEngineFeatureInfoProto& from) {
528 IcingSearchEngineFeatureInfoProto* const _this = this;
529 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.IcingSearchEngineFeatureInfoProto)
530 GOOGLE_DCHECK_NE(&from, _this);
531 ::uint32_t cached_has_bits = 0;
532 (void) cached_has_bits;
533
534 cached_has_bits = from._impl_._has_bits_[0];
535 if (cached_has_bits & 0x0000007fu) {
536 if (cached_has_bits & 0x00000001u) {
537 _this->_impl_.feature_type_ = from._impl_.feature_type_;
538 }
539 if (cached_has_bits & 0x00000002u) {
540 _this->_impl_.needs_document_store_rebuild_ = from._impl_.needs_document_store_rebuild_;
541 }
542 if (cached_has_bits & 0x00000004u) {
543 _this->_impl_.needs_schema_store_rebuild_ = from._impl_.needs_schema_store_rebuild_;
544 }
545 if (cached_has_bits & 0x00000008u) {
546 _this->_impl_.needs_term_index_rebuild_ = from._impl_.needs_term_index_rebuild_;
547 }
548 if (cached_has_bits & 0x00000010u) {
549 _this->_impl_.needs_integer_index_rebuild_ = from._impl_.needs_integer_index_rebuild_;
550 }
551 if (cached_has_bits & 0x00000020u) {
552 _this->_impl_.needs_qualified_id_join_index_rebuild_ = from._impl_.needs_qualified_id_join_index_rebuild_;
553 }
554 if (cached_has_bits & 0x00000040u) {
555 _this->_impl_.needs_embedding_index_rebuild_ = from._impl_.needs_embedding_index_rebuild_;
556 }
557 _this->_impl_._has_bits_[0] |= cached_has_bits;
558 }
559 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
560 }
561
CopyFrom(const IcingSearchEngineFeatureInfoProto & from)562 void IcingSearchEngineFeatureInfoProto::CopyFrom(const IcingSearchEngineFeatureInfoProto& from) {
563 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.IcingSearchEngineFeatureInfoProto)
564 if (&from == this) return;
565 Clear();
566 MergeFrom(from);
567 }
568
IsInitialized() const569 bool IcingSearchEngineFeatureInfoProto::IsInitialized() const {
570 return true;
571 }
572
InternalSwap(IcingSearchEngineFeatureInfoProto * other)573 void IcingSearchEngineFeatureInfoProto::InternalSwap(IcingSearchEngineFeatureInfoProto* other) {
574 using std::swap;
575 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
576 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
577 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
578 PROTOBUF_FIELD_OFFSET(IcingSearchEngineFeatureInfoProto, _impl_.needs_embedding_index_rebuild_)
579 + sizeof(IcingSearchEngineFeatureInfoProto::_impl_.needs_embedding_index_rebuild_) // NOLINT
580 - PROTOBUF_FIELD_OFFSET(IcingSearchEngineFeatureInfoProto, _impl_.feature_type_)>(
581 reinterpret_cast<char*>(&_impl_.feature_type_),
582 reinterpret_cast<char*>(&other->_impl_.feature_type_));
583 }
584
GetTypeName() const585 std::string IcingSearchEngineFeatureInfoProto::GetTypeName() const {
586 return "icing.lib.IcingSearchEngineFeatureInfoProto";
587 }
588
589
590 // ===================================================================
591
592 class IcingSearchEngineVersionProto::_Internal {
593 public:
594 using HasBits = decltype(std::declval<IcingSearchEngineVersionProto>()._impl_._has_bits_);
set_has_version(HasBits * has_bits)595 static void set_has_version(HasBits* has_bits) {
596 (*has_bits)[0] |= 1u;
597 }
set_has_max_version(HasBits * has_bits)598 static void set_has_max_version(HasBits* has_bits) {
599 (*has_bits)[0] |= 2u;
600 }
601 };
602
IcingSearchEngineVersionProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)603 IcingSearchEngineVersionProto::IcingSearchEngineVersionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
604 bool is_message_owned)
605 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
606 SharedCtor(arena, is_message_owned);
607 // @@protoc_insertion_point(arena_constructor:icing.lib.IcingSearchEngineVersionProto)
608 }
IcingSearchEngineVersionProto(const IcingSearchEngineVersionProto & from)609 IcingSearchEngineVersionProto::IcingSearchEngineVersionProto(const IcingSearchEngineVersionProto& from)
610 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
611 IcingSearchEngineVersionProto* const _this = this; (void)_this;
612 new (&_impl_) Impl_{
613 decltype(_impl_._has_bits_){from._impl_._has_bits_}
614 , /*decltype(_impl_._cached_size_)*/{}
615 , decltype(_impl_.enabled_features_){from._impl_.enabled_features_}
616 , decltype(_impl_.version_){}
617 , decltype(_impl_.max_version_){}};
618
619 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
620 ::memcpy(&_impl_.version_, &from._impl_.version_,
621 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_version_) -
622 reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.max_version_));
623 // @@protoc_insertion_point(copy_constructor:icing.lib.IcingSearchEngineVersionProto)
624 }
625
SharedCtor(::_pb::Arena * arena,bool is_message_owned)626 inline void IcingSearchEngineVersionProto::SharedCtor(
627 ::_pb::Arena* arena, bool is_message_owned) {
628 (void)arena;
629 (void)is_message_owned;
630 new (&_impl_) Impl_{
631 decltype(_impl_._has_bits_){}
632 , /*decltype(_impl_._cached_size_)*/{}
633 , decltype(_impl_.enabled_features_){arena}
634 , decltype(_impl_.version_){0}
635 , decltype(_impl_.max_version_){0}
636 };
637 }
638
~IcingSearchEngineVersionProto()639 IcingSearchEngineVersionProto::~IcingSearchEngineVersionProto() {
640 // @@protoc_insertion_point(destructor:icing.lib.IcingSearchEngineVersionProto)
641 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
642 (void)arena;
643 return;
644 }
645 SharedDtor();
646 }
647
SharedDtor()648 inline void IcingSearchEngineVersionProto::SharedDtor() {
649 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
650 _impl_.enabled_features_.~RepeatedPtrField();
651 }
652
SetCachedSize(int size) const653 void IcingSearchEngineVersionProto::SetCachedSize(int size) const {
654 _impl_._cached_size_.Set(size);
655 }
656
Clear()657 void IcingSearchEngineVersionProto::Clear() {
658 // @@protoc_insertion_point(message_clear_start:icing.lib.IcingSearchEngineVersionProto)
659 ::uint32_t cached_has_bits = 0;
660 // Prevent compiler warnings about cached_has_bits being unused
661 (void) cached_has_bits;
662
663 _impl_.enabled_features_.Clear();
664 cached_has_bits = _impl_._has_bits_[0];
665 if (cached_has_bits & 0x00000003u) {
666 ::memset(&_impl_.version_, 0, static_cast<size_t>(
667 reinterpret_cast<char*>(&_impl_.max_version_) -
668 reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.max_version_));
669 }
670 _impl_._has_bits_.Clear();
671 _internal_metadata_.Clear<std::string>();
672 }
673
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)674 const char* IcingSearchEngineVersionProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
675 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
676 _Internal::HasBits has_bits{};
677 while (!ctx->Done(&ptr)) {
678 ::uint32_t tag;
679 ptr = ::_pbi::ReadTag(ptr, &tag);
680 switch (tag >> 3) {
681 // optional int32 version = 1;
682 case 1:
683 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
684 _Internal::set_has_version(&has_bits);
685 _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
686 CHK_(ptr);
687 } else {
688 goto handle_unusual;
689 }
690 continue;
691 // optional int32 max_version = 2;
692 case 2:
693 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
694 _Internal::set_has_max_version(&has_bits);
695 _impl_.max_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
696 CHK_(ptr);
697 } else {
698 goto handle_unusual;
699 }
700 continue;
701 // repeated .icing.lib.IcingSearchEngineFeatureInfoProto enabled_features = 3;
702 case 3:
703 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
704 ptr -= 1;
705 do {
706 ptr += 1;
707 ptr = ctx->ParseMessage(_internal_add_enabled_features(), ptr);
708 CHK_(ptr);
709 if (!ctx->DataAvailable(ptr)) break;
710 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
711 } else {
712 goto handle_unusual;
713 }
714 continue;
715 default:
716 goto handle_unusual;
717 } // switch
718 handle_unusual:
719 if ((tag == 0) || ((tag & 7) == 4)) {
720 CHK_(ptr);
721 ctx->SetLastTag(tag);
722 goto message_done;
723 }
724 ptr = UnknownFieldParse(
725 tag,
726 _internal_metadata_.mutable_unknown_fields<std::string>(),
727 ptr, ctx);
728 CHK_(ptr != nullptr);
729 } // while
730 message_done:
731 _impl_._has_bits_.Or(has_bits);
732 return ptr;
733 failure:
734 ptr = nullptr;
735 goto message_done;
736 #undef CHK_
737 }
738
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const739 ::uint8_t* IcingSearchEngineVersionProto::_InternalSerialize(
740 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
741 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.IcingSearchEngineVersionProto)
742 ::uint32_t cached_has_bits = 0;
743 (void) cached_has_bits;
744
745 cached_has_bits = _impl_._has_bits_[0];
746 // optional int32 version = 1;
747 if (cached_has_bits & 0x00000001u) {
748 target = stream->EnsureSpace(target);
749 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target);
750 }
751
752 // optional int32 max_version = 2;
753 if (cached_has_bits & 0x00000002u) {
754 target = stream->EnsureSpace(target);
755 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_version(), target);
756 }
757
758 // repeated .icing.lib.IcingSearchEngineFeatureInfoProto enabled_features = 3;
759 for (unsigned i = 0,
760 n = static_cast<unsigned>(this->_internal_enabled_features_size()); i < n; i++) {
761 const auto& repfield = this->_internal_enabled_features(i);
762 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
763 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
764 }
765
766 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
767 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
768 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
769 }
770 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.IcingSearchEngineVersionProto)
771 return target;
772 }
773
ByteSizeLong() const774 size_t IcingSearchEngineVersionProto::ByteSizeLong() const {
775 // @@protoc_insertion_point(message_byte_size_start:icing.lib.IcingSearchEngineVersionProto)
776 size_t total_size = 0;
777
778 ::uint32_t cached_has_bits = 0;
779 // Prevent compiler warnings about cached_has_bits being unused
780 (void) cached_has_bits;
781
782 // repeated .icing.lib.IcingSearchEngineFeatureInfoProto enabled_features = 3;
783 total_size += 1UL * this->_internal_enabled_features_size();
784 for (const auto& msg : this->_impl_.enabled_features_) {
785 total_size +=
786 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
787 }
788
789 cached_has_bits = _impl_._has_bits_[0];
790 if (cached_has_bits & 0x00000003u) {
791 // optional int32 version = 1;
792 if (cached_has_bits & 0x00000001u) {
793 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_version());
794 }
795
796 // optional int32 max_version = 2;
797 if (cached_has_bits & 0x00000002u) {
798 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_version());
799 }
800
801 }
802 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
803 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
804 }
805 int cached_size = ::_pbi::ToCachedSize(total_size);
806 SetCachedSize(cached_size);
807 return total_size;
808 }
809
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)810 void IcingSearchEngineVersionProto::CheckTypeAndMergeFrom(
811 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
812 MergeFrom(*::_pbi::DownCast<const IcingSearchEngineVersionProto*>(
813 &from));
814 }
815
MergeFrom(const IcingSearchEngineVersionProto & from)816 void IcingSearchEngineVersionProto::MergeFrom(const IcingSearchEngineVersionProto& from) {
817 IcingSearchEngineVersionProto* const _this = this;
818 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.IcingSearchEngineVersionProto)
819 GOOGLE_DCHECK_NE(&from, _this);
820 ::uint32_t cached_has_bits = 0;
821 (void) cached_has_bits;
822
823 _this->_impl_.enabled_features_.MergeFrom(from._impl_.enabled_features_);
824 cached_has_bits = from._impl_._has_bits_[0];
825 if (cached_has_bits & 0x00000003u) {
826 if (cached_has_bits & 0x00000001u) {
827 _this->_impl_.version_ = from._impl_.version_;
828 }
829 if (cached_has_bits & 0x00000002u) {
830 _this->_impl_.max_version_ = from._impl_.max_version_;
831 }
832 _this->_impl_._has_bits_[0] |= cached_has_bits;
833 }
834 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
835 }
836
CopyFrom(const IcingSearchEngineVersionProto & from)837 void IcingSearchEngineVersionProto::CopyFrom(const IcingSearchEngineVersionProto& from) {
838 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.IcingSearchEngineVersionProto)
839 if (&from == this) return;
840 Clear();
841 MergeFrom(from);
842 }
843
IsInitialized() const844 bool IcingSearchEngineVersionProto::IsInitialized() const {
845 return true;
846 }
847
InternalSwap(IcingSearchEngineVersionProto * other)848 void IcingSearchEngineVersionProto::InternalSwap(IcingSearchEngineVersionProto* other) {
849 using std::swap;
850 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
851 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
852 _impl_.enabled_features_.InternalSwap(&other->_impl_.enabled_features_);
853 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
854 PROTOBUF_FIELD_OFFSET(IcingSearchEngineVersionProto, _impl_.max_version_)
855 + sizeof(IcingSearchEngineVersionProto::_impl_.max_version_) // NOLINT
856 - PROTOBUF_FIELD_OFFSET(IcingSearchEngineVersionProto, _impl_.version_)>(
857 reinterpret_cast<char*>(&_impl_.version_),
858 reinterpret_cast<char*>(&other->_impl_.version_));
859 }
860
GetTypeName() const861 std::string IcingSearchEngineVersionProto::GetTypeName() const {
862 return "icing.lib.IcingSearchEngineVersionProto";
863 }
864
865
866 // ===================================================================
867
868 class IcingSearchEngineOptions::_Internal {
869 public:
870 using HasBits = decltype(std::declval<IcingSearchEngineOptions>()._impl_._has_bits_);
set_has_base_dir(HasBits * has_bits)871 static void set_has_base_dir(HasBits* has_bits) {
872 (*has_bits)[0] |= 1u;
873 }
set_has_max_token_length(HasBits * has_bits)874 static void set_has_max_token_length(HasBits* has_bits) {
875 (*has_bits)[0] |= 131072u;
876 }
set_has_index_merge_size(HasBits * has_bits)877 static void set_has_index_merge_size(HasBits* has_bits) {
878 (*has_bits)[0] |= 262144u;
879 }
set_has_document_store_namespace_id_fingerprint(HasBits * has_bits)880 static void set_has_document_store_namespace_id_fingerprint(HasBits* has_bits) {
881 (*has_bits)[0] |= 4u;
882 }
set_has_optimize_rebuild_index_threshold(HasBits * has_bits)883 static void set_has_optimize_rebuild_index_threshold(HasBits* has_bits) {
884 (*has_bits)[0] |= 2u;
885 }
set_has_compression_level(HasBits * has_bits)886 static void set_has_compression_level(HasBits* has_bits) {
887 (*has_bits)[0] |= 524288u;
888 }
set_has_allow_circular_schema_definitions(HasBits * has_bits)889 static void set_has_allow_circular_schema_definitions(HasBits* has_bits) {
890 (*has_bits)[0] |= 8u;
891 }
set_has_pre_mapping_fbv(HasBits * has_bits)892 static void set_has_pre_mapping_fbv(HasBits* has_bits) {
893 (*has_bits)[0] |= 16u;
894 }
set_has_use_persistent_hash_map(HasBits * has_bits)895 static void set_has_use_persistent_hash_map(HasBits* has_bits) {
896 (*has_bits)[0] |= 32u;
897 }
set_has_integer_index_bucket_split_threshold(HasBits * has_bits)898 static void set_has_integer_index_bucket_split_threshold(HasBits* has_bits) {
899 (*has_bits)[0] |= 1048576u;
900 }
set_has_lite_index_sort_at_indexing(HasBits * has_bits)901 static void set_has_lite_index_sort_at_indexing(HasBits* has_bits) {
902 (*has_bits)[0] |= 128u;
903 }
set_has_lite_index_sort_size(HasBits * has_bits)904 static void set_has_lite_index_sort_size(HasBits* has_bits) {
905 (*has_bits)[0] |= 2097152u;
906 }
set_has_use_new_qualified_id_join_index(HasBits * has_bits)907 static void set_has_use_new_qualified_id_join_index(HasBits* has_bits) {
908 (*has_bits)[0] |= 256u;
909 }
set_has_build_property_existence_metadata_hits(HasBits * has_bits)910 static void set_has_build_property_existence_metadata_hits(HasBits* has_bits) {
911 (*has_bits)[0] |= 512u;
912 }
set_has_enable_blob_store(HasBits * has_bits)913 static void set_has_enable_blob_store(HasBits* has_bits) {
914 (*has_bits)[0] |= 1024u;
915 }
set_has_orphan_blob_time_to_live_ms(HasBits * has_bits)916 static void set_has_orphan_blob_time_to_live_ms(HasBits* has_bits) {
917 (*has_bits)[0] |= 64u;
918 }
set_has_enable_schema_database(HasBits * has_bits)919 static void set_has_enable_schema_database(HasBits* has_bits) {
920 (*has_bits)[0] |= 2048u;
921 }
set_has_enable_embedding_index(HasBits * has_bits)922 static void set_has_enable_embedding_index(HasBits* has_bits) {
923 (*has_bits)[0] |= 4194304u;
924 }
set_has_enable_scorable_properties(HasBits * has_bits)925 static void set_has_enable_scorable_properties(HasBits* has_bits) {
926 (*has_bits)[0] |= 4096u;
927 }
set_has_enable_embedding_quantization(HasBits * has_bits)928 static void set_has_enable_embedding_quantization(HasBits* has_bits) {
929 (*has_bits)[0] |= 8192u;
930 }
set_has_blob_store_compression_level(HasBits * has_bits)931 static void set_has_blob_store_compression_level(HasBits* has_bits) {
932 (*has_bits)[0] |= 65536u;
933 }
set_has_enable_repeated_field_joins(HasBits * has_bits)934 static void set_has_enable_repeated_field_joins(HasBits* has_bits) {
935 (*has_bits)[0] |= 16384u;
936 }
set_has_enable_qualified_id_join_index_v3_and_delete_propagate_from(HasBits * has_bits)937 static void set_has_enable_qualified_id_join_index_v3_and_delete_propagate_from(HasBits* has_bits) {
938 (*has_bits)[0] |= 32768u;
939 }
940 };
941
IcingSearchEngineOptions(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)942 IcingSearchEngineOptions::IcingSearchEngineOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
943 bool is_message_owned)
944 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
945 SharedCtor(arena, is_message_owned);
946 // @@protoc_insertion_point(arena_constructor:icing.lib.IcingSearchEngineOptions)
947 }
IcingSearchEngineOptions(const IcingSearchEngineOptions & from)948 IcingSearchEngineOptions::IcingSearchEngineOptions(const IcingSearchEngineOptions& from)
949 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
950 IcingSearchEngineOptions* const _this = this; (void)_this;
951 new (&_impl_) Impl_{
952 decltype(_impl_._has_bits_){from._impl_._has_bits_}
953 , /*decltype(_impl_._cached_size_)*/{}
954 , decltype(_impl_.base_dir_){}
955 , decltype(_impl_.optimize_rebuild_index_threshold_){}
956 , decltype(_impl_.document_store_namespace_id_fingerprint_){}
957 , decltype(_impl_.allow_circular_schema_definitions_){}
958 , decltype(_impl_.pre_mapping_fbv_){}
959 , decltype(_impl_.use_persistent_hash_map_){}
960 , decltype(_impl_.orphan_blob_time_to_live_ms_){}
961 , decltype(_impl_.lite_index_sort_at_indexing_){}
962 , decltype(_impl_.use_new_qualified_id_join_index_){}
963 , decltype(_impl_.build_property_existence_metadata_hits_){}
964 , decltype(_impl_.enable_blob_store_){}
965 , decltype(_impl_.enable_schema_database_){}
966 , decltype(_impl_.enable_scorable_properties_){}
967 , decltype(_impl_.enable_embedding_quantization_){}
968 , decltype(_impl_.enable_repeated_field_joins_){}
969 , decltype(_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_){}
970 , decltype(_impl_.blob_store_compression_level_){}
971 , decltype(_impl_.max_token_length_){}
972 , decltype(_impl_.index_merge_size_){}
973 , decltype(_impl_.compression_level_){}
974 , decltype(_impl_.integer_index_bucket_split_threshold_){}
975 , decltype(_impl_.lite_index_sort_size_){}
976 , decltype(_impl_.enable_embedding_index_){}};
977
978 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
979 _impl_.base_dir_.InitDefault();
980 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
981 _impl_.base_dir_.Set("", GetArenaForAllocation());
982 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
983 if (from._internal_has_base_dir()) {
984 _this->_impl_.base_dir_.Set(from._internal_base_dir(),
985 _this->GetArenaForAllocation());
986 }
987 ::memcpy(&_impl_.optimize_rebuild_index_threshold_, &from._impl_.optimize_rebuild_index_threshold_,
988 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.enable_embedding_index_) -
989 reinterpret_cast<char*>(&_impl_.optimize_rebuild_index_threshold_)) + sizeof(_impl_.enable_embedding_index_));
990 // @@protoc_insertion_point(copy_constructor:icing.lib.IcingSearchEngineOptions)
991 }
992
SharedCtor(::_pb::Arena * arena,bool is_message_owned)993 inline void IcingSearchEngineOptions::SharedCtor(
994 ::_pb::Arena* arena, bool is_message_owned) {
995 (void)arena;
996 (void)is_message_owned;
997 new (&_impl_) Impl_{
998 decltype(_impl_._has_bits_){}
999 , /*decltype(_impl_._cached_size_)*/{}
1000 , decltype(_impl_.base_dir_){}
1001 , decltype(_impl_.optimize_rebuild_index_threshold_){0}
1002 , decltype(_impl_.document_store_namespace_id_fingerprint_){false}
1003 , decltype(_impl_.allow_circular_schema_definitions_){false}
1004 , decltype(_impl_.pre_mapping_fbv_){false}
1005 , decltype(_impl_.use_persistent_hash_map_){false}
1006 , decltype(_impl_.orphan_blob_time_to_live_ms_){::int64_t{0}}
1007 , decltype(_impl_.lite_index_sort_at_indexing_){false}
1008 , decltype(_impl_.use_new_qualified_id_join_index_){false}
1009 , decltype(_impl_.build_property_existence_metadata_hits_){false}
1010 , decltype(_impl_.enable_blob_store_){false}
1011 , decltype(_impl_.enable_schema_database_){false}
1012 , decltype(_impl_.enable_scorable_properties_){false}
1013 , decltype(_impl_.enable_embedding_quantization_){false}
1014 , decltype(_impl_.enable_repeated_field_joins_){false}
1015 , decltype(_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_){false}
1016 , decltype(_impl_.blob_store_compression_level_){3}
1017 , decltype(_impl_.max_token_length_){30}
1018 , decltype(_impl_.index_merge_size_){1048576}
1019 , decltype(_impl_.compression_level_){3}
1020 , decltype(_impl_.integer_index_bucket_split_threshold_){65536}
1021 , decltype(_impl_.lite_index_sort_size_){8192}
1022 , decltype(_impl_.enable_embedding_index_){true}
1023 };
1024 _impl_.base_dir_.InitDefault();
1025 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1026 _impl_.base_dir_.Set("", GetArenaForAllocation());
1027 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1028 }
1029
~IcingSearchEngineOptions()1030 IcingSearchEngineOptions::~IcingSearchEngineOptions() {
1031 // @@protoc_insertion_point(destructor:icing.lib.IcingSearchEngineOptions)
1032 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1033 (void)arena;
1034 return;
1035 }
1036 SharedDtor();
1037 }
1038
SharedDtor()1039 inline void IcingSearchEngineOptions::SharedDtor() {
1040 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1041 _impl_.base_dir_.Destroy();
1042 }
1043
SetCachedSize(int size) const1044 void IcingSearchEngineOptions::SetCachedSize(int size) const {
1045 _impl_._cached_size_.Set(size);
1046 }
1047
Clear()1048 void IcingSearchEngineOptions::Clear() {
1049 // @@protoc_insertion_point(message_clear_start:icing.lib.IcingSearchEngineOptions)
1050 ::uint32_t cached_has_bits = 0;
1051 // Prevent compiler warnings about cached_has_bits being unused
1052 (void) cached_has_bits;
1053
1054 cached_has_bits = _impl_._has_bits_[0];
1055 if (cached_has_bits & 0x00000001u) {
1056 _impl_.base_dir_.ClearNonDefaultToEmpty();
1057 }
1058 if (cached_has_bits & 0x000000feu) {
1059 ::memset(&_impl_.optimize_rebuild_index_threshold_, 0, static_cast<size_t>(
1060 reinterpret_cast<char*>(&_impl_.lite_index_sort_at_indexing_) -
1061 reinterpret_cast<char*>(&_impl_.optimize_rebuild_index_threshold_)) + sizeof(_impl_.lite_index_sort_at_indexing_));
1062 }
1063 if (cached_has_bits & 0x0000ff00u) {
1064 ::memset(&_impl_.use_new_qualified_id_join_index_, 0, static_cast<size_t>(
1065 reinterpret_cast<char*>(&_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_) -
1066 reinterpret_cast<char*>(&_impl_.use_new_qualified_id_join_index_)) + sizeof(_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_));
1067 }
1068 if (cached_has_bits & 0x007f0000u) {
1069 _impl_.blob_store_compression_level_ = 3;
1070 _impl_.max_token_length_ = 30;
1071 _impl_.index_merge_size_ = 1048576;
1072 _impl_.compression_level_ = 3;
1073 _impl_.integer_index_bucket_split_threshold_ = 65536;
1074 _impl_.lite_index_sort_size_ = 8192;
1075 _impl_.enable_embedding_index_ = true;
1076 }
1077 _impl_._has_bits_.Clear();
1078 _internal_metadata_.Clear<std::string>();
1079 }
1080
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1081 const char* IcingSearchEngineOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1082 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1083 _Internal::HasBits has_bits{};
1084 while (!ctx->Done(&ptr)) {
1085 ::uint32_t tag;
1086 ptr = ::_pbi::ReadTag(ptr, &tag);
1087 switch (tag >> 3) {
1088 // optional string base_dir = 1;
1089 case 1:
1090 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1091 auto str = _internal_mutable_base_dir();
1092 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1093 CHK_(ptr);
1094 } else {
1095 goto handle_unusual;
1096 }
1097 continue;
1098 // optional int32 max_token_length = 3 [default = 30];
1099 case 3:
1100 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1101 _Internal::set_has_max_token_length(&has_bits);
1102 _impl_.max_token_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1103 CHK_(ptr);
1104 } else {
1105 goto handle_unusual;
1106 }
1107 continue;
1108 // optional int32 index_merge_size = 4 [default = 1048576];
1109 case 4:
1110 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1111 _Internal::set_has_index_merge_size(&has_bits);
1112 _impl_.index_merge_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1113 CHK_(ptr);
1114 } else {
1115 goto handle_unusual;
1116 }
1117 continue;
1118 // optional bool document_store_namespace_id_fingerprint = 5;
1119 case 5:
1120 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1121 _Internal::set_has_document_store_namespace_id_fingerprint(&has_bits);
1122 _impl_.document_store_namespace_id_fingerprint_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1123 CHK_(ptr);
1124 } else {
1125 goto handle_unusual;
1126 }
1127 continue;
1128 // optional float optimize_rebuild_index_threshold = 6 [default = 0];
1129 case 6:
1130 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 53)) {
1131 _Internal::set_has_optimize_rebuild_index_threshold(&has_bits);
1132 _impl_.optimize_rebuild_index_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1133 ptr += sizeof(float);
1134 } else {
1135 goto handle_unusual;
1136 }
1137 continue;
1138 // optional int32 compression_level = 7 [default = 3];
1139 case 7:
1140 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1141 _Internal::set_has_compression_level(&has_bits);
1142 _impl_.compression_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1143 CHK_(ptr);
1144 } else {
1145 goto handle_unusual;
1146 }
1147 continue;
1148 // optional bool allow_circular_schema_definitions = 8;
1149 case 8:
1150 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1151 _Internal::set_has_allow_circular_schema_definitions(&has_bits);
1152 _impl_.allow_circular_schema_definitions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1153 CHK_(ptr);
1154 } else {
1155 goto handle_unusual;
1156 }
1157 continue;
1158 // optional bool pre_mapping_fbv = 9;
1159 case 9:
1160 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1161 _Internal::set_has_pre_mapping_fbv(&has_bits);
1162 _impl_.pre_mapping_fbv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1163 CHK_(ptr);
1164 } else {
1165 goto handle_unusual;
1166 }
1167 continue;
1168 // optional bool use_persistent_hash_map = 10;
1169 case 10:
1170 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1171 _Internal::set_has_use_persistent_hash_map(&has_bits);
1172 _impl_.use_persistent_hash_map_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1173 CHK_(ptr);
1174 } else {
1175 goto handle_unusual;
1176 }
1177 continue;
1178 // optional int32 integer_index_bucket_split_threshold = 11 [default = 65536];
1179 case 11:
1180 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
1181 _Internal::set_has_integer_index_bucket_split_threshold(&has_bits);
1182 _impl_.integer_index_bucket_split_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1183 CHK_(ptr);
1184 } else {
1185 goto handle_unusual;
1186 }
1187 continue;
1188 // optional bool lite_index_sort_at_indexing = 12;
1189 case 12:
1190 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
1191 _Internal::set_has_lite_index_sort_at_indexing(&has_bits);
1192 _impl_.lite_index_sort_at_indexing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1193 CHK_(ptr);
1194 } else {
1195 goto handle_unusual;
1196 }
1197 continue;
1198 // optional int32 lite_index_sort_size = 13 [default = 8192];
1199 case 13:
1200 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
1201 _Internal::set_has_lite_index_sort_size(&has_bits);
1202 _impl_.lite_index_sort_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1203 CHK_(ptr);
1204 } else {
1205 goto handle_unusual;
1206 }
1207 continue;
1208 // optional bool use_new_qualified_id_join_index = 14;
1209 case 14:
1210 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
1211 _Internal::set_has_use_new_qualified_id_join_index(&has_bits);
1212 _impl_.use_new_qualified_id_join_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1213 CHK_(ptr);
1214 } else {
1215 goto handle_unusual;
1216 }
1217 continue;
1218 // optional bool build_property_existence_metadata_hits = 15;
1219 case 15:
1220 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
1221 _Internal::set_has_build_property_existence_metadata_hits(&has_bits);
1222 _impl_.build_property_existence_metadata_hits_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1223 CHK_(ptr);
1224 } else {
1225 goto handle_unusual;
1226 }
1227 continue;
1228 // optional bool enable_blob_store = 16;
1229 case 16:
1230 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
1231 _Internal::set_has_enable_blob_store(&has_bits);
1232 _impl_.enable_blob_store_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1233 CHK_(ptr);
1234 } else {
1235 goto handle_unusual;
1236 }
1237 continue;
1238 // optional int64 orphan_blob_time_to_live_ms = 17;
1239 case 17:
1240 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1241 _Internal::set_has_orphan_blob_time_to_live_ms(&has_bits);
1242 _impl_.orphan_blob_time_to_live_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1243 CHK_(ptr);
1244 } else {
1245 goto handle_unusual;
1246 }
1247 continue;
1248 // optional bool enable_schema_database = 18;
1249 case 18:
1250 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
1251 _Internal::set_has_enable_schema_database(&has_bits);
1252 _impl_.enable_schema_database_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1253 CHK_(ptr);
1254 } else {
1255 goto handle_unusual;
1256 }
1257 continue;
1258 // optional bool enable_embedding_index = 19 [default = true];
1259 case 19:
1260 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
1261 _Internal::set_has_enable_embedding_index(&has_bits);
1262 _impl_.enable_embedding_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1263 CHK_(ptr);
1264 } else {
1265 goto handle_unusual;
1266 }
1267 continue;
1268 // optional bool enable_scorable_properties = 21;
1269 case 21:
1270 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
1271 _Internal::set_has_enable_scorable_properties(&has_bits);
1272 _impl_.enable_scorable_properties_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1273 CHK_(ptr);
1274 } else {
1275 goto handle_unusual;
1276 }
1277 continue;
1278 // optional bool enable_embedding_quantization = 22;
1279 case 22:
1280 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 176)) {
1281 _Internal::set_has_enable_embedding_quantization(&has_bits);
1282 _impl_.enable_embedding_quantization_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1283 CHK_(ptr);
1284 } else {
1285 goto handle_unusual;
1286 }
1287 continue;
1288 // optional int32 blob_store_compression_level = 23 [default = 3];
1289 case 23:
1290 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
1291 _Internal::set_has_blob_store_compression_level(&has_bits);
1292 _impl_.blob_store_compression_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1293 CHK_(ptr);
1294 } else {
1295 goto handle_unusual;
1296 }
1297 continue;
1298 // optional bool enable_repeated_field_joins = 24;
1299 case 24:
1300 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 192)) {
1301 _Internal::set_has_enable_repeated_field_joins(&has_bits);
1302 _impl_.enable_repeated_field_joins_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1303 CHK_(ptr);
1304 } else {
1305 goto handle_unusual;
1306 }
1307 continue;
1308 // optional bool enable_qualified_id_join_index_v3_and_delete_propagate_from = 25;
1309 case 25:
1310 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 200)) {
1311 _Internal::set_has_enable_qualified_id_join_index_v3_and_delete_propagate_from(&has_bits);
1312 _impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1313 CHK_(ptr);
1314 } else {
1315 goto handle_unusual;
1316 }
1317 continue;
1318 default:
1319 goto handle_unusual;
1320 } // switch
1321 handle_unusual:
1322 if ((tag == 0) || ((tag & 7) == 4)) {
1323 CHK_(ptr);
1324 ctx->SetLastTag(tag);
1325 goto message_done;
1326 }
1327 ptr = UnknownFieldParse(
1328 tag,
1329 _internal_metadata_.mutable_unknown_fields<std::string>(),
1330 ptr, ctx);
1331 CHK_(ptr != nullptr);
1332 } // while
1333 message_done:
1334 _impl_._has_bits_.Or(has_bits);
1335 return ptr;
1336 failure:
1337 ptr = nullptr;
1338 goto message_done;
1339 #undef CHK_
1340 }
1341
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1342 ::uint8_t* IcingSearchEngineOptions::_InternalSerialize(
1343 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1344 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.IcingSearchEngineOptions)
1345 ::uint32_t cached_has_bits = 0;
1346 (void) cached_has_bits;
1347
1348 cached_has_bits = _impl_._has_bits_[0];
1349 // optional string base_dir = 1;
1350 if (cached_has_bits & 0x00000001u) {
1351 target = stream->WriteStringMaybeAliased(
1352 1, this->_internal_base_dir(), target);
1353 }
1354
1355 // optional int32 max_token_length = 3 [default = 30];
1356 if (cached_has_bits & 0x00020000u) {
1357 target = stream->EnsureSpace(target);
1358 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_token_length(), target);
1359 }
1360
1361 // optional int32 index_merge_size = 4 [default = 1048576];
1362 if (cached_has_bits & 0x00040000u) {
1363 target = stream->EnsureSpace(target);
1364 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_index_merge_size(), target);
1365 }
1366
1367 // optional bool document_store_namespace_id_fingerprint = 5;
1368 if (cached_has_bits & 0x00000004u) {
1369 target = stream->EnsureSpace(target);
1370 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_document_store_namespace_id_fingerprint(), target);
1371 }
1372
1373 // optional float optimize_rebuild_index_threshold = 6 [default = 0];
1374 if (cached_has_bits & 0x00000002u) {
1375 target = stream->EnsureSpace(target);
1376 target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_optimize_rebuild_index_threshold(), target);
1377 }
1378
1379 // optional int32 compression_level = 7 [default = 3];
1380 if (cached_has_bits & 0x00080000u) {
1381 target = stream->EnsureSpace(target);
1382 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_compression_level(), target);
1383 }
1384
1385 // optional bool allow_circular_schema_definitions = 8;
1386 if (cached_has_bits & 0x00000008u) {
1387 target = stream->EnsureSpace(target);
1388 target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_allow_circular_schema_definitions(), target);
1389 }
1390
1391 // optional bool pre_mapping_fbv = 9;
1392 if (cached_has_bits & 0x00000010u) {
1393 target = stream->EnsureSpace(target);
1394 target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_pre_mapping_fbv(), target);
1395 }
1396
1397 // optional bool use_persistent_hash_map = 10;
1398 if (cached_has_bits & 0x00000020u) {
1399 target = stream->EnsureSpace(target);
1400 target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_use_persistent_hash_map(), target);
1401 }
1402
1403 // optional int32 integer_index_bucket_split_threshold = 11 [default = 65536];
1404 if (cached_has_bits & 0x00100000u) {
1405 target = stream->EnsureSpace(target);
1406 target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_integer_index_bucket_split_threshold(), target);
1407 }
1408
1409 // optional bool lite_index_sort_at_indexing = 12;
1410 if (cached_has_bits & 0x00000080u) {
1411 target = stream->EnsureSpace(target);
1412 target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_lite_index_sort_at_indexing(), target);
1413 }
1414
1415 // optional int32 lite_index_sort_size = 13 [default = 8192];
1416 if (cached_has_bits & 0x00200000u) {
1417 target = stream->EnsureSpace(target);
1418 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_lite_index_sort_size(), target);
1419 }
1420
1421 // optional bool use_new_qualified_id_join_index = 14;
1422 if (cached_has_bits & 0x00000100u) {
1423 target = stream->EnsureSpace(target);
1424 target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_use_new_qualified_id_join_index(), target);
1425 }
1426
1427 // optional bool build_property_existence_metadata_hits = 15;
1428 if (cached_has_bits & 0x00000200u) {
1429 target = stream->EnsureSpace(target);
1430 target = ::_pbi::WireFormatLite::WriteBoolToArray(15, this->_internal_build_property_existence_metadata_hits(), target);
1431 }
1432
1433 // optional bool enable_blob_store = 16;
1434 if (cached_has_bits & 0x00000400u) {
1435 target = stream->EnsureSpace(target);
1436 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_enable_blob_store(), target);
1437 }
1438
1439 // optional int64 orphan_blob_time_to_live_ms = 17;
1440 if (cached_has_bits & 0x00000040u) {
1441 target = stream->EnsureSpace(target);
1442 target = ::_pbi::WireFormatLite::WriteInt64ToArray(17, this->_internal_orphan_blob_time_to_live_ms(), target);
1443 }
1444
1445 // optional bool enable_schema_database = 18;
1446 if (cached_has_bits & 0x00000800u) {
1447 target = stream->EnsureSpace(target);
1448 target = ::_pbi::WireFormatLite::WriteBoolToArray(18, this->_internal_enable_schema_database(), target);
1449 }
1450
1451 // optional bool enable_embedding_index = 19 [default = true];
1452 if (cached_has_bits & 0x00400000u) {
1453 target = stream->EnsureSpace(target);
1454 target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_enable_embedding_index(), target);
1455 }
1456
1457 // optional bool enable_scorable_properties = 21;
1458 if (cached_has_bits & 0x00001000u) {
1459 target = stream->EnsureSpace(target);
1460 target = ::_pbi::WireFormatLite::WriteBoolToArray(21, this->_internal_enable_scorable_properties(), target);
1461 }
1462
1463 // optional bool enable_embedding_quantization = 22;
1464 if (cached_has_bits & 0x00002000u) {
1465 target = stream->EnsureSpace(target);
1466 target = ::_pbi::WireFormatLite::WriteBoolToArray(22, this->_internal_enable_embedding_quantization(), target);
1467 }
1468
1469 // optional int32 blob_store_compression_level = 23 [default = 3];
1470 if (cached_has_bits & 0x00010000u) {
1471 target = stream->EnsureSpace(target);
1472 target = ::_pbi::WireFormatLite::WriteInt32ToArray(23, this->_internal_blob_store_compression_level(), target);
1473 }
1474
1475 // optional bool enable_repeated_field_joins = 24;
1476 if (cached_has_bits & 0x00004000u) {
1477 target = stream->EnsureSpace(target);
1478 target = ::_pbi::WireFormatLite::WriteBoolToArray(24, this->_internal_enable_repeated_field_joins(), target);
1479 }
1480
1481 // optional bool enable_qualified_id_join_index_v3_and_delete_propagate_from = 25;
1482 if (cached_has_bits & 0x00008000u) {
1483 target = stream->EnsureSpace(target);
1484 target = ::_pbi::WireFormatLite::WriteBoolToArray(25, this->_internal_enable_qualified_id_join_index_v3_and_delete_propagate_from(), target);
1485 }
1486
1487 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1488 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1489 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1490 }
1491 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.IcingSearchEngineOptions)
1492 return target;
1493 }
1494
ByteSizeLong() const1495 size_t IcingSearchEngineOptions::ByteSizeLong() const {
1496 // @@protoc_insertion_point(message_byte_size_start:icing.lib.IcingSearchEngineOptions)
1497 size_t total_size = 0;
1498
1499 ::uint32_t cached_has_bits = 0;
1500 // Prevent compiler warnings about cached_has_bits being unused
1501 (void) cached_has_bits;
1502
1503 cached_has_bits = _impl_._has_bits_[0];
1504 if (cached_has_bits & 0x000000ffu) {
1505 // optional string base_dir = 1;
1506 if (cached_has_bits & 0x00000001u) {
1507 total_size += 1 +
1508 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1509 this->_internal_base_dir());
1510 }
1511
1512 // optional float optimize_rebuild_index_threshold = 6 [default = 0];
1513 if (cached_has_bits & 0x00000002u) {
1514 total_size += 1 + 4;
1515 }
1516
1517 // optional bool document_store_namespace_id_fingerprint = 5;
1518 if (cached_has_bits & 0x00000004u) {
1519 total_size += 1 + 1;
1520 }
1521
1522 // optional bool allow_circular_schema_definitions = 8;
1523 if (cached_has_bits & 0x00000008u) {
1524 total_size += 1 + 1;
1525 }
1526
1527 // optional bool pre_mapping_fbv = 9;
1528 if (cached_has_bits & 0x00000010u) {
1529 total_size += 1 + 1;
1530 }
1531
1532 // optional bool use_persistent_hash_map = 10;
1533 if (cached_has_bits & 0x00000020u) {
1534 total_size += 1 + 1;
1535 }
1536
1537 // optional int64 orphan_blob_time_to_live_ms = 17;
1538 if (cached_has_bits & 0x00000040u) {
1539 total_size += 2 +
1540 ::_pbi::WireFormatLite::Int64Size(
1541 this->_internal_orphan_blob_time_to_live_ms());
1542 }
1543
1544 // optional bool lite_index_sort_at_indexing = 12;
1545 if (cached_has_bits & 0x00000080u) {
1546 total_size += 1 + 1;
1547 }
1548
1549 }
1550 if (cached_has_bits & 0x0000ff00u) {
1551 // optional bool use_new_qualified_id_join_index = 14;
1552 if (cached_has_bits & 0x00000100u) {
1553 total_size += 1 + 1;
1554 }
1555
1556 // optional bool build_property_existence_metadata_hits = 15;
1557 if (cached_has_bits & 0x00000200u) {
1558 total_size += 1 + 1;
1559 }
1560
1561 // optional bool enable_blob_store = 16;
1562 if (cached_has_bits & 0x00000400u) {
1563 total_size += 2 + 1;
1564 }
1565
1566 // optional bool enable_schema_database = 18;
1567 if (cached_has_bits & 0x00000800u) {
1568 total_size += 2 + 1;
1569 }
1570
1571 // optional bool enable_scorable_properties = 21;
1572 if (cached_has_bits & 0x00001000u) {
1573 total_size += 2 + 1;
1574 }
1575
1576 // optional bool enable_embedding_quantization = 22;
1577 if (cached_has_bits & 0x00002000u) {
1578 total_size += 2 + 1;
1579 }
1580
1581 // optional bool enable_repeated_field_joins = 24;
1582 if (cached_has_bits & 0x00004000u) {
1583 total_size += 2 + 1;
1584 }
1585
1586 // optional bool enable_qualified_id_join_index_v3_and_delete_propagate_from = 25;
1587 if (cached_has_bits & 0x00008000u) {
1588 total_size += 2 + 1;
1589 }
1590
1591 }
1592 if (cached_has_bits & 0x007f0000u) {
1593 // optional int32 blob_store_compression_level = 23 [default = 3];
1594 if (cached_has_bits & 0x00010000u) {
1595 total_size += 2 +
1596 ::_pbi::WireFormatLite::Int32Size(
1597 this->_internal_blob_store_compression_level());
1598 }
1599
1600 // optional int32 max_token_length = 3 [default = 30];
1601 if (cached_has_bits & 0x00020000u) {
1602 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_token_length());
1603 }
1604
1605 // optional int32 index_merge_size = 4 [default = 1048576];
1606 if (cached_has_bits & 0x00040000u) {
1607 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_index_merge_size());
1608 }
1609
1610 // optional int32 compression_level = 7 [default = 3];
1611 if (cached_has_bits & 0x00080000u) {
1612 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_compression_level());
1613 }
1614
1615 // optional int32 integer_index_bucket_split_threshold = 11 [default = 65536];
1616 if (cached_has_bits & 0x00100000u) {
1617 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_integer_index_bucket_split_threshold());
1618 }
1619
1620 // optional int32 lite_index_sort_size = 13 [default = 8192];
1621 if (cached_has_bits & 0x00200000u) {
1622 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_lite_index_sort_size());
1623 }
1624
1625 // optional bool enable_embedding_index = 19 [default = true];
1626 if (cached_has_bits & 0x00400000u) {
1627 total_size += 2 + 1;
1628 }
1629
1630 }
1631 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1632 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1633 }
1634 int cached_size = ::_pbi::ToCachedSize(total_size);
1635 SetCachedSize(cached_size);
1636 return total_size;
1637 }
1638
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1639 void IcingSearchEngineOptions::CheckTypeAndMergeFrom(
1640 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1641 MergeFrom(*::_pbi::DownCast<const IcingSearchEngineOptions*>(
1642 &from));
1643 }
1644
MergeFrom(const IcingSearchEngineOptions & from)1645 void IcingSearchEngineOptions::MergeFrom(const IcingSearchEngineOptions& from) {
1646 IcingSearchEngineOptions* const _this = this;
1647 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.IcingSearchEngineOptions)
1648 GOOGLE_DCHECK_NE(&from, _this);
1649 ::uint32_t cached_has_bits = 0;
1650 (void) cached_has_bits;
1651
1652 cached_has_bits = from._impl_._has_bits_[0];
1653 if (cached_has_bits & 0x000000ffu) {
1654 if (cached_has_bits & 0x00000001u) {
1655 _this->_internal_set_base_dir(from._internal_base_dir());
1656 }
1657 if (cached_has_bits & 0x00000002u) {
1658 _this->_impl_.optimize_rebuild_index_threshold_ = from._impl_.optimize_rebuild_index_threshold_;
1659 }
1660 if (cached_has_bits & 0x00000004u) {
1661 _this->_impl_.document_store_namespace_id_fingerprint_ = from._impl_.document_store_namespace_id_fingerprint_;
1662 }
1663 if (cached_has_bits & 0x00000008u) {
1664 _this->_impl_.allow_circular_schema_definitions_ = from._impl_.allow_circular_schema_definitions_;
1665 }
1666 if (cached_has_bits & 0x00000010u) {
1667 _this->_impl_.pre_mapping_fbv_ = from._impl_.pre_mapping_fbv_;
1668 }
1669 if (cached_has_bits & 0x00000020u) {
1670 _this->_impl_.use_persistent_hash_map_ = from._impl_.use_persistent_hash_map_;
1671 }
1672 if (cached_has_bits & 0x00000040u) {
1673 _this->_impl_.orphan_blob_time_to_live_ms_ = from._impl_.orphan_blob_time_to_live_ms_;
1674 }
1675 if (cached_has_bits & 0x00000080u) {
1676 _this->_impl_.lite_index_sort_at_indexing_ = from._impl_.lite_index_sort_at_indexing_;
1677 }
1678 _this->_impl_._has_bits_[0] |= cached_has_bits;
1679 }
1680 if (cached_has_bits & 0x0000ff00u) {
1681 if (cached_has_bits & 0x00000100u) {
1682 _this->_impl_.use_new_qualified_id_join_index_ = from._impl_.use_new_qualified_id_join_index_;
1683 }
1684 if (cached_has_bits & 0x00000200u) {
1685 _this->_impl_.build_property_existence_metadata_hits_ = from._impl_.build_property_existence_metadata_hits_;
1686 }
1687 if (cached_has_bits & 0x00000400u) {
1688 _this->_impl_.enable_blob_store_ = from._impl_.enable_blob_store_;
1689 }
1690 if (cached_has_bits & 0x00000800u) {
1691 _this->_impl_.enable_schema_database_ = from._impl_.enable_schema_database_;
1692 }
1693 if (cached_has_bits & 0x00001000u) {
1694 _this->_impl_.enable_scorable_properties_ = from._impl_.enable_scorable_properties_;
1695 }
1696 if (cached_has_bits & 0x00002000u) {
1697 _this->_impl_.enable_embedding_quantization_ = from._impl_.enable_embedding_quantization_;
1698 }
1699 if (cached_has_bits & 0x00004000u) {
1700 _this->_impl_.enable_repeated_field_joins_ = from._impl_.enable_repeated_field_joins_;
1701 }
1702 if (cached_has_bits & 0x00008000u) {
1703 _this->_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_ = from._impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_;
1704 }
1705 _this->_impl_._has_bits_[0] |= cached_has_bits;
1706 }
1707 if (cached_has_bits & 0x007f0000u) {
1708 if (cached_has_bits & 0x00010000u) {
1709 _this->_impl_.blob_store_compression_level_ = from._impl_.blob_store_compression_level_;
1710 }
1711 if (cached_has_bits & 0x00020000u) {
1712 _this->_impl_.max_token_length_ = from._impl_.max_token_length_;
1713 }
1714 if (cached_has_bits & 0x00040000u) {
1715 _this->_impl_.index_merge_size_ = from._impl_.index_merge_size_;
1716 }
1717 if (cached_has_bits & 0x00080000u) {
1718 _this->_impl_.compression_level_ = from._impl_.compression_level_;
1719 }
1720 if (cached_has_bits & 0x00100000u) {
1721 _this->_impl_.integer_index_bucket_split_threshold_ = from._impl_.integer_index_bucket_split_threshold_;
1722 }
1723 if (cached_has_bits & 0x00200000u) {
1724 _this->_impl_.lite_index_sort_size_ = from._impl_.lite_index_sort_size_;
1725 }
1726 if (cached_has_bits & 0x00400000u) {
1727 _this->_impl_.enable_embedding_index_ = from._impl_.enable_embedding_index_;
1728 }
1729 _this->_impl_._has_bits_[0] |= cached_has_bits;
1730 }
1731 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1732 }
1733
CopyFrom(const IcingSearchEngineOptions & from)1734 void IcingSearchEngineOptions::CopyFrom(const IcingSearchEngineOptions& from) {
1735 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.IcingSearchEngineOptions)
1736 if (&from == this) return;
1737 Clear();
1738 MergeFrom(from);
1739 }
1740
IsInitialized() const1741 bool IcingSearchEngineOptions::IsInitialized() const {
1742 return true;
1743 }
1744
InternalSwap(IcingSearchEngineOptions * other)1745 void IcingSearchEngineOptions::InternalSwap(IcingSearchEngineOptions* other) {
1746 using std::swap;
1747 auto* lhs_arena = GetArenaForAllocation();
1748 auto* rhs_arena = other->GetArenaForAllocation();
1749 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1750 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1751 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1752 &_impl_.base_dir_, lhs_arena,
1753 &other->_impl_.base_dir_, rhs_arena
1754 );
1755 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1756 PROTOBUF_FIELD_OFFSET(IcingSearchEngineOptions, _impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_)
1757 + sizeof(IcingSearchEngineOptions::_impl_.enable_qualified_id_join_index_v3_and_delete_propagate_from_) // NOLINT
1758 - PROTOBUF_FIELD_OFFSET(IcingSearchEngineOptions, _impl_.optimize_rebuild_index_threshold_)>(
1759 reinterpret_cast<char*>(&_impl_.optimize_rebuild_index_threshold_),
1760 reinterpret_cast<char*>(&other->_impl_.optimize_rebuild_index_threshold_));
1761 swap(_impl_.blob_store_compression_level_, other->_impl_.blob_store_compression_level_);
1762 swap(_impl_.max_token_length_, other->_impl_.max_token_length_);
1763 swap(_impl_.index_merge_size_, other->_impl_.index_merge_size_);
1764 swap(_impl_.compression_level_, other->_impl_.compression_level_);
1765 swap(_impl_.integer_index_bucket_split_threshold_, other->_impl_.integer_index_bucket_split_threshold_);
1766 swap(_impl_.lite_index_sort_size_, other->_impl_.lite_index_sort_size_);
1767 swap(_impl_.enable_embedding_index_, other->_impl_.enable_embedding_index_);
1768 }
1769
GetTypeName() const1770 std::string IcingSearchEngineOptions::GetTypeName() const {
1771 return "icing.lib.IcingSearchEngineOptions";
1772 }
1773
1774
1775 // ===================================================================
1776
1777 class InitializeResultProto::_Internal {
1778 public:
1779 using HasBits = decltype(std::declval<InitializeResultProto>()._impl_._has_bits_);
1780 static const ::icing::lib::StatusProto& status(const InitializeResultProto* msg);
set_has_status(HasBits * has_bits)1781 static void set_has_status(HasBits* has_bits) {
1782 (*has_bits)[0] |= 1u;
1783 }
1784 static const ::icing::lib::InitializeStatsProto& initialize_stats(const InitializeResultProto* msg);
set_has_initialize_stats(HasBits * has_bits)1785 static void set_has_initialize_stats(HasBits* has_bits) {
1786 (*has_bits)[0] |= 2u;
1787 }
1788 };
1789
1790 const ::icing::lib::StatusProto&
status(const InitializeResultProto * msg)1791 InitializeResultProto::_Internal::status(const InitializeResultProto* msg) {
1792 return *msg->_impl_.status_;
1793 }
1794 const ::icing::lib::InitializeStatsProto&
initialize_stats(const InitializeResultProto * msg)1795 InitializeResultProto::_Internal::initialize_stats(const InitializeResultProto* msg) {
1796 return *msg->_impl_.initialize_stats_;
1797 }
clear_status()1798 void InitializeResultProto::clear_status() {
1799 if (_impl_.status_ != nullptr) _impl_.status_->Clear();
1800 _impl_._has_bits_[0] &= ~0x00000001u;
1801 }
clear_initialize_stats()1802 void InitializeResultProto::clear_initialize_stats() {
1803 if (_impl_.initialize_stats_ != nullptr) _impl_.initialize_stats_->Clear();
1804 _impl_._has_bits_[0] &= ~0x00000002u;
1805 }
InitializeResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1806 InitializeResultProto::InitializeResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1807 bool is_message_owned)
1808 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1809 SharedCtor(arena, is_message_owned);
1810 // @@protoc_insertion_point(arena_constructor:icing.lib.InitializeResultProto)
1811 }
InitializeResultProto(const InitializeResultProto & from)1812 InitializeResultProto::InitializeResultProto(const InitializeResultProto& from)
1813 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1814 InitializeResultProto* const _this = this; (void)_this;
1815 new (&_impl_) Impl_{
1816 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1817 , /*decltype(_impl_._cached_size_)*/{}
1818 , decltype(_impl_.status_){nullptr}
1819 , decltype(_impl_.initialize_stats_){nullptr}};
1820
1821 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1822 if (from._internal_has_status()) {
1823 _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
1824 }
1825 if (from._internal_has_initialize_stats()) {
1826 _this->_impl_.initialize_stats_ = new ::icing::lib::InitializeStatsProto(*from._impl_.initialize_stats_);
1827 }
1828 // @@protoc_insertion_point(copy_constructor:icing.lib.InitializeResultProto)
1829 }
1830
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1831 inline void InitializeResultProto::SharedCtor(
1832 ::_pb::Arena* arena, bool is_message_owned) {
1833 (void)arena;
1834 (void)is_message_owned;
1835 new (&_impl_) Impl_{
1836 decltype(_impl_._has_bits_){}
1837 , /*decltype(_impl_._cached_size_)*/{}
1838 , decltype(_impl_.status_){nullptr}
1839 , decltype(_impl_.initialize_stats_){nullptr}
1840 };
1841 }
1842
~InitializeResultProto()1843 InitializeResultProto::~InitializeResultProto() {
1844 // @@protoc_insertion_point(destructor:icing.lib.InitializeResultProto)
1845 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1846 (void)arena;
1847 return;
1848 }
1849 SharedDtor();
1850 }
1851
SharedDtor()1852 inline void InitializeResultProto::SharedDtor() {
1853 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1854 if (this != internal_default_instance()) delete _impl_.status_;
1855 if (this != internal_default_instance()) delete _impl_.initialize_stats_;
1856 }
1857
SetCachedSize(int size) const1858 void InitializeResultProto::SetCachedSize(int size) const {
1859 _impl_._cached_size_.Set(size);
1860 }
1861
Clear()1862 void InitializeResultProto::Clear() {
1863 // @@protoc_insertion_point(message_clear_start:icing.lib.InitializeResultProto)
1864 ::uint32_t cached_has_bits = 0;
1865 // Prevent compiler warnings about cached_has_bits being unused
1866 (void) cached_has_bits;
1867
1868 cached_has_bits = _impl_._has_bits_[0];
1869 if (cached_has_bits & 0x00000003u) {
1870 if (cached_has_bits & 0x00000001u) {
1871 GOOGLE_DCHECK(_impl_.status_ != nullptr);
1872 _impl_.status_->Clear();
1873 }
1874 if (cached_has_bits & 0x00000002u) {
1875 GOOGLE_DCHECK(_impl_.initialize_stats_ != nullptr);
1876 _impl_.initialize_stats_->Clear();
1877 }
1878 }
1879 _impl_._has_bits_.Clear();
1880 _internal_metadata_.Clear<std::string>();
1881 }
1882
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1883 const char* InitializeResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1884 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1885 _Internal::HasBits has_bits{};
1886 while (!ctx->Done(&ptr)) {
1887 ::uint32_t tag;
1888 ptr = ::_pbi::ReadTag(ptr, &tag);
1889 switch (tag >> 3) {
1890 // optional .icing.lib.StatusProto status = 1;
1891 case 1:
1892 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1893 ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
1894 CHK_(ptr);
1895 } else {
1896 goto handle_unusual;
1897 }
1898 continue;
1899 // optional .icing.lib.InitializeStatsProto initialize_stats = 2;
1900 case 2:
1901 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1902 ptr = ctx->ParseMessage(_internal_mutable_initialize_stats(), ptr);
1903 CHK_(ptr);
1904 } else {
1905 goto handle_unusual;
1906 }
1907 continue;
1908 default:
1909 goto handle_unusual;
1910 } // switch
1911 handle_unusual:
1912 if ((tag == 0) || ((tag & 7) == 4)) {
1913 CHK_(ptr);
1914 ctx->SetLastTag(tag);
1915 goto message_done;
1916 }
1917 ptr = UnknownFieldParse(
1918 tag,
1919 _internal_metadata_.mutable_unknown_fields<std::string>(),
1920 ptr, ctx);
1921 CHK_(ptr != nullptr);
1922 } // while
1923 message_done:
1924 _impl_._has_bits_.Or(has_bits);
1925 return ptr;
1926 failure:
1927 ptr = nullptr;
1928 goto message_done;
1929 #undef CHK_
1930 }
1931
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1932 ::uint8_t* InitializeResultProto::_InternalSerialize(
1933 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1934 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.InitializeResultProto)
1935 ::uint32_t cached_has_bits = 0;
1936 (void) cached_has_bits;
1937
1938 cached_has_bits = _impl_._has_bits_[0];
1939 // optional .icing.lib.StatusProto status = 1;
1940 if (cached_has_bits & 0x00000001u) {
1941 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1942 InternalWriteMessage(1, _Internal::status(this),
1943 _Internal::status(this).GetCachedSize(), target, stream);
1944 }
1945
1946 // optional .icing.lib.InitializeStatsProto initialize_stats = 2;
1947 if (cached_has_bits & 0x00000002u) {
1948 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1949 InternalWriteMessage(2, _Internal::initialize_stats(this),
1950 _Internal::initialize_stats(this).GetCachedSize(), target, stream);
1951 }
1952
1953 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1954 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1955 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1956 }
1957 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.InitializeResultProto)
1958 return target;
1959 }
1960
ByteSizeLong() const1961 size_t InitializeResultProto::ByteSizeLong() const {
1962 // @@protoc_insertion_point(message_byte_size_start:icing.lib.InitializeResultProto)
1963 size_t total_size = 0;
1964
1965 ::uint32_t cached_has_bits = 0;
1966 // Prevent compiler warnings about cached_has_bits being unused
1967 (void) cached_has_bits;
1968
1969 cached_has_bits = _impl_._has_bits_[0];
1970 if (cached_has_bits & 0x00000003u) {
1971 // optional .icing.lib.StatusProto status = 1;
1972 if (cached_has_bits & 0x00000001u) {
1973 total_size += 1 +
1974 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1975 *_impl_.status_);
1976 }
1977
1978 // optional .icing.lib.InitializeStatsProto initialize_stats = 2;
1979 if (cached_has_bits & 0x00000002u) {
1980 total_size += 1 +
1981 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1982 *_impl_.initialize_stats_);
1983 }
1984
1985 }
1986 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1987 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1988 }
1989 int cached_size = ::_pbi::ToCachedSize(total_size);
1990 SetCachedSize(cached_size);
1991 return total_size;
1992 }
1993
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1994 void InitializeResultProto::CheckTypeAndMergeFrom(
1995 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1996 MergeFrom(*::_pbi::DownCast<const InitializeResultProto*>(
1997 &from));
1998 }
1999
MergeFrom(const InitializeResultProto & from)2000 void InitializeResultProto::MergeFrom(const InitializeResultProto& from) {
2001 InitializeResultProto* const _this = this;
2002 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.InitializeResultProto)
2003 GOOGLE_DCHECK_NE(&from, _this);
2004 ::uint32_t cached_has_bits = 0;
2005 (void) cached_has_bits;
2006
2007 cached_has_bits = from._impl_._has_bits_[0];
2008 if (cached_has_bits & 0x00000003u) {
2009 if (cached_has_bits & 0x00000001u) {
2010 _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
2011 from._internal_status());
2012 }
2013 if (cached_has_bits & 0x00000002u) {
2014 _this->_internal_mutable_initialize_stats()->::icing::lib::InitializeStatsProto::MergeFrom(
2015 from._internal_initialize_stats());
2016 }
2017 }
2018 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2019 }
2020
CopyFrom(const InitializeResultProto & from)2021 void InitializeResultProto::CopyFrom(const InitializeResultProto& from) {
2022 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.InitializeResultProto)
2023 if (&from == this) return;
2024 Clear();
2025 MergeFrom(from);
2026 }
2027
IsInitialized() const2028 bool InitializeResultProto::IsInitialized() const {
2029 return true;
2030 }
2031
InternalSwap(InitializeResultProto * other)2032 void InitializeResultProto::InternalSwap(InitializeResultProto* other) {
2033 using std::swap;
2034 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2035 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2036 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2037 PROTOBUF_FIELD_OFFSET(InitializeResultProto, _impl_.initialize_stats_)
2038 + sizeof(InitializeResultProto::_impl_.initialize_stats_) // NOLINT
2039 - PROTOBUF_FIELD_OFFSET(InitializeResultProto, _impl_.status_)>(
2040 reinterpret_cast<char*>(&_impl_.status_),
2041 reinterpret_cast<char*>(&other->_impl_.status_));
2042 }
2043
GetTypeName() const2044 std::string InitializeResultProto::GetTypeName() const {
2045 return "icing.lib.InitializeResultProto";
2046 }
2047
2048
2049 // @@protoc_insertion_point(namespace_scope)
2050 } // namespace lib
2051 } // namespace icing
2052 PROTOBUF_NAMESPACE_OPEN
2053 template<> PROTOBUF_NOINLINE ::icing::lib::IcingSearchEngineFeatureInfoProto*
CreateMaybeMessage(Arena * arena)2054 Arena::CreateMaybeMessage< ::icing::lib::IcingSearchEngineFeatureInfoProto >(Arena* arena) {
2055 return Arena::CreateMessageInternal< ::icing::lib::IcingSearchEngineFeatureInfoProto >(arena);
2056 }
2057 template<> PROTOBUF_NOINLINE ::icing::lib::IcingSearchEngineVersionProto*
CreateMaybeMessage(Arena * arena)2058 Arena::CreateMaybeMessage< ::icing::lib::IcingSearchEngineVersionProto >(Arena* arena) {
2059 return Arena::CreateMessageInternal< ::icing::lib::IcingSearchEngineVersionProto >(arena);
2060 }
2061 template<> PROTOBUF_NOINLINE ::icing::lib::IcingSearchEngineOptions*
CreateMaybeMessage(Arena * arena)2062 Arena::CreateMaybeMessage< ::icing::lib::IcingSearchEngineOptions >(Arena* arena) {
2063 return Arena::CreateMessageInternal< ::icing::lib::IcingSearchEngineOptions >(arena);
2064 }
2065 template<> PROTOBUF_NOINLINE ::icing::lib::InitializeResultProto*
CreateMaybeMessage(Arena * arena)2066 Arena::CreateMaybeMessage< ::icing::lib::InitializeResultProto >(Arena* arena) {
2067 return Arena::CreateMessageInternal< ::icing::lib::InitializeResultProto >(arena);
2068 }
2069 PROTOBUF_NAMESPACE_CLOSE
2070
2071 // @@protoc_insertion_point(global_scope)
2072 #include <google/protobuf/port_undef.inc>
2073