1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/blob.proto
3 
4 #include "icing/proto/blob.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 {
BlobProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR BlobProto::BlobProto(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.status_)*/nullptr
28   , /*decltype(_impl_.file_descriptor_)*/0} {}
29 struct BlobProtoDefaultTypeInternal {
BlobProtoDefaultTypeInternalicing::lib::BlobProtoDefaultTypeInternal30   PROTOBUF_CONSTEXPR BlobProtoDefaultTypeInternal()
31       : _instance(::_pbi::ConstantInitialized{}) {}
~BlobProtoDefaultTypeInternalicing::lib::BlobProtoDefaultTypeInternal32   ~BlobProtoDefaultTypeInternal() {}
33   union {  // NOLINT(misc-non-private-member-variables-in-classes)
34     BlobProto _instance;
35   };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlobProtoDefaultTypeInternal _BlobProto_default_instance_;
BlobInfoProto(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR BlobInfoProto::BlobInfoProto(
39     ::_pbi::ConstantInitialized): _impl_{
40     /*decltype(_impl_._has_bits_)*/{}
41   , /*decltype(_impl_._cached_size_)*/{}
42   , /*decltype(_impl_.blob_handle_)*/nullptr
43   , /*decltype(_impl_.creation_time_ms_)*/::int64_t{0}
44   , /*decltype(_impl_.is_committed_)*/false} {}
45 struct BlobInfoProtoDefaultTypeInternal {
BlobInfoProtoDefaultTypeInternalicing::lib::BlobInfoProtoDefaultTypeInternal46   PROTOBUF_CONSTEXPR BlobInfoProtoDefaultTypeInternal()
47       : _instance(::_pbi::ConstantInitialized{}) {}
~BlobInfoProtoDefaultTypeInternalicing::lib::BlobInfoProtoDefaultTypeInternal48   ~BlobInfoProtoDefaultTypeInternal() {}
49   union {  // NOLINT(misc-non-private-member-variables-in-classes)
50     BlobInfoProto _instance;
51   };
52 };
53 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlobInfoProtoDefaultTypeInternal _BlobInfoProto_default_instance_;
54 }  // namespace lib
55 }  // namespace icing
56 namespace icing {
57 namespace lib {
58 
59 // ===================================================================
60 
61 class BlobProto::_Internal {
62  public:
63   using HasBits = decltype(std::declval<BlobProto>()._impl_._has_bits_);
64   static const ::icing::lib::StatusProto& status(const BlobProto* msg);
set_has_status(HasBits * has_bits)65   static void set_has_status(HasBits* has_bits) {
66     (*has_bits)[0] |= 1u;
67   }
set_has_file_descriptor(HasBits * has_bits)68   static void set_has_file_descriptor(HasBits* has_bits) {
69     (*has_bits)[0] |= 2u;
70   }
71 };
72 
73 const ::icing::lib::StatusProto&
status(const BlobProto * msg)74 BlobProto::_Internal::status(const BlobProto* msg) {
75   return *msg->_impl_.status_;
76 }
clear_status()77 void BlobProto::clear_status() {
78   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
79   _impl_._has_bits_[0] &= ~0x00000001u;
80 }
BlobProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)81 BlobProto::BlobProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
82                          bool is_message_owned)
83   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
84   SharedCtor(arena, is_message_owned);
85   // @@protoc_insertion_point(arena_constructor:icing.lib.BlobProto)
86 }
BlobProto(const BlobProto & from)87 BlobProto::BlobProto(const BlobProto& from)
88   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
89   BlobProto* const _this = this; (void)_this;
90   new (&_impl_) Impl_{
91       decltype(_impl_._has_bits_){from._impl_._has_bits_}
92     , /*decltype(_impl_._cached_size_)*/{}
93     , decltype(_impl_.status_){nullptr}
94     , decltype(_impl_.file_descriptor_){}};
95 
96   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
97   if (from._internal_has_status()) {
98     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
99   }
100   _this->_impl_.file_descriptor_ = from._impl_.file_descriptor_;
101   // @@protoc_insertion_point(copy_constructor:icing.lib.BlobProto)
102 }
103 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)104 inline void BlobProto::SharedCtor(
105     ::_pb::Arena* arena, bool is_message_owned) {
106   (void)arena;
107   (void)is_message_owned;
108   new (&_impl_) Impl_{
109       decltype(_impl_._has_bits_){}
110     , /*decltype(_impl_._cached_size_)*/{}
111     , decltype(_impl_.status_){nullptr}
112     , decltype(_impl_.file_descriptor_){0}
113   };
114 }
115 
~BlobProto()116 BlobProto::~BlobProto() {
117   // @@protoc_insertion_point(destructor:icing.lib.BlobProto)
118   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
119   (void)arena;
120     return;
121   }
122   SharedDtor();
123 }
124 
SharedDtor()125 inline void BlobProto::SharedDtor() {
126   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
127   if (this != internal_default_instance()) delete _impl_.status_;
128 }
129 
SetCachedSize(int size) const130 void BlobProto::SetCachedSize(int size) const {
131   _impl_._cached_size_.Set(size);
132 }
133 
Clear()134 void BlobProto::Clear() {
135 // @@protoc_insertion_point(message_clear_start:icing.lib.BlobProto)
136   ::uint32_t cached_has_bits = 0;
137   // Prevent compiler warnings about cached_has_bits being unused
138   (void) cached_has_bits;
139 
140   cached_has_bits = _impl_._has_bits_[0];
141   if (cached_has_bits & 0x00000001u) {
142     GOOGLE_DCHECK(_impl_.status_ != nullptr);
143     _impl_.status_->Clear();
144   }
145   _impl_.file_descriptor_ = 0;
146   _impl_._has_bits_.Clear();
147   _internal_metadata_.Clear<std::string>();
148 }
149 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)150 const char* BlobProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
151 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
152   _Internal::HasBits has_bits{};
153   while (!ctx->Done(&ptr)) {
154     ::uint32_t tag;
155     ptr = ::_pbi::ReadTag(ptr, &tag);
156     switch (tag >> 3) {
157       // optional .icing.lib.StatusProto status = 1;
158       case 1:
159         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
160           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
161           CHK_(ptr);
162         } else {
163           goto handle_unusual;
164         }
165         continue;
166       // optional int32 file_descriptor = 2;
167       case 2:
168         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
169           _Internal::set_has_file_descriptor(&has_bits);
170           _impl_.file_descriptor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
171           CHK_(ptr);
172         } else {
173           goto handle_unusual;
174         }
175         continue;
176       default:
177         goto handle_unusual;
178     }  // switch
179   handle_unusual:
180     if ((tag == 0) || ((tag & 7) == 4)) {
181       CHK_(ptr);
182       ctx->SetLastTag(tag);
183       goto message_done;
184     }
185     ptr = UnknownFieldParse(
186         tag,
187         _internal_metadata_.mutable_unknown_fields<std::string>(),
188         ptr, ctx);
189     CHK_(ptr != nullptr);
190   }  // while
191 message_done:
192   _impl_._has_bits_.Or(has_bits);
193   return ptr;
194 failure:
195   ptr = nullptr;
196   goto message_done;
197 #undef CHK_
198 }
199 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const200 ::uint8_t* BlobProto::_InternalSerialize(
201     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
202   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.BlobProto)
203   ::uint32_t cached_has_bits = 0;
204   (void) cached_has_bits;
205 
206   cached_has_bits = _impl_._has_bits_[0];
207   // optional .icing.lib.StatusProto status = 1;
208   if (cached_has_bits & 0x00000001u) {
209     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
210       InternalWriteMessage(1, _Internal::status(this),
211         _Internal::status(this).GetCachedSize(), target, stream);
212   }
213 
214   // optional int32 file_descriptor = 2;
215   if (cached_has_bits & 0x00000002u) {
216     target = stream->EnsureSpace(target);
217     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_file_descriptor(), target);
218   }
219 
220   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
221     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
222         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
223   }
224   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.BlobProto)
225   return target;
226 }
227 
ByteSizeLong() const228 size_t BlobProto::ByteSizeLong() const {
229 // @@protoc_insertion_point(message_byte_size_start:icing.lib.BlobProto)
230   size_t total_size = 0;
231 
232   ::uint32_t cached_has_bits = 0;
233   // Prevent compiler warnings about cached_has_bits being unused
234   (void) cached_has_bits;
235 
236   cached_has_bits = _impl_._has_bits_[0];
237   if (cached_has_bits & 0x00000003u) {
238     // optional .icing.lib.StatusProto status = 1;
239     if (cached_has_bits & 0x00000001u) {
240       total_size += 1 +
241         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
242           *_impl_.status_);
243     }
244 
245     // optional int32 file_descriptor = 2;
246     if (cached_has_bits & 0x00000002u) {
247       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_file_descriptor());
248     }
249 
250   }
251   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
252     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
253   }
254   int cached_size = ::_pbi::ToCachedSize(total_size);
255   SetCachedSize(cached_size);
256   return total_size;
257 }
258 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)259 void BlobProto::CheckTypeAndMergeFrom(
260     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
261   MergeFrom(*::_pbi::DownCast<const BlobProto*>(
262       &from));
263 }
264 
MergeFrom(const BlobProto & from)265 void BlobProto::MergeFrom(const BlobProto& from) {
266   BlobProto* const _this = this;
267   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.BlobProto)
268   GOOGLE_DCHECK_NE(&from, _this);
269   ::uint32_t cached_has_bits = 0;
270   (void) cached_has_bits;
271 
272   cached_has_bits = from._impl_._has_bits_[0];
273   if (cached_has_bits & 0x00000003u) {
274     if (cached_has_bits & 0x00000001u) {
275       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
276           from._internal_status());
277     }
278     if (cached_has_bits & 0x00000002u) {
279       _this->_impl_.file_descriptor_ = from._impl_.file_descriptor_;
280     }
281     _this->_impl_._has_bits_[0] |= cached_has_bits;
282   }
283   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
284 }
285 
CopyFrom(const BlobProto & from)286 void BlobProto::CopyFrom(const BlobProto& from) {
287 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.BlobProto)
288   if (&from == this) return;
289   Clear();
290   MergeFrom(from);
291 }
292 
IsInitialized() const293 bool BlobProto::IsInitialized() const {
294   return true;
295 }
296 
InternalSwap(BlobProto * other)297 void BlobProto::InternalSwap(BlobProto* other) {
298   using std::swap;
299   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
300   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
301   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
302       PROTOBUF_FIELD_OFFSET(BlobProto, _impl_.file_descriptor_)
303       + sizeof(BlobProto::_impl_.file_descriptor_)  // NOLINT
304       - PROTOBUF_FIELD_OFFSET(BlobProto, _impl_.status_)>(
305           reinterpret_cast<char*>(&_impl_.status_),
306           reinterpret_cast<char*>(&other->_impl_.status_));
307 }
308 
GetTypeName() const309 std::string BlobProto::GetTypeName() const {
310   return "icing.lib.BlobProto";
311 }
312 
313 
314 // ===================================================================
315 
316 class BlobInfoProto::_Internal {
317  public:
318   using HasBits = decltype(std::declval<BlobInfoProto>()._impl_._has_bits_);
319   static const ::icing::lib::PropertyProto_BlobHandleProto& blob_handle(const BlobInfoProto* msg);
set_has_blob_handle(HasBits * has_bits)320   static void set_has_blob_handle(HasBits* has_bits) {
321     (*has_bits)[0] |= 1u;
322   }
set_has_creation_time_ms(HasBits * has_bits)323   static void set_has_creation_time_ms(HasBits* has_bits) {
324     (*has_bits)[0] |= 2u;
325   }
set_has_is_committed(HasBits * has_bits)326   static void set_has_is_committed(HasBits* has_bits) {
327     (*has_bits)[0] |= 4u;
328   }
329 };
330 
331 const ::icing::lib::PropertyProto_BlobHandleProto&
blob_handle(const BlobInfoProto * msg)332 BlobInfoProto::_Internal::blob_handle(const BlobInfoProto* msg) {
333   return *msg->_impl_.blob_handle_;
334 }
clear_blob_handle()335 void BlobInfoProto::clear_blob_handle() {
336   if (_impl_.blob_handle_ != nullptr) _impl_.blob_handle_->Clear();
337   _impl_._has_bits_[0] &= ~0x00000001u;
338 }
BlobInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)339 BlobInfoProto::BlobInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
340                          bool is_message_owned)
341   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
342   SharedCtor(arena, is_message_owned);
343   // @@protoc_insertion_point(arena_constructor:icing.lib.BlobInfoProto)
344 }
BlobInfoProto(const BlobInfoProto & from)345 BlobInfoProto::BlobInfoProto(const BlobInfoProto& from)
346   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
347   BlobInfoProto* const _this = this; (void)_this;
348   new (&_impl_) Impl_{
349       decltype(_impl_._has_bits_){from._impl_._has_bits_}
350     , /*decltype(_impl_._cached_size_)*/{}
351     , decltype(_impl_.blob_handle_){nullptr}
352     , decltype(_impl_.creation_time_ms_){}
353     , decltype(_impl_.is_committed_){}};
354 
355   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
356   if (from._internal_has_blob_handle()) {
357     _this->_impl_.blob_handle_ = new ::icing::lib::PropertyProto_BlobHandleProto(*from._impl_.blob_handle_);
358   }
359   ::memcpy(&_impl_.creation_time_ms_, &from._impl_.creation_time_ms_,
360     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.is_committed_) -
361     reinterpret_cast<char*>(&_impl_.creation_time_ms_)) + sizeof(_impl_.is_committed_));
362   // @@protoc_insertion_point(copy_constructor:icing.lib.BlobInfoProto)
363 }
364 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)365 inline void BlobInfoProto::SharedCtor(
366     ::_pb::Arena* arena, bool is_message_owned) {
367   (void)arena;
368   (void)is_message_owned;
369   new (&_impl_) Impl_{
370       decltype(_impl_._has_bits_){}
371     , /*decltype(_impl_._cached_size_)*/{}
372     , decltype(_impl_.blob_handle_){nullptr}
373     , decltype(_impl_.creation_time_ms_){::int64_t{0}}
374     , decltype(_impl_.is_committed_){false}
375   };
376 }
377 
~BlobInfoProto()378 BlobInfoProto::~BlobInfoProto() {
379   // @@protoc_insertion_point(destructor:icing.lib.BlobInfoProto)
380   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
381   (void)arena;
382     return;
383   }
384   SharedDtor();
385 }
386 
SharedDtor()387 inline void BlobInfoProto::SharedDtor() {
388   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
389   if (this != internal_default_instance()) delete _impl_.blob_handle_;
390 }
391 
SetCachedSize(int size) const392 void BlobInfoProto::SetCachedSize(int size) const {
393   _impl_._cached_size_.Set(size);
394 }
395 
Clear()396 void BlobInfoProto::Clear() {
397 // @@protoc_insertion_point(message_clear_start:icing.lib.BlobInfoProto)
398   ::uint32_t cached_has_bits = 0;
399   // Prevent compiler warnings about cached_has_bits being unused
400   (void) cached_has_bits;
401 
402   cached_has_bits = _impl_._has_bits_[0];
403   if (cached_has_bits & 0x00000001u) {
404     GOOGLE_DCHECK(_impl_.blob_handle_ != nullptr);
405     _impl_.blob_handle_->Clear();
406   }
407   if (cached_has_bits & 0x00000006u) {
408     ::memset(&_impl_.creation_time_ms_, 0, static_cast<size_t>(
409         reinterpret_cast<char*>(&_impl_.is_committed_) -
410         reinterpret_cast<char*>(&_impl_.creation_time_ms_)) + sizeof(_impl_.is_committed_));
411   }
412   _impl_._has_bits_.Clear();
413   _internal_metadata_.Clear<std::string>();
414 }
415 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)416 const char* BlobInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
417 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
418   _Internal::HasBits has_bits{};
419   while (!ctx->Done(&ptr)) {
420     ::uint32_t tag;
421     ptr = ::_pbi::ReadTag(ptr, &tag);
422     switch (tag >> 3) {
423       // optional .icing.lib.PropertyProto.BlobHandleProto blob_handle = 1;
424       case 1:
425         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
426           ptr = ctx->ParseMessage(_internal_mutable_blob_handle(), ptr);
427           CHK_(ptr);
428         } else {
429           goto handle_unusual;
430         }
431         continue;
432       // optional int64 creation_time_ms = 2;
433       case 2:
434         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
435           _Internal::set_has_creation_time_ms(&has_bits);
436           _impl_.creation_time_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
437           CHK_(ptr);
438         } else {
439           goto handle_unusual;
440         }
441         continue;
442       // optional bool is_committed = 3;
443       case 3:
444         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
445           _Internal::set_has_is_committed(&has_bits);
446           _impl_.is_committed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
447           CHK_(ptr);
448         } else {
449           goto handle_unusual;
450         }
451         continue;
452       default:
453         goto handle_unusual;
454     }  // switch
455   handle_unusual:
456     if ((tag == 0) || ((tag & 7) == 4)) {
457       CHK_(ptr);
458       ctx->SetLastTag(tag);
459       goto message_done;
460     }
461     ptr = UnknownFieldParse(
462         tag,
463         _internal_metadata_.mutable_unknown_fields<std::string>(),
464         ptr, ctx);
465     CHK_(ptr != nullptr);
466   }  // while
467 message_done:
468   _impl_._has_bits_.Or(has_bits);
469   return ptr;
470 failure:
471   ptr = nullptr;
472   goto message_done;
473 #undef CHK_
474 }
475 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const476 ::uint8_t* BlobInfoProto::_InternalSerialize(
477     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
478   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.BlobInfoProto)
479   ::uint32_t cached_has_bits = 0;
480   (void) cached_has_bits;
481 
482   cached_has_bits = _impl_._has_bits_[0];
483   // optional .icing.lib.PropertyProto.BlobHandleProto blob_handle = 1;
484   if (cached_has_bits & 0x00000001u) {
485     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
486       InternalWriteMessage(1, _Internal::blob_handle(this),
487         _Internal::blob_handle(this).GetCachedSize(), target, stream);
488   }
489 
490   // optional int64 creation_time_ms = 2;
491   if (cached_has_bits & 0x00000002u) {
492     target = stream->EnsureSpace(target);
493     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_creation_time_ms(), target);
494   }
495 
496   // optional bool is_committed = 3;
497   if (cached_has_bits & 0x00000004u) {
498     target = stream->EnsureSpace(target);
499     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_committed(), target);
500   }
501 
502   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
503     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
504         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
505   }
506   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.BlobInfoProto)
507   return target;
508 }
509 
ByteSizeLong() const510 size_t BlobInfoProto::ByteSizeLong() const {
511 // @@protoc_insertion_point(message_byte_size_start:icing.lib.BlobInfoProto)
512   size_t total_size = 0;
513 
514   ::uint32_t cached_has_bits = 0;
515   // Prevent compiler warnings about cached_has_bits being unused
516   (void) cached_has_bits;
517 
518   cached_has_bits = _impl_._has_bits_[0];
519   if (cached_has_bits & 0x00000007u) {
520     // optional .icing.lib.PropertyProto.BlobHandleProto blob_handle = 1;
521     if (cached_has_bits & 0x00000001u) {
522       total_size += 1 +
523         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
524           *_impl_.blob_handle_);
525     }
526 
527     // optional int64 creation_time_ms = 2;
528     if (cached_has_bits & 0x00000002u) {
529       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_creation_time_ms());
530     }
531 
532     // optional bool is_committed = 3;
533     if (cached_has_bits & 0x00000004u) {
534       total_size += 1 + 1;
535     }
536 
537   }
538   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
539     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
540   }
541   int cached_size = ::_pbi::ToCachedSize(total_size);
542   SetCachedSize(cached_size);
543   return total_size;
544 }
545 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)546 void BlobInfoProto::CheckTypeAndMergeFrom(
547     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
548   MergeFrom(*::_pbi::DownCast<const BlobInfoProto*>(
549       &from));
550 }
551 
MergeFrom(const BlobInfoProto & from)552 void BlobInfoProto::MergeFrom(const BlobInfoProto& from) {
553   BlobInfoProto* const _this = this;
554   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.BlobInfoProto)
555   GOOGLE_DCHECK_NE(&from, _this);
556   ::uint32_t cached_has_bits = 0;
557   (void) cached_has_bits;
558 
559   cached_has_bits = from._impl_._has_bits_[0];
560   if (cached_has_bits & 0x00000007u) {
561     if (cached_has_bits & 0x00000001u) {
562       _this->_internal_mutable_blob_handle()->::icing::lib::PropertyProto_BlobHandleProto::MergeFrom(
563           from._internal_blob_handle());
564     }
565     if (cached_has_bits & 0x00000002u) {
566       _this->_impl_.creation_time_ms_ = from._impl_.creation_time_ms_;
567     }
568     if (cached_has_bits & 0x00000004u) {
569       _this->_impl_.is_committed_ = from._impl_.is_committed_;
570     }
571     _this->_impl_._has_bits_[0] |= cached_has_bits;
572   }
573   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
574 }
575 
CopyFrom(const BlobInfoProto & from)576 void BlobInfoProto::CopyFrom(const BlobInfoProto& from) {
577 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.BlobInfoProto)
578   if (&from == this) return;
579   Clear();
580   MergeFrom(from);
581 }
582 
IsInitialized() const583 bool BlobInfoProto::IsInitialized() const {
584   return true;
585 }
586 
InternalSwap(BlobInfoProto * other)587 void BlobInfoProto::InternalSwap(BlobInfoProto* other) {
588   using std::swap;
589   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
590   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
591   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
592       PROTOBUF_FIELD_OFFSET(BlobInfoProto, _impl_.is_committed_)
593       + sizeof(BlobInfoProto::_impl_.is_committed_)  // NOLINT
594       - PROTOBUF_FIELD_OFFSET(BlobInfoProto, _impl_.blob_handle_)>(
595           reinterpret_cast<char*>(&_impl_.blob_handle_),
596           reinterpret_cast<char*>(&other->_impl_.blob_handle_));
597 }
598 
GetTypeName() const599 std::string BlobInfoProto::GetTypeName() const {
600   return "icing.lib.BlobInfoProto";
601 }
602 
603 
604 // @@protoc_insertion_point(namespace_scope)
605 }  // namespace lib
606 }  // namespace icing
607 PROTOBUF_NAMESPACE_OPEN
608 template<> PROTOBUF_NOINLINE ::icing::lib::BlobProto*
CreateMaybeMessage(Arena * arena)609 Arena::CreateMaybeMessage< ::icing::lib::BlobProto >(Arena* arena) {
610   return Arena::CreateMessageInternal< ::icing::lib::BlobProto >(arena);
611 }
612 template<> PROTOBUF_NOINLINE ::icing::lib::BlobInfoProto*
CreateMaybeMessage(Arena * arena)613 Arena::CreateMaybeMessage< ::icing::lib::BlobInfoProto >(Arena* arena) {
614   return Arena::CreateMessageInternal< ::icing::lib::BlobInfoProto >(arena);
615 }
616 PROTOBUF_NAMESPACE_CLOSE
617 
618 // @@protoc_insertion_point(global_scope)
619 #include <google/protobuf/port_undef.inc>
620