1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: icing/proto/storage.proto
3
4 #include "icing/proto/storage.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 {
NamespaceStorageInfoProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR NamespaceStorageInfoProto::NamespaceStorageInfoProto(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.num_alive_documents_)*/0
29 , /*decltype(_impl_.num_expired_documents_)*/0
30 , /*decltype(_impl_.num_alive_documents_usage_type1_)*/0
31 , /*decltype(_impl_.num_alive_documents_usage_type2_)*/0
32 , /*decltype(_impl_.num_alive_documents_usage_type3_)*/0
33 , /*decltype(_impl_.num_expired_documents_usage_type1_)*/0
34 , /*decltype(_impl_.num_expired_documents_usage_type2_)*/0
35 , /*decltype(_impl_.num_expired_documents_usage_type3_)*/0} {}
36 struct NamespaceStorageInfoProtoDefaultTypeInternal {
NamespaceStorageInfoProtoDefaultTypeInternalicing::lib::NamespaceStorageInfoProtoDefaultTypeInternal37 PROTOBUF_CONSTEXPR NamespaceStorageInfoProtoDefaultTypeInternal()
38 : _instance(::_pbi::ConstantInitialized{}) {}
~NamespaceStorageInfoProtoDefaultTypeInternalicing::lib::NamespaceStorageInfoProtoDefaultTypeInternal39 ~NamespaceStorageInfoProtoDefaultTypeInternal() {}
40 union { // NOLINT(misc-non-private-member-variables-in-classes)
41 NamespaceStorageInfoProto _instance;
42 };
43 };
44 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NamespaceStorageInfoProtoDefaultTypeInternal _NamespaceStorageInfoProto_default_instance_;
DocumentStorageInfoProto(::_pbi::ConstantInitialized)45 PROTOBUF_CONSTEXPR DocumentStorageInfoProto::DocumentStorageInfoProto(
46 ::_pbi::ConstantInitialized): _impl_{
47 /*decltype(_impl_._has_bits_)*/{}
48 , /*decltype(_impl_._cached_size_)*/{}
49 , /*decltype(_impl_.namespace_storage_info_)*/{}
50 , /*decltype(_impl_.num_alive_documents_)*/0
51 , /*decltype(_impl_.num_deleted_documents_)*/0
52 , /*decltype(_impl_.document_store_size_)*/::int64_t{0}
53 , /*decltype(_impl_.document_log_size_)*/::int64_t{0}
54 , /*decltype(_impl_.key_mapper_size_)*/::int64_t{0}
55 , /*decltype(_impl_.document_id_mapper_size_)*/::int64_t{0}
56 , /*decltype(_impl_.score_cache_size_)*/::int64_t{0}
57 , /*decltype(_impl_.num_expired_documents_)*/0
58 , /*decltype(_impl_.num_namespaces_)*/0
59 , /*decltype(_impl_.filter_cache_size_)*/::int64_t{0}
60 , /*decltype(_impl_.corpus_mapper_size_)*/::int64_t{0}
61 , /*decltype(_impl_.corpus_score_cache_size_)*/::int64_t{0}
62 , /*decltype(_impl_.namespace_id_mapper_size_)*/::int64_t{0}
63 , /*decltype(_impl_.scorable_property_cache_size_)*/::int64_t{0}} {}
64 struct DocumentStorageInfoProtoDefaultTypeInternal {
DocumentStorageInfoProtoDefaultTypeInternalicing::lib::DocumentStorageInfoProtoDefaultTypeInternal65 PROTOBUF_CONSTEXPR DocumentStorageInfoProtoDefaultTypeInternal()
66 : _instance(::_pbi::ConstantInitialized{}) {}
~DocumentStorageInfoProtoDefaultTypeInternalicing::lib::DocumentStorageInfoProtoDefaultTypeInternal67 ~DocumentStorageInfoProtoDefaultTypeInternal() {}
68 union { // NOLINT(misc-non-private-member-variables-in-classes)
69 DocumentStorageInfoProto _instance;
70 };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DocumentStorageInfoProtoDefaultTypeInternal _DocumentStorageInfoProto_default_instance_;
SchemaStoreStorageInfoProto(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR SchemaStoreStorageInfoProto::SchemaStoreStorageInfoProto(
74 ::_pbi::ConstantInitialized): _impl_{
75 /*decltype(_impl_._has_bits_)*/{}
76 , /*decltype(_impl_._cached_size_)*/{}
77 , /*decltype(_impl_.schema_store_size_)*/::int64_t{0}
78 , /*decltype(_impl_.num_schema_types_)*/0
79 , /*decltype(_impl_.num_total_sections_)*/0
80 , /*decltype(_impl_.num_schema_types_sections_exhausted_)*/0} {}
81 struct SchemaStoreStorageInfoProtoDefaultTypeInternal {
SchemaStoreStorageInfoProtoDefaultTypeInternalicing::lib::SchemaStoreStorageInfoProtoDefaultTypeInternal82 PROTOBUF_CONSTEXPR SchemaStoreStorageInfoProtoDefaultTypeInternal()
83 : _instance(::_pbi::ConstantInitialized{}) {}
~SchemaStoreStorageInfoProtoDefaultTypeInternalicing::lib::SchemaStoreStorageInfoProtoDefaultTypeInternal84 ~SchemaStoreStorageInfoProtoDefaultTypeInternal() {}
85 union { // NOLINT(misc-non-private-member-variables-in-classes)
86 SchemaStoreStorageInfoProto _instance;
87 };
88 };
89 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SchemaStoreStorageInfoProtoDefaultTypeInternal _SchemaStoreStorageInfoProto_default_instance_;
IndexStorageInfoProto(::_pbi::ConstantInitialized)90 PROTOBUF_CONSTEXPR IndexStorageInfoProto::IndexStorageInfoProto(
91 ::_pbi::ConstantInitialized): _impl_{
92 /*decltype(_impl_._has_bits_)*/{}
93 , /*decltype(_impl_._cached_size_)*/{}
94 , /*decltype(_impl_.index_size_)*/::int64_t{0}
95 , /*decltype(_impl_.lite_index_lexicon_size_)*/::int64_t{0}
96 , /*decltype(_impl_.lite_index_hit_buffer_size_)*/::int64_t{0}
97 , /*decltype(_impl_.main_index_lexicon_size_)*/::int64_t{0}
98 , /*decltype(_impl_.main_index_storage_size_)*/::int64_t{0}
99 , /*decltype(_impl_.main_index_block_size_)*/::int64_t{0}
100 , /*decltype(_impl_.num_blocks_)*/0
101 , /*decltype(_impl_.min_free_fraction_)*/0} {}
102 struct IndexStorageInfoProtoDefaultTypeInternal {
IndexStorageInfoProtoDefaultTypeInternalicing::lib::IndexStorageInfoProtoDefaultTypeInternal103 PROTOBUF_CONSTEXPR IndexStorageInfoProtoDefaultTypeInternal()
104 : _instance(::_pbi::ConstantInitialized{}) {}
~IndexStorageInfoProtoDefaultTypeInternalicing::lib::IndexStorageInfoProtoDefaultTypeInternal105 ~IndexStorageInfoProtoDefaultTypeInternal() {}
106 union { // NOLINT(misc-non-private-member-variables-in-classes)
107 IndexStorageInfoProto _instance;
108 };
109 };
110 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IndexStorageInfoProtoDefaultTypeInternal _IndexStorageInfoProto_default_instance_;
NamespaceBlobStorageInfoProto(::_pbi::ConstantInitialized)111 PROTOBUF_CONSTEXPR NamespaceBlobStorageInfoProto::NamespaceBlobStorageInfoProto(
112 ::_pbi::ConstantInitialized): _impl_{
113 /*decltype(_impl_._has_bits_)*/{}
114 , /*decltype(_impl_._cached_size_)*/{}
115 , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
116 , /*decltype(_impl_.blob_size_)*/::int64_t{0}
117 , /*decltype(_impl_.num_blobs_)*/0} {}
118 struct NamespaceBlobStorageInfoProtoDefaultTypeInternal {
NamespaceBlobStorageInfoProtoDefaultTypeInternalicing::lib::NamespaceBlobStorageInfoProtoDefaultTypeInternal119 PROTOBUF_CONSTEXPR NamespaceBlobStorageInfoProtoDefaultTypeInternal()
120 : _instance(::_pbi::ConstantInitialized{}) {}
~NamespaceBlobStorageInfoProtoDefaultTypeInternalicing::lib::NamespaceBlobStorageInfoProtoDefaultTypeInternal121 ~NamespaceBlobStorageInfoProtoDefaultTypeInternal() {}
122 union { // NOLINT(misc-non-private-member-variables-in-classes)
123 NamespaceBlobStorageInfoProto _instance;
124 };
125 };
126 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NamespaceBlobStorageInfoProtoDefaultTypeInternal _NamespaceBlobStorageInfoProto_default_instance_;
StorageInfoProto(::_pbi::ConstantInitialized)127 PROTOBUF_CONSTEXPR StorageInfoProto::StorageInfoProto(
128 ::_pbi::ConstantInitialized): _impl_{
129 /*decltype(_impl_._has_bits_)*/{}
130 , /*decltype(_impl_._cached_size_)*/{}
131 , /*decltype(_impl_.namespace_blob_storage_info_)*/{}
132 , /*decltype(_impl_.document_storage_info_)*/nullptr
133 , /*decltype(_impl_.schema_store_storage_info_)*/nullptr
134 , /*decltype(_impl_.index_storage_info_)*/nullptr
135 , /*decltype(_impl_.total_storage_size_)*/::int64_t{0}} {}
136 struct StorageInfoProtoDefaultTypeInternal {
StorageInfoProtoDefaultTypeInternalicing::lib::StorageInfoProtoDefaultTypeInternal137 PROTOBUF_CONSTEXPR StorageInfoProtoDefaultTypeInternal()
138 : _instance(::_pbi::ConstantInitialized{}) {}
~StorageInfoProtoDefaultTypeInternalicing::lib::StorageInfoProtoDefaultTypeInternal139 ~StorageInfoProtoDefaultTypeInternal() {}
140 union { // NOLINT(misc-non-private-member-variables-in-classes)
141 StorageInfoProto _instance;
142 };
143 };
144 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StorageInfoProtoDefaultTypeInternal _StorageInfoProto_default_instance_;
StorageInfoResultProto(::_pbi::ConstantInitialized)145 PROTOBUF_CONSTEXPR StorageInfoResultProto::StorageInfoResultProto(
146 ::_pbi::ConstantInitialized): _impl_{
147 /*decltype(_impl_._has_bits_)*/{}
148 , /*decltype(_impl_._cached_size_)*/{}
149 , /*decltype(_impl_.status_)*/nullptr
150 , /*decltype(_impl_.storage_info_)*/nullptr} {}
151 struct StorageInfoResultProtoDefaultTypeInternal {
StorageInfoResultProtoDefaultTypeInternalicing::lib::StorageInfoResultProtoDefaultTypeInternal152 PROTOBUF_CONSTEXPR StorageInfoResultProtoDefaultTypeInternal()
153 : _instance(::_pbi::ConstantInitialized{}) {}
~StorageInfoResultProtoDefaultTypeInternalicing::lib::StorageInfoResultProtoDefaultTypeInternal154 ~StorageInfoResultProtoDefaultTypeInternal() {}
155 union { // NOLINT(misc-non-private-member-variables-in-classes)
156 StorageInfoResultProto _instance;
157 };
158 };
159 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StorageInfoResultProtoDefaultTypeInternal _StorageInfoResultProto_default_instance_;
160 } // namespace lib
161 } // namespace icing
162 namespace icing {
163 namespace lib {
164
165 // ===================================================================
166
167 class NamespaceStorageInfoProto::_Internal {
168 public:
169 using HasBits = decltype(std::declval<NamespaceStorageInfoProto>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)170 static void set_has_namespace_(HasBits* has_bits) {
171 (*has_bits)[0] |= 1u;
172 }
set_has_num_alive_documents(HasBits * has_bits)173 static void set_has_num_alive_documents(HasBits* has_bits) {
174 (*has_bits)[0] |= 2u;
175 }
set_has_num_expired_documents(HasBits * has_bits)176 static void set_has_num_expired_documents(HasBits* has_bits) {
177 (*has_bits)[0] |= 4u;
178 }
set_has_num_alive_documents_usage_type1(HasBits * has_bits)179 static void set_has_num_alive_documents_usage_type1(HasBits* has_bits) {
180 (*has_bits)[0] |= 8u;
181 }
set_has_num_alive_documents_usage_type2(HasBits * has_bits)182 static void set_has_num_alive_documents_usage_type2(HasBits* has_bits) {
183 (*has_bits)[0] |= 16u;
184 }
set_has_num_alive_documents_usage_type3(HasBits * has_bits)185 static void set_has_num_alive_documents_usage_type3(HasBits* has_bits) {
186 (*has_bits)[0] |= 32u;
187 }
set_has_num_expired_documents_usage_type1(HasBits * has_bits)188 static void set_has_num_expired_documents_usage_type1(HasBits* has_bits) {
189 (*has_bits)[0] |= 64u;
190 }
set_has_num_expired_documents_usage_type2(HasBits * has_bits)191 static void set_has_num_expired_documents_usage_type2(HasBits* has_bits) {
192 (*has_bits)[0] |= 128u;
193 }
set_has_num_expired_documents_usage_type3(HasBits * has_bits)194 static void set_has_num_expired_documents_usage_type3(HasBits* has_bits) {
195 (*has_bits)[0] |= 256u;
196 }
197 };
198
NamespaceStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)199 NamespaceStorageInfoProto::NamespaceStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
200 bool is_message_owned)
201 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
202 SharedCtor(arena, is_message_owned);
203 // @@protoc_insertion_point(arena_constructor:icing.lib.NamespaceStorageInfoProto)
204 }
NamespaceStorageInfoProto(const NamespaceStorageInfoProto & from)205 NamespaceStorageInfoProto::NamespaceStorageInfoProto(const NamespaceStorageInfoProto& from)
206 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
207 NamespaceStorageInfoProto* const _this = this; (void)_this;
208 new (&_impl_) Impl_{
209 decltype(_impl_._has_bits_){from._impl_._has_bits_}
210 , /*decltype(_impl_._cached_size_)*/{}
211 , decltype(_impl_.namespace__){}
212 , decltype(_impl_.num_alive_documents_){}
213 , decltype(_impl_.num_expired_documents_){}
214 , decltype(_impl_.num_alive_documents_usage_type1_){}
215 , decltype(_impl_.num_alive_documents_usage_type2_){}
216 , decltype(_impl_.num_alive_documents_usage_type3_){}
217 , decltype(_impl_.num_expired_documents_usage_type1_){}
218 , decltype(_impl_.num_expired_documents_usage_type2_){}
219 , decltype(_impl_.num_expired_documents_usage_type3_){}};
220
221 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
222 _impl_.namespace__.InitDefault();
223 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
224 _impl_.namespace__.Set("", GetArenaForAllocation());
225 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
226 if (from._internal_has_namespace_()) {
227 _this->_impl_.namespace__.Set(from._internal_namespace_(),
228 _this->GetArenaForAllocation());
229 }
230 ::memcpy(&_impl_.num_alive_documents_, &from._impl_.num_alive_documents_,
231 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_expired_documents_usage_type3_) -
232 reinterpret_cast<char*>(&_impl_.num_alive_documents_)) + sizeof(_impl_.num_expired_documents_usage_type3_));
233 // @@protoc_insertion_point(copy_constructor:icing.lib.NamespaceStorageInfoProto)
234 }
235
SharedCtor(::_pb::Arena * arena,bool is_message_owned)236 inline void NamespaceStorageInfoProto::SharedCtor(
237 ::_pb::Arena* arena, bool is_message_owned) {
238 (void)arena;
239 (void)is_message_owned;
240 new (&_impl_) Impl_{
241 decltype(_impl_._has_bits_){}
242 , /*decltype(_impl_._cached_size_)*/{}
243 , decltype(_impl_.namespace__){}
244 , decltype(_impl_.num_alive_documents_){0}
245 , decltype(_impl_.num_expired_documents_){0}
246 , decltype(_impl_.num_alive_documents_usage_type1_){0}
247 , decltype(_impl_.num_alive_documents_usage_type2_){0}
248 , decltype(_impl_.num_alive_documents_usage_type3_){0}
249 , decltype(_impl_.num_expired_documents_usage_type1_){0}
250 , decltype(_impl_.num_expired_documents_usage_type2_){0}
251 , decltype(_impl_.num_expired_documents_usage_type3_){0}
252 };
253 _impl_.namespace__.InitDefault();
254 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
255 _impl_.namespace__.Set("", GetArenaForAllocation());
256 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
257 }
258
~NamespaceStorageInfoProto()259 NamespaceStorageInfoProto::~NamespaceStorageInfoProto() {
260 // @@protoc_insertion_point(destructor:icing.lib.NamespaceStorageInfoProto)
261 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
262 (void)arena;
263 return;
264 }
265 SharedDtor();
266 }
267
SharedDtor()268 inline void NamespaceStorageInfoProto::SharedDtor() {
269 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
270 _impl_.namespace__.Destroy();
271 }
272
SetCachedSize(int size) const273 void NamespaceStorageInfoProto::SetCachedSize(int size) const {
274 _impl_._cached_size_.Set(size);
275 }
276
Clear()277 void NamespaceStorageInfoProto::Clear() {
278 // @@protoc_insertion_point(message_clear_start:icing.lib.NamespaceStorageInfoProto)
279 ::uint32_t cached_has_bits = 0;
280 // Prevent compiler warnings about cached_has_bits being unused
281 (void) cached_has_bits;
282
283 cached_has_bits = _impl_._has_bits_[0];
284 if (cached_has_bits & 0x00000001u) {
285 _impl_.namespace__.ClearNonDefaultToEmpty();
286 }
287 if (cached_has_bits & 0x000000feu) {
288 ::memset(&_impl_.num_alive_documents_, 0, static_cast<size_t>(
289 reinterpret_cast<char*>(&_impl_.num_expired_documents_usage_type2_) -
290 reinterpret_cast<char*>(&_impl_.num_alive_documents_)) + sizeof(_impl_.num_expired_documents_usage_type2_));
291 }
292 _impl_.num_expired_documents_usage_type3_ = 0;
293 _impl_._has_bits_.Clear();
294 _internal_metadata_.Clear<std::string>();
295 }
296
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)297 const char* NamespaceStorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
298 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
299 _Internal::HasBits has_bits{};
300 while (!ctx->Done(&ptr)) {
301 ::uint32_t tag;
302 ptr = ::_pbi::ReadTag(ptr, &tag);
303 switch (tag >> 3) {
304 // optional string namespace = 1;
305 case 1:
306 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
307 auto str = _internal_mutable_namespace_();
308 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
309 CHK_(ptr);
310 } else {
311 goto handle_unusual;
312 }
313 continue;
314 // optional int32 num_alive_documents = 2;
315 case 2:
316 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
317 _Internal::set_has_num_alive_documents(&has_bits);
318 _impl_.num_alive_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
319 CHK_(ptr);
320 } else {
321 goto handle_unusual;
322 }
323 continue;
324 // optional int32 num_expired_documents = 3;
325 case 3:
326 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
327 _Internal::set_has_num_expired_documents(&has_bits);
328 _impl_.num_expired_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
329 CHK_(ptr);
330 } else {
331 goto handle_unusual;
332 }
333 continue;
334 // optional int32 num_alive_documents_usage_type1 = 4;
335 case 4:
336 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
337 _Internal::set_has_num_alive_documents_usage_type1(&has_bits);
338 _impl_.num_alive_documents_usage_type1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
339 CHK_(ptr);
340 } else {
341 goto handle_unusual;
342 }
343 continue;
344 // optional int32 num_alive_documents_usage_type2 = 5;
345 case 5:
346 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
347 _Internal::set_has_num_alive_documents_usage_type2(&has_bits);
348 _impl_.num_alive_documents_usage_type2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
349 CHK_(ptr);
350 } else {
351 goto handle_unusual;
352 }
353 continue;
354 // optional int32 num_alive_documents_usage_type3 = 6;
355 case 6:
356 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
357 _Internal::set_has_num_alive_documents_usage_type3(&has_bits);
358 _impl_.num_alive_documents_usage_type3_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
359 CHK_(ptr);
360 } else {
361 goto handle_unusual;
362 }
363 continue;
364 // optional int32 num_expired_documents_usage_type1 = 7;
365 case 7:
366 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
367 _Internal::set_has_num_expired_documents_usage_type1(&has_bits);
368 _impl_.num_expired_documents_usage_type1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
369 CHK_(ptr);
370 } else {
371 goto handle_unusual;
372 }
373 continue;
374 // optional int32 num_expired_documents_usage_type2 = 8;
375 case 8:
376 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
377 _Internal::set_has_num_expired_documents_usage_type2(&has_bits);
378 _impl_.num_expired_documents_usage_type2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
379 CHK_(ptr);
380 } else {
381 goto handle_unusual;
382 }
383 continue;
384 // optional int32 num_expired_documents_usage_type3 = 9;
385 case 9:
386 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
387 _Internal::set_has_num_expired_documents_usage_type3(&has_bits);
388 _impl_.num_expired_documents_usage_type3_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
389 CHK_(ptr);
390 } else {
391 goto handle_unusual;
392 }
393 continue;
394 default:
395 goto handle_unusual;
396 } // switch
397 handle_unusual:
398 if ((tag == 0) || ((tag & 7) == 4)) {
399 CHK_(ptr);
400 ctx->SetLastTag(tag);
401 goto message_done;
402 }
403 ptr = UnknownFieldParse(
404 tag,
405 _internal_metadata_.mutable_unknown_fields<std::string>(),
406 ptr, ctx);
407 CHK_(ptr != nullptr);
408 } // while
409 message_done:
410 _impl_._has_bits_.Or(has_bits);
411 return ptr;
412 failure:
413 ptr = nullptr;
414 goto message_done;
415 #undef CHK_
416 }
417
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const418 ::uint8_t* NamespaceStorageInfoProto::_InternalSerialize(
419 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
420 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.NamespaceStorageInfoProto)
421 ::uint32_t cached_has_bits = 0;
422 (void) cached_has_bits;
423
424 cached_has_bits = _impl_._has_bits_[0];
425 // optional string namespace = 1;
426 if (cached_has_bits & 0x00000001u) {
427 target = stream->WriteStringMaybeAliased(
428 1, this->_internal_namespace_(), target);
429 }
430
431 // optional int32 num_alive_documents = 2;
432 if (cached_has_bits & 0x00000002u) {
433 target = stream->EnsureSpace(target);
434 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_alive_documents(), target);
435 }
436
437 // optional int32 num_expired_documents = 3;
438 if (cached_has_bits & 0x00000004u) {
439 target = stream->EnsureSpace(target);
440 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_expired_documents(), target);
441 }
442
443 // optional int32 num_alive_documents_usage_type1 = 4;
444 if (cached_has_bits & 0x00000008u) {
445 target = stream->EnsureSpace(target);
446 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_alive_documents_usage_type1(), target);
447 }
448
449 // optional int32 num_alive_documents_usage_type2 = 5;
450 if (cached_has_bits & 0x00000010u) {
451 target = stream->EnsureSpace(target);
452 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_num_alive_documents_usage_type2(), target);
453 }
454
455 // optional int32 num_alive_documents_usage_type3 = 6;
456 if (cached_has_bits & 0x00000020u) {
457 target = stream->EnsureSpace(target);
458 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_num_alive_documents_usage_type3(), target);
459 }
460
461 // optional int32 num_expired_documents_usage_type1 = 7;
462 if (cached_has_bits & 0x00000040u) {
463 target = stream->EnsureSpace(target);
464 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_num_expired_documents_usage_type1(), target);
465 }
466
467 // optional int32 num_expired_documents_usage_type2 = 8;
468 if (cached_has_bits & 0x00000080u) {
469 target = stream->EnsureSpace(target);
470 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_num_expired_documents_usage_type2(), target);
471 }
472
473 // optional int32 num_expired_documents_usage_type3 = 9;
474 if (cached_has_bits & 0x00000100u) {
475 target = stream->EnsureSpace(target);
476 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_num_expired_documents_usage_type3(), target);
477 }
478
479 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
480 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
481 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
482 }
483 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.NamespaceStorageInfoProto)
484 return target;
485 }
486
ByteSizeLong() const487 size_t NamespaceStorageInfoProto::ByteSizeLong() const {
488 // @@protoc_insertion_point(message_byte_size_start:icing.lib.NamespaceStorageInfoProto)
489 size_t total_size = 0;
490
491 ::uint32_t cached_has_bits = 0;
492 // Prevent compiler warnings about cached_has_bits being unused
493 (void) cached_has_bits;
494
495 cached_has_bits = _impl_._has_bits_[0];
496 if (cached_has_bits & 0x000000ffu) {
497 // optional string namespace = 1;
498 if (cached_has_bits & 0x00000001u) {
499 total_size += 1 +
500 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
501 this->_internal_namespace_());
502 }
503
504 // optional int32 num_alive_documents = 2;
505 if (cached_has_bits & 0x00000002u) {
506 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_alive_documents());
507 }
508
509 // optional int32 num_expired_documents = 3;
510 if (cached_has_bits & 0x00000004u) {
511 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_expired_documents());
512 }
513
514 // optional int32 num_alive_documents_usage_type1 = 4;
515 if (cached_has_bits & 0x00000008u) {
516 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_alive_documents_usage_type1());
517 }
518
519 // optional int32 num_alive_documents_usage_type2 = 5;
520 if (cached_has_bits & 0x00000010u) {
521 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_alive_documents_usage_type2());
522 }
523
524 // optional int32 num_alive_documents_usage_type3 = 6;
525 if (cached_has_bits & 0x00000020u) {
526 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_alive_documents_usage_type3());
527 }
528
529 // optional int32 num_expired_documents_usage_type1 = 7;
530 if (cached_has_bits & 0x00000040u) {
531 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_expired_documents_usage_type1());
532 }
533
534 // optional int32 num_expired_documents_usage_type2 = 8;
535 if (cached_has_bits & 0x00000080u) {
536 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_expired_documents_usage_type2());
537 }
538
539 }
540 // optional int32 num_expired_documents_usage_type3 = 9;
541 if (cached_has_bits & 0x00000100u) {
542 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_expired_documents_usage_type3());
543 }
544
545 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
546 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
547 }
548 int cached_size = ::_pbi::ToCachedSize(total_size);
549 SetCachedSize(cached_size);
550 return total_size;
551 }
552
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)553 void NamespaceStorageInfoProto::CheckTypeAndMergeFrom(
554 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
555 MergeFrom(*::_pbi::DownCast<const NamespaceStorageInfoProto*>(
556 &from));
557 }
558
MergeFrom(const NamespaceStorageInfoProto & from)559 void NamespaceStorageInfoProto::MergeFrom(const NamespaceStorageInfoProto& from) {
560 NamespaceStorageInfoProto* const _this = this;
561 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.NamespaceStorageInfoProto)
562 GOOGLE_DCHECK_NE(&from, _this);
563 ::uint32_t cached_has_bits = 0;
564 (void) cached_has_bits;
565
566 cached_has_bits = from._impl_._has_bits_[0];
567 if (cached_has_bits & 0x000000ffu) {
568 if (cached_has_bits & 0x00000001u) {
569 _this->_internal_set_namespace_(from._internal_namespace_());
570 }
571 if (cached_has_bits & 0x00000002u) {
572 _this->_impl_.num_alive_documents_ = from._impl_.num_alive_documents_;
573 }
574 if (cached_has_bits & 0x00000004u) {
575 _this->_impl_.num_expired_documents_ = from._impl_.num_expired_documents_;
576 }
577 if (cached_has_bits & 0x00000008u) {
578 _this->_impl_.num_alive_documents_usage_type1_ = from._impl_.num_alive_documents_usage_type1_;
579 }
580 if (cached_has_bits & 0x00000010u) {
581 _this->_impl_.num_alive_documents_usage_type2_ = from._impl_.num_alive_documents_usage_type2_;
582 }
583 if (cached_has_bits & 0x00000020u) {
584 _this->_impl_.num_alive_documents_usage_type3_ = from._impl_.num_alive_documents_usage_type3_;
585 }
586 if (cached_has_bits & 0x00000040u) {
587 _this->_impl_.num_expired_documents_usage_type1_ = from._impl_.num_expired_documents_usage_type1_;
588 }
589 if (cached_has_bits & 0x00000080u) {
590 _this->_impl_.num_expired_documents_usage_type2_ = from._impl_.num_expired_documents_usage_type2_;
591 }
592 _this->_impl_._has_bits_[0] |= cached_has_bits;
593 }
594 if (cached_has_bits & 0x00000100u) {
595 _this->_internal_set_num_expired_documents_usage_type3(from._internal_num_expired_documents_usage_type3());
596 }
597 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
598 }
599
CopyFrom(const NamespaceStorageInfoProto & from)600 void NamespaceStorageInfoProto::CopyFrom(const NamespaceStorageInfoProto& from) {
601 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.NamespaceStorageInfoProto)
602 if (&from == this) return;
603 Clear();
604 MergeFrom(from);
605 }
606
IsInitialized() const607 bool NamespaceStorageInfoProto::IsInitialized() const {
608 return true;
609 }
610
InternalSwap(NamespaceStorageInfoProto * other)611 void NamespaceStorageInfoProto::InternalSwap(NamespaceStorageInfoProto* other) {
612 using std::swap;
613 auto* lhs_arena = GetArenaForAllocation();
614 auto* rhs_arena = other->GetArenaForAllocation();
615 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
616 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
617 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
618 &_impl_.namespace__, lhs_arena,
619 &other->_impl_.namespace__, rhs_arena
620 );
621 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
622 PROTOBUF_FIELD_OFFSET(NamespaceStorageInfoProto, _impl_.num_expired_documents_usage_type3_)
623 + sizeof(NamespaceStorageInfoProto::_impl_.num_expired_documents_usage_type3_) // NOLINT
624 - PROTOBUF_FIELD_OFFSET(NamespaceStorageInfoProto, _impl_.num_alive_documents_)>(
625 reinterpret_cast<char*>(&_impl_.num_alive_documents_),
626 reinterpret_cast<char*>(&other->_impl_.num_alive_documents_));
627 }
628
GetTypeName() const629 std::string NamespaceStorageInfoProto::GetTypeName() const {
630 return "icing.lib.NamespaceStorageInfoProto";
631 }
632
633
634 // ===================================================================
635
636 class DocumentStorageInfoProto::_Internal {
637 public:
638 using HasBits = decltype(std::declval<DocumentStorageInfoProto>()._impl_._has_bits_);
set_has_num_alive_documents(HasBits * has_bits)639 static void set_has_num_alive_documents(HasBits* has_bits) {
640 (*has_bits)[0] |= 1u;
641 }
set_has_num_deleted_documents(HasBits * has_bits)642 static void set_has_num_deleted_documents(HasBits* has_bits) {
643 (*has_bits)[0] |= 2u;
644 }
set_has_num_expired_documents(HasBits * has_bits)645 static void set_has_num_expired_documents(HasBits* has_bits) {
646 (*has_bits)[0] |= 128u;
647 }
set_has_document_store_size(HasBits * has_bits)648 static void set_has_document_store_size(HasBits* has_bits) {
649 (*has_bits)[0] |= 4u;
650 }
set_has_document_log_size(HasBits * has_bits)651 static void set_has_document_log_size(HasBits* has_bits) {
652 (*has_bits)[0] |= 8u;
653 }
set_has_key_mapper_size(HasBits * has_bits)654 static void set_has_key_mapper_size(HasBits* has_bits) {
655 (*has_bits)[0] |= 16u;
656 }
set_has_document_id_mapper_size(HasBits * has_bits)657 static void set_has_document_id_mapper_size(HasBits* has_bits) {
658 (*has_bits)[0] |= 32u;
659 }
set_has_score_cache_size(HasBits * has_bits)660 static void set_has_score_cache_size(HasBits* has_bits) {
661 (*has_bits)[0] |= 64u;
662 }
set_has_filter_cache_size(HasBits * has_bits)663 static void set_has_filter_cache_size(HasBits* has_bits) {
664 (*has_bits)[0] |= 512u;
665 }
set_has_corpus_mapper_size(HasBits * has_bits)666 static void set_has_corpus_mapper_size(HasBits* has_bits) {
667 (*has_bits)[0] |= 1024u;
668 }
set_has_corpus_score_cache_size(HasBits * has_bits)669 static void set_has_corpus_score_cache_size(HasBits* has_bits) {
670 (*has_bits)[0] |= 2048u;
671 }
set_has_namespace_id_mapper_size(HasBits * has_bits)672 static void set_has_namespace_id_mapper_size(HasBits* has_bits) {
673 (*has_bits)[0] |= 4096u;
674 }
set_has_scorable_property_cache_size(HasBits * has_bits)675 static void set_has_scorable_property_cache_size(HasBits* has_bits) {
676 (*has_bits)[0] |= 8192u;
677 }
set_has_num_namespaces(HasBits * has_bits)678 static void set_has_num_namespaces(HasBits* has_bits) {
679 (*has_bits)[0] |= 256u;
680 }
681 };
682
DocumentStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)683 DocumentStorageInfoProto::DocumentStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
684 bool is_message_owned)
685 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
686 SharedCtor(arena, is_message_owned);
687 // @@protoc_insertion_point(arena_constructor:icing.lib.DocumentStorageInfoProto)
688 }
DocumentStorageInfoProto(const DocumentStorageInfoProto & from)689 DocumentStorageInfoProto::DocumentStorageInfoProto(const DocumentStorageInfoProto& from)
690 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
691 DocumentStorageInfoProto* const _this = this; (void)_this;
692 new (&_impl_) Impl_{
693 decltype(_impl_._has_bits_){from._impl_._has_bits_}
694 , /*decltype(_impl_._cached_size_)*/{}
695 , decltype(_impl_.namespace_storage_info_){from._impl_.namespace_storage_info_}
696 , decltype(_impl_.num_alive_documents_){}
697 , decltype(_impl_.num_deleted_documents_){}
698 , decltype(_impl_.document_store_size_){}
699 , decltype(_impl_.document_log_size_){}
700 , decltype(_impl_.key_mapper_size_){}
701 , decltype(_impl_.document_id_mapper_size_){}
702 , decltype(_impl_.score_cache_size_){}
703 , decltype(_impl_.num_expired_documents_){}
704 , decltype(_impl_.num_namespaces_){}
705 , decltype(_impl_.filter_cache_size_){}
706 , decltype(_impl_.corpus_mapper_size_){}
707 , decltype(_impl_.corpus_score_cache_size_){}
708 , decltype(_impl_.namespace_id_mapper_size_){}
709 , decltype(_impl_.scorable_property_cache_size_){}};
710
711 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
712 ::memcpy(&_impl_.num_alive_documents_, &from._impl_.num_alive_documents_,
713 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scorable_property_cache_size_) -
714 reinterpret_cast<char*>(&_impl_.num_alive_documents_)) + sizeof(_impl_.scorable_property_cache_size_));
715 // @@protoc_insertion_point(copy_constructor:icing.lib.DocumentStorageInfoProto)
716 }
717
SharedCtor(::_pb::Arena * arena,bool is_message_owned)718 inline void DocumentStorageInfoProto::SharedCtor(
719 ::_pb::Arena* arena, bool is_message_owned) {
720 (void)arena;
721 (void)is_message_owned;
722 new (&_impl_) Impl_{
723 decltype(_impl_._has_bits_){}
724 , /*decltype(_impl_._cached_size_)*/{}
725 , decltype(_impl_.namespace_storage_info_){arena}
726 , decltype(_impl_.num_alive_documents_){0}
727 , decltype(_impl_.num_deleted_documents_){0}
728 , decltype(_impl_.document_store_size_){::int64_t{0}}
729 , decltype(_impl_.document_log_size_){::int64_t{0}}
730 , decltype(_impl_.key_mapper_size_){::int64_t{0}}
731 , decltype(_impl_.document_id_mapper_size_){::int64_t{0}}
732 , decltype(_impl_.score_cache_size_){::int64_t{0}}
733 , decltype(_impl_.num_expired_documents_){0}
734 , decltype(_impl_.num_namespaces_){0}
735 , decltype(_impl_.filter_cache_size_){::int64_t{0}}
736 , decltype(_impl_.corpus_mapper_size_){::int64_t{0}}
737 , decltype(_impl_.corpus_score_cache_size_){::int64_t{0}}
738 , decltype(_impl_.namespace_id_mapper_size_){::int64_t{0}}
739 , decltype(_impl_.scorable_property_cache_size_){::int64_t{0}}
740 };
741 }
742
~DocumentStorageInfoProto()743 DocumentStorageInfoProto::~DocumentStorageInfoProto() {
744 // @@protoc_insertion_point(destructor:icing.lib.DocumentStorageInfoProto)
745 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
746 (void)arena;
747 return;
748 }
749 SharedDtor();
750 }
751
SharedDtor()752 inline void DocumentStorageInfoProto::SharedDtor() {
753 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
754 _impl_.namespace_storage_info_.~RepeatedPtrField();
755 }
756
SetCachedSize(int size) const757 void DocumentStorageInfoProto::SetCachedSize(int size) const {
758 _impl_._cached_size_.Set(size);
759 }
760
Clear()761 void DocumentStorageInfoProto::Clear() {
762 // @@protoc_insertion_point(message_clear_start:icing.lib.DocumentStorageInfoProto)
763 ::uint32_t cached_has_bits = 0;
764 // Prevent compiler warnings about cached_has_bits being unused
765 (void) cached_has_bits;
766
767 _impl_.namespace_storage_info_.Clear();
768 cached_has_bits = _impl_._has_bits_[0];
769 if (cached_has_bits & 0x000000ffu) {
770 ::memset(&_impl_.num_alive_documents_, 0, static_cast<size_t>(
771 reinterpret_cast<char*>(&_impl_.num_expired_documents_) -
772 reinterpret_cast<char*>(&_impl_.num_alive_documents_)) + sizeof(_impl_.num_expired_documents_));
773 }
774 if (cached_has_bits & 0x00003f00u) {
775 ::memset(&_impl_.num_namespaces_, 0, static_cast<size_t>(
776 reinterpret_cast<char*>(&_impl_.scorable_property_cache_size_) -
777 reinterpret_cast<char*>(&_impl_.num_namespaces_)) + sizeof(_impl_.scorable_property_cache_size_));
778 }
779 _impl_._has_bits_.Clear();
780 _internal_metadata_.Clear<std::string>();
781 }
782
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)783 const char* DocumentStorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
784 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
785 _Internal::HasBits has_bits{};
786 while (!ctx->Done(&ptr)) {
787 ::uint32_t tag;
788 ptr = ::_pbi::ReadTag(ptr, &tag);
789 switch (tag >> 3) {
790 // optional int32 num_alive_documents = 1;
791 case 1:
792 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
793 _Internal::set_has_num_alive_documents(&has_bits);
794 _impl_.num_alive_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
795 CHK_(ptr);
796 } else {
797 goto handle_unusual;
798 }
799 continue;
800 // optional int32 num_deleted_documents = 2;
801 case 2:
802 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
803 _Internal::set_has_num_deleted_documents(&has_bits);
804 _impl_.num_deleted_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
805 CHK_(ptr);
806 } else {
807 goto handle_unusual;
808 }
809 continue;
810 // optional int32 num_expired_documents = 3;
811 case 3:
812 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
813 _Internal::set_has_num_expired_documents(&has_bits);
814 _impl_.num_expired_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
815 CHK_(ptr);
816 } else {
817 goto handle_unusual;
818 }
819 continue;
820 // optional int64 document_store_size = 4;
821 case 4:
822 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
823 _Internal::set_has_document_store_size(&has_bits);
824 _impl_.document_store_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
825 CHK_(ptr);
826 } else {
827 goto handle_unusual;
828 }
829 continue;
830 // optional int64 document_log_size = 5;
831 case 5:
832 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
833 _Internal::set_has_document_log_size(&has_bits);
834 _impl_.document_log_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
835 CHK_(ptr);
836 } else {
837 goto handle_unusual;
838 }
839 continue;
840 // optional int64 key_mapper_size = 6;
841 case 6:
842 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
843 _Internal::set_has_key_mapper_size(&has_bits);
844 _impl_.key_mapper_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
845 CHK_(ptr);
846 } else {
847 goto handle_unusual;
848 }
849 continue;
850 // optional int64 document_id_mapper_size = 7;
851 case 7:
852 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
853 _Internal::set_has_document_id_mapper_size(&has_bits);
854 _impl_.document_id_mapper_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
855 CHK_(ptr);
856 } else {
857 goto handle_unusual;
858 }
859 continue;
860 // optional int64 score_cache_size = 8;
861 case 8:
862 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
863 _Internal::set_has_score_cache_size(&has_bits);
864 _impl_.score_cache_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
865 CHK_(ptr);
866 } else {
867 goto handle_unusual;
868 }
869 continue;
870 // optional int64 filter_cache_size = 9;
871 case 9:
872 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
873 _Internal::set_has_filter_cache_size(&has_bits);
874 _impl_.filter_cache_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
875 CHK_(ptr);
876 } else {
877 goto handle_unusual;
878 }
879 continue;
880 // optional int64 corpus_mapper_size = 10;
881 case 10:
882 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
883 _Internal::set_has_corpus_mapper_size(&has_bits);
884 _impl_.corpus_mapper_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
885 CHK_(ptr);
886 } else {
887 goto handle_unusual;
888 }
889 continue;
890 // optional int64 corpus_score_cache_size = 11;
891 case 11:
892 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
893 _Internal::set_has_corpus_score_cache_size(&has_bits);
894 _impl_.corpus_score_cache_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
895 CHK_(ptr);
896 } else {
897 goto handle_unusual;
898 }
899 continue;
900 // optional int64 namespace_id_mapper_size = 12;
901 case 12:
902 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
903 _Internal::set_has_namespace_id_mapper_size(&has_bits);
904 _impl_.namespace_id_mapper_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
905 CHK_(ptr);
906 } else {
907 goto handle_unusual;
908 }
909 continue;
910 // optional int32 num_namespaces = 13;
911 case 13:
912 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
913 _Internal::set_has_num_namespaces(&has_bits);
914 _impl_.num_namespaces_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
915 CHK_(ptr);
916 } else {
917 goto handle_unusual;
918 }
919 continue;
920 // repeated .icing.lib.NamespaceStorageInfoProto namespace_storage_info = 14;
921 case 14:
922 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
923 ptr -= 1;
924 do {
925 ptr += 1;
926 ptr = ctx->ParseMessage(_internal_add_namespace_storage_info(), ptr);
927 CHK_(ptr);
928 if (!ctx->DataAvailable(ptr)) break;
929 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
930 } else {
931 goto handle_unusual;
932 }
933 continue;
934 // optional int64 scorable_property_cache_size = 15;
935 case 15:
936 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
937 _Internal::set_has_scorable_property_cache_size(&has_bits);
938 _impl_.scorable_property_cache_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
939 CHK_(ptr);
940 } else {
941 goto handle_unusual;
942 }
943 continue;
944 default:
945 goto handle_unusual;
946 } // switch
947 handle_unusual:
948 if ((tag == 0) || ((tag & 7) == 4)) {
949 CHK_(ptr);
950 ctx->SetLastTag(tag);
951 goto message_done;
952 }
953 ptr = UnknownFieldParse(
954 tag,
955 _internal_metadata_.mutable_unknown_fields<std::string>(),
956 ptr, ctx);
957 CHK_(ptr != nullptr);
958 } // while
959 message_done:
960 _impl_._has_bits_.Or(has_bits);
961 return ptr;
962 failure:
963 ptr = nullptr;
964 goto message_done;
965 #undef CHK_
966 }
967
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const968 ::uint8_t* DocumentStorageInfoProto::_InternalSerialize(
969 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
970 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DocumentStorageInfoProto)
971 ::uint32_t cached_has_bits = 0;
972 (void) cached_has_bits;
973
974 cached_has_bits = _impl_._has_bits_[0];
975 // optional int32 num_alive_documents = 1;
976 if (cached_has_bits & 0x00000001u) {
977 target = stream->EnsureSpace(target);
978 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_alive_documents(), target);
979 }
980
981 // optional int32 num_deleted_documents = 2;
982 if (cached_has_bits & 0x00000002u) {
983 target = stream->EnsureSpace(target);
984 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_deleted_documents(), target);
985 }
986
987 // optional int32 num_expired_documents = 3;
988 if (cached_has_bits & 0x00000080u) {
989 target = stream->EnsureSpace(target);
990 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_expired_documents(), target);
991 }
992
993 // optional int64 document_store_size = 4;
994 if (cached_has_bits & 0x00000004u) {
995 target = stream->EnsureSpace(target);
996 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_document_store_size(), target);
997 }
998
999 // optional int64 document_log_size = 5;
1000 if (cached_has_bits & 0x00000008u) {
1001 target = stream->EnsureSpace(target);
1002 target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_document_log_size(), target);
1003 }
1004
1005 // optional int64 key_mapper_size = 6;
1006 if (cached_has_bits & 0x00000010u) {
1007 target = stream->EnsureSpace(target);
1008 target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_key_mapper_size(), target);
1009 }
1010
1011 // optional int64 document_id_mapper_size = 7;
1012 if (cached_has_bits & 0x00000020u) {
1013 target = stream->EnsureSpace(target);
1014 target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_document_id_mapper_size(), target);
1015 }
1016
1017 // optional int64 score_cache_size = 8;
1018 if (cached_has_bits & 0x00000040u) {
1019 target = stream->EnsureSpace(target);
1020 target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_score_cache_size(), target);
1021 }
1022
1023 // optional int64 filter_cache_size = 9;
1024 if (cached_has_bits & 0x00000200u) {
1025 target = stream->EnsureSpace(target);
1026 target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_filter_cache_size(), target);
1027 }
1028
1029 // optional int64 corpus_mapper_size = 10;
1030 if (cached_has_bits & 0x00000400u) {
1031 target = stream->EnsureSpace(target);
1032 target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_corpus_mapper_size(), target);
1033 }
1034
1035 // optional int64 corpus_score_cache_size = 11;
1036 if (cached_has_bits & 0x00000800u) {
1037 target = stream->EnsureSpace(target);
1038 target = ::_pbi::WireFormatLite::WriteInt64ToArray(11, this->_internal_corpus_score_cache_size(), target);
1039 }
1040
1041 // optional int64 namespace_id_mapper_size = 12;
1042 if (cached_has_bits & 0x00001000u) {
1043 target = stream->EnsureSpace(target);
1044 target = ::_pbi::WireFormatLite::WriteInt64ToArray(12, this->_internal_namespace_id_mapper_size(), target);
1045 }
1046
1047 // optional int32 num_namespaces = 13;
1048 if (cached_has_bits & 0x00000100u) {
1049 target = stream->EnsureSpace(target);
1050 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_num_namespaces(), target);
1051 }
1052
1053 // repeated .icing.lib.NamespaceStorageInfoProto namespace_storage_info = 14;
1054 for (unsigned i = 0,
1055 n = static_cast<unsigned>(this->_internal_namespace_storage_info_size()); i < n; i++) {
1056 const auto& repfield = this->_internal_namespace_storage_info(i);
1057 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1058 InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
1059 }
1060
1061 // optional int64 scorable_property_cache_size = 15;
1062 if (cached_has_bits & 0x00002000u) {
1063 target = stream->EnsureSpace(target);
1064 target = ::_pbi::WireFormatLite::WriteInt64ToArray(15, this->_internal_scorable_property_cache_size(), target);
1065 }
1066
1067 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1068 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1069 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1070 }
1071 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DocumentStorageInfoProto)
1072 return target;
1073 }
1074
ByteSizeLong() const1075 size_t DocumentStorageInfoProto::ByteSizeLong() const {
1076 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DocumentStorageInfoProto)
1077 size_t total_size = 0;
1078
1079 ::uint32_t cached_has_bits = 0;
1080 // Prevent compiler warnings about cached_has_bits being unused
1081 (void) cached_has_bits;
1082
1083 // repeated .icing.lib.NamespaceStorageInfoProto namespace_storage_info = 14;
1084 total_size += 1UL * this->_internal_namespace_storage_info_size();
1085 for (const auto& msg : this->_impl_.namespace_storage_info_) {
1086 total_size +=
1087 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1088 }
1089
1090 cached_has_bits = _impl_._has_bits_[0];
1091 if (cached_has_bits & 0x000000ffu) {
1092 // optional int32 num_alive_documents = 1;
1093 if (cached_has_bits & 0x00000001u) {
1094 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_alive_documents());
1095 }
1096
1097 // optional int32 num_deleted_documents = 2;
1098 if (cached_has_bits & 0x00000002u) {
1099 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_deleted_documents());
1100 }
1101
1102 // optional int64 document_store_size = 4;
1103 if (cached_has_bits & 0x00000004u) {
1104 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_document_store_size());
1105 }
1106
1107 // optional int64 document_log_size = 5;
1108 if (cached_has_bits & 0x00000008u) {
1109 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_document_log_size());
1110 }
1111
1112 // optional int64 key_mapper_size = 6;
1113 if (cached_has_bits & 0x00000010u) {
1114 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_key_mapper_size());
1115 }
1116
1117 // optional int64 document_id_mapper_size = 7;
1118 if (cached_has_bits & 0x00000020u) {
1119 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_document_id_mapper_size());
1120 }
1121
1122 // optional int64 score_cache_size = 8;
1123 if (cached_has_bits & 0x00000040u) {
1124 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_score_cache_size());
1125 }
1126
1127 // optional int32 num_expired_documents = 3;
1128 if (cached_has_bits & 0x00000080u) {
1129 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_expired_documents());
1130 }
1131
1132 }
1133 if (cached_has_bits & 0x00003f00u) {
1134 // optional int32 num_namespaces = 13;
1135 if (cached_has_bits & 0x00000100u) {
1136 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_namespaces());
1137 }
1138
1139 // optional int64 filter_cache_size = 9;
1140 if (cached_has_bits & 0x00000200u) {
1141 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_filter_cache_size());
1142 }
1143
1144 // optional int64 corpus_mapper_size = 10;
1145 if (cached_has_bits & 0x00000400u) {
1146 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_corpus_mapper_size());
1147 }
1148
1149 // optional int64 corpus_score_cache_size = 11;
1150 if (cached_has_bits & 0x00000800u) {
1151 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_corpus_score_cache_size());
1152 }
1153
1154 // optional int64 namespace_id_mapper_size = 12;
1155 if (cached_has_bits & 0x00001000u) {
1156 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_namespace_id_mapper_size());
1157 }
1158
1159 // optional int64 scorable_property_cache_size = 15;
1160 if (cached_has_bits & 0x00002000u) {
1161 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_scorable_property_cache_size());
1162 }
1163
1164 }
1165 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1166 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1167 }
1168 int cached_size = ::_pbi::ToCachedSize(total_size);
1169 SetCachedSize(cached_size);
1170 return total_size;
1171 }
1172
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1173 void DocumentStorageInfoProto::CheckTypeAndMergeFrom(
1174 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1175 MergeFrom(*::_pbi::DownCast<const DocumentStorageInfoProto*>(
1176 &from));
1177 }
1178
MergeFrom(const DocumentStorageInfoProto & from)1179 void DocumentStorageInfoProto::MergeFrom(const DocumentStorageInfoProto& from) {
1180 DocumentStorageInfoProto* const _this = this;
1181 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DocumentStorageInfoProto)
1182 GOOGLE_DCHECK_NE(&from, _this);
1183 ::uint32_t cached_has_bits = 0;
1184 (void) cached_has_bits;
1185
1186 _this->_impl_.namespace_storage_info_.MergeFrom(from._impl_.namespace_storage_info_);
1187 cached_has_bits = from._impl_._has_bits_[0];
1188 if (cached_has_bits & 0x000000ffu) {
1189 if (cached_has_bits & 0x00000001u) {
1190 _this->_impl_.num_alive_documents_ = from._impl_.num_alive_documents_;
1191 }
1192 if (cached_has_bits & 0x00000002u) {
1193 _this->_impl_.num_deleted_documents_ = from._impl_.num_deleted_documents_;
1194 }
1195 if (cached_has_bits & 0x00000004u) {
1196 _this->_impl_.document_store_size_ = from._impl_.document_store_size_;
1197 }
1198 if (cached_has_bits & 0x00000008u) {
1199 _this->_impl_.document_log_size_ = from._impl_.document_log_size_;
1200 }
1201 if (cached_has_bits & 0x00000010u) {
1202 _this->_impl_.key_mapper_size_ = from._impl_.key_mapper_size_;
1203 }
1204 if (cached_has_bits & 0x00000020u) {
1205 _this->_impl_.document_id_mapper_size_ = from._impl_.document_id_mapper_size_;
1206 }
1207 if (cached_has_bits & 0x00000040u) {
1208 _this->_impl_.score_cache_size_ = from._impl_.score_cache_size_;
1209 }
1210 if (cached_has_bits & 0x00000080u) {
1211 _this->_impl_.num_expired_documents_ = from._impl_.num_expired_documents_;
1212 }
1213 _this->_impl_._has_bits_[0] |= cached_has_bits;
1214 }
1215 if (cached_has_bits & 0x00003f00u) {
1216 if (cached_has_bits & 0x00000100u) {
1217 _this->_impl_.num_namespaces_ = from._impl_.num_namespaces_;
1218 }
1219 if (cached_has_bits & 0x00000200u) {
1220 _this->_impl_.filter_cache_size_ = from._impl_.filter_cache_size_;
1221 }
1222 if (cached_has_bits & 0x00000400u) {
1223 _this->_impl_.corpus_mapper_size_ = from._impl_.corpus_mapper_size_;
1224 }
1225 if (cached_has_bits & 0x00000800u) {
1226 _this->_impl_.corpus_score_cache_size_ = from._impl_.corpus_score_cache_size_;
1227 }
1228 if (cached_has_bits & 0x00001000u) {
1229 _this->_impl_.namespace_id_mapper_size_ = from._impl_.namespace_id_mapper_size_;
1230 }
1231 if (cached_has_bits & 0x00002000u) {
1232 _this->_impl_.scorable_property_cache_size_ = from._impl_.scorable_property_cache_size_;
1233 }
1234 _this->_impl_._has_bits_[0] |= cached_has_bits;
1235 }
1236 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1237 }
1238
CopyFrom(const DocumentStorageInfoProto & from)1239 void DocumentStorageInfoProto::CopyFrom(const DocumentStorageInfoProto& from) {
1240 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DocumentStorageInfoProto)
1241 if (&from == this) return;
1242 Clear();
1243 MergeFrom(from);
1244 }
1245
IsInitialized() const1246 bool DocumentStorageInfoProto::IsInitialized() const {
1247 return true;
1248 }
1249
InternalSwap(DocumentStorageInfoProto * other)1250 void DocumentStorageInfoProto::InternalSwap(DocumentStorageInfoProto* other) {
1251 using std::swap;
1252 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1253 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1254 _impl_.namespace_storage_info_.InternalSwap(&other->_impl_.namespace_storage_info_);
1255 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1256 PROTOBUF_FIELD_OFFSET(DocumentStorageInfoProto, _impl_.scorable_property_cache_size_)
1257 + sizeof(DocumentStorageInfoProto::_impl_.scorable_property_cache_size_) // NOLINT
1258 - PROTOBUF_FIELD_OFFSET(DocumentStorageInfoProto, _impl_.num_alive_documents_)>(
1259 reinterpret_cast<char*>(&_impl_.num_alive_documents_),
1260 reinterpret_cast<char*>(&other->_impl_.num_alive_documents_));
1261 }
1262
GetTypeName() const1263 std::string DocumentStorageInfoProto::GetTypeName() const {
1264 return "icing.lib.DocumentStorageInfoProto";
1265 }
1266
1267
1268 // ===================================================================
1269
1270 class SchemaStoreStorageInfoProto::_Internal {
1271 public:
1272 using HasBits = decltype(std::declval<SchemaStoreStorageInfoProto>()._impl_._has_bits_);
set_has_schema_store_size(HasBits * has_bits)1273 static void set_has_schema_store_size(HasBits* has_bits) {
1274 (*has_bits)[0] |= 1u;
1275 }
set_has_num_schema_types(HasBits * has_bits)1276 static void set_has_num_schema_types(HasBits* has_bits) {
1277 (*has_bits)[0] |= 2u;
1278 }
set_has_num_total_sections(HasBits * has_bits)1279 static void set_has_num_total_sections(HasBits* has_bits) {
1280 (*has_bits)[0] |= 4u;
1281 }
set_has_num_schema_types_sections_exhausted(HasBits * has_bits)1282 static void set_has_num_schema_types_sections_exhausted(HasBits* has_bits) {
1283 (*has_bits)[0] |= 8u;
1284 }
1285 };
1286
SchemaStoreStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1287 SchemaStoreStorageInfoProto::SchemaStoreStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1288 bool is_message_owned)
1289 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1290 SharedCtor(arena, is_message_owned);
1291 // @@protoc_insertion_point(arena_constructor:icing.lib.SchemaStoreStorageInfoProto)
1292 }
SchemaStoreStorageInfoProto(const SchemaStoreStorageInfoProto & from)1293 SchemaStoreStorageInfoProto::SchemaStoreStorageInfoProto(const SchemaStoreStorageInfoProto& from)
1294 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1295 SchemaStoreStorageInfoProto* const _this = this; (void)_this;
1296 new (&_impl_) Impl_{
1297 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1298 , /*decltype(_impl_._cached_size_)*/{}
1299 , decltype(_impl_.schema_store_size_){}
1300 , decltype(_impl_.num_schema_types_){}
1301 , decltype(_impl_.num_total_sections_){}
1302 , decltype(_impl_.num_schema_types_sections_exhausted_){}};
1303
1304 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1305 ::memcpy(&_impl_.schema_store_size_, &from._impl_.schema_store_size_,
1306 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_schema_types_sections_exhausted_) -
1307 reinterpret_cast<char*>(&_impl_.schema_store_size_)) + sizeof(_impl_.num_schema_types_sections_exhausted_));
1308 // @@protoc_insertion_point(copy_constructor:icing.lib.SchemaStoreStorageInfoProto)
1309 }
1310
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1311 inline void SchemaStoreStorageInfoProto::SharedCtor(
1312 ::_pb::Arena* arena, bool is_message_owned) {
1313 (void)arena;
1314 (void)is_message_owned;
1315 new (&_impl_) Impl_{
1316 decltype(_impl_._has_bits_){}
1317 , /*decltype(_impl_._cached_size_)*/{}
1318 , decltype(_impl_.schema_store_size_){::int64_t{0}}
1319 , decltype(_impl_.num_schema_types_){0}
1320 , decltype(_impl_.num_total_sections_){0}
1321 , decltype(_impl_.num_schema_types_sections_exhausted_){0}
1322 };
1323 }
1324
~SchemaStoreStorageInfoProto()1325 SchemaStoreStorageInfoProto::~SchemaStoreStorageInfoProto() {
1326 // @@protoc_insertion_point(destructor:icing.lib.SchemaStoreStorageInfoProto)
1327 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1328 (void)arena;
1329 return;
1330 }
1331 SharedDtor();
1332 }
1333
SharedDtor()1334 inline void SchemaStoreStorageInfoProto::SharedDtor() {
1335 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1336 }
1337
SetCachedSize(int size) const1338 void SchemaStoreStorageInfoProto::SetCachedSize(int size) const {
1339 _impl_._cached_size_.Set(size);
1340 }
1341
Clear()1342 void SchemaStoreStorageInfoProto::Clear() {
1343 // @@protoc_insertion_point(message_clear_start:icing.lib.SchemaStoreStorageInfoProto)
1344 ::uint32_t cached_has_bits = 0;
1345 // Prevent compiler warnings about cached_has_bits being unused
1346 (void) cached_has_bits;
1347
1348 cached_has_bits = _impl_._has_bits_[0];
1349 if (cached_has_bits & 0x0000000fu) {
1350 ::memset(&_impl_.schema_store_size_, 0, static_cast<size_t>(
1351 reinterpret_cast<char*>(&_impl_.num_schema_types_sections_exhausted_) -
1352 reinterpret_cast<char*>(&_impl_.schema_store_size_)) + sizeof(_impl_.num_schema_types_sections_exhausted_));
1353 }
1354 _impl_._has_bits_.Clear();
1355 _internal_metadata_.Clear<std::string>();
1356 }
1357
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1358 const char* SchemaStoreStorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1359 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1360 _Internal::HasBits has_bits{};
1361 while (!ctx->Done(&ptr)) {
1362 ::uint32_t tag;
1363 ptr = ::_pbi::ReadTag(ptr, &tag);
1364 switch (tag >> 3) {
1365 // optional int64 schema_store_size = 1;
1366 case 1:
1367 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1368 _Internal::set_has_schema_store_size(&has_bits);
1369 _impl_.schema_store_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1370 CHK_(ptr);
1371 } else {
1372 goto handle_unusual;
1373 }
1374 continue;
1375 // optional int32 num_schema_types = 2;
1376 case 2:
1377 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1378 _Internal::set_has_num_schema_types(&has_bits);
1379 _impl_.num_schema_types_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1380 CHK_(ptr);
1381 } else {
1382 goto handle_unusual;
1383 }
1384 continue;
1385 // optional int32 num_total_sections = 3;
1386 case 3:
1387 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1388 _Internal::set_has_num_total_sections(&has_bits);
1389 _impl_.num_total_sections_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1390 CHK_(ptr);
1391 } else {
1392 goto handle_unusual;
1393 }
1394 continue;
1395 // optional int32 num_schema_types_sections_exhausted = 4;
1396 case 4:
1397 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1398 _Internal::set_has_num_schema_types_sections_exhausted(&has_bits);
1399 _impl_.num_schema_types_sections_exhausted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1400 CHK_(ptr);
1401 } else {
1402 goto handle_unusual;
1403 }
1404 continue;
1405 default:
1406 goto handle_unusual;
1407 } // switch
1408 handle_unusual:
1409 if ((tag == 0) || ((tag & 7) == 4)) {
1410 CHK_(ptr);
1411 ctx->SetLastTag(tag);
1412 goto message_done;
1413 }
1414 ptr = UnknownFieldParse(
1415 tag,
1416 _internal_metadata_.mutable_unknown_fields<std::string>(),
1417 ptr, ctx);
1418 CHK_(ptr != nullptr);
1419 } // while
1420 message_done:
1421 _impl_._has_bits_.Or(has_bits);
1422 return ptr;
1423 failure:
1424 ptr = nullptr;
1425 goto message_done;
1426 #undef CHK_
1427 }
1428
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1429 ::uint8_t* SchemaStoreStorageInfoProto::_InternalSerialize(
1430 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1431 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SchemaStoreStorageInfoProto)
1432 ::uint32_t cached_has_bits = 0;
1433 (void) cached_has_bits;
1434
1435 cached_has_bits = _impl_._has_bits_[0];
1436 // optional int64 schema_store_size = 1;
1437 if (cached_has_bits & 0x00000001u) {
1438 target = stream->EnsureSpace(target);
1439 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_schema_store_size(), target);
1440 }
1441
1442 // optional int32 num_schema_types = 2;
1443 if (cached_has_bits & 0x00000002u) {
1444 target = stream->EnsureSpace(target);
1445 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_schema_types(), target);
1446 }
1447
1448 // optional int32 num_total_sections = 3;
1449 if (cached_has_bits & 0x00000004u) {
1450 target = stream->EnsureSpace(target);
1451 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_total_sections(), target);
1452 }
1453
1454 // optional int32 num_schema_types_sections_exhausted = 4;
1455 if (cached_has_bits & 0x00000008u) {
1456 target = stream->EnsureSpace(target);
1457 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_schema_types_sections_exhausted(), target);
1458 }
1459
1460 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1461 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1462 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1463 }
1464 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SchemaStoreStorageInfoProto)
1465 return target;
1466 }
1467
ByteSizeLong() const1468 size_t SchemaStoreStorageInfoProto::ByteSizeLong() const {
1469 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SchemaStoreStorageInfoProto)
1470 size_t total_size = 0;
1471
1472 ::uint32_t cached_has_bits = 0;
1473 // Prevent compiler warnings about cached_has_bits being unused
1474 (void) cached_has_bits;
1475
1476 cached_has_bits = _impl_._has_bits_[0];
1477 if (cached_has_bits & 0x0000000fu) {
1478 // optional int64 schema_store_size = 1;
1479 if (cached_has_bits & 0x00000001u) {
1480 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_schema_store_size());
1481 }
1482
1483 // optional int32 num_schema_types = 2;
1484 if (cached_has_bits & 0x00000002u) {
1485 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types());
1486 }
1487
1488 // optional int32 num_total_sections = 3;
1489 if (cached_has_bits & 0x00000004u) {
1490 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_total_sections());
1491 }
1492
1493 // optional int32 num_schema_types_sections_exhausted = 4;
1494 if (cached_has_bits & 0x00000008u) {
1495 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types_sections_exhausted());
1496 }
1497
1498 }
1499 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1500 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1501 }
1502 int cached_size = ::_pbi::ToCachedSize(total_size);
1503 SetCachedSize(cached_size);
1504 return total_size;
1505 }
1506
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1507 void SchemaStoreStorageInfoProto::CheckTypeAndMergeFrom(
1508 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1509 MergeFrom(*::_pbi::DownCast<const SchemaStoreStorageInfoProto*>(
1510 &from));
1511 }
1512
MergeFrom(const SchemaStoreStorageInfoProto & from)1513 void SchemaStoreStorageInfoProto::MergeFrom(const SchemaStoreStorageInfoProto& from) {
1514 SchemaStoreStorageInfoProto* const _this = this;
1515 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SchemaStoreStorageInfoProto)
1516 GOOGLE_DCHECK_NE(&from, _this);
1517 ::uint32_t cached_has_bits = 0;
1518 (void) cached_has_bits;
1519
1520 cached_has_bits = from._impl_._has_bits_[0];
1521 if (cached_has_bits & 0x0000000fu) {
1522 if (cached_has_bits & 0x00000001u) {
1523 _this->_impl_.schema_store_size_ = from._impl_.schema_store_size_;
1524 }
1525 if (cached_has_bits & 0x00000002u) {
1526 _this->_impl_.num_schema_types_ = from._impl_.num_schema_types_;
1527 }
1528 if (cached_has_bits & 0x00000004u) {
1529 _this->_impl_.num_total_sections_ = from._impl_.num_total_sections_;
1530 }
1531 if (cached_has_bits & 0x00000008u) {
1532 _this->_impl_.num_schema_types_sections_exhausted_ = from._impl_.num_schema_types_sections_exhausted_;
1533 }
1534 _this->_impl_._has_bits_[0] |= cached_has_bits;
1535 }
1536 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1537 }
1538
CopyFrom(const SchemaStoreStorageInfoProto & from)1539 void SchemaStoreStorageInfoProto::CopyFrom(const SchemaStoreStorageInfoProto& from) {
1540 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SchemaStoreStorageInfoProto)
1541 if (&from == this) return;
1542 Clear();
1543 MergeFrom(from);
1544 }
1545
IsInitialized() const1546 bool SchemaStoreStorageInfoProto::IsInitialized() const {
1547 return true;
1548 }
1549
InternalSwap(SchemaStoreStorageInfoProto * other)1550 void SchemaStoreStorageInfoProto::InternalSwap(SchemaStoreStorageInfoProto* other) {
1551 using std::swap;
1552 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1553 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1554 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1555 PROTOBUF_FIELD_OFFSET(SchemaStoreStorageInfoProto, _impl_.num_schema_types_sections_exhausted_)
1556 + sizeof(SchemaStoreStorageInfoProto::_impl_.num_schema_types_sections_exhausted_) // NOLINT
1557 - PROTOBUF_FIELD_OFFSET(SchemaStoreStorageInfoProto, _impl_.schema_store_size_)>(
1558 reinterpret_cast<char*>(&_impl_.schema_store_size_),
1559 reinterpret_cast<char*>(&other->_impl_.schema_store_size_));
1560 }
1561
GetTypeName() const1562 std::string SchemaStoreStorageInfoProto::GetTypeName() const {
1563 return "icing.lib.SchemaStoreStorageInfoProto";
1564 }
1565
1566
1567 // ===================================================================
1568
1569 class IndexStorageInfoProto::_Internal {
1570 public:
1571 using HasBits = decltype(std::declval<IndexStorageInfoProto>()._impl_._has_bits_);
set_has_index_size(HasBits * has_bits)1572 static void set_has_index_size(HasBits* has_bits) {
1573 (*has_bits)[0] |= 1u;
1574 }
set_has_lite_index_lexicon_size(HasBits * has_bits)1575 static void set_has_lite_index_lexicon_size(HasBits* has_bits) {
1576 (*has_bits)[0] |= 2u;
1577 }
set_has_lite_index_hit_buffer_size(HasBits * has_bits)1578 static void set_has_lite_index_hit_buffer_size(HasBits* has_bits) {
1579 (*has_bits)[0] |= 4u;
1580 }
set_has_main_index_lexicon_size(HasBits * has_bits)1581 static void set_has_main_index_lexicon_size(HasBits* has_bits) {
1582 (*has_bits)[0] |= 8u;
1583 }
set_has_main_index_storage_size(HasBits * has_bits)1584 static void set_has_main_index_storage_size(HasBits* has_bits) {
1585 (*has_bits)[0] |= 16u;
1586 }
set_has_main_index_block_size(HasBits * has_bits)1587 static void set_has_main_index_block_size(HasBits* has_bits) {
1588 (*has_bits)[0] |= 32u;
1589 }
set_has_num_blocks(HasBits * has_bits)1590 static void set_has_num_blocks(HasBits* has_bits) {
1591 (*has_bits)[0] |= 64u;
1592 }
set_has_min_free_fraction(HasBits * has_bits)1593 static void set_has_min_free_fraction(HasBits* has_bits) {
1594 (*has_bits)[0] |= 128u;
1595 }
1596 };
1597
IndexStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1598 IndexStorageInfoProto::IndexStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1599 bool is_message_owned)
1600 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1601 SharedCtor(arena, is_message_owned);
1602 // @@protoc_insertion_point(arena_constructor:icing.lib.IndexStorageInfoProto)
1603 }
IndexStorageInfoProto(const IndexStorageInfoProto & from)1604 IndexStorageInfoProto::IndexStorageInfoProto(const IndexStorageInfoProto& from)
1605 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1606 IndexStorageInfoProto* const _this = this; (void)_this;
1607 new (&_impl_) Impl_{
1608 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1609 , /*decltype(_impl_._cached_size_)*/{}
1610 , decltype(_impl_.index_size_){}
1611 , decltype(_impl_.lite_index_lexicon_size_){}
1612 , decltype(_impl_.lite_index_hit_buffer_size_){}
1613 , decltype(_impl_.main_index_lexicon_size_){}
1614 , decltype(_impl_.main_index_storage_size_){}
1615 , decltype(_impl_.main_index_block_size_){}
1616 , decltype(_impl_.num_blocks_){}
1617 , decltype(_impl_.min_free_fraction_){}};
1618
1619 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1620 ::memcpy(&_impl_.index_size_, &from._impl_.index_size_,
1621 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.min_free_fraction_) -
1622 reinterpret_cast<char*>(&_impl_.index_size_)) + sizeof(_impl_.min_free_fraction_));
1623 // @@protoc_insertion_point(copy_constructor:icing.lib.IndexStorageInfoProto)
1624 }
1625
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1626 inline void IndexStorageInfoProto::SharedCtor(
1627 ::_pb::Arena* arena, bool is_message_owned) {
1628 (void)arena;
1629 (void)is_message_owned;
1630 new (&_impl_) Impl_{
1631 decltype(_impl_._has_bits_){}
1632 , /*decltype(_impl_._cached_size_)*/{}
1633 , decltype(_impl_.index_size_){::int64_t{0}}
1634 , decltype(_impl_.lite_index_lexicon_size_){::int64_t{0}}
1635 , decltype(_impl_.lite_index_hit_buffer_size_){::int64_t{0}}
1636 , decltype(_impl_.main_index_lexicon_size_){::int64_t{0}}
1637 , decltype(_impl_.main_index_storage_size_){::int64_t{0}}
1638 , decltype(_impl_.main_index_block_size_){::int64_t{0}}
1639 , decltype(_impl_.num_blocks_){0}
1640 , decltype(_impl_.min_free_fraction_){0}
1641 };
1642 }
1643
~IndexStorageInfoProto()1644 IndexStorageInfoProto::~IndexStorageInfoProto() {
1645 // @@protoc_insertion_point(destructor:icing.lib.IndexStorageInfoProto)
1646 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1647 (void)arena;
1648 return;
1649 }
1650 SharedDtor();
1651 }
1652
SharedDtor()1653 inline void IndexStorageInfoProto::SharedDtor() {
1654 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1655 }
1656
SetCachedSize(int size) const1657 void IndexStorageInfoProto::SetCachedSize(int size) const {
1658 _impl_._cached_size_.Set(size);
1659 }
1660
Clear()1661 void IndexStorageInfoProto::Clear() {
1662 // @@protoc_insertion_point(message_clear_start:icing.lib.IndexStorageInfoProto)
1663 ::uint32_t cached_has_bits = 0;
1664 // Prevent compiler warnings about cached_has_bits being unused
1665 (void) cached_has_bits;
1666
1667 cached_has_bits = _impl_._has_bits_[0];
1668 if (cached_has_bits & 0x000000ffu) {
1669 ::memset(&_impl_.index_size_, 0, static_cast<size_t>(
1670 reinterpret_cast<char*>(&_impl_.min_free_fraction_) -
1671 reinterpret_cast<char*>(&_impl_.index_size_)) + sizeof(_impl_.min_free_fraction_));
1672 }
1673 _impl_._has_bits_.Clear();
1674 _internal_metadata_.Clear<std::string>();
1675 }
1676
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1677 const char* IndexStorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1678 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1679 _Internal::HasBits has_bits{};
1680 while (!ctx->Done(&ptr)) {
1681 ::uint32_t tag;
1682 ptr = ::_pbi::ReadTag(ptr, &tag);
1683 switch (tag >> 3) {
1684 // optional int64 index_size = 1;
1685 case 1:
1686 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1687 _Internal::set_has_index_size(&has_bits);
1688 _impl_.index_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1689 CHK_(ptr);
1690 } else {
1691 goto handle_unusual;
1692 }
1693 continue;
1694 // optional int64 lite_index_lexicon_size = 2;
1695 case 2:
1696 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1697 _Internal::set_has_lite_index_lexicon_size(&has_bits);
1698 _impl_.lite_index_lexicon_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1699 CHK_(ptr);
1700 } else {
1701 goto handle_unusual;
1702 }
1703 continue;
1704 // optional int64 lite_index_hit_buffer_size = 3;
1705 case 3:
1706 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1707 _Internal::set_has_lite_index_hit_buffer_size(&has_bits);
1708 _impl_.lite_index_hit_buffer_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1709 CHK_(ptr);
1710 } else {
1711 goto handle_unusual;
1712 }
1713 continue;
1714 // optional int64 main_index_lexicon_size = 4;
1715 case 4:
1716 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1717 _Internal::set_has_main_index_lexicon_size(&has_bits);
1718 _impl_.main_index_lexicon_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1719 CHK_(ptr);
1720 } else {
1721 goto handle_unusual;
1722 }
1723 continue;
1724 // optional int64 main_index_storage_size = 5;
1725 case 5:
1726 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1727 _Internal::set_has_main_index_storage_size(&has_bits);
1728 _impl_.main_index_storage_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1729 CHK_(ptr);
1730 } else {
1731 goto handle_unusual;
1732 }
1733 continue;
1734 // optional int64 main_index_block_size = 6;
1735 case 6:
1736 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
1737 _Internal::set_has_main_index_block_size(&has_bits);
1738 _impl_.main_index_block_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1739 CHK_(ptr);
1740 } else {
1741 goto handle_unusual;
1742 }
1743 continue;
1744 // optional int32 num_blocks = 7;
1745 case 7:
1746 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1747 _Internal::set_has_num_blocks(&has_bits);
1748 _impl_.num_blocks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1749 CHK_(ptr);
1750 } else {
1751 goto handle_unusual;
1752 }
1753 continue;
1754 // optional float min_free_fraction = 8;
1755 case 8:
1756 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 69)) {
1757 _Internal::set_has_min_free_fraction(&has_bits);
1758 _impl_.min_free_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1759 ptr += sizeof(float);
1760 } else {
1761 goto handle_unusual;
1762 }
1763 continue;
1764 default:
1765 goto handle_unusual;
1766 } // switch
1767 handle_unusual:
1768 if ((tag == 0) || ((tag & 7) == 4)) {
1769 CHK_(ptr);
1770 ctx->SetLastTag(tag);
1771 goto message_done;
1772 }
1773 ptr = UnknownFieldParse(
1774 tag,
1775 _internal_metadata_.mutable_unknown_fields<std::string>(),
1776 ptr, ctx);
1777 CHK_(ptr != nullptr);
1778 } // while
1779 message_done:
1780 _impl_._has_bits_.Or(has_bits);
1781 return ptr;
1782 failure:
1783 ptr = nullptr;
1784 goto message_done;
1785 #undef CHK_
1786 }
1787
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1788 ::uint8_t* IndexStorageInfoProto::_InternalSerialize(
1789 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1790 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.IndexStorageInfoProto)
1791 ::uint32_t cached_has_bits = 0;
1792 (void) cached_has_bits;
1793
1794 cached_has_bits = _impl_._has_bits_[0];
1795 // optional int64 index_size = 1;
1796 if (cached_has_bits & 0x00000001u) {
1797 target = stream->EnsureSpace(target);
1798 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_index_size(), target);
1799 }
1800
1801 // optional int64 lite_index_lexicon_size = 2;
1802 if (cached_has_bits & 0x00000002u) {
1803 target = stream->EnsureSpace(target);
1804 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_lite_index_lexicon_size(), target);
1805 }
1806
1807 // optional int64 lite_index_hit_buffer_size = 3;
1808 if (cached_has_bits & 0x00000004u) {
1809 target = stream->EnsureSpace(target);
1810 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_lite_index_hit_buffer_size(), target);
1811 }
1812
1813 // optional int64 main_index_lexicon_size = 4;
1814 if (cached_has_bits & 0x00000008u) {
1815 target = stream->EnsureSpace(target);
1816 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_main_index_lexicon_size(), target);
1817 }
1818
1819 // optional int64 main_index_storage_size = 5;
1820 if (cached_has_bits & 0x00000010u) {
1821 target = stream->EnsureSpace(target);
1822 target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_main_index_storage_size(), target);
1823 }
1824
1825 // optional int64 main_index_block_size = 6;
1826 if (cached_has_bits & 0x00000020u) {
1827 target = stream->EnsureSpace(target);
1828 target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_main_index_block_size(), target);
1829 }
1830
1831 // optional int32 num_blocks = 7;
1832 if (cached_has_bits & 0x00000040u) {
1833 target = stream->EnsureSpace(target);
1834 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_num_blocks(), target);
1835 }
1836
1837 // optional float min_free_fraction = 8;
1838 if (cached_has_bits & 0x00000080u) {
1839 target = stream->EnsureSpace(target);
1840 target = ::_pbi::WireFormatLite::WriteFloatToArray(8, this->_internal_min_free_fraction(), target);
1841 }
1842
1843 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1844 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1845 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1846 }
1847 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.IndexStorageInfoProto)
1848 return target;
1849 }
1850
ByteSizeLong() const1851 size_t IndexStorageInfoProto::ByteSizeLong() const {
1852 // @@protoc_insertion_point(message_byte_size_start:icing.lib.IndexStorageInfoProto)
1853 size_t total_size = 0;
1854
1855 ::uint32_t cached_has_bits = 0;
1856 // Prevent compiler warnings about cached_has_bits being unused
1857 (void) cached_has_bits;
1858
1859 cached_has_bits = _impl_._has_bits_[0];
1860 if (cached_has_bits & 0x000000ffu) {
1861 // optional int64 index_size = 1;
1862 if (cached_has_bits & 0x00000001u) {
1863 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_index_size());
1864 }
1865
1866 // optional int64 lite_index_lexicon_size = 2;
1867 if (cached_has_bits & 0x00000002u) {
1868 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_lite_index_lexicon_size());
1869 }
1870
1871 // optional int64 lite_index_hit_buffer_size = 3;
1872 if (cached_has_bits & 0x00000004u) {
1873 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_lite_index_hit_buffer_size());
1874 }
1875
1876 // optional int64 main_index_lexicon_size = 4;
1877 if (cached_has_bits & 0x00000008u) {
1878 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_main_index_lexicon_size());
1879 }
1880
1881 // optional int64 main_index_storage_size = 5;
1882 if (cached_has_bits & 0x00000010u) {
1883 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_main_index_storage_size());
1884 }
1885
1886 // optional int64 main_index_block_size = 6;
1887 if (cached_has_bits & 0x00000020u) {
1888 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_main_index_block_size());
1889 }
1890
1891 // optional int32 num_blocks = 7;
1892 if (cached_has_bits & 0x00000040u) {
1893 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_blocks());
1894 }
1895
1896 // optional float min_free_fraction = 8;
1897 if (cached_has_bits & 0x00000080u) {
1898 total_size += 1 + 4;
1899 }
1900
1901 }
1902 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1903 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1904 }
1905 int cached_size = ::_pbi::ToCachedSize(total_size);
1906 SetCachedSize(cached_size);
1907 return total_size;
1908 }
1909
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1910 void IndexStorageInfoProto::CheckTypeAndMergeFrom(
1911 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1912 MergeFrom(*::_pbi::DownCast<const IndexStorageInfoProto*>(
1913 &from));
1914 }
1915
MergeFrom(const IndexStorageInfoProto & from)1916 void IndexStorageInfoProto::MergeFrom(const IndexStorageInfoProto& from) {
1917 IndexStorageInfoProto* const _this = this;
1918 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.IndexStorageInfoProto)
1919 GOOGLE_DCHECK_NE(&from, _this);
1920 ::uint32_t cached_has_bits = 0;
1921 (void) cached_has_bits;
1922
1923 cached_has_bits = from._impl_._has_bits_[0];
1924 if (cached_has_bits & 0x000000ffu) {
1925 if (cached_has_bits & 0x00000001u) {
1926 _this->_impl_.index_size_ = from._impl_.index_size_;
1927 }
1928 if (cached_has_bits & 0x00000002u) {
1929 _this->_impl_.lite_index_lexicon_size_ = from._impl_.lite_index_lexicon_size_;
1930 }
1931 if (cached_has_bits & 0x00000004u) {
1932 _this->_impl_.lite_index_hit_buffer_size_ = from._impl_.lite_index_hit_buffer_size_;
1933 }
1934 if (cached_has_bits & 0x00000008u) {
1935 _this->_impl_.main_index_lexicon_size_ = from._impl_.main_index_lexicon_size_;
1936 }
1937 if (cached_has_bits & 0x00000010u) {
1938 _this->_impl_.main_index_storage_size_ = from._impl_.main_index_storage_size_;
1939 }
1940 if (cached_has_bits & 0x00000020u) {
1941 _this->_impl_.main_index_block_size_ = from._impl_.main_index_block_size_;
1942 }
1943 if (cached_has_bits & 0x00000040u) {
1944 _this->_impl_.num_blocks_ = from._impl_.num_blocks_;
1945 }
1946 if (cached_has_bits & 0x00000080u) {
1947 _this->_impl_.min_free_fraction_ = from._impl_.min_free_fraction_;
1948 }
1949 _this->_impl_._has_bits_[0] |= cached_has_bits;
1950 }
1951 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1952 }
1953
CopyFrom(const IndexStorageInfoProto & from)1954 void IndexStorageInfoProto::CopyFrom(const IndexStorageInfoProto& from) {
1955 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.IndexStorageInfoProto)
1956 if (&from == this) return;
1957 Clear();
1958 MergeFrom(from);
1959 }
1960
IsInitialized() const1961 bool IndexStorageInfoProto::IsInitialized() const {
1962 return true;
1963 }
1964
InternalSwap(IndexStorageInfoProto * other)1965 void IndexStorageInfoProto::InternalSwap(IndexStorageInfoProto* other) {
1966 using std::swap;
1967 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1968 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1969 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1970 PROTOBUF_FIELD_OFFSET(IndexStorageInfoProto, _impl_.min_free_fraction_)
1971 + sizeof(IndexStorageInfoProto::_impl_.min_free_fraction_) // NOLINT
1972 - PROTOBUF_FIELD_OFFSET(IndexStorageInfoProto, _impl_.index_size_)>(
1973 reinterpret_cast<char*>(&_impl_.index_size_),
1974 reinterpret_cast<char*>(&other->_impl_.index_size_));
1975 }
1976
GetTypeName() const1977 std::string IndexStorageInfoProto::GetTypeName() const {
1978 return "icing.lib.IndexStorageInfoProto";
1979 }
1980
1981
1982 // ===================================================================
1983
1984 class NamespaceBlobStorageInfoProto::_Internal {
1985 public:
1986 using HasBits = decltype(std::declval<NamespaceBlobStorageInfoProto>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)1987 static void set_has_namespace_(HasBits* has_bits) {
1988 (*has_bits)[0] |= 1u;
1989 }
set_has_blob_size(HasBits * has_bits)1990 static void set_has_blob_size(HasBits* has_bits) {
1991 (*has_bits)[0] |= 2u;
1992 }
set_has_num_blobs(HasBits * has_bits)1993 static void set_has_num_blobs(HasBits* has_bits) {
1994 (*has_bits)[0] |= 4u;
1995 }
1996 };
1997
NamespaceBlobStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1998 NamespaceBlobStorageInfoProto::NamespaceBlobStorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1999 bool is_message_owned)
2000 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2001 SharedCtor(arena, is_message_owned);
2002 // @@protoc_insertion_point(arena_constructor:icing.lib.NamespaceBlobStorageInfoProto)
2003 }
NamespaceBlobStorageInfoProto(const NamespaceBlobStorageInfoProto & from)2004 NamespaceBlobStorageInfoProto::NamespaceBlobStorageInfoProto(const NamespaceBlobStorageInfoProto& from)
2005 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2006 NamespaceBlobStorageInfoProto* const _this = this; (void)_this;
2007 new (&_impl_) Impl_{
2008 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2009 , /*decltype(_impl_._cached_size_)*/{}
2010 , decltype(_impl_.namespace__){}
2011 , decltype(_impl_.blob_size_){}
2012 , decltype(_impl_.num_blobs_){}};
2013
2014 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2015 _impl_.namespace__.InitDefault();
2016 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2017 _impl_.namespace__.Set("", GetArenaForAllocation());
2018 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2019 if (from._internal_has_namespace_()) {
2020 _this->_impl_.namespace__.Set(from._internal_namespace_(),
2021 _this->GetArenaForAllocation());
2022 }
2023 ::memcpy(&_impl_.blob_size_, &from._impl_.blob_size_,
2024 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_blobs_) -
2025 reinterpret_cast<char*>(&_impl_.blob_size_)) + sizeof(_impl_.num_blobs_));
2026 // @@protoc_insertion_point(copy_constructor:icing.lib.NamespaceBlobStorageInfoProto)
2027 }
2028
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2029 inline void NamespaceBlobStorageInfoProto::SharedCtor(
2030 ::_pb::Arena* arena, bool is_message_owned) {
2031 (void)arena;
2032 (void)is_message_owned;
2033 new (&_impl_) Impl_{
2034 decltype(_impl_._has_bits_){}
2035 , /*decltype(_impl_._cached_size_)*/{}
2036 , decltype(_impl_.namespace__){}
2037 , decltype(_impl_.blob_size_){::int64_t{0}}
2038 , decltype(_impl_.num_blobs_){0}
2039 };
2040 _impl_.namespace__.InitDefault();
2041 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2042 _impl_.namespace__.Set("", GetArenaForAllocation());
2043 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2044 }
2045
~NamespaceBlobStorageInfoProto()2046 NamespaceBlobStorageInfoProto::~NamespaceBlobStorageInfoProto() {
2047 // @@protoc_insertion_point(destructor:icing.lib.NamespaceBlobStorageInfoProto)
2048 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2049 (void)arena;
2050 return;
2051 }
2052 SharedDtor();
2053 }
2054
SharedDtor()2055 inline void NamespaceBlobStorageInfoProto::SharedDtor() {
2056 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2057 _impl_.namespace__.Destroy();
2058 }
2059
SetCachedSize(int size) const2060 void NamespaceBlobStorageInfoProto::SetCachedSize(int size) const {
2061 _impl_._cached_size_.Set(size);
2062 }
2063
Clear()2064 void NamespaceBlobStorageInfoProto::Clear() {
2065 // @@protoc_insertion_point(message_clear_start:icing.lib.NamespaceBlobStorageInfoProto)
2066 ::uint32_t cached_has_bits = 0;
2067 // Prevent compiler warnings about cached_has_bits being unused
2068 (void) cached_has_bits;
2069
2070 cached_has_bits = _impl_._has_bits_[0];
2071 if (cached_has_bits & 0x00000001u) {
2072 _impl_.namespace__.ClearNonDefaultToEmpty();
2073 }
2074 if (cached_has_bits & 0x00000006u) {
2075 ::memset(&_impl_.blob_size_, 0, static_cast<size_t>(
2076 reinterpret_cast<char*>(&_impl_.num_blobs_) -
2077 reinterpret_cast<char*>(&_impl_.blob_size_)) + sizeof(_impl_.num_blobs_));
2078 }
2079 _impl_._has_bits_.Clear();
2080 _internal_metadata_.Clear<std::string>();
2081 }
2082
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2083 const char* NamespaceBlobStorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2084 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2085 _Internal::HasBits has_bits{};
2086 while (!ctx->Done(&ptr)) {
2087 ::uint32_t tag;
2088 ptr = ::_pbi::ReadTag(ptr, &tag);
2089 switch (tag >> 3) {
2090 // optional string namespace = 1;
2091 case 1:
2092 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2093 auto str = _internal_mutable_namespace_();
2094 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2095 CHK_(ptr);
2096 } else {
2097 goto handle_unusual;
2098 }
2099 continue;
2100 // optional int64 blob_size = 2;
2101 case 2:
2102 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2103 _Internal::set_has_blob_size(&has_bits);
2104 _impl_.blob_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2105 CHK_(ptr);
2106 } else {
2107 goto handle_unusual;
2108 }
2109 continue;
2110 // optional int32 num_blobs = 3;
2111 case 3:
2112 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2113 _Internal::set_has_num_blobs(&has_bits);
2114 _impl_.num_blobs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2115 CHK_(ptr);
2116 } else {
2117 goto handle_unusual;
2118 }
2119 continue;
2120 default:
2121 goto handle_unusual;
2122 } // switch
2123 handle_unusual:
2124 if ((tag == 0) || ((tag & 7) == 4)) {
2125 CHK_(ptr);
2126 ctx->SetLastTag(tag);
2127 goto message_done;
2128 }
2129 ptr = UnknownFieldParse(
2130 tag,
2131 _internal_metadata_.mutable_unknown_fields<std::string>(),
2132 ptr, ctx);
2133 CHK_(ptr != nullptr);
2134 } // while
2135 message_done:
2136 _impl_._has_bits_.Or(has_bits);
2137 return ptr;
2138 failure:
2139 ptr = nullptr;
2140 goto message_done;
2141 #undef CHK_
2142 }
2143
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2144 ::uint8_t* NamespaceBlobStorageInfoProto::_InternalSerialize(
2145 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2146 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.NamespaceBlobStorageInfoProto)
2147 ::uint32_t cached_has_bits = 0;
2148 (void) cached_has_bits;
2149
2150 cached_has_bits = _impl_._has_bits_[0];
2151 // optional string namespace = 1;
2152 if (cached_has_bits & 0x00000001u) {
2153 target = stream->WriteStringMaybeAliased(
2154 1, this->_internal_namespace_(), target);
2155 }
2156
2157 // optional int64 blob_size = 2;
2158 if (cached_has_bits & 0x00000002u) {
2159 target = stream->EnsureSpace(target);
2160 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_blob_size(), target);
2161 }
2162
2163 // optional int32 num_blobs = 3;
2164 if (cached_has_bits & 0x00000004u) {
2165 target = stream->EnsureSpace(target);
2166 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_blobs(), target);
2167 }
2168
2169 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2170 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2171 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2172 }
2173 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.NamespaceBlobStorageInfoProto)
2174 return target;
2175 }
2176
ByteSizeLong() const2177 size_t NamespaceBlobStorageInfoProto::ByteSizeLong() const {
2178 // @@protoc_insertion_point(message_byte_size_start:icing.lib.NamespaceBlobStorageInfoProto)
2179 size_t total_size = 0;
2180
2181 ::uint32_t cached_has_bits = 0;
2182 // Prevent compiler warnings about cached_has_bits being unused
2183 (void) cached_has_bits;
2184
2185 cached_has_bits = _impl_._has_bits_[0];
2186 if (cached_has_bits & 0x00000007u) {
2187 // optional string namespace = 1;
2188 if (cached_has_bits & 0x00000001u) {
2189 total_size += 1 +
2190 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2191 this->_internal_namespace_());
2192 }
2193
2194 // optional int64 blob_size = 2;
2195 if (cached_has_bits & 0x00000002u) {
2196 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_blob_size());
2197 }
2198
2199 // optional int32 num_blobs = 3;
2200 if (cached_has_bits & 0x00000004u) {
2201 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_blobs());
2202 }
2203
2204 }
2205 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2206 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2207 }
2208 int cached_size = ::_pbi::ToCachedSize(total_size);
2209 SetCachedSize(cached_size);
2210 return total_size;
2211 }
2212
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2213 void NamespaceBlobStorageInfoProto::CheckTypeAndMergeFrom(
2214 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2215 MergeFrom(*::_pbi::DownCast<const NamespaceBlobStorageInfoProto*>(
2216 &from));
2217 }
2218
MergeFrom(const NamespaceBlobStorageInfoProto & from)2219 void NamespaceBlobStorageInfoProto::MergeFrom(const NamespaceBlobStorageInfoProto& from) {
2220 NamespaceBlobStorageInfoProto* const _this = this;
2221 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.NamespaceBlobStorageInfoProto)
2222 GOOGLE_DCHECK_NE(&from, _this);
2223 ::uint32_t cached_has_bits = 0;
2224 (void) cached_has_bits;
2225
2226 cached_has_bits = from._impl_._has_bits_[0];
2227 if (cached_has_bits & 0x00000007u) {
2228 if (cached_has_bits & 0x00000001u) {
2229 _this->_internal_set_namespace_(from._internal_namespace_());
2230 }
2231 if (cached_has_bits & 0x00000002u) {
2232 _this->_impl_.blob_size_ = from._impl_.blob_size_;
2233 }
2234 if (cached_has_bits & 0x00000004u) {
2235 _this->_impl_.num_blobs_ = from._impl_.num_blobs_;
2236 }
2237 _this->_impl_._has_bits_[0] |= cached_has_bits;
2238 }
2239 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2240 }
2241
CopyFrom(const NamespaceBlobStorageInfoProto & from)2242 void NamespaceBlobStorageInfoProto::CopyFrom(const NamespaceBlobStorageInfoProto& from) {
2243 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.NamespaceBlobStorageInfoProto)
2244 if (&from == this) return;
2245 Clear();
2246 MergeFrom(from);
2247 }
2248
IsInitialized() const2249 bool NamespaceBlobStorageInfoProto::IsInitialized() const {
2250 return true;
2251 }
2252
InternalSwap(NamespaceBlobStorageInfoProto * other)2253 void NamespaceBlobStorageInfoProto::InternalSwap(NamespaceBlobStorageInfoProto* other) {
2254 using std::swap;
2255 auto* lhs_arena = GetArenaForAllocation();
2256 auto* rhs_arena = other->GetArenaForAllocation();
2257 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2258 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2259 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2260 &_impl_.namespace__, lhs_arena,
2261 &other->_impl_.namespace__, rhs_arena
2262 );
2263 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2264 PROTOBUF_FIELD_OFFSET(NamespaceBlobStorageInfoProto, _impl_.num_blobs_)
2265 + sizeof(NamespaceBlobStorageInfoProto::_impl_.num_blobs_) // NOLINT
2266 - PROTOBUF_FIELD_OFFSET(NamespaceBlobStorageInfoProto, _impl_.blob_size_)>(
2267 reinterpret_cast<char*>(&_impl_.blob_size_),
2268 reinterpret_cast<char*>(&other->_impl_.blob_size_));
2269 }
2270
GetTypeName() const2271 std::string NamespaceBlobStorageInfoProto::GetTypeName() const {
2272 return "icing.lib.NamespaceBlobStorageInfoProto";
2273 }
2274
2275
2276 // ===================================================================
2277
2278 class StorageInfoProto::_Internal {
2279 public:
2280 using HasBits = decltype(std::declval<StorageInfoProto>()._impl_._has_bits_);
set_has_total_storage_size(HasBits * has_bits)2281 static void set_has_total_storage_size(HasBits* has_bits) {
2282 (*has_bits)[0] |= 8u;
2283 }
2284 static const ::icing::lib::DocumentStorageInfoProto& document_storage_info(const StorageInfoProto* msg);
set_has_document_storage_info(HasBits * has_bits)2285 static void set_has_document_storage_info(HasBits* has_bits) {
2286 (*has_bits)[0] |= 1u;
2287 }
2288 static const ::icing::lib::SchemaStoreStorageInfoProto& schema_store_storage_info(const StorageInfoProto* msg);
set_has_schema_store_storage_info(HasBits * has_bits)2289 static void set_has_schema_store_storage_info(HasBits* has_bits) {
2290 (*has_bits)[0] |= 2u;
2291 }
2292 static const ::icing::lib::IndexStorageInfoProto& index_storage_info(const StorageInfoProto* msg);
set_has_index_storage_info(HasBits * has_bits)2293 static void set_has_index_storage_info(HasBits* has_bits) {
2294 (*has_bits)[0] |= 4u;
2295 }
2296 };
2297
2298 const ::icing::lib::DocumentStorageInfoProto&
document_storage_info(const StorageInfoProto * msg)2299 StorageInfoProto::_Internal::document_storage_info(const StorageInfoProto* msg) {
2300 return *msg->_impl_.document_storage_info_;
2301 }
2302 const ::icing::lib::SchemaStoreStorageInfoProto&
schema_store_storage_info(const StorageInfoProto * msg)2303 StorageInfoProto::_Internal::schema_store_storage_info(const StorageInfoProto* msg) {
2304 return *msg->_impl_.schema_store_storage_info_;
2305 }
2306 const ::icing::lib::IndexStorageInfoProto&
index_storage_info(const StorageInfoProto * msg)2307 StorageInfoProto::_Internal::index_storage_info(const StorageInfoProto* msg) {
2308 return *msg->_impl_.index_storage_info_;
2309 }
StorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2310 StorageInfoProto::StorageInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2311 bool is_message_owned)
2312 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2313 SharedCtor(arena, is_message_owned);
2314 // @@protoc_insertion_point(arena_constructor:icing.lib.StorageInfoProto)
2315 }
StorageInfoProto(const StorageInfoProto & from)2316 StorageInfoProto::StorageInfoProto(const StorageInfoProto& from)
2317 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2318 StorageInfoProto* const _this = this; (void)_this;
2319 new (&_impl_) Impl_{
2320 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2321 , /*decltype(_impl_._cached_size_)*/{}
2322 , decltype(_impl_.namespace_blob_storage_info_){from._impl_.namespace_blob_storage_info_}
2323 , decltype(_impl_.document_storage_info_){nullptr}
2324 , decltype(_impl_.schema_store_storage_info_){nullptr}
2325 , decltype(_impl_.index_storage_info_){nullptr}
2326 , decltype(_impl_.total_storage_size_){}};
2327
2328 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2329 if (from._internal_has_document_storage_info()) {
2330 _this->_impl_.document_storage_info_ = new ::icing::lib::DocumentStorageInfoProto(*from._impl_.document_storage_info_);
2331 }
2332 if (from._internal_has_schema_store_storage_info()) {
2333 _this->_impl_.schema_store_storage_info_ = new ::icing::lib::SchemaStoreStorageInfoProto(*from._impl_.schema_store_storage_info_);
2334 }
2335 if (from._internal_has_index_storage_info()) {
2336 _this->_impl_.index_storage_info_ = new ::icing::lib::IndexStorageInfoProto(*from._impl_.index_storage_info_);
2337 }
2338 _this->_impl_.total_storage_size_ = from._impl_.total_storage_size_;
2339 // @@protoc_insertion_point(copy_constructor:icing.lib.StorageInfoProto)
2340 }
2341
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2342 inline void StorageInfoProto::SharedCtor(
2343 ::_pb::Arena* arena, bool is_message_owned) {
2344 (void)arena;
2345 (void)is_message_owned;
2346 new (&_impl_) Impl_{
2347 decltype(_impl_._has_bits_){}
2348 , /*decltype(_impl_._cached_size_)*/{}
2349 , decltype(_impl_.namespace_blob_storage_info_){arena}
2350 , decltype(_impl_.document_storage_info_){nullptr}
2351 , decltype(_impl_.schema_store_storage_info_){nullptr}
2352 , decltype(_impl_.index_storage_info_){nullptr}
2353 , decltype(_impl_.total_storage_size_){::int64_t{0}}
2354 };
2355 }
2356
~StorageInfoProto()2357 StorageInfoProto::~StorageInfoProto() {
2358 // @@protoc_insertion_point(destructor:icing.lib.StorageInfoProto)
2359 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2360 (void)arena;
2361 return;
2362 }
2363 SharedDtor();
2364 }
2365
SharedDtor()2366 inline void StorageInfoProto::SharedDtor() {
2367 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2368 _impl_.namespace_blob_storage_info_.~RepeatedPtrField();
2369 if (this != internal_default_instance()) delete _impl_.document_storage_info_;
2370 if (this != internal_default_instance()) delete _impl_.schema_store_storage_info_;
2371 if (this != internal_default_instance()) delete _impl_.index_storage_info_;
2372 }
2373
SetCachedSize(int size) const2374 void StorageInfoProto::SetCachedSize(int size) const {
2375 _impl_._cached_size_.Set(size);
2376 }
2377
Clear()2378 void StorageInfoProto::Clear() {
2379 // @@protoc_insertion_point(message_clear_start:icing.lib.StorageInfoProto)
2380 ::uint32_t cached_has_bits = 0;
2381 // Prevent compiler warnings about cached_has_bits being unused
2382 (void) cached_has_bits;
2383
2384 _impl_.namespace_blob_storage_info_.Clear();
2385 cached_has_bits = _impl_._has_bits_[0];
2386 if (cached_has_bits & 0x00000007u) {
2387 if (cached_has_bits & 0x00000001u) {
2388 GOOGLE_DCHECK(_impl_.document_storage_info_ != nullptr);
2389 _impl_.document_storage_info_->Clear();
2390 }
2391 if (cached_has_bits & 0x00000002u) {
2392 GOOGLE_DCHECK(_impl_.schema_store_storage_info_ != nullptr);
2393 _impl_.schema_store_storage_info_->Clear();
2394 }
2395 if (cached_has_bits & 0x00000004u) {
2396 GOOGLE_DCHECK(_impl_.index_storage_info_ != nullptr);
2397 _impl_.index_storage_info_->Clear();
2398 }
2399 }
2400 _impl_.total_storage_size_ = ::int64_t{0};
2401 _impl_._has_bits_.Clear();
2402 _internal_metadata_.Clear<std::string>();
2403 }
2404
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2405 const char* StorageInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2406 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2407 _Internal::HasBits has_bits{};
2408 while (!ctx->Done(&ptr)) {
2409 ::uint32_t tag;
2410 ptr = ::_pbi::ReadTag(ptr, &tag);
2411 switch (tag >> 3) {
2412 // optional int64 total_storage_size = 1;
2413 case 1:
2414 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2415 _Internal::set_has_total_storage_size(&has_bits);
2416 _impl_.total_storage_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2417 CHK_(ptr);
2418 } else {
2419 goto handle_unusual;
2420 }
2421 continue;
2422 // optional .icing.lib.DocumentStorageInfoProto document_storage_info = 2;
2423 case 2:
2424 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2425 ptr = ctx->ParseMessage(_internal_mutable_document_storage_info(), ptr);
2426 CHK_(ptr);
2427 } else {
2428 goto handle_unusual;
2429 }
2430 continue;
2431 // optional .icing.lib.SchemaStoreStorageInfoProto schema_store_storage_info = 3;
2432 case 3:
2433 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2434 ptr = ctx->ParseMessage(_internal_mutable_schema_store_storage_info(), ptr);
2435 CHK_(ptr);
2436 } else {
2437 goto handle_unusual;
2438 }
2439 continue;
2440 // optional .icing.lib.IndexStorageInfoProto index_storage_info = 4;
2441 case 4:
2442 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2443 ptr = ctx->ParseMessage(_internal_mutable_index_storage_info(), ptr);
2444 CHK_(ptr);
2445 } else {
2446 goto handle_unusual;
2447 }
2448 continue;
2449 // repeated .icing.lib.NamespaceBlobStorageInfoProto namespace_blob_storage_info = 5;
2450 case 5:
2451 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2452 ptr -= 1;
2453 do {
2454 ptr += 1;
2455 ptr = ctx->ParseMessage(_internal_add_namespace_blob_storage_info(), ptr);
2456 CHK_(ptr);
2457 if (!ctx->DataAvailable(ptr)) break;
2458 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
2459 } else {
2460 goto handle_unusual;
2461 }
2462 continue;
2463 default:
2464 goto handle_unusual;
2465 } // switch
2466 handle_unusual:
2467 if ((tag == 0) || ((tag & 7) == 4)) {
2468 CHK_(ptr);
2469 ctx->SetLastTag(tag);
2470 goto message_done;
2471 }
2472 ptr = UnknownFieldParse(
2473 tag,
2474 _internal_metadata_.mutable_unknown_fields<std::string>(),
2475 ptr, ctx);
2476 CHK_(ptr != nullptr);
2477 } // while
2478 message_done:
2479 _impl_._has_bits_.Or(has_bits);
2480 return ptr;
2481 failure:
2482 ptr = nullptr;
2483 goto message_done;
2484 #undef CHK_
2485 }
2486
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2487 ::uint8_t* StorageInfoProto::_InternalSerialize(
2488 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2489 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.StorageInfoProto)
2490 ::uint32_t cached_has_bits = 0;
2491 (void) cached_has_bits;
2492
2493 cached_has_bits = _impl_._has_bits_[0];
2494 // optional int64 total_storage_size = 1;
2495 if (cached_has_bits & 0x00000008u) {
2496 target = stream->EnsureSpace(target);
2497 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_total_storage_size(), target);
2498 }
2499
2500 // optional .icing.lib.DocumentStorageInfoProto document_storage_info = 2;
2501 if (cached_has_bits & 0x00000001u) {
2502 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2503 InternalWriteMessage(2, _Internal::document_storage_info(this),
2504 _Internal::document_storage_info(this).GetCachedSize(), target, stream);
2505 }
2506
2507 // optional .icing.lib.SchemaStoreStorageInfoProto schema_store_storage_info = 3;
2508 if (cached_has_bits & 0x00000002u) {
2509 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2510 InternalWriteMessage(3, _Internal::schema_store_storage_info(this),
2511 _Internal::schema_store_storage_info(this).GetCachedSize(), target, stream);
2512 }
2513
2514 // optional .icing.lib.IndexStorageInfoProto index_storage_info = 4;
2515 if (cached_has_bits & 0x00000004u) {
2516 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2517 InternalWriteMessage(4, _Internal::index_storage_info(this),
2518 _Internal::index_storage_info(this).GetCachedSize(), target, stream);
2519 }
2520
2521 // repeated .icing.lib.NamespaceBlobStorageInfoProto namespace_blob_storage_info = 5;
2522 for (unsigned i = 0,
2523 n = static_cast<unsigned>(this->_internal_namespace_blob_storage_info_size()); i < n; i++) {
2524 const auto& repfield = this->_internal_namespace_blob_storage_info(i);
2525 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2526 InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
2527 }
2528
2529 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2530 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2531 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2532 }
2533 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.StorageInfoProto)
2534 return target;
2535 }
2536
ByteSizeLong() const2537 size_t StorageInfoProto::ByteSizeLong() const {
2538 // @@protoc_insertion_point(message_byte_size_start:icing.lib.StorageInfoProto)
2539 size_t total_size = 0;
2540
2541 ::uint32_t cached_has_bits = 0;
2542 // Prevent compiler warnings about cached_has_bits being unused
2543 (void) cached_has_bits;
2544
2545 // repeated .icing.lib.NamespaceBlobStorageInfoProto namespace_blob_storage_info = 5;
2546 total_size += 1UL * this->_internal_namespace_blob_storage_info_size();
2547 for (const auto& msg : this->_impl_.namespace_blob_storage_info_) {
2548 total_size +=
2549 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2550 }
2551
2552 cached_has_bits = _impl_._has_bits_[0];
2553 if (cached_has_bits & 0x0000000fu) {
2554 // optional .icing.lib.DocumentStorageInfoProto document_storage_info = 2;
2555 if (cached_has_bits & 0x00000001u) {
2556 total_size += 1 +
2557 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2558 *_impl_.document_storage_info_);
2559 }
2560
2561 // optional .icing.lib.SchemaStoreStorageInfoProto schema_store_storage_info = 3;
2562 if (cached_has_bits & 0x00000002u) {
2563 total_size += 1 +
2564 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2565 *_impl_.schema_store_storage_info_);
2566 }
2567
2568 // optional .icing.lib.IndexStorageInfoProto index_storage_info = 4;
2569 if (cached_has_bits & 0x00000004u) {
2570 total_size += 1 +
2571 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2572 *_impl_.index_storage_info_);
2573 }
2574
2575 // optional int64 total_storage_size = 1;
2576 if (cached_has_bits & 0x00000008u) {
2577 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_total_storage_size());
2578 }
2579
2580 }
2581 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2582 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2583 }
2584 int cached_size = ::_pbi::ToCachedSize(total_size);
2585 SetCachedSize(cached_size);
2586 return total_size;
2587 }
2588
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2589 void StorageInfoProto::CheckTypeAndMergeFrom(
2590 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2591 MergeFrom(*::_pbi::DownCast<const StorageInfoProto*>(
2592 &from));
2593 }
2594
MergeFrom(const StorageInfoProto & from)2595 void StorageInfoProto::MergeFrom(const StorageInfoProto& from) {
2596 StorageInfoProto* const _this = this;
2597 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.StorageInfoProto)
2598 GOOGLE_DCHECK_NE(&from, _this);
2599 ::uint32_t cached_has_bits = 0;
2600 (void) cached_has_bits;
2601
2602 _this->_impl_.namespace_blob_storage_info_.MergeFrom(from._impl_.namespace_blob_storage_info_);
2603 cached_has_bits = from._impl_._has_bits_[0];
2604 if (cached_has_bits & 0x0000000fu) {
2605 if (cached_has_bits & 0x00000001u) {
2606 _this->_internal_mutable_document_storage_info()->::icing::lib::DocumentStorageInfoProto::MergeFrom(
2607 from._internal_document_storage_info());
2608 }
2609 if (cached_has_bits & 0x00000002u) {
2610 _this->_internal_mutable_schema_store_storage_info()->::icing::lib::SchemaStoreStorageInfoProto::MergeFrom(
2611 from._internal_schema_store_storage_info());
2612 }
2613 if (cached_has_bits & 0x00000004u) {
2614 _this->_internal_mutable_index_storage_info()->::icing::lib::IndexStorageInfoProto::MergeFrom(
2615 from._internal_index_storage_info());
2616 }
2617 if (cached_has_bits & 0x00000008u) {
2618 _this->_impl_.total_storage_size_ = from._impl_.total_storage_size_;
2619 }
2620 _this->_impl_._has_bits_[0] |= cached_has_bits;
2621 }
2622 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2623 }
2624
CopyFrom(const StorageInfoProto & from)2625 void StorageInfoProto::CopyFrom(const StorageInfoProto& from) {
2626 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.StorageInfoProto)
2627 if (&from == this) return;
2628 Clear();
2629 MergeFrom(from);
2630 }
2631
IsInitialized() const2632 bool StorageInfoProto::IsInitialized() const {
2633 return true;
2634 }
2635
InternalSwap(StorageInfoProto * other)2636 void StorageInfoProto::InternalSwap(StorageInfoProto* other) {
2637 using std::swap;
2638 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2639 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2640 _impl_.namespace_blob_storage_info_.InternalSwap(&other->_impl_.namespace_blob_storage_info_);
2641 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2642 PROTOBUF_FIELD_OFFSET(StorageInfoProto, _impl_.total_storage_size_)
2643 + sizeof(StorageInfoProto::_impl_.total_storage_size_) // NOLINT
2644 - PROTOBUF_FIELD_OFFSET(StorageInfoProto, _impl_.document_storage_info_)>(
2645 reinterpret_cast<char*>(&_impl_.document_storage_info_),
2646 reinterpret_cast<char*>(&other->_impl_.document_storage_info_));
2647 }
2648
GetTypeName() const2649 std::string StorageInfoProto::GetTypeName() const {
2650 return "icing.lib.StorageInfoProto";
2651 }
2652
2653
2654 // ===================================================================
2655
2656 class StorageInfoResultProto::_Internal {
2657 public:
2658 using HasBits = decltype(std::declval<StorageInfoResultProto>()._impl_._has_bits_);
2659 static const ::icing::lib::StatusProto& status(const StorageInfoResultProto* msg);
set_has_status(HasBits * has_bits)2660 static void set_has_status(HasBits* has_bits) {
2661 (*has_bits)[0] |= 1u;
2662 }
2663 static const ::icing::lib::StorageInfoProto& storage_info(const StorageInfoResultProto* msg);
set_has_storage_info(HasBits * has_bits)2664 static void set_has_storage_info(HasBits* has_bits) {
2665 (*has_bits)[0] |= 2u;
2666 }
2667 };
2668
2669 const ::icing::lib::StatusProto&
status(const StorageInfoResultProto * msg)2670 StorageInfoResultProto::_Internal::status(const StorageInfoResultProto* msg) {
2671 return *msg->_impl_.status_;
2672 }
2673 const ::icing::lib::StorageInfoProto&
storage_info(const StorageInfoResultProto * msg)2674 StorageInfoResultProto::_Internal::storage_info(const StorageInfoResultProto* msg) {
2675 return *msg->_impl_.storage_info_;
2676 }
clear_status()2677 void StorageInfoResultProto::clear_status() {
2678 if (_impl_.status_ != nullptr) _impl_.status_->Clear();
2679 _impl_._has_bits_[0] &= ~0x00000001u;
2680 }
StorageInfoResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2681 StorageInfoResultProto::StorageInfoResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2682 bool is_message_owned)
2683 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2684 SharedCtor(arena, is_message_owned);
2685 // @@protoc_insertion_point(arena_constructor:icing.lib.StorageInfoResultProto)
2686 }
StorageInfoResultProto(const StorageInfoResultProto & from)2687 StorageInfoResultProto::StorageInfoResultProto(const StorageInfoResultProto& from)
2688 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2689 StorageInfoResultProto* const _this = this; (void)_this;
2690 new (&_impl_) Impl_{
2691 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2692 , /*decltype(_impl_._cached_size_)*/{}
2693 , decltype(_impl_.status_){nullptr}
2694 , decltype(_impl_.storage_info_){nullptr}};
2695
2696 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2697 if (from._internal_has_status()) {
2698 _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
2699 }
2700 if (from._internal_has_storage_info()) {
2701 _this->_impl_.storage_info_ = new ::icing::lib::StorageInfoProto(*from._impl_.storage_info_);
2702 }
2703 // @@protoc_insertion_point(copy_constructor:icing.lib.StorageInfoResultProto)
2704 }
2705
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2706 inline void StorageInfoResultProto::SharedCtor(
2707 ::_pb::Arena* arena, bool is_message_owned) {
2708 (void)arena;
2709 (void)is_message_owned;
2710 new (&_impl_) Impl_{
2711 decltype(_impl_._has_bits_){}
2712 , /*decltype(_impl_._cached_size_)*/{}
2713 , decltype(_impl_.status_){nullptr}
2714 , decltype(_impl_.storage_info_){nullptr}
2715 };
2716 }
2717
~StorageInfoResultProto()2718 StorageInfoResultProto::~StorageInfoResultProto() {
2719 // @@protoc_insertion_point(destructor:icing.lib.StorageInfoResultProto)
2720 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2721 (void)arena;
2722 return;
2723 }
2724 SharedDtor();
2725 }
2726
SharedDtor()2727 inline void StorageInfoResultProto::SharedDtor() {
2728 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2729 if (this != internal_default_instance()) delete _impl_.status_;
2730 if (this != internal_default_instance()) delete _impl_.storage_info_;
2731 }
2732
SetCachedSize(int size) const2733 void StorageInfoResultProto::SetCachedSize(int size) const {
2734 _impl_._cached_size_.Set(size);
2735 }
2736
Clear()2737 void StorageInfoResultProto::Clear() {
2738 // @@protoc_insertion_point(message_clear_start:icing.lib.StorageInfoResultProto)
2739 ::uint32_t cached_has_bits = 0;
2740 // Prevent compiler warnings about cached_has_bits being unused
2741 (void) cached_has_bits;
2742
2743 cached_has_bits = _impl_._has_bits_[0];
2744 if (cached_has_bits & 0x00000003u) {
2745 if (cached_has_bits & 0x00000001u) {
2746 GOOGLE_DCHECK(_impl_.status_ != nullptr);
2747 _impl_.status_->Clear();
2748 }
2749 if (cached_has_bits & 0x00000002u) {
2750 GOOGLE_DCHECK(_impl_.storage_info_ != nullptr);
2751 _impl_.storage_info_->Clear();
2752 }
2753 }
2754 _impl_._has_bits_.Clear();
2755 _internal_metadata_.Clear<std::string>();
2756 }
2757
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2758 const char* StorageInfoResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2759 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2760 _Internal::HasBits has_bits{};
2761 while (!ctx->Done(&ptr)) {
2762 ::uint32_t tag;
2763 ptr = ::_pbi::ReadTag(ptr, &tag);
2764 switch (tag >> 3) {
2765 // optional .icing.lib.StatusProto status = 1;
2766 case 1:
2767 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2768 ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
2769 CHK_(ptr);
2770 } else {
2771 goto handle_unusual;
2772 }
2773 continue;
2774 // optional .icing.lib.StorageInfoProto storage_info = 2;
2775 case 2:
2776 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2777 ptr = ctx->ParseMessage(_internal_mutable_storage_info(), ptr);
2778 CHK_(ptr);
2779 } else {
2780 goto handle_unusual;
2781 }
2782 continue;
2783 default:
2784 goto handle_unusual;
2785 } // switch
2786 handle_unusual:
2787 if ((tag == 0) || ((tag & 7) == 4)) {
2788 CHK_(ptr);
2789 ctx->SetLastTag(tag);
2790 goto message_done;
2791 }
2792 ptr = UnknownFieldParse(
2793 tag,
2794 _internal_metadata_.mutable_unknown_fields<std::string>(),
2795 ptr, ctx);
2796 CHK_(ptr != nullptr);
2797 } // while
2798 message_done:
2799 _impl_._has_bits_.Or(has_bits);
2800 return ptr;
2801 failure:
2802 ptr = nullptr;
2803 goto message_done;
2804 #undef CHK_
2805 }
2806
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2807 ::uint8_t* StorageInfoResultProto::_InternalSerialize(
2808 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2809 // @@protoc_insertion_point(serialize_to_array_start:icing.lib.StorageInfoResultProto)
2810 ::uint32_t cached_has_bits = 0;
2811 (void) cached_has_bits;
2812
2813 cached_has_bits = _impl_._has_bits_[0];
2814 // optional .icing.lib.StatusProto status = 1;
2815 if (cached_has_bits & 0x00000001u) {
2816 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2817 InternalWriteMessage(1, _Internal::status(this),
2818 _Internal::status(this).GetCachedSize(), target, stream);
2819 }
2820
2821 // optional .icing.lib.StorageInfoProto storage_info = 2;
2822 if (cached_has_bits & 0x00000002u) {
2823 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2824 InternalWriteMessage(2, _Internal::storage_info(this),
2825 _Internal::storage_info(this).GetCachedSize(), target, stream);
2826 }
2827
2828 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2829 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2830 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2831 }
2832 // @@protoc_insertion_point(serialize_to_array_end:icing.lib.StorageInfoResultProto)
2833 return target;
2834 }
2835
ByteSizeLong() const2836 size_t StorageInfoResultProto::ByteSizeLong() const {
2837 // @@protoc_insertion_point(message_byte_size_start:icing.lib.StorageInfoResultProto)
2838 size_t total_size = 0;
2839
2840 ::uint32_t cached_has_bits = 0;
2841 // Prevent compiler warnings about cached_has_bits being unused
2842 (void) cached_has_bits;
2843
2844 cached_has_bits = _impl_._has_bits_[0];
2845 if (cached_has_bits & 0x00000003u) {
2846 // optional .icing.lib.StatusProto status = 1;
2847 if (cached_has_bits & 0x00000001u) {
2848 total_size += 1 +
2849 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2850 *_impl_.status_);
2851 }
2852
2853 // optional .icing.lib.StorageInfoProto storage_info = 2;
2854 if (cached_has_bits & 0x00000002u) {
2855 total_size += 1 +
2856 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2857 *_impl_.storage_info_);
2858 }
2859
2860 }
2861 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2862 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2863 }
2864 int cached_size = ::_pbi::ToCachedSize(total_size);
2865 SetCachedSize(cached_size);
2866 return total_size;
2867 }
2868
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2869 void StorageInfoResultProto::CheckTypeAndMergeFrom(
2870 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2871 MergeFrom(*::_pbi::DownCast<const StorageInfoResultProto*>(
2872 &from));
2873 }
2874
MergeFrom(const StorageInfoResultProto & from)2875 void StorageInfoResultProto::MergeFrom(const StorageInfoResultProto& from) {
2876 StorageInfoResultProto* const _this = this;
2877 // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.StorageInfoResultProto)
2878 GOOGLE_DCHECK_NE(&from, _this);
2879 ::uint32_t cached_has_bits = 0;
2880 (void) cached_has_bits;
2881
2882 cached_has_bits = from._impl_._has_bits_[0];
2883 if (cached_has_bits & 0x00000003u) {
2884 if (cached_has_bits & 0x00000001u) {
2885 _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
2886 from._internal_status());
2887 }
2888 if (cached_has_bits & 0x00000002u) {
2889 _this->_internal_mutable_storage_info()->::icing::lib::StorageInfoProto::MergeFrom(
2890 from._internal_storage_info());
2891 }
2892 }
2893 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2894 }
2895
CopyFrom(const StorageInfoResultProto & from)2896 void StorageInfoResultProto::CopyFrom(const StorageInfoResultProto& from) {
2897 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.StorageInfoResultProto)
2898 if (&from == this) return;
2899 Clear();
2900 MergeFrom(from);
2901 }
2902
IsInitialized() const2903 bool StorageInfoResultProto::IsInitialized() const {
2904 return true;
2905 }
2906
InternalSwap(StorageInfoResultProto * other)2907 void StorageInfoResultProto::InternalSwap(StorageInfoResultProto* other) {
2908 using std::swap;
2909 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2910 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2911 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2912 PROTOBUF_FIELD_OFFSET(StorageInfoResultProto, _impl_.storage_info_)
2913 + sizeof(StorageInfoResultProto::_impl_.storage_info_) // NOLINT
2914 - PROTOBUF_FIELD_OFFSET(StorageInfoResultProto, _impl_.status_)>(
2915 reinterpret_cast<char*>(&_impl_.status_),
2916 reinterpret_cast<char*>(&other->_impl_.status_));
2917 }
2918
GetTypeName() const2919 std::string StorageInfoResultProto::GetTypeName() const {
2920 return "icing.lib.StorageInfoResultProto";
2921 }
2922
2923
2924 // @@protoc_insertion_point(namespace_scope)
2925 } // namespace lib
2926 } // namespace icing
2927 PROTOBUF_NAMESPACE_OPEN
2928 template<> PROTOBUF_NOINLINE ::icing::lib::NamespaceStorageInfoProto*
CreateMaybeMessage(Arena * arena)2929 Arena::CreateMaybeMessage< ::icing::lib::NamespaceStorageInfoProto >(Arena* arena) {
2930 return Arena::CreateMessageInternal< ::icing::lib::NamespaceStorageInfoProto >(arena);
2931 }
2932 template<> PROTOBUF_NOINLINE ::icing::lib::DocumentStorageInfoProto*
CreateMaybeMessage(Arena * arena)2933 Arena::CreateMaybeMessage< ::icing::lib::DocumentStorageInfoProto >(Arena* arena) {
2934 return Arena::CreateMessageInternal< ::icing::lib::DocumentStorageInfoProto >(arena);
2935 }
2936 template<> PROTOBUF_NOINLINE ::icing::lib::SchemaStoreStorageInfoProto*
CreateMaybeMessage(Arena * arena)2937 Arena::CreateMaybeMessage< ::icing::lib::SchemaStoreStorageInfoProto >(Arena* arena) {
2938 return Arena::CreateMessageInternal< ::icing::lib::SchemaStoreStorageInfoProto >(arena);
2939 }
2940 template<> PROTOBUF_NOINLINE ::icing::lib::IndexStorageInfoProto*
CreateMaybeMessage(Arena * arena)2941 Arena::CreateMaybeMessage< ::icing::lib::IndexStorageInfoProto >(Arena* arena) {
2942 return Arena::CreateMessageInternal< ::icing::lib::IndexStorageInfoProto >(arena);
2943 }
2944 template<> PROTOBUF_NOINLINE ::icing::lib::NamespaceBlobStorageInfoProto*
CreateMaybeMessage(Arena * arena)2945 Arena::CreateMaybeMessage< ::icing::lib::NamespaceBlobStorageInfoProto >(Arena* arena) {
2946 return Arena::CreateMessageInternal< ::icing::lib::NamespaceBlobStorageInfoProto >(arena);
2947 }
2948 template<> PROTOBUF_NOINLINE ::icing::lib::StorageInfoProto*
CreateMaybeMessage(Arena * arena)2949 Arena::CreateMaybeMessage< ::icing::lib::StorageInfoProto >(Arena* arena) {
2950 return Arena::CreateMessageInternal< ::icing::lib::StorageInfoProto >(arena);
2951 }
2952 template<> PROTOBUF_NOINLINE ::icing::lib::StorageInfoResultProto*
CreateMaybeMessage(Arena * arena)2953 Arena::CreateMaybeMessage< ::icing::lib::StorageInfoResultProto >(Arena* arena) {
2954 return Arena::CreateMessageInternal< ::icing::lib::StorageInfoResultProto >(arena);
2955 }
2956 PROTOBUF_NAMESPACE_CLOSE
2957
2958 // @@protoc_insertion_point(global_scope)
2959 #include <google/protobuf/port_undef.inc>
2960