1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/document.proto
3 
4 #include "icing/proto/document.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 {
DocumentProto_InternalFields(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR DocumentProto_InternalFields::DocumentProto_InternalFields(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.length_in_tokens_)*/0} {}
28 struct DocumentProto_InternalFieldsDefaultTypeInternal {
DocumentProto_InternalFieldsDefaultTypeInternalicing::lib::DocumentProto_InternalFieldsDefaultTypeInternal29   PROTOBUF_CONSTEXPR DocumentProto_InternalFieldsDefaultTypeInternal()
30       : _instance(::_pbi::ConstantInitialized{}) {}
~DocumentProto_InternalFieldsDefaultTypeInternalicing::lib::DocumentProto_InternalFieldsDefaultTypeInternal31   ~DocumentProto_InternalFieldsDefaultTypeInternal() {}
32   union {  // NOLINT(misc-non-private-member-variables-in-classes)
33     DocumentProto_InternalFields _instance;
34   };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DocumentProto_InternalFieldsDefaultTypeInternal _DocumentProto_InternalFields_default_instance_;
DocumentProto(::_pbi::ConstantInitialized)37 PROTOBUF_CONSTEXPR DocumentProto::DocumentProto(
38     ::_pbi::ConstantInitialized): _impl_{
39     /*decltype(_impl_._has_bits_)*/{}
40   , /*decltype(_impl_._cached_size_)*/{}
41   , /*decltype(_impl_.properties_)*/{}
42   , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
43   , /*decltype(_impl_.uri_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
44   , /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
45   , /*decltype(_impl_.internal_fields_)*/nullptr
46   , /*decltype(_impl_.creation_timestamp_ms_)*/::int64_t{0}
47   , /*decltype(_impl_.ttl_ms_)*/::int64_t{0}
48   , /*decltype(_impl_.score_)*/0} {}
49 struct DocumentProtoDefaultTypeInternal {
DocumentProtoDefaultTypeInternalicing::lib::DocumentProtoDefaultTypeInternal50   PROTOBUF_CONSTEXPR DocumentProtoDefaultTypeInternal()
51       : _instance(::_pbi::ConstantInitialized{}) {}
~DocumentProtoDefaultTypeInternalicing::lib::DocumentProtoDefaultTypeInternal52   ~DocumentProtoDefaultTypeInternal() {}
53   union {  // NOLINT(misc-non-private-member-variables-in-classes)
54     DocumentProto _instance;
55   };
56 };
57 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DocumentProtoDefaultTypeInternal _DocumentProto_default_instance_;
PropertyProto_VectorProto(::_pbi::ConstantInitialized)58 PROTOBUF_CONSTEXPR PropertyProto_VectorProto::PropertyProto_VectorProto(
59     ::_pbi::ConstantInitialized): _impl_{
60     /*decltype(_impl_._has_bits_)*/{}
61   , /*decltype(_impl_._cached_size_)*/{}
62   , /*decltype(_impl_.values_)*/{}
63   , /*decltype(_impl_.model_signature_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
64 struct PropertyProto_VectorProtoDefaultTypeInternal {
PropertyProto_VectorProtoDefaultTypeInternalicing::lib::PropertyProto_VectorProtoDefaultTypeInternal65   PROTOBUF_CONSTEXPR PropertyProto_VectorProtoDefaultTypeInternal()
66       : _instance(::_pbi::ConstantInitialized{}) {}
~PropertyProto_VectorProtoDefaultTypeInternalicing::lib::PropertyProto_VectorProtoDefaultTypeInternal67   ~PropertyProto_VectorProtoDefaultTypeInternal() {}
68   union {  // NOLINT(misc-non-private-member-variables-in-classes)
69     PropertyProto_VectorProto _instance;
70   };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PropertyProto_VectorProtoDefaultTypeInternal _PropertyProto_VectorProto_default_instance_;
PropertyProto_BlobHandleProto(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR PropertyProto_BlobHandleProto::PropertyProto_BlobHandleProto(
74     ::_pbi::ConstantInitialized): _impl_{
75     /*decltype(_impl_._has_bits_)*/{}
76   , /*decltype(_impl_._cached_size_)*/{}
77   , /*decltype(_impl_.digest_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
78   , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
79 struct PropertyProto_BlobHandleProtoDefaultTypeInternal {
PropertyProto_BlobHandleProtoDefaultTypeInternalicing::lib::PropertyProto_BlobHandleProtoDefaultTypeInternal80   PROTOBUF_CONSTEXPR PropertyProto_BlobHandleProtoDefaultTypeInternal()
81       : _instance(::_pbi::ConstantInitialized{}) {}
~PropertyProto_BlobHandleProtoDefaultTypeInternalicing::lib::PropertyProto_BlobHandleProtoDefaultTypeInternal82   ~PropertyProto_BlobHandleProtoDefaultTypeInternal() {}
83   union {  // NOLINT(misc-non-private-member-variables-in-classes)
84     PropertyProto_BlobHandleProto _instance;
85   };
86 };
87 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PropertyProto_BlobHandleProtoDefaultTypeInternal _PropertyProto_BlobHandleProto_default_instance_;
PropertyProto(::_pbi::ConstantInitialized)88 PROTOBUF_CONSTEXPR PropertyProto::PropertyProto(
89     ::_pbi::ConstantInitialized): _impl_{
90     /*decltype(_impl_._has_bits_)*/{}
91   , /*decltype(_impl_._cached_size_)*/{}
92   , /*decltype(_impl_.string_values_)*/{}
93   , /*decltype(_impl_.int64_values_)*/{}
94   , /*decltype(_impl_.double_values_)*/{}
95   , /*decltype(_impl_.boolean_values_)*/{}
96   , /*decltype(_impl_.bytes_values_)*/{}
97   , /*decltype(_impl_.document_values_)*/{}
98   , /*decltype(_impl_.vector_values_)*/{}
99   , /*decltype(_impl_.blob_handle_values_)*/{}
100   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
101 struct PropertyProtoDefaultTypeInternal {
PropertyProtoDefaultTypeInternalicing::lib::PropertyProtoDefaultTypeInternal102   PROTOBUF_CONSTEXPR PropertyProtoDefaultTypeInternal()
103       : _instance(::_pbi::ConstantInitialized{}) {}
~PropertyProtoDefaultTypeInternalicing::lib::PropertyProtoDefaultTypeInternal104   ~PropertyProtoDefaultTypeInternal() {}
105   union {  // NOLINT(misc-non-private-member-variables-in-classes)
106     PropertyProto _instance;
107   };
108 };
109 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PropertyProtoDefaultTypeInternal _PropertyProto_default_instance_;
PutResultProto(::_pbi::ConstantInitialized)110 PROTOBUF_CONSTEXPR PutResultProto::PutResultProto(
111     ::_pbi::ConstantInitialized): _impl_{
112     /*decltype(_impl_._has_bits_)*/{}
113   , /*decltype(_impl_._cached_size_)*/{}
114   , /*decltype(_impl_.status_)*/nullptr
115   , /*decltype(_impl_.put_document_stats_)*/nullptr
116   , /*decltype(_impl_.was_replacement_)*/false} {}
117 struct PutResultProtoDefaultTypeInternal {
PutResultProtoDefaultTypeInternalicing::lib::PutResultProtoDefaultTypeInternal118   PROTOBUF_CONSTEXPR PutResultProtoDefaultTypeInternal()
119       : _instance(::_pbi::ConstantInitialized{}) {}
~PutResultProtoDefaultTypeInternalicing::lib::PutResultProtoDefaultTypeInternal120   ~PutResultProtoDefaultTypeInternal() {}
121   union {  // NOLINT(misc-non-private-member-variables-in-classes)
122     PutResultProto _instance;
123   };
124 };
125 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutResultProtoDefaultTypeInternal _PutResultProto_default_instance_;
GetResultProto(::_pbi::ConstantInitialized)126 PROTOBUF_CONSTEXPR GetResultProto::GetResultProto(
127     ::_pbi::ConstantInitialized): _impl_{
128     /*decltype(_impl_._has_bits_)*/{}
129   , /*decltype(_impl_._cached_size_)*/{}
130   , /*decltype(_impl_.status_)*/nullptr
131   , /*decltype(_impl_.document_)*/nullptr} {}
132 struct GetResultProtoDefaultTypeInternal {
GetResultProtoDefaultTypeInternalicing::lib::GetResultProtoDefaultTypeInternal133   PROTOBUF_CONSTEXPR GetResultProtoDefaultTypeInternal()
134       : _instance(::_pbi::ConstantInitialized{}) {}
~GetResultProtoDefaultTypeInternalicing::lib::GetResultProtoDefaultTypeInternal135   ~GetResultProtoDefaultTypeInternal() {}
136   union {  // NOLINT(misc-non-private-member-variables-in-classes)
137     GetResultProto _instance;
138   };
139 };
140 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetResultProtoDefaultTypeInternal _GetResultProto_default_instance_;
GetAllNamespacesResultProto(::_pbi::ConstantInitialized)141 PROTOBUF_CONSTEXPR GetAllNamespacesResultProto::GetAllNamespacesResultProto(
142     ::_pbi::ConstantInitialized): _impl_{
143     /*decltype(_impl_._has_bits_)*/{}
144   , /*decltype(_impl_._cached_size_)*/{}
145   , /*decltype(_impl_.namespaces_)*/{}
146   , /*decltype(_impl_.status_)*/nullptr} {}
147 struct GetAllNamespacesResultProtoDefaultTypeInternal {
GetAllNamespacesResultProtoDefaultTypeInternalicing::lib::GetAllNamespacesResultProtoDefaultTypeInternal148   PROTOBUF_CONSTEXPR GetAllNamespacesResultProtoDefaultTypeInternal()
149       : _instance(::_pbi::ConstantInitialized{}) {}
~GetAllNamespacesResultProtoDefaultTypeInternalicing::lib::GetAllNamespacesResultProtoDefaultTypeInternal150   ~GetAllNamespacesResultProtoDefaultTypeInternal() {}
151   union {  // NOLINT(misc-non-private-member-variables-in-classes)
152     GetAllNamespacesResultProto _instance;
153   };
154 };
155 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetAllNamespacesResultProtoDefaultTypeInternal _GetAllNamespacesResultProto_default_instance_;
DeleteResultProto(::_pbi::ConstantInitialized)156 PROTOBUF_CONSTEXPR DeleteResultProto::DeleteResultProto(
157     ::_pbi::ConstantInitialized): _impl_{
158     /*decltype(_impl_._has_bits_)*/{}
159   , /*decltype(_impl_._cached_size_)*/{}
160   , /*decltype(_impl_.status_)*/nullptr
161   , /*decltype(_impl_.delete_stats_)*/nullptr} {}
162 struct DeleteResultProtoDefaultTypeInternal {
DeleteResultProtoDefaultTypeInternalicing::lib::DeleteResultProtoDefaultTypeInternal163   PROTOBUF_CONSTEXPR DeleteResultProtoDefaultTypeInternal()
164       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteResultProtoDefaultTypeInternalicing::lib::DeleteResultProtoDefaultTypeInternal165   ~DeleteResultProtoDefaultTypeInternal() {}
166   union {  // NOLINT(misc-non-private-member-variables-in-classes)
167     DeleteResultProto _instance;
168   };
169 };
170 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteResultProtoDefaultTypeInternal _DeleteResultProto_default_instance_;
DeleteByNamespaceResultProto(::_pbi::ConstantInitialized)171 PROTOBUF_CONSTEXPR DeleteByNamespaceResultProto::DeleteByNamespaceResultProto(
172     ::_pbi::ConstantInitialized): _impl_{
173     /*decltype(_impl_._has_bits_)*/{}
174   , /*decltype(_impl_._cached_size_)*/{}
175   , /*decltype(_impl_.status_)*/nullptr
176   , /*decltype(_impl_.delete_stats_)*/nullptr} {}
177 struct DeleteByNamespaceResultProtoDefaultTypeInternal {
DeleteByNamespaceResultProtoDefaultTypeInternalicing::lib::DeleteByNamespaceResultProtoDefaultTypeInternal178   PROTOBUF_CONSTEXPR DeleteByNamespaceResultProtoDefaultTypeInternal()
179       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteByNamespaceResultProtoDefaultTypeInternalicing::lib::DeleteByNamespaceResultProtoDefaultTypeInternal180   ~DeleteByNamespaceResultProtoDefaultTypeInternal() {}
181   union {  // NOLINT(misc-non-private-member-variables-in-classes)
182     DeleteByNamespaceResultProto _instance;
183   };
184 };
185 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteByNamespaceResultProtoDefaultTypeInternal _DeleteByNamespaceResultProto_default_instance_;
DeleteBySchemaTypeResultProto(::_pbi::ConstantInitialized)186 PROTOBUF_CONSTEXPR DeleteBySchemaTypeResultProto::DeleteBySchemaTypeResultProto(
187     ::_pbi::ConstantInitialized): _impl_{
188     /*decltype(_impl_._has_bits_)*/{}
189   , /*decltype(_impl_._cached_size_)*/{}
190   , /*decltype(_impl_.status_)*/nullptr
191   , /*decltype(_impl_.delete_stats_)*/nullptr} {}
192 struct DeleteBySchemaTypeResultProtoDefaultTypeInternal {
DeleteBySchemaTypeResultProtoDefaultTypeInternalicing::lib::DeleteBySchemaTypeResultProtoDefaultTypeInternal193   PROTOBUF_CONSTEXPR DeleteBySchemaTypeResultProtoDefaultTypeInternal()
194       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteBySchemaTypeResultProtoDefaultTypeInternalicing::lib::DeleteBySchemaTypeResultProtoDefaultTypeInternal195   ~DeleteBySchemaTypeResultProtoDefaultTypeInternal() {}
196   union {  // NOLINT(misc-non-private-member-variables-in-classes)
197     DeleteBySchemaTypeResultProto _instance;
198   };
199 };
200 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteBySchemaTypeResultProtoDefaultTypeInternal _DeleteBySchemaTypeResultProto_default_instance_;
DeleteByQueryResultProto_DocumentGroupInfo(::_pbi::ConstantInitialized)201 PROTOBUF_CONSTEXPR DeleteByQueryResultProto_DocumentGroupInfo::DeleteByQueryResultProto_DocumentGroupInfo(
202     ::_pbi::ConstantInitialized): _impl_{
203     /*decltype(_impl_._has_bits_)*/{}
204   , /*decltype(_impl_._cached_size_)*/{}
205   , /*decltype(_impl_.uris_)*/{}
206   , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
207   , /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
208 struct DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal {
DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternalicing::lib::DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal209   PROTOBUF_CONSTEXPR DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal()
210       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternalicing::lib::DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal211   ~DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal() {}
212   union {  // NOLINT(misc-non-private-member-variables-in-classes)
213     DeleteByQueryResultProto_DocumentGroupInfo _instance;
214   };
215 };
216 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteByQueryResultProto_DocumentGroupInfoDefaultTypeInternal _DeleteByQueryResultProto_DocumentGroupInfo_default_instance_;
DeleteByQueryResultProto(::_pbi::ConstantInitialized)217 PROTOBUF_CONSTEXPR DeleteByQueryResultProto::DeleteByQueryResultProto(
218     ::_pbi::ConstantInitialized): _impl_{
219     /*decltype(_impl_._has_bits_)*/{}
220   , /*decltype(_impl_._cached_size_)*/{}
221   , /*decltype(_impl_.deleted_documents_)*/{}
222   , /*decltype(_impl_.status_)*/nullptr
223   , /*decltype(_impl_.delete_by_query_stats_)*/nullptr} {}
224 struct DeleteByQueryResultProtoDefaultTypeInternal {
DeleteByQueryResultProtoDefaultTypeInternalicing::lib::DeleteByQueryResultProtoDefaultTypeInternal225   PROTOBUF_CONSTEXPR DeleteByQueryResultProtoDefaultTypeInternal()
226       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteByQueryResultProtoDefaultTypeInternalicing::lib::DeleteByQueryResultProtoDefaultTypeInternal227   ~DeleteByQueryResultProtoDefaultTypeInternal() {}
228   union {  // NOLINT(misc-non-private-member-variables-in-classes)
229     DeleteByQueryResultProto _instance;
230   };
231 };
232 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteByQueryResultProtoDefaultTypeInternal _DeleteByQueryResultProto_default_instance_;
233 }  // namespace lib
234 }  // namespace icing
235 namespace icing {
236 namespace lib {
237 
238 // ===================================================================
239 
240 class DocumentProto_InternalFields::_Internal {
241  public:
242   using HasBits = decltype(std::declval<DocumentProto_InternalFields>()._impl_._has_bits_);
set_has_length_in_tokens(HasBits * has_bits)243   static void set_has_length_in_tokens(HasBits* has_bits) {
244     (*has_bits)[0] |= 1u;
245   }
246 };
247 
DocumentProto_InternalFields(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)248 DocumentProto_InternalFields::DocumentProto_InternalFields(::PROTOBUF_NAMESPACE_ID::Arena* arena,
249                          bool is_message_owned)
250   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
251   SharedCtor(arena, is_message_owned);
252   // @@protoc_insertion_point(arena_constructor:icing.lib.DocumentProto.InternalFields)
253 }
DocumentProto_InternalFields(const DocumentProto_InternalFields & from)254 DocumentProto_InternalFields::DocumentProto_InternalFields(const DocumentProto_InternalFields& from)
255   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
256   DocumentProto_InternalFields* const _this = this; (void)_this;
257   new (&_impl_) Impl_{
258       decltype(_impl_._has_bits_){from._impl_._has_bits_}
259     , /*decltype(_impl_._cached_size_)*/{}
260     , decltype(_impl_.length_in_tokens_){}};
261 
262   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
263   _this->_impl_.length_in_tokens_ = from._impl_.length_in_tokens_;
264   // @@protoc_insertion_point(copy_constructor:icing.lib.DocumentProto.InternalFields)
265 }
266 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)267 inline void DocumentProto_InternalFields::SharedCtor(
268     ::_pb::Arena* arena, bool is_message_owned) {
269   (void)arena;
270   (void)is_message_owned;
271   new (&_impl_) Impl_{
272       decltype(_impl_._has_bits_){}
273     , /*decltype(_impl_._cached_size_)*/{}
274     , decltype(_impl_.length_in_tokens_){0}
275   };
276 }
277 
~DocumentProto_InternalFields()278 DocumentProto_InternalFields::~DocumentProto_InternalFields() {
279   // @@protoc_insertion_point(destructor:icing.lib.DocumentProto.InternalFields)
280   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
281   (void)arena;
282     return;
283   }
284   SharedDtor();
285 }
286 
SharedDtor()287 inline void DocumentProto_InternalFields::SharedDtor() {
288   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
289 }
290 
SetCachedSize(int size) const291 void DocumentProto_InternalFields::SetCachedSize(int size) const {
292   _impl_._cached_size_.Set(size);
293 }
294 
Clear()295 void DocumentProto_InternalFields::Clear() {
296 // @@protoc_insertion_point(message_clear_start:icing.lib.DocumentProto.InternalFields)
297   ::uint32_t cached_has_bits = 0;
298   // Prevent compiler warnings about cached_has_bits being unused
299   (void) cached_has_bits;
300 
301   _impl_.length_in_tokens_ = 0;
302   _impl_._has_bits_.Clear();
303   _internal_metadata_.Clear<std::string>();
304 }
305 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)306 const char* DocumentProto_InternalFields::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
307 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
308   _Internal::HasBits has_bits{};
309   while (!ctx->Done(&ptr)) {
310     ::uint32_t tag;
311     ptr = ::_pbi::ReadTag(ptr, &tag);
312     switch (tag >> 3) {
313       // optional int32 length_in_tokens = 1;
314       case 1:
315         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
316           _Internal::set_has_length_in_tokens(&has_bits);
317           _impl_.length_in_tokens_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
318           CHK_(ptr);
319         } else {
320           goto handle_unusual;
321         }
322         continue;
323       default:
324         goto handle_unusual;
325     }  // switch
326   handle_unusual:
327     if ((tag == 0) || ((tag & 7) == 4)) {
328       CHK_(ptr);
329       ctx->SetLastTag(tag);
330       goto message_done;
331     }
332     ptr = UnknownFieldParse(
333         tag,
334         _internal_metadata_.mutable_unknown_fields<std::string>(),
335         ptr, ctx);
336     CHK_(ptr != nullptr);
337   }  // while
338 message_done:
339   _impl_._has_bits_.Or(has_bits);
340   return ptr;
341 failure:
342   ptr = nullptr;
343   goto message_done;
344 #undef CHK_
345 }
346 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const347 ::uint8_t* DocumentProto_InternalFields::_InternalSerialize(
348     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
349   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DocumentProto.InternalFields)
350   ::uint32_t cached_has_bits = 0;
351   (void) cached_has_bits;
352 
353   cached_has_bits = _impl_._has_bits_[0];
354   // optional int32 length_in_tokens = 1;
355   if (cached_has_bits & 0x00000001u) {
356     target = stream->EnsureSpace(target);
357     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_length_in_tokens(), target);
358   }
359 
360   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
361     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
362         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
363   }
364   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DocumentProto.InternalFields)
365   return target;
366 }
367 
ByteSizeLong() const368 size_t DocumentProto_InternalFields::ByteSizeLong() const {
369 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DocumentProto.InternalFields)
370   size_t total_size = 0;
371 
372   ::uint32_t cached_has_bits = 0;
373   // Prevent compiler warnings about cached_has_bits being unused
374   (void) cached_has_bits;
375 
376   // optional int32 length_in_tokens = 1;
377   cached_has_bits = _impl_._has_bits_[0];
378   if (cached_has_bits & 0x00000001u) {
379     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_length_in_tokens());
380   }
381 
382   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
383     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
384   }
385   int cached_size = ::_pbi::ToCachedSize(total_size);
386   SetCachedSize(cached_size);
387   return total_size;
388 }
389 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)390 void DocumentProto_InternalFields::CheckTypeAndMergeFrom(
391     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
392   MergeFrom(*::_pbi::DownCast<const DocumentProto_InternalFields*>(
393       &from));
394 }
395 
MergeFrom(const DocumentProto_InternalFields & from)396 void DocumentProto_InternalFields::MergeFrom(const DocumentProto_InternalFields& from) {
397   DocumentProto_InternalFields* const _this = this;
398   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DocumentProto.InternalFields)
399   GOOGLE_DCHECK_NE(&from, _this);
400   ::uint32_t cached_has_bits = 0;
401   (void) cached_has_bits;
402 
403   if (from._internal_has_length_in_tokens()) {
404     _this->_internal_set_length_in_tokens(from._internal_length_in_tokens());
405   }
406   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
407 }
408 
CopyFrom(const DocumentProto_InternalFields & from)409 void DocumentProto_InternalFields::CopyFrom(const DocumentProto_InternalFields& from) {
410 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DocumentProto.InternalFields)
411   if (&from == this) return;
412   Clear();
413   MergeFrom(from);
414 }
415 
IsInitialized() const416 bool DocumentProto_InternalFields::IsInitialized() const {
417   return true;
418 }
419 
InternalSwap(DocumentProto_InternalFields * other)420 void DocumentProto_InternalFields::InternalSwap(DocumentProto_InternalFields* other) {
421   using std::swap;
422   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
423   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
424   swap(_impl_.length_in_tokens_, other->_impl_.length_in_tokens_);
425 }
426 
GetTypeName() const427 std::string DocumentProto_InternalFields::GetTypeName() const {
428   return "icing.lib.DocumentProto.InternalFields";
429 }
430 
431 
432 // ===================================================================
433 
434 class DocumentProto::_Internal {
435  public:
436   using HasBits = decltype(std::declval<DocumentProto>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)437   static void set_has_namespace_(HasBits* has_bits) {
438     (*has_bits)[0] |= 1u;
439   }
set_has_uri(HasBits * has_bits)440   static void set_has_uri(HasBits* has_bits) {
441     (*has_bits)[0] |= 2u;
442   }
set_has_schema(HasBits * has_bits)443   static void set_has_schema(HasBits* has_bits) {
444     (*has_bits)[0] |= 4u;
445   }
set_has_creation_timestamp_ms(HasBits * has_bits)446   static void set_has_creation_timestamp_ms(HasBits* has_bits) {
447     (*has_bits)[0] |= 16u;
448   }
set_has_score(HasBits * has_bits)449   static void set_has_score(HasBits* has_bits) {
450     (*has_bits)[0] |= 64u;
451   }
set_has_ttl_ms(HasBits * has_bits)452   static void set_has_ttl_ms(HasBits* has_bits) {
453     (*has_bits)[0] |= 32u;
454   }
455   static const ::icing::lib::DocumentProto_InternalFields& internal_fields(const DocumentProto* msg);
set_has_internal_fields(HasBits * has_bits)456   static void set_has_internal_fields(HasBits* has_bits) {
457     (*has_bits)[0] |= 8u;
458   }
459 };
460 
461 const ::icing::lib::DocumentProto_InternalFields&
internal_fields(const DocumentProto * msg)462 DocumentProto::_Internal::internal_fields(const DocumentProto* msg) {
463   return *msg->_impl_.internal_fields_;
464 }
DocumentProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)465 DocumentProto::DocumentProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
466                          bool is_message_owned)
467   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
468   SharedCtor(arena, is_message_owned);
469   // @@protoc_insertion_point(arena_constructor:icing.lib.DocumentProto)
470 }
DocumentProto(const DocumentProto & from)471 DocumentProto::DocumentProto(const DocumentProto& from)
472   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
473   DocumentProto* const _this = this; (void)_this;
474   new (&_impl_) Impl_{
475       decltype(_impl_._has_bits_){from._impl_._has_bits_}
476     , /*decltype(_impl_._cached_size_)*/{}
477     , decltype(_impl_.properties_){from._impl_.properties_}
478     , decltype(_impl_.namespace__){}
479     , decltype(_impl_.uri_){}
480     , decltype(_impl_.schema_){}
481     , decltype(_impl_.internal_fields_){nullptr}
482     , decltype(_impl_.creation_timestamp_ms_){}
483     , decltype(_impl_.ttl_ms_){}
484     , decltype(_impl_.score_){}};
485 
486   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
487   _impl_.namespace__.InitDefault();
488   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
489     _impl_.namespace__.Set("", GetArenaForAllocation());
490   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
491   if (from._internal_has_namespace_()) {
492     _this->_impl_.namespace__.Set(from._internal_namespace_(),
493       _this->GetArenaForAllocation());
494   }
495   _impl_.uri_.InitDefault();
496   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
497     _impl_.uri_.Set("", GetArenaForAllocation());
498   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
499   if (from._internal_has_uri()) {
500     _this->_impl_.uri_.Set(from._internal_uri(),
501       _this->GetArenaForAllocation());
502   }
503   _impl_.schema_.InitDefault();
504   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
505     _impl_.schema_.Set("", GetArenaForAllocation());
506   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
507   if (from._internal_has_schema()) {
508     _this->_impl_.schema_.Set(from._internal_schema(),
509       _this->GetArenaForAllocation());
510   }
511   if (from._internal_has_internal_fields()) {
512     _this->_impl_.internal_fields_ = new ::icing::lib::DocumentProto_InternalFields(*from._impl_.internal_fields_);
513   }
514   ::memcpy(&_impl_.creation_timestamp_ms_, &from._impl_.creation_timestamp_ms_,
515     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.score_) -
516     reinterpret_cast<char*>(&_impl_.creation_timestamp_ms_)) + sizeof(_impl_.score_));
517   // @@protoc_insertion_point(copy_constructor:icing.lib.DocumentProto)
518 }
519 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)520 inline void DocumentProto::SharedCtor(
521     ::_pb::Arena* arena, bool is_message_owned) {
522   (void)arena;
523   (void)is_message_owned;
524   new (&_impl_) Impl_{
525       decltype(_impl_._has_bits_){}
526     , /*decltype(_impl_._cached_size_)*/{}
527     , decltype(_impl_.properties_){arena}
528     , decltype(_impl_.namespace__){}
529     , decltype(_impl_.uri_){}
530     , decltype(_impl_.schema_){}
531     , decltype(_impl_.internal_fields_){nullptr}
532     , decltype(_impl_.creation_timestamp_ms_){::int64_t{0}}
533     , decltype(_impl_.ttl_ms_){::int64_t{0}}
534     , decltype(_impl_.score_){0}
535   };
536   _impl_.namespace__.InitDefault();
537   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
538     _impl_.namespace__.Set("", GetArenaForAllocation());
539   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
540   _impl_.uri_.InitDefault();
541   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
542     _impl_.uri_.Set("", GetArenaForAllocation());
543   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
544   _impl_.schema_.InitDefault();
545   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
546     _impl_.schema_.Set("", GetArenaForAllocation());
547   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
548 }
549 
~DocumentProto()550 DocumentProto::~DocumentProto() {
551   // @@protoc_insertion_point(destructor:icing.lib.DocumentProto)
552   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
553   (void)arena;
554     return;
555   }
556   SharedDtor();
557 }
558 
SharedDtor()559 inline void DocumentProto::SharedDtor() {
560   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
561   _impl_.properties_.~RepeatedPtrField();
562   _impl_.namespace__.Destroy();
563   _impl_.uri_.Destroy();
564   _impl_.schema_.Destroy();
565   if (this != internal_default_instance()) delete _impl_.internal_fields_;
566 }
567 
SetCachedSize(int size) const568 void DocumentProto::SetCachedSize(int size) const {
569   _impl_._cached_size_.Set(size);
570 }
571 
Clear()572 void DocumentProto::Clear() {
573 // @@protoc_insertion_point(message_clear_start:icing.lib.DocumentProto)
574   ::uint32_t cached_has_bits = 0;
575   // Prevent compiler warnings about cached_has_bits being unused
576   (void) cached_has_bits;
577 
578   _impl_.properties_.Clear();
579   cached_has_bits = _impl_._has_bits_[0];
580   if (cached_has_bits & 0x0000000fu) {
581     if (cached_has_bits & 0x00000001u) {
582       _impl_.namespace__.ClearNonDefaultToEmpty();
583     }
584     if (cached_has_bits & 0x00000002u) {
585       _impl_.uri_.ClearNonDefaultToEmpty();
586     }
587     if (cached_has_bits & 0x00000004u) {
588       _impl_.schema_.ClearNonDefaultToEmpty();
589     }
590     if (cached_has_bits & 0x00000008u) {
591       GOOGLE_DCHECK(_impl_.internal_fields_ != nullptr);
592       _impl_.internal_fields_->Clear();
593     }
594   }
595   if (cached_has_bits & 0x00000070u) {
596     ::memset(&_impl_.creation_timestamp_ms_, 0, static_cast<size_t>(
597         reinterpret_cast<char*>(&_impl_.score_) -
598         reinterpret_cast<char*>(&_impl_.creation_timestamp_ms_)) + sizeof(_impl_.score_));
599   }
600   _impl_._has_bits_.Clear();
601   _internal_metadata_.Clear<std::string>();
602 }
603 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)604 const char* DocumentProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
605 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
606   _Internal::HasBits has_bits{};
607   while (!ctx->Done(&ptr)) {
608     ::uint32_t tag;
609     ptr = ::_pbi::ReadTag(ptr, &tag);
610     switch (tag >> 3) {
611       // optional string namespace = 1;
612       case 1:
613         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
614           auto str = _internal_mutable_namespace_();
615           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
616           CHK_(ptr);
617         } else {
618           goto handle_unusual;
619         }
620         continue;
621       // optional string uri = 2;
622       case 2:
623         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
624           auto str = _internal_mutable_uri();
625           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
626           CHK_(ptr);
627         } else {
628           goto handle_unusual;
629         }
630         continue;
631       // optional string schema = 3;
632       case 3:
633         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
634           auto str = _internal_mutable_schema();
635           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
636           CHK_(ptr);
637         } else {
638           goto handle_unusual;
639         }
640         continue;
641       // optional int64 creation_timestamp_ms = 4;
642       case 4:
643         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
644           _Internal::set_has_creation_timestamp_ms(&has_bits);
645           _impl_.creation_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
646           CHK_(ptr);
647         } else {
648           goto handle_unusual;
649         }
650         continue;
651       // repeated .icing.lib.PropertyProto properties = 5;
652       case 5:
653         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
654           ptr -= 1;
655           do {
656             ptr += 1;
657             ptr = ctx->ParseMessage(_internal_add_properties(), ptr);
658             CHK_(ptr);
659             if (!ctx->DataAvailable(ptr)) break;
660           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
661         } else {
662           goto handle_unusual;
663         }
664         continue;
665       // optional int32 score = 7 [default = 0];
666       case 7:
667         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
668           _Internal::set_has_score(&has_bits);
669           _impl_.score_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
670           CHK_(ptr);
671         } else {
672           goto handle_unusual;
673         }
674         continue;
675       // optional int64 ttl_ms = 8 [default = 0];
676       case 8:
677         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
678           _Internal::set_has_ttl_ms(&has_bits);
679           _impl_.ttl_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
680           CHK_(ptr);
681         } else {
682           goto handle_unusual;
683         }
684         continue;
685       // optional .icing.lib.DocumentProto.InternalFields internal_fields = 9;
686       case 9:
687         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
688           ptr = ctx->ParseMessage(_internal_mutable_internal_fields(), ptr);
689           CHK_(ptr);
690         } else {
691           goto handle_unusual;
692         }
693         continue;
694       default:
695         goto handle_unusual;
696     }  // switch
697   handle_unusual:
698     if ((tag == 0) || ((tag & 7) == 4)) {
699       CHK_(ptr);
700       ctx->SetLastTag(tag);
701       goto message_done;
702     }
703     ptr = UnknownFieldParse(
704         tag,
705         _internal_metadata_.mutable_unknown_fields<std::string>(),
706         ptr, ctx);
707     CHK_(ptr != nullptr);
708   }  // while
709 message_done:
710   _impl_._has_bits_.Or(has_bits);
711   return ptr;
712 failure:
713   ptr = nullptr;
714   goto message_done;
715 #undef CHK_
716 }
717 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const718 ::uint8_t* DocumentProto::_InternalSerialize(
719     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
720   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DocumentProto)
721   ::uint32_t cached_has_bits = 0;
722   (void) cached_has_bits;
723 
724   cached_has_bits = _impl_._has_bits_[0];
725   // optional string namespace = 1;
726   if (cached_has_bits & 0x00000001u) {
727     target = stream->WriteStringMaybeAliased(
728         1, this->_internal_namespace_(), target);
729   }
730 
731   // optional string uri = 2;
732   if (cached_has_bits & 0x00000002u) {
733     target = stream->WriteStringMaybeAliased(
734         2, this->_internal_uri(), target);
735   }
736 
737   // optional string schema = 3;
738   if (cached_has_bits & 0x00000004u) {
739     target = stream->WriteStringMaybeAliased(
740         3, this->_internal_schema(), target);
741   }
742 
743   // optional int64 creation_timestamp_ms = 4;
744   if (cached_has_bits & 0x00000010u) {
745     target = stream->EnsureSpace(target);
746     target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_creation_timestamp_ms(), target);
747   }
748 
749   // repeated .icing.lib.PropertyProto properties = 5;
750   for (unsigned i = 0,
751       n = static_cast<unsigned>(this->_internal_properties_size()); i < n; i++) {
752     const auto& repfield = this->_internal_properties(i);
753     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
754         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
755   }
756 
757   // optional int32 score = 7 [default = 0];
758   if (cached_has_bits & 0x00000040u) {
759     target = stream->EnsureSpace(target);
760     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_score(), target);
761   }
762 
763   // optional int64 ttl_ms = 8 [default = 0];
764   if (cached_has_bits & 0x00000020u) {
765     target = stream->EnsureSpace(target);
766     target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_ttl_ms(), target);
767   }
768 
769   // optional .icing.lib.DocumentProto.InternalFields internal_fields = 9;
770   if (cached_has_bits & 0x00000008u) {
771     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
772       InternalWriteMessage(9, _Internal::internal_fields(this),
773         _Internal::internal_fields(this).GetCachedSize(), target, stream);
774   }
775 
776   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
777     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
778         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
779   }
780   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DocumentProto)
781   return target;
782 }
783 
ByteSizeLong() const784 size_t DocumentProto::ByteSizeLong() const {
785 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DocumentProto)
786   size_t total_size = 0;
787 
788   ::uint32_t cached_has_bits = 0;
789   // Prevent compiler warnings about cached_has_bits being unused
790   (void) cached_has_bits;
791 
792   // repeated .icing.lib.PropertyProto properties = 5;
793   total_size += 1UL * this->_internal_properties_size();
794   for (const auto& msg : this->_impl_.properties_) {
795     total_size +=
796       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
797   }
798 
799   cached_has_bits = _impl_._has_bits_[0];
800   if (cached_has_bits & 0x0000007fu) {
801     // optional string namespace = 1;
802     if (cached_has_bits & 0x00000001u) {
803       total_size += 1 +
804         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
805           this->_internal_namespace_());
806     }
807 
808     // optional string uri = 2;
809     if (cached_has_bits & 0x00000002u) {
810       total_size += 1 +
811         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
812           this->_internal_uri());
813     }
814 
815     // optional string schema = 3;
816     if (cached_has_bits & 0x00000004u) {
817       total_size += 1 +
818         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
819           this->_internal_schema());
820     }
821 
822     // optional .icing.lib.DocumentProto.InternalFields internal_fields = 9;
823     if (cached_has_bits & 0x00000008u) {
824       total_size += 1 +
825         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
826           *_impl_.internal_fields_);
827     }
828 
829     // optional int64 creation_timestamp_ms = 4;
830     if (cached_has_bits & 0x00000010u) {
831       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_creation_timestamp_ms());
832     }
833 
834     // optional int64 ttl_ms = 8 [default = 0];
835     if (cached_has_bits & 0x00000020u) {
836       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_ttl_ms());
837     }
838 
839     // optional int32 score = 7 [default = 0];
840     if (cached_has_bits & 0x00000040u) {
841       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_score());
842     }
843 
844   }
845   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
846     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
847   }
848   int cached_size = ::_pbi::ToCachedSize(total_size);
849   SetCachedSize(cached_size);
850   return total_size;
851 }
852 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)853 void DocumentProto::CheckTypeAndMergeFrom(
854     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
855   MergeFrom(*::_pbi::DownCast<const DocumentProto*>(
856       &from));
857 }
858 
MergeFrom(const DocumentProto & from)859 void DocumentProto::MergeFrom(const DocumentProto& from) {
860   DocumentProto* const _this = this;
861   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DocumentProto)
862   GOOGLE_DCHECK_NE(&from, _this);
863   ::uint32_t cached_has_bits = 0;
864   (void) cached_has_bits;
865 
866   _this->_impl_.properties_.MergeFrom(from._impl_.properties_);
867   cached_has_bits = from._impl_._has_bits_[0];
868   if (cached_has_bits & 0x0000007fu) {
869     if (cached_has_bits & 0x00000001u) {
870       _this->_internal_set_namespace_(from._internal_namespace_());
871     }
872     if (cached_has_bits & 0x00000002u) {
873       _this->_internal_set_uri(from._internal_uri());
874     }
875     if (cached_has_bits & 0x00000004u) {
876       _this->_internal_set_schema(from._internal_schema());
877     }
878     if (cached_has_bits & 0x00000008u) {
879       _this->_internal_mutable_internal_fields()->::icing::lib::DocumentProto_InternalFields::MergeFrom(
880           from._internal_internal_fields());
881     }
882     if (cached_has_bits & 0x00000010u) {
883       _this->_impl_.creation_timestamp_ms_ = from._impl_.creation_timestamp_ms_;
884     }
885     if (cached_has_bits & 0x00000020u) {
886       _this->_impl_.ttl_ms_ = from._impl_.ttl_ms_;
887     }
888     if (cached_has_bits & 0x00000040u) {
889       _this->_impl_.score_ = from._impl_.score_;
890     }
891     _this->_impl_._has_bits_[0] |= cached_has_bits;
892   }
893   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
894 }
895 
CopyFrom(const DocumentProto & from)896 void DocumentProto::CopyFrom(const DocumentProto& from) {
897 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DocumentProto)
898   if (&from == this) return;
899   Clear();
900   MergeFrom(from);
901 }
902 
IsInitialized() const903 bool DocumentProto::IsInitialized() const {
904   return true;
905 }
906 
InternalSwap(DocumentProto * other)907 void DocumentProto::InternalSwap(DocumentProto* other) {
908   using std::swap;
909   auto* lhs_arena = GetArenaForAllocation();
910   auto* rhs_arena = other->GetArenaForAllocation();
911   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
912   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
913   _impl_.properties_.InternalSwap(&other->_impl_.properties_);
914   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
915       &_impl_.namespace__, lhs_arena,
916       &other->_impl_.namespace__, rhs_arena
917   );
918   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
919       &_impl_.uri_, lhs_arena,
920       &other->_impl_.uri_, rhs_arena
921   );
922   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
923       &_impl_.schema_, lhs_arena,
924       &other->_impl_.schema_, rhs_arena
925   );
926   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
927       PROTOBUF_FIELD_OFFSET(DocumentProto, _impl_.score_)
928       + sizeof(DocumentProto::_impl_.score_)  // NOLINT
929       - PROTOBUF_FIELD_OFFSET(DocumentProto, _impl_.internal_fields_)>(
930           reinterpret_cast<char*>(&_impl_.internal_fields_),
931           reinterpret_cast<char*>(&other->_impl_.internal_fields_));
932 }
933 
GetTypeName() const934 std::string DocumentProto::GetTypeName() const {
935   return "icing.lib.DocumentProto";
936 }
937 
938 
939 // ===================================================================
940 
941 class PropertyProto_VectorProto::_Internal {
942  public:
943   using HasBits = decltype(std::declval<PropertyProto_VectorProto>()._impl_._has_bits_);
set_has_model_signature(HasBits * has_bits)944   static void set_has_model_signature(HasBits* has_bits) {
945     (*has_bits)[0] |= 1u;
946   }
947 };
948 
PropertyProto_VectorProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)949 PropertyProto_VectorProto::PropertyProto_VectorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
950                          bool is_message_owned)
951   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
952   SharedCtor(arena, is_message_owned);
953   // @@protoc_insertion_point(arena_constructor:icing.lib.PropertyProto.VectorProto)
954 }
PropertyProto_VectorProto(const PropertyProto_VectorProto & from)955 PropertyProto_VectorProto::PropertyProto_VectorProto(const PropertyProto_VectorProto& from)
956   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
957   PropertyProto_VectorProto* const _this = this; (void)_this;
958   new (&_impl_) Impl_{
959       decltype(_impl_._has_bits_){from._impl_._has_bits_}
960     , /*decltype(_impl_._cached_size_)*/{}
961     , decltype(_impl_.values_){from._impl_.values_}
962     , decltype(_impl_.model_signature_){}};
963 
964   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
965   _impl_.model_signature_.InitDefault();
966   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
967     _impl_.model_signature_.Set("", GetArenaForAllocation());
968   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
969   if (from._internal_has_model_signature()) {
970     _this->_impl_.model_signature_.Set(from._internal_model_signature(),
971       _this->GetArenaForAllocation());
972   }
973   // @@protoc_insertion_point(copy_constructor:icing.lib.PropertyProto.VectorProto)
974 }
975 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)976 inline void PropertyProto_VectorProto::SharedCtor(
977     ::_pb::Arena* arena, bool is_message_owned) {
978   (void)arena;
979   (void)is_message_owned;
980   new (&_impl_) Impl_{
981       decltype(_impl_._has_bits_){}
982     , /*decltype(_impl_._cached_size_)*/{}
983     , decltype(_impl_.values_){arena}
984     , decltype(_impl_.model_signature_){}
985   };
986   _impl_.model_signature_.InitDefault();
987   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
988     _impl_.model_signature_.Set("", GetArenaForAllocation());
989   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
990 }
991 
~PropertyProto_VectorProto()992 PropertyProto_VectorProto::~PropertyProto_VectorProto() {
993   // @@protoc_insertion_point(destructor:icing.lib.PropertyProto.VectorProto)
994   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
995   (void)arena;
996     return;
997   }
998   SharedDtor();
999 }
1000 
SharedDtor()1001 inline void PropertyProto_VectorProto::SharedDtor() {
1002   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1003   _impl_.values_.~RepeatedField();
1004   _impl_.model_signature_.Destroy();
1005 }
1006 
SetCachedSize(int size) const1007 void PropertyProto_VectorProto::SetCachedSize(int size) const {
1008   _impl_._cached_size_.Set(size);
1009 }
1010 
Clear()1011 void PropertyProto_VectorProto::Clear() {
1012 // @@protoc_insertion_point(message_clear_start:icing.lib.PropertyProto.VectorProto)
1013   ::uint32_t cached_has_bits = 0;
1014   // Prevent compiler warnings about cached_has_bits being unused
1015   (void) cached_has_bits;
1016 
1017   _impl_.values_.Clear();
1018   cached_has_bits = _impl_._has_bits_[0];
1019   if (cached_has_bits & 0x00000001u) {
1020     _impl_.model_signature_.ClearNonDefaultToEmpty();
1021   }
1022   _impl_._has_bits_.Clear();
1023   _internal_metadata_.Clear<std::string>();
1024 }
1025 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1026 const char* PropertyProto_VectorProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1027 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1028   _Internal::HasBits has_bits{};
1029   while (!ctx->Done(&ptr)) {
1030     ::uint32_t tag;
1031     ptr = ::_pbi::ReadTag(ptr, &tag);
1032     switch (tag >> 3) {
1033       // repeated float values = 1 [packed = true];
1034       case 1:
1035         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1036           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_values(), ptr, ctx);
1037           CHK_(ptr);
1038         } else if (static_cast<::uint8_t>(tag) == 13) {
1039           _internal_add_values(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
1040           ptr += sizeof(float);
1041         } else {
1042           goto handle_unusual;
1043         }
1044         continue;
1045       // optional string model_signature = 2;
1046       case 2:
1047         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1048           auto str = _internal_mutable_model_signature();
1049           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1050           CHK_(ptr);
1051         } else {
1052           goto handle_unusual;
1053         }
1054         continue;
1055       default:
1056         goto handle_unusual;
1057     }  // switch
1058   handle_unusual:
1059     if ((tag == 0) || ((tag & 7) == 4)) {
1060       CHK_(ptr);
1061       ctx->SetLastTag(tag);
1062       goto message_done;
1063     }
1064     ptr = UnknownFieldParse(
1065         tag,
1066         _internal_metadata_.mutable_unknown_fields<std::string>(),
1067         ptr, ctx);
1068     CHK_(ptr != nullptr);
1069   }  // while
1070 message_done:
1071   _impl_._has_bits_.Or(has_bits);
1072   return ptr;
1073 failure:
1074   ptr = nullptr;
1075   goto message_done;
1076 #undef CHK_
1077 }
1078 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1079 ::uint8_t* PropertyProto_VectorProto::_InternalSerialize(
1080     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1081   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PropertyProto.VectorProto)
1082   ::uint32_t cached_has_bits = 0;
1083   (void) cached_has_bits;
1084 
1085   // repeated float values = 1 [packed = true];
1086   if (this->_internal_values_size() > 0) {
1087     target = stream->WriteFixedPacked(1, _internal_values(), target);
1088   }
1089 
1090   cached_has_bits = _impl_._has_bits_[0];
1091   // optional string model_signature = 2;
1092   if (cached_has_bits & 0x00000001u) {
1093     target = stream->WriteStringMaybeAliased(
1094         2, this->_internal_model_signature(), target);
1095   }
1096 
1097   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1098     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1099         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1100   }
1101   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.PropertyProto.VectorProto)
1102   return target;
1103 }
1104 
ByteSizeLong() const1105 size_t PropertyProto_VectorProto::ByteSizeLong() const {
1106 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PropertyProto.VectorProto)
1107   size_t total_size = 0;
1108 
1109   ::uint32_t cached_has_bits = 0;
1110   // Prevent compiler warnings about cached_has_bits being unused
1111   (void) cached_has_bits;
1112 
1113   // repeated float values = 1 [packed = true];
1114   {
1115     unsigned int count = static_cast<unsigned int>(this->_internal_values_size());
1116     size_t data_size = 4UL * count;
1117     if (data_size > 0) {
1118       total_size += 1 +
1119         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
1120     }
1121     total_size += data_size;
1122   }
1123 
1124   // optional string model_signature = 2;
1125   cached_has_bits = _impl_._has_bits_[0];
1126   if (cached_has_bits & 0x00000001u) {
1127     total_size += 1 +
1128       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1129         this->_internal_model_signature());
1130   }
1131 
1132   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1133     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1134   }
1135   int cached_size = ::_pbi::ToCachedSize(total_size);
1136   SetCachedSize(cached_size);
1137   return total_size;
1138 }
1139 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1140 void PropertyProto_VectorProto::CheckTypeAndMergeFrom(
1141     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1142   MergeFrom(*::_pbi::DownCast<const PropertyProto_VectorProto*>(
1143       &from));
1144 }
1145 
MergeFrom(const PropertyProto_VectorProto & from)1146 void PropertyProto_VectorProto::MergeFrom(const PropertyProto_VectorProto& from) {
1147   PropertyProto_VectorProto* const _this = this;
1148   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PropertyProto.VectorProto)
1149   GOOGLE_DCHECK_NE(&from, _this);
1150   ::uint32_t cached_has_bits = 0;
1151   (void) cached_has_bits;
1152 
1153   _this->_impl_.values_.MergeFrom(from._impl_.values_);
1154   if (from._internal_has_model_signature()) {
1155     _this->_internal_set_model_signature(from._internal_model_signature());
1156   }
1157   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1158 }
1159 
CopyFrom(const PropertyProto_VectorProto & from)1160 void PropertyProto_VectorProto::CopyFrom(const PropertyProto_VectorProto& from) {
1161 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PropertyProto.VectorProto)
1162   if (&from == this) return;
1163   Clear();
1164   MergeFrom(from);
1165 }
1166 
IsInitialized() const1167 bool PropertyProto_VectorProto::IsInitialized() const {
1168   return true;
1169 }
1170 
InternalSwap(PropertyProto_VectorProto * other)1171 void PropertyProto_VectorProto::InternalSwap(PropertyProto_VectorProto* other) {
1172   using std::swap;
1173   auto* lhs_arena = GetArenaForAllocation();
1174   auto* rhs_arena = other->GetArenaForAllocation();
1175   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1176   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1177   _impl_.values_.InternalSwap(&other->_impl_.values_);
1178   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1179       &_impl_.model_signature_, lhs_arena,
1180       &other->_impl_.model_signature_, rhs_arena
1181   );
1182 }
1183 
GetTypeName() const1184 std::string PropertyProto_VectorProto::GetTypeName() const {
1185   return "icing.lib.PropertyProto.VectorProto";
1186 }
1187 
1188 
1189 // ===================================================================
1190 
1191 class PropertyProto_BlobHandleProto::_Internal {
1192  public:
1193   using HasBits = decltype(std::declval<PropertyProto_BlobHandleProto>()._impl_._has_bits_);
set_has_digest(HasBits * has_bits)1194   static void set_has_digest(HasBits* has_bits) {
1195     (*has_bits)[0] |= 1u;
1196   }
set_has_namespace_(HasBits * has_bits)1197   static void set_has_namespace_(HasBits* has_bits) {
1198     (*has_bits)[0] |= 2u;
1199   }
1200 };
1201 
PropertyProto_BlobHandleProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1202 PropertyProto_BlobHandleProto::PropertyProto_BlobHandleProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1203                          bool is_message_owned)
1204   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1205   SharedCtor(arena, is_message_owned);
1206   // @@protoc_insertion_point(arena_constructor:icing.lib.PropertyProto.BlobHandleProto)
1207 }
PropertyProto_BlobHandleProto(const PropertyProto_BlobHandleProto & from)1208 PropertyProto_BlobHandleProto::PropertyProto_BlobHandleProto(const PropertyProto_BlobHandleProto& from)
1209   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1210   PropertyProto_BlobHandleProto* const _this = this; (void)_this;
1211   new (&_impl_) Impl_{
1212       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1213     , /*decltype(_impl_._cached_size_)*/{}
1214     , decltype(_impl_.digest_){}
1215     , decltype(_impl_.namespace__){}};
1216 
1217   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1218   _impl_.digest_.InitDefault();
1219   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1220     _impl_.digest_.Set("", GetArenaForAllocation());
1221   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1222   if (from._internal_has_digest()) {
1223     _this->_impl_.digest_.Set(from._internal_digest(),
1224       _this->GetArenaForAllocation());
1225   }
1226   _impl_.namespace__.InitDefault();
1227   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1228     _impl_.namespace__.Set("", GetArenaForAllocation());
1229   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1230   if (from._internal_has_namespace_()) {
1231     _this->_impl_.namespace__.Set(from._internal_namespace_(),
1232       _this->GetArenaForAllocation());
1233   }
1234   // @@protoc_insertion_point(copy_constructor:icing.lib.PropertyProto.BlobHandleProto)
1235 }
1236 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1237 inline void PropertyProto_BlobHandleProto::SharedCtor(
1238     ::_pb::Arena* arena, bool is_message_owned) {
1239   (void)arena;
1240   (void)is_message_owned;
1241   new (&_impl_) Impl_{
1242       decltype(_impl_._has_bits_){}
1243     , /*decltype(_impl_._cached_size_)*/{}
1244     , decltype(_impl_.digest_){}
1245     , decltype(_impl_.namespace__){}
1246   };
1247   _impl_.digest_.InitDefault();
1248   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1249     _impl_.digest_.Set("", GetArenaForAllocation());
1250   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1251   _impl_.namespace__.InitDefault();
1252   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1253     _impl_.namespace__.Set("", GetArenaForAllocation());
1254   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1255 }
1256 
~PropertyProto_BlobHandleProto()1257 PropertyProto_BlobHandleProto::~PropertyProto_BlobHandleProto() {
1258   // @@protoc_insertion_point(destructor:icing.lib.PropertyProto.BlobHandleProto)
1259   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1260   (void)arena;
1261     return;
1262   }
1263   SharedDtor();
1264 }
1265 
SharedDtor()1266 inline void PropertyProto_BlobHandleProto::SharedDtor() {
1267   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1268   _impl_.digest_.Destroy();
1269   _impl_.namespace__.Destroy();
1270 }
1271 
SetCachedSize(int size) const1272 void PropertyProto_BlobHandleProto::SetCachedSize(int size) const {
1273   _impl_._cached_size_.Set(size);
1274 }
1275 
Clear()1276 void PropertyProto_BlobHandleProto::Clear() {
1277 // @@protoc_insertion_point(message_clear_start:icing.lib.PropertyProto.BlobHandleProto)
1278   ::uint32_t cached_has_bits = 0;
1279   // Prevent compiler warnings about cached_has_bits being unused
1280   (void) cached_has_bits;
1281 
1282   cached_has_bits = _impl_._has_bits_[0];
1283   if (cached_has_bits & 0x00000003u) {
1284     if (cached_has_bits & 0x00000001u) {
1285       _impl_.digest_.ClearNonDefaultToEmpty();
1286     }
1287     if (cached_has_bits & 0x00000002u) {
1288       _impl_.namespace__.ClearNonDefaultToEmpty();
1289     }
1290   }
1291   _impl_._has_bits_.Clear();
1292   _internal_metadata_.Clear<std::string>();
1293 }
1294 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1295 const char* PropertyProto_BlobHandleProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1296 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1297   _Internal::HasBits has_bits{};
1298   while (!ctx->Done(&ptr)) {
1299     ::uint32_t tag;
1300     ptr = ::_pbi::ReadTag(ptr, &tag);
1301     switch (tag >> 3) {
1302       // optional bytes digest = 1;
1303       case 1:
1304         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1305           auto str = _internal_mutable_digest();
1306           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1307           CHK_(ptr);
1308         } else {
1309           goto handle_unusual;
1310         }
1311         continue;
1312       // optional string namespace = 3;
1313       case 3:
1314         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1315           auto str = _internal_mutable_namespace_();
1316           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1317           CHK_(ptr);
1318         } else {
1319           goto handle_unusual;
1320         }
1321         continue;
1322       default:
1323         goto handle_unusual;
1324     }  // switch
1325   handle_unusual:
1326     if ((tag == 0) || ((tag & 7) == 4)) {
1327       CHK_(ptr);
1328       ctx->SetLastTag(tag);
1329       goto message_done;
1330     }
1331     ptr = UnknownFieldParse(
1332         tag,
1333         _internal_metadata_.mutable_unknown_fields<std::string>(),
1334         ptr, ctx);
1335     CHK_(ptr != nullptr);
1336   }  // while
1337 message_done:
1338   _impl_._has_bits_.Or(has_bits);
1339   return ptr;
1340 failure:
1341   ptr = nullptr;
1342   goto message_done;
1343 #undef CHK_
1344 }
1345 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1346 ::uint8_t* PropertyProto_BlobHandleProto::_InternalSerialize(
1347     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1348   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PropertyProto.BlobHandleProto)
1349   ::uint32_t cached_has_bits = 0;
1350   (void) cached_has_bits;
1351 
1352   cached_has_bits = _impl_._has_bits_[0];
1353   // optional bytes digest = 1;
1354   if (cached_has_bits & 0x00000001u) {
1355     target = stream->WriteBytesMaybeAliased(
1356         1, this->_internal_digest(), target);
1357   }
1358 
1359   // optional string namespace = 3;
1360   if (cached_has_bits & 0x00000002u) {
1361     target = stream->WriteStringMaybeAliased(
1362         3, this->_internal_namespace_(), target);
1363   }
1364 
1365   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1366     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1367         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1368   }
1369   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.PropertyProto.BlobHandleProto)
1370   return target;
1371 }
1372 
ByteSizeLong() const1373 size_t PropertyProto_BlobHandleProto::ByteSizeLong() const {
1374 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PropertyProto.BlobHandleProto)
1375   size_t total_size = 0;
1376 
1377   ::uint32_t cached_has_bits = 0;
1378   // Prevent compiler warnings about cached_has_bits being unused
1379   (void) cached_has_bits;
1380 
1381   cached_has_bits = _impl_._has_bits_[0];
1382   if (cached_has_bits & 0x00000003u) {
1383     // optional bytes digest = 1;
1384     if (cached_has_bits & 0x00000001u) {
1385       total_size += 1 +
1386         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
1387           this->_internal_digest());
1388     }
1389 
1390     // optional string namespace = 3;
1391     if (cached_has_bits & 0x00000002u) {
1392       total_size += 1 +
1393         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1394           this->_internal_namespace_());
1395     }
1396 
1397   }
1398   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1399     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1400   }
1401   int cached_size = ::_pbi::ToCachedSize(total_size);
1402   SetCachedSize(cached_size);
1403   return total_size;
1404 }
1405 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1406 void PropertyProto_BlobHandleProto::CheckTypeAndMergeFrom(
1407     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1408   MergeFrom(*::_pbi::DownCast<const PropertyProto_BlobHandleProto*>(
1409       &from));
1410 }
1411 
MergeFrom(const PropertyProto_BlobHandleProto & from)1412 void PropertyProto_BlobHandleProto::MergeFrom(const PropertyProto_BlobHandleProto& from) {
1413   PropertyProto_BlobHandleProto* const _this = this;
1414   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PropertyProto.BlobHandleProto)
1415   GOOGLE_DCHECK_NE(&from, _this);
1416   ::uint32_t cached_has_bits = 0;
1417   (void) cached_has_bits;
1418 
1419   cached_has_bits = from._impl_._has_bits_[0];
1420   if (cached_has_bits & 0x00000003u) {
1421     if (cached_has_bits & 0x00000001u) {
1422       _this->_internal_set_digest(from._internal_digest());
1423     }
1424     if (cached_has_bits & 0x00000002u) {
1425       _this->_internal_set_namespace_(from._internal_namespace_());
1426     }
1427   }
1428   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1429 }
1430 
CopyFrom(const PropertyProto_BlobHandleProto & from)1431 void PropertyProto_BlobHandleProto::CopyFrom(const PropertyProto_BlobHandleProto& from) {
1432 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PropertyProto.BlobHandleProto)
1433   if (&from == this) return;
1434   Clear();
1435   MergeFrom(from);
1436 }
1437 
IsInitialized() const1438 bool PropertyProto_BlobHandleProto::IsInitialized() const {
1439   return true;
1440 }
1441 
InternalSwap(PropertyProto_BlobHandleProto * other)1442 void PropertyProto_BlobHandleProto::InternalSwap(PropertyProto_BlobHandleProto* other) {
1443   using std::swap;
1444   auto* lhs_arena = GetArenaForAllocation();
1445   auto* rhs_arena = other->GetArenaForAllocation();
1446   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1447   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1448   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1449       &_impl_.digest_, lhs_arena,
1450       &other->_impl_.digest_, rhs_arena
1451   );
1452   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1453       &_impl_.namespace__, lhs_arena,
1454       &other->_impl_.namespace__, rhs_arena
1455   );
1456 }
1457 
GetTypeName() const1458 std::string PropertyProto_BlobHandleProto::GetTypeName() const {
1459   return "icing.lib.PropertyProto.BlobHandleProto";
1460 }
1461 
1462 
1463 // ===================================================================
1464 
1465 class PropertyProto::_Internal {
1466  public:
1467   using HasBits = decltype(std::declval<PropertyProto>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)1468   static void set_has_name(HasBits* has_bits) {
1469     (*has_bits)[0] |= 1u;
1470   }
1471 };
1472 
PropertyProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1473 PropertyProto::PropertyProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1474                          bool is_message_owned)
1475   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1476   SharedCtor(arena, is_message_owned);
1477   // @@protoc_insertion_point(arena_constructor:icing.lib.PropertyProto)
1478 }
PropertyProto(const PropertyProto & from)1479 PropertyProto::PropertyProto(const PropertyProto& from)
1480   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1481   PropertyProto* const _this = this; (void)_this;
1482   new (&_impl_) Impl_{
1483       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1484     , /*decltype(_impl_._cached_size_)*/{}
1485     , decltype(_impl_.string_values_){from._impl_.string_values_}
1486     , decltype(_impl_.int64_values_){from._impl_.int64_values_}
1487     , decltype(_impl_.double_values_){from._impl_.double_values_}
1488     , decltype(_impl_.boolean_values_){from._impl_.boolean_values_}
1489     , decltype(_impl_.bytes_values_){from._impl_.bytes_values_}
1490     , decltype(_impl_.document_values_){from._impl_.document_values_}
1491     , decltype(_impl_.vector_values_){from._impl_.vector_values_}
1492     , decltype(_impl_.blob_handle_values_){from._impl_.blob_handle_values_}
1493     , decltype(_impl_.name_){}};
1494 
1495   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1496   _impl_.name_.InitDefault();
1497   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1498     _impl_.name_.Set("", GetArenaForAllocation());
1499   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1500   if (from._internal_has_name()) {
1501     _this->_impl_.name_.Set(from._internal_name(),
1502       _this->GetArenaForAllocation());
1503   }
1504   // @@protoc_insertion_point(copy_constructor:icing.lib.PropertyProto)
1505 }
1506 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1507 inline void PropertyProto::SharedCtor(
1508     ::_pb::Arena* arena, bool is_message_owned) {
1509   (void)arena;
1510   (void)is_message_owned;
1511   new (&_impl_) Impl_{
1512       decltype(_impl_._has_bits_){}
1513     , /*decltype(_impl_._cached_size_)*/{}
1514     , decltype(_impl_.string_values_){arena}
1515     , decltype(_impl_.int64_values_){arena}
1516     , decltype(_impl_.double_values_){arena}
1517     , decltype(_impl_.boolean_values_){arena}
1518     , decltype(_impl_.bytes_values_){arena}
1519     , decltype(_impl_.document_values_){arena}
1520     , decltype(_impl_.vector_values_){arena}
1521     , decltype(_impl_.blob_handle_values_){arena}
1522     , decltype(_impl_.name_){}
1523   };
1524   _impl_.name_.InitDefault();
1525   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1526     _impl_.name_.Set("", GetArenaForAllocation());
1527   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1528 }
1529 
~PropertyProto()1530 PropertyProto::~PropertyProto() {
1531   // @@protoc_insertion_point(destructor:icing.lib.PropertyProto)
1532   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1533   (void)arena;
1534     return;
1535   }
1536   SharedDtor();
1537 }
1538 
SharedDtor()1539 inline void PropertyProto::SharedDtor() {
1540   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1541   _impl_.string_values_.~RepeatedPtrField();
1542   _impl_.int64_values_.~RepeatedField();
1543   _impl_.double_values_.~RepeatedField();
1544   _impl_.boolean_values_.~RepeatedField();
1545   _impl_.bytes_values_.~RepeatedPtrField();
1546   _impl_.document_values_.~RepeatedPtrField();
1547   _impl_.vector_values_.~RepeatedPtrField();
1548   _impl_.blob_handle_values_.~RepeatedPtrField();
1549   _impl_.name_.Destroy();
1550 }
1551 
SetCachedSize(int size) const1552 void PropertyProto::SetCachedSize(int size) const {
1553   _impl_._cached_size_.Set(size);
1554 }
1555 
Clear()1556 void PropertyProto::Clear() {
1557 // @@protoc_insertion_point(message_clear_start:icing.lib.PropertyProto)
1558   ::uint32_t cached_has_bits = 0;
1559   // Prevent compiler warnings about cached_has_bits being unused
1560   (void) cached_has_bits;
1561 
1562   _impl_.string_values_.Clear();
1563   _impl_.int64_values_.Clear();
1564   _impl_.double_values_.Clear();
1565   _impl_.boolean_values_.Clear();
1566   _impl_.bytes_values_.Clear();
1567   _impl_.document_values_.Clear();
1568   _impl_.vector_values_.Clear();
1569   _impl_.blob_handle_values_.Clear();
1570   cached_has_bits = _impl_._has_bits_[0];
1571   if (cached_has_bits & 0x00000001u) {
1572     _impl_.name_.ClearNonDefaultToEmpty();
1573   }
1574   _impl_._has_bits_.Clear();
1575   _internal_metadata_.Clear<std::string>();
1576 }
1577 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1578 const char* PropertyProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1579 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1580   _Internal::HasBits has_bits{};
1581   while (!ctx->Done(&ptr)) {
1582     ::uint32_t tag;
1583     ptr = ::_pbi::ReadTag(ptr, &tag);
1584     switch (tag >> 3) {
1585       // optional string name = 1;
1586       case 1:
1587         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1588           auto str = _internal_mutable_name();
1589           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1590           CHK_(ptr);
1591         } else {
1592           goto handle_unusual;
1593         }
1594         continue;
1595       // repeated string string_values = 2;
1596       case 2:
1597         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1598           ptr -= 1;
1599           do {
1600             ptr += 1;
1601             auto str = _internal_add_string_values();
1602             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1603             CHK_(ptr);
1604             if (!ctx->DataAvailable(ptr)) break;
1605           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1606         } else {
1607           goto handle_unusual;
1608         }
1609         continue;
1610       // repeated int64 int64_values = 3;
1611       case 3:
1612         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1613           ptr -= 1;
1614           do {
1615             ptr += 1;
1616             _internal_add_int64_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1617             CHK_(ptr);
1618             if (!ctx->DataAvailable(ptr)) break;
1619           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
1620         } else if (static_cast<::uint8_t>(tag) == 26) {
1621           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_int64_values(), ptr, ctx);
1622           CHK_(ptr);
1623         } else {
1624           goto handle_unusual;
1625         }
1626         continue;
1627       // repeated double double_values = 4;
1628       case 4:
1629         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 33)) {
1630           ptr -= 1;
1631           do {
1632             ptr += 1;
1633             _internal_add_double_values(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
1634             ptr += sizeof(double);
1635             if (!ctx->DataAvailable(ptr)) break;
1636           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<33>(ptr));
1637         } else if (static_cast<::uint8_t>(tag) == 34) {
1638           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_values(), ptr, ctx);
1639           CHK_(ptr);
1640         } else {
1641           goto handle_unusual;
1642         }
1643         continue;
1644       // repeated bool boolean_values = 5;
1645       case 5:
1646         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1647           ptr -= 1;
1648           do {
1649             ptr += 1;
1650             _internal_add_boolean_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1651             CHK_(ptr);
1652             if (!ctx->DataAvailable(ptr)) break;
1653           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
1654         } else if (static_cast<::uint8_t>(tag) == 42) {
1655           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_boolean_values(), ptr, ctx);
1656           CHK_(ptr);
1657         } else {
1658           goto handle_unusual;
1659         }
1660         continue;
1661       // repeated bytes bytes_values = 6;
1662       case 6:
1663         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1664           ptr -= 1;
1665           do {
1666             ptr += 1;
1667             auto str = _internal_add_bytes_values();
1668             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1669             CHK_(ptr);
1670             if (!ctx->DataAvailable(ptr)) break;
1671           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
1672         } else {
1673           goto handle_unusual;
1674         }
1675         continue;
1676       // repeated .icing.lib.DocumentProto document_values = 7;
1677       case 7:
1678         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
1679           ptr -= 1;
1680           do {
1681             ptr += 1;
1682             ptr = ctx->ParseMessage(_internal_add_document_values(), ptr);
1683             CHK_(ptr);
1684             if (!ctx->DataAvailable(ptr)) break;
1685           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
1686         } else {
1687           goto handle_unusual;
1688         }
1689         continue;
1690       // repeated .icing.lib.PropertyProto.VectorProto vector_values = 8;
1691       case 8:
1692         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
1693           ptr -= 1;
1694           do {
1695             ptr += 1;
1696             ptr = ctx->ParseMessage(_internal_add_vector_values(), ptr);
1697             CHK_(ptr);
1698             if (!ctx->DataAvailable(ptr)) break;
1699           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
1700         } else {
1701           goto handle_unusual;
1702         }
1703         continue;
1704       // repeated .icing.lib.PropertyProto.BlobHandleProto blob_handle_values = 9;
1705       case 9:
1706         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
1707           ptr -= 1;
1708           do {
1709             ptr += 1;
1710             ptr = ctx->ParseMessage(_internal_add_blob_handle_values(), ptr);
1711             CHK_(ptr);
1712             if (!ctx->DataAvailable(ptr)) break;
1713           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
1714         } else {
1715           goto handle_unusual;
1716         }
1717         continue;
1718       default:
1719         goto handle_unusual;
1720     }  // switch
1721   handle_unusual:
1722     if ((tag == 0) || ((tag & 7) == 4)) {
1723       CHK_(ptr);
1724       ctx->SetLastTag(tag);
1725       goto message_done;
1726     }
1727     ptr = UnknownFieldParse(
1728         tag,
1729         _internal_metadata_.mutable_unknown_fields<std::string>(),
1730         ptr, ctx);
1731     CHK_(ptr != nullptr);
1732   }  // while
1733 message_done:
1734   _impl_._has_bits_.Or(has_bits);
1735   return ptr;
1736 failure:
1737   ptr = nullptr;
1738   goto message_done;
1739 #undef CHK_
1740 }
1741 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1742 ::uint8_t* PropertyProto::_InternalSerialize(
1743     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1744   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PropertyProto)
1745   ::uint32_t cached_has_bits = 0;
1746   (void) cached_has_bits;
1747 
1748   cached_has_bits = _impl_._has_bits_[0];
1749   // optional string name = 1;
1750   if (cached_has_bits & 0x00000001u) {
1751     target = stream->WriteStringMaybeAliased(
1752         1, this->_internal_name(), target);
1753   }
1754 
1755   // repeated string string_values = 2;
1756   for (int i = 0, n = this->_internal_string_values_size(); i < n; i++) {
1757     const auto& s = this->_internal_string_values(i);
1758     target = stream->WriteString(2, s, target);
1759   }
1760 
1761   // repeated int64 int64_values = 3;
1762   for (int i = 0, n = this->_internal_int64_values_size(); i < n; i++) {
1763     target = stream->EnsureSpace(target);
1764     target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_int64_values(i), target);
1765   }
1766 
1767   // repeated double double_values = 4;
1768   for (int i = 0, n = this->_internal_double_values_size(); i < n; i++) {
1769     target = stream->EnsureSpace(target);
1770     target = ::_pbi::WireFormatLite::WriteDoubleToArray(4, this->_internal_double_values(i), target);
1771   }
1772 
1773   // repeated bool boolean_values = 5;
1774   for (int i = 0, n = this->_internal_boolean_values_size(); i < n; i++) {
1775     target = stream->EnsureSpace(target);
1776     target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_boolean_values(i), target);
1777   }
1778 
1779   // repeated bytes bytes_values = 6;
1780   for (int i = 0, n = this->_internal_bytes_values_size(); i < n; i++) {
1781     const auto& s = this->_internal_bytes_values(i);
1782     target = stream->WriteBytes(6, s, target);
1783   }
1784 
1785   // repeated .icing.lib.DocumentProto document_values = 7;
1786   for (unsigned i = 0,
1787       n = static_cast<unsigned>(this->_internal_document_values_size()); i < n; i++) {
1788     const auto& repfield = this->_internal_document_values(i);
1789     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1790         InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
1791   }
1792 
1793   // repeated .icing.lib.PropertyProto.VectorProto vector_values = 8;
1794   for (unsigned i = 0,
1795       n = static_cast<unsigned>(this->_internal_vector_values_size()); i < n; i++) {
1796     const auto& repfield = this->_internal_vector_values(i);
1797     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1798         InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
1799   }
1800 
1801   // repeated .icing.lib.PropertyProto.BlobHandleProto blob_handle_values = 9;
1802   for (unsigned i = 0,
1803       n = static_cast<unsigned>(this->_internal_blob_handle_values_size()); i < n; i++) {
1804     const auto& repfield = this->_internal_blob_handle_values(i);
1805     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1806         InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream);
1807   }
1808 
1809   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1810     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1811         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1812   }
1813   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.PropertyProto)
1814   return target;
1815 }
1816 
ByteSizeLong() const1817 size_t PropertyProto::ByteSizeLong() const {
1818 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PropertyProto)
1819   size_t total_size = 0;
1820 
1821   ::uint32_t cached_has_bits = 0;
1822   // Prevent compiler warnings about cached_has_bits being unused
1823   (void) cached_has_bits;
1824 
1825   // repeated string string_values = 2;
1826   total_size += 1 *
1827       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.string_values_.size());
1828   for (int i = 0, n = _impl_.string_values_.size(); i < n; i++) {
1829     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1830       _impl_.string_values_.Get(i));
1831   }
1832 
1833   // repeated int64 int64_values = 3;
1834   {
1835     size_t data_size = ::_pbi::WireFormatLite::
1836       Int64Size(this->_impl_.int64_values_);
1837     total_size += 1 *
1838                   ::_pbi::FromIntSize(this->_internal_int64_values_size());
1839     total_size += data_size;
1840   }
1841 
1842   // repeated double double_values = 4;
1843   {
1844     unsigned int count = static_cast<unsigned int>(this->_internal_double_values_size());
1845     size_t data_size = 8UL * count;
1846     total_size += 1 *
1847                   ::_pbi::FromIntSize(this->_internal_double_values_size());
1848     total_size += data_size;
1849   }
1850 
1851   // repeated bool boolean_values = 5;
1852   {
1853     unsigned int count = static_cast<unsigned int>(this->_internal_boolean_values_size());
1854     size_t data_size = 1UL * count;
1855     total_size += 1 *
1856                   ::_pbi::FromIntSize(this->_internal_boolean_values_size());
1857     total_size += data_size;
1858   }
1859 
1860   // repeated bytes bytes_values = 6;
1861   total_size += 1 *
1862       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.bytes_values_.size());
1863   for (int i = 0, n = _impl_.bytes_values_.size(); i < n; i++) {
1864     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
1865       _impl_.bytes_values_.Get(i));
1866   }
1867 
1868   // repeated .icing.lib.DocumentProto document_values = 7;
1869   total_size += 1UL * this->_internal_document_values_size();
1870   for (const auto& msg : this->_impl_.document_values_) {
1871     total_size +=
1872       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1873   }
1874 
1875   // repeated .icing.lib.PropertyProto.VectorProto vector_values = 8;
1876   total_size += 1UL * this->_internal_vector_values_size();
1877   for (const auto& msg : this->_impl_.vector_values_) {
1878     total_size +=
1879       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1880   }
1881 
1882   // repeated .icing.lib.PropertyProto.BlobHandleProto blob_handle_values = 9;
1883   total_size += 1UL * this->_internal_blob_handle_values_size();
1884   for (const auto& msg : this->_impl_.blob_handle_values_) {
1885     total_size +=
1886       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1887   }
1888 
1889   // optional string name = 1;
1890   cached_has_bits = _impl_._has_bits_[0];
1891   if (cached_has_bits & 0x00000001u) {
1892     total_size += 1 +
1893       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1894         this->_internal_name());
1895   }
1896 
1897   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1898     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1899   }
1900   int cached_size = ::_pbi::ToCachedSize(total_size);
1901   SetCachedSize(cached_size);
1902   return total_size;
1903 }
1904 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1905 void PropertyProto::CheckTypeAndMergeFrom(
1906     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1907   MergeFrom(*::_pbi::DownCast<const PropertyProto*>(
1908       &from));
1909 }
1910 
MergeFrom(const PropertyProto & from)1911 void PropertyProto::MergeFrom(const PropertyProto& from) {
1912   PropertyProto* const _this = this;
1913   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PropertyProto)
1914   GOOGLE_DCHECK_NE(&from, _this);
1915   ::uint32_t cached_has_bits = 0;
1916   (void) cached_has_bits;
1917 
1918   _this->_impl_.string_values_.MergeFrom(from._impl_.string_values_);
1919   _this->_impl_.int64_values_.MergeFrom(from._impl_.int64_values_);
1920   _this->_impl_.double_values_.MergeFrom(from._impl_.double_values_);
1921   _this->_impl_.boolean_values_.MergeFrom(from._impl_.boolean_values_);
1922   _this->_impl_.bytes_values_.MergeFrom(from._impl_.bytes_values_);
1923   _this->_impl_.document_values_.MergeFrom(from._impl_.document_values_);
1924   _this->_impl_.vector_values_.MergeFrom(from._impl_.vector_values_);
1925   _this->_impl_.blob_handle_values_.MergeFrom(from._impl_.blob_handle_values_);
1926   if (from._internal_has_name()) {
1927     _this->_internal_set_name(from._internal_name());
1928   }
1929   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1930 }
1931 
CopyFrom(const PropertyProto & from)1932 void PropertyProto::CopyFrom(const PropertyProto& from) {
1933 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PropertyProto)
1934   if (&from == this) return;
1935   Clear();
1936   MergeFrom(from);
1937 }
1938 
IsInitialized() const1939 bool PropertyProto::IsInitialized() const {
1940   return true;
1941 }
1942 
InternalSwap(PropertyProto * other)1943 void PropertyProto::InternalSwap(PropertyProto* other) {
1944   using std::swap;
1945   auto* lhs_arena = GetArenaForAllocation();
1946   auto* rhs_arena = other->GetArenaForAllocation();
1947   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1948   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1949   _impl_.string_values_.InternalSwap(&other->_impl_.string_values_);
1950   _impl_.int64_values_.InternalSwap(&other->_impl_.int64_values_);
1951   _impl_.double_values_.InternalSwap(&other->_impl_.double_values_);
1952   _impl_.boolean_values_.InternalSwap(&other->_impl_.boolean_values_);
1953   _impl_.bytes_values_.InternalSwap(&other->_impl_.bytes_values_);
1954   _impl_.document_values_.InternalSwap(&other->_impl_.document_values_);
1955   _impl_.vector_values_.InternalSwap(&other->_impl_.vector_values_);
1956   _impl_.blob_handle_values_.InternalSwap(&other->_impl_.blob_handle_values_);
1957   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1958       &_impl_.name_, lhs_arena,
1959       &other->_impl_.name_, rhs_arena
1960   );
1961 }
1962 
GetTypeName() const1963 std::string PropertyProto::GetTypeName() const {
1964   return "icing.lib.PropertyProto";
1965 }
1966 
1967 
1968 // ===================================================================
1969 
1970 class PutResultProto::_Internal {
1971  public:
1972   using HasBits = decltype(std::declval<PutResultProto>()._impl_._has_bits_);
1973   static const ::icing::lib::StatusProto& status(const PutResultProto* msg);
set_has_status(HasBits * has_bits)1974   static void set_has_status(HasBits* has_bits) {
1975     (*has_bits)[0] |= 1u;
1976   }
1977   static const ::icing::lib::PutDocumentStatsProto& put_document_stats(const PutResultProto* msg);
set_has_put_document_stats(HasBits * has_bits)1978   static void set_has_put_document_stats(HasBits* has_bits) {
1979     (*has_bits)[0] |= 2u;
1980   }
set_has_was_replacement(HasBits * has_bits)1981   static void set_has_was_replacement(HasBits* has_bits) {
1982     (*has_bits)[0] |= 4u;
1983   }
1984 };
1985 
1986 const ::icing::lib::StatusProto&
status(const PutResultProto * msg)1987 PutResultProto::_Internal::status(const PutResultProto* msg) {
1988   return *msg->_impl_.status_;
1989 }
1990 const ::icing::lib::PutDocumentStatsProto&
put_document_stats(const PutResultProto * msg)1991 PutResultProto::_Internal::put_document_stats(const PutResultProto* msg) {
1992   return *msg->_impl_.put_document_stats_;
1993 }
clear_status()1994 void PutResultProto::clear_status() {
1995   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
1996   _impl_._has_bits_[0] &= ~0x00000001u;
1997 }
clear_put_document_stats()1998 void PutResultProto::clear_put_document_stats() {
1999   if (_impl_.put_document_stats_ != nullptr) _impl_.put_document_stats_->Clear();
2000   _impl_._has_bits_[0] &= ~0x00000002u;
2001 }
PutResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2002 PutResultProto::PutResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2003                          bool is_message_owned)
2004   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2005   SharedCtor(arena, is_message_owned);
2006   // @@protoc_insertion_point(arena_constructor:icing.lib.PutResultProto)
2007 }
PutResultProto(const PutResultProto & from)2008 PutResultProto::PutResultProto(const PutResultProto& from)
2009   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2010   PutResultProto* const _this = this; (void)_this;
2011   new (&_impl_) Impl_{
2012       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2013     , /*decltype(_impl_._cached_size_)*/{}
2014     , decltype(_impl_.status_){nullptr}
2015     , decltype(_impl_.put_document_stats_){nullptr}
2016     , decltype(_impl_.was_replacement_){}};
2017 
2018   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2019   if (from._internal_has_status()) {
2020     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
2021   }
2022   if (from._internal_has_put_document_stats()) {
2023     _this->_impl_.put_document_stats_ = new ::icing::lib::PutDocumentStatsProto(*from._impl_.put_document_stats_);
2024   }
2025   _this->_impl_.was_replacement_ = from._impl_.was_replacement_;
2026   // @@protoc_insertion_point(copy_constructor:icing.lib.PutResultProto)
2027 }
2028 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2029 inline void PutResultProto::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_.status_){nullptr}
2037     , decltype(_impl_.put_document_stats_){nullptr}
2038     , decltype(_impl_.was_replacement_){false}
2039   };
2040 }
2041 
~PutResultProto()2042 PutResultProto::~PutResultProto() {
2043   // @@protoc_insertion_point(destructor:icing.lib.PutResultProto)
2044   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2045   (void)arena;
2046     return;
2047   }
2048   SharedDtor();
2049 }
2050 
SharedDtor()2051 inline void PutResultProto::SharedDtor() {
2052   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2053   if (this != internal_default_instance()) delete _impl_.status_;
2054   if (this != internal_default_instance()) delete _impl_.put_document_stats_;
2055 }
2056 
SetCachedSize(int size) const2057 void PutResultProto::SetCachedSize(int size) const {
2058   _impl_._cached_size_.Set(size);
2059 }
2060 
Clear()2061 void PutResultProto::Clear() {
2062 // @@protoc_insertion_point(message_clear_start:icing.lib.PutResultProto)
2063   ::uint32_t cached_has_bits = 0;
2064   // Prevent compiler warnings about cached_has_bits being unused
2065   (void) cached_has_bits;
2066 
2067   cached_has_bits = _impl_._has_bits_[0];
2068   if (cached_has_bits & 0x00000003u) {
2069     if (cached_has_bits & 0x00000001u) {
2070       GOOGLE_DCHECK(_impl_.status_ != nullptr);
2071       _impl_.status_->Clear();
2072     }
2073     if (cached_has_bits & 0x00000002u) {
2074       GOOGLE_DCHECK(_impl_.put_document_stats_ != nullptr);
2075       _impl_.put_document_stats_->Clear();
2076     }
2077   }
2078   _impl_.was_replacement_ = false;
2079   _impl_._has_bits_.Clear();
2080   _internal_metadata_.Clear<std::string>();
2081 }
2082 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2083 const char* PutResultProto::_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 .icing.lib.StatusProto status = 1;
2091       case 1:
2092         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2093           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
2094           CHK_(ptr);
2095         } else {
2096           goto handle_unusual;
2097         }
2098         continue;
2099       // optional .icing.lib.PutDocumentStatsProto put_document_stats = 2;
2100       case 2:
2101         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2102           ptr = ctx->ParseMessage(_internal_mutable_put_document_stats(), ptr);
2103           CHK_(ptr);
2104         } else {
2105           goto handle_unusual;
2106         }
2107         continue;
2108       // optional bool was_replacement = 3;
2109       case 3:
2110         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2111           _Internal::set_has_was_replacement(&has_bits);
2112           _impl_.was_replacement_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2113           CHK_(ptr);
2114         } else {
2115           goto handle_unusual;
2116         }
2117         continue;
2118       default:
2119         goto handle_unusual;
2120     }  // switch
2121   handle_unusual:
2122     if ((tag == 0) || ((tag & 7) == 4)) {
2123       CHK_(ptr);
2124       ctx->SetLastTag(tag);
2125       goto message_done;
2126     }
2127     ptr = UnknownFieldParse(
2128         tag,
2129         _internal_metadata_.mutable_unknown_fields<std::string>(),
2130         ptr, ctx);
2131     CHK_(ptr != nullptr);
2132   }  // while
2133 message_done:
2134   _impl_._has_bits_.Or(has_bits);
2135   return ptr;
2136 failure:
2137   ptr = nullptr;
2138   goto message_done;
2139 #undef CHK_
2140 }
2141 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2142 ::uint8_t* PutResultProto::_InternalSerialize(
2143     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2144   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PutResultProto)
2145   ::uint32_t cached_has_bits = 0;
2146   (void) cached_has_bits;
2147 
2148   cached_has_bits = _impl_._has_bits_[0];
2149   // optional .icing.lib.StatusProto status = 1;
2150   if (cached_has_bits & 0x00000001u) {
2151     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2152       InternalWriteMessage(1, _Internal::status(this),
2153         _Internal::status(this).GetCachedSize(), target, stream);
2154   }
2155 
2156   // optional .icing.lib.PutDocumentStatsProto put_document_stats = 2;
2157   if (cached_has_bits & 0x00000002u) {
2158     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2159       InternalWriteMessage(2, _Internal::put_document_stats(this),
2160         _Internal::put_document_stats(this).GetCachedSize(), target, stream);
2161   }
2162 
2163   // optional bool was_replacement = 3;
2164   if (cached_has_bits & 0x00000004u) {
2165     target = stream->EnsureSpace(target);
2166     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_was_replacement(), 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.PutResultProto)
2174   return target;
2175 }
2176 
ByteSizeLong() const2177 size_t PutResultProto::ByteSizeLong() const {
2178 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PutResultProto)
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 .icing.lib.StatusProto status = 1;
2188     if (cached_has_bits & 0x00000001u) {
2189       total_size += 1 +
2190         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2191           *_impl_.status_);
2192     }
2193 
2194     // optional .icing.lib.PutDocumentStatsProto put_document_stats = 2;
2195     if (cached_has_bits & 0x00000002u) {
2196       total_size += 1 +
2197         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2198           *_impl_.put_document_stats_);
2199     }
2200 
2201     // optional bool was_replacement = 3;
2202     if (cached_has_bits & 0x00000004u) {
2203       total_size += 1 + 1;
2204     }
2205 
2206   }
2207   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2208     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2209   }
2210   int cached_size = ::_pbi::ToCachedSize(total_size);
2211   SetCachedSize(cached_size);
2212   return total_size;
2213 }
2214 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2215 void PutResultProto::CheckTypeAndMergeFrom(
2216     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2217   MergeFrom(*::_pbi::DownCast<const PutResultProto*>(
2218       &from));
2219 }
2220 
MergeFrom(const PutResultProto & from)2221 void PutResultProto::MergeFrom(const PutResultProto& from) {
2222   PutResultProto* const _this = this;
2223   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PutResultProto)
2224   GOOGLE_DCHECK_NE(&from, _this);
2225   ::uint32_t cached_has_bits = 0;
2226   (void) cached_has_bits;
2227 
2228   cached_has_bits = from._impl_._has_bits_[0];
2229   if (cached_has_bits & 0x00000007u) {
2230     if (cached_has_bits & 0x00000001u) {
2231       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
2232           from._internal_status());
2233     }
2234     if (cached_has_bits & 0x00000002u) {
2235       _this->_internal_mutable_put_document_stats()->::icing::lib::PutDocumentStatsProto::MergeFrom(
2236           from._internal_put_document_stats());
2237     }
2238     if (cached_has_bits & 0x00000004u) {
2239       _this->_impl_.was_replacement_ = from._impl_.was_replacement_;
2240     }
2241     _this->_impl_._has_bits_[0] |= cached_has_bits;
2242   }
2243   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2244 }
2245 
CopyFrom(const PutResultProto & from)2246 void PutResultProto::CopyFrom(const PutResultProto& from) {
2247 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PutResultProto)
2248   if (&from == this) return;
2249   Clear();
2250   MergeFrom(from);
2251 }
2252 
IsInitialized() const2253 bool PutResultProto::IsInitialized() const {
2254   return true;
2255 }
2256 
InternalSwap(PutResultProto * other)2257 void PutResultProto::InternalSwap(PutResultProto* other) {
2258   using std::swap;
2259   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2260   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2261   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2262       PROTOBUF_FIELD_OFFSET(PutResultProto, _impl_.was_replacement_)
2263       + sizeof(PutResultProto::_impl_.was_replacement_)  // NOLINT
2264       - PROTOBUF_FIELD_OFFSET(PutResultProto, _impl_.status_)>(
2265           reinterpret_cast<char*>(&_impl_.status_),
2266           reinterpret_cast<char*>(&other->_impl_.status_));
2267 }
2268 
GetTypeName() const2269 std::string PutResultProto::GetTypeName() const {
2270   return "icing.lib.PutResultProto";
2271 }
2272 
2273 
2274 // ===================================================================
2275 
2276 class GetResultProto::_Internal {
2277  public:
2278   using HasBits = decltype(std::declval<GetResultProto>()._impl_._has_bits_);
2279   static const ::icing::lib::StatusProto& status(const GetResultProto* msg);
set_has_status(HasBits * has_bits)2280   static void set_has_status(HasBits* has_bits) {
2281     (*has_bits)[0] |= 1u;
2282   }
2283   static const ::icing::lib::DocumentProto& document(const GetResultProto* msg);
set_has_document(HasBits * has_bits)2284   static void set_has_document(HasBits* has_bits) {
2285     (*has_bits)[0] |= 2u;
2286   }
2287 };
2288 
2289 const ::icing::lib::StatusProto&
status(const GetResultProto * msg)2290 GetResultProto::_Internal::status(const GetResultProto* msg) {
2291   return *msg->_impl_.status_;
2292 }
2293 const ::icing::lib::DocumentProto&
document(const GetResultProto * msg)2294 GetResultProto::_Internal::document(const GetResultProto* msg) {
2295   return *msg->_impl_.document_;
2296 }
clear_status()2297 void GetResultProto::clear_status() {
2298   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
2299   _impl_._has_bits_[0] &= ~0x00000001u;
2300 }
GetResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2301 GetResultProto::GetResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2302                          bool is_message_owned)
2303   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2304   SharedCtor(arena, is_message_owned);
2305   // @@protoc_insertion_point(arena_constructor:icing.lib.GetResultProto)
2306 }
GetResultProto(const GetResultProto & from)2307 GetResultProto::GetResultProto(const GetResultProto& from)
2308   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2309   GetResultProto* const _this = this; (void)_this;
2310   new (&_impl_) Impl_{
2311       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2312     , /*decltype(_impl_._cached_size_)*/{}
2313     , decltype(_impl_.status_){nullptr}
2314     , decltype(_impl_.document_){nullptr}};
2315 
2316   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2317   if (from._internal_has_status()) {
2318     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
2319   }
2320   if (from._internal_has_document()) {
2321     _this->_impl_.document_ = new ::icing::lib::DocumentProto(*from._impl_.document_);
2322   }
2323   // @@protoc_insertion_point(copy_constructor:icing.lib.GetResultProto)
2324 }
2325 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2326 inline void GetResultProto::SharedCtor(
2327     ::_pb::Arena* arena, bool is_message_owned) {
2328   (void)arena;
2329   (void)is_message_owned;
2330   new (&_impl_) Impl_{
2331       decltype(_impl_._has_bits_){}
2332     , /*decltype(_impl_._cached_size_)*/{}
2333     , decltype(_impl_.status_){nullptr}
2334     , decltype(_impl_.document_){nullptr}
2335   };
2336 }
2337 
~GetResultProto()2338 GetResultProto::~GetResultProto() {
2339   // @@protoc_insertion_point(destructor:icing.lib.GetResultProto)
2340   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2341   (void)arena;
2342     return;
2343   }
2344   SharedDtor();
2345 }
2346 
SharedDtor()2347 inline void GetResultProto::SharedDtor() {
2348   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2349   if (this != internal_default_instance()) delete _impl_.status_;
2350   if (this != internal_default_instance()) delete _impl_.document_;
2351 }
2352 
SetCachedSize(int size) const2353 void GetResultProto::SetCachedSize(int size) const {
2354   _impl_._cached_size_.Set(size);
2355 }
2356 
Clear()2357 void GetResultProto::Clear() {
2358 // @@protoc_insertion_point(message_clear_start:icing.lib.GetResultProto)
2359   ::uint32_t cached_has_bits = 0;
2360   // Prevent compiler warnings about cached_has_bits being unused
2361   (void) cached_has_bits;
2362 
2363   cached_has_bits = _impl_._has_bits_[0];
2364   if (cached_has_bits & 0x00000003u) {
2365     if (cached_has_bits & 0x00000001u) {
2366       GOOGLE_DCHECK(_impl_.status_ != nullptr);
2367       _impl_.status_->Clear();
2368     }
2369     if (cached_has_bits & 0x00000002u) {
2370       GOOGLE_DCHECK(_impl_.document_ != nullptr);
2371       _impl_.document_->Clear();
2372     }
2373   }
2374   _impl_._has_bits_.Clear();
2375   _internal_metadata_.Clear<std::string>();
2376 }
2377 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2378 const char* GetResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2379 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2380   _Internal::HasBits has_bits{};
2381   while (!ctx->Done(&ptr)) {
2382     ::uint32_t tag;
2383     ptr = ::_pbi::ReadTag(ptr, &tag);
2384     switch (tag >> 3) {
2385       // optional .icing.lib.StatusProto status = 1;
2386       case 1:
2387         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2388           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
2389           CHK_(ptr);
2390         } else {
2391           goto handle_unusual;
2392         }
2393         continue;
2394       // optional .icing.lib.DocumentProto document = 2;
2395       case 2:
2396         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2397           ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
2398           CHK_(ptr);
2399         } else {
2400           goto handle_unusual;
2401         }
2402         continue;
2403       default:
2404         goto handle_unusual;
2405     }  // switch
2406   handle_unusual:
2407     if ((tag == 0) || ((tag & 7) == 4)) {
2408       CHK_(ptr);
2409       ctx->SetLastTag(tag);
2410       goto message_done;
2411     }
2412     ptr = UnknownFieldParse(
2413         tag,
2414         _internal_metadata_.mutable_unknown_fields<std::string>(),
2415         ptr, ctx);
2416     CHK_(ptr != nullptr);
2417   }  // while
2418 message_done:
2419   _impl_._has_bits_.Or(has_bits);
2420   return ptr;
2421 failure:
2422   ptr = nullptr;
2423   goto message_done;
2424 #undef CHK_
2425 }
2426 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2427 ::uint8_t* GetResultProto::_InternalSerialize(
2428     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2429   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.GetResultProto)
2430   ::uint32_t cached_has_bits = 0;
2431   (void) cached_has_bits;
2432 
2433   cached_has_bits = _impl_._has_bits_[0];
2434   // optional .icing.lib.StatusProto status = 1;
2435   if (cached_has_bits & 0x00000001u) {
2436     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2437       InternalWriteMessage(1, _Internal::status(this),
2438         _Internal::status(this).GetCachedSize(), target, stream);
2439   }
2440 
2441   // optional .icing.lib.DocumentProto document = 2;
2442   if (cached_has_bits & 0x00000002u) {
2443     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2444       InternalWriteMessage(2, _Internal::document(this),
2445         _Internal::document(this).GetCachedSize(), target, stream);
2446   }
2447 
2448   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2449     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2450         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2451   }
2452   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.GetResultProto)
2453   return target;
2454 }
2455 
ByteSizeLong() const2456 size_t GetResultProto::ByteSizeLong() const {
2457 // @@protoc_insertion_point(message_byte_size_start:icing.lib.GetResultProto)
2458   size_t total_size = 0;
2459 
2460   ::uint32_t cached_has_bits = 0;
2461   // Prevent compiler warnings about cached_has_bits being unused
2462   (void) cached_has_bits;
2463 
2464   cached_has_bits = _impl_._has_bits_[0];
2465   if (cached_has_bits & 0x00000003u) {
2466     // optional .icing.lib.StatusProto status = 1;
2467     if (cached_has_bits & 0x00000001u) {
2468       total_size += 1 +
2469         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2470           *_impl_.status_);
2471     }
2472 
2473     // optional .icing.lib.DocumentProto document = 2;
2474     if (cached_has_bits & 0x00000002u) {
2475       total_size += 1 +
2476         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2477           *_impl_.document_);
2478     }
2479 
2480   }
2481   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2482     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2483   }
2484   int cached_size = ::_pbi::ToCachedSize(total_size);
2485   SetCachedSize(cached_size);
2486   return total_size;
2487 }
2488 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2489 void GetResultProto::CheckTypeAndMergeFrom(
2490     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2491   MergeFrom(*::_pbi::DownCast<const GetResultProto*>(
2492       &from));
2493 }
2494 
MergeFrom(const GetResultProto & from)2495 void GetResultProto::MergeFrom(const GetResultProto& from) {
2496   GetResultProto* const _this = this;
2497   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.GetResultProto)
2498   GOOGLE_DCHECK_NE(&from, _this);
2499   ::uint32_t cached_has_bits = 0;
2500   (void) cached_has_bits;
2501 
2502   cached_has_bits = from._impl_._has_bits_[0];
2503   if (cached_has_bits & 0x00000003u) {
2504     if (cached_has_bits & 0x00000001u) {
2505       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
2506           from._internal_status());
2507     }
2508     if (cached_has_bits & 0x00000002u) {
2509       _this->_internal_mutable_document()->::icing::lib::DocumentProto::MergeFrom(
2510           from._internal_document());
2511     }
2512   }
2513   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2514 }
2515 
CopyFrom(const GetResultProto & from)2516 void GetResultProto::CopyFrom(const GetResultProto& from) {
2517 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.GetResultProto)
2518   if (&from == this) return;
2519   Clear();
2520   MergeFrom(from);
2521 }
2522 
IsInitialized() const2523 bool GetResultProto::IsInitialized() const {
2524   return true;
2525 }
2526 
InternalSwap(GetResultProto * other)2527 void GetResultProto::InternalSwap(GetResultProto* other) {
2528   using std::swap;
2529   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2530   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2531   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2532       PROTOBUF_FIELD_OFFSET(GetResultProto, _impl_.document_)
2533       + sizeof(GetResultProto::_impl_.document_)  // NOLINT
2534       - PROTOBUF_FIELD_OFFSET(GetResultProto, _impl_.status_)>(
2535           reinterpret_cast<char*>(&_impl_.status_),
2536           reinterpret_cast<char*>(&other->_impl_.status_));
2537 }
2538 
GetTypeName() const2539 std::string GetResultProto::GetTypeName() const {
2540   return "icing.lib.GetResultProto";
2541 }
2542 
2543 
2544 // ===================================================================
2545 
2546 class GetAllNamespacesResultProto::_Internal {
2547  public:
2548   using HasBits = decltype(std::declval<GetAllNamespacesResultProto>()._impl_._has_bits_);
2549   static const ::icing::lib::StatusProto& status(const GetAllNamespacesResultProto* msg);
set_has_status(HasBits * has_bits)2550   static void set_has_status(HasBits* has_bits) {
2551     (*has_bits)[0] |= 1u;
2552   }
2553 };
2554 
2555 const ::icing::lib::StatusProto&
status(const GetAllNamespacesResultProto * msg)2556 GetAllNamespacesResultProto::_Internal::status(const GetAllNamespacesResultProto* msg) {
2557   return *msg->_impl_.status_;
2558 }
clear_status()2559 void GetAllNamespacesResultProto::clear_status() {
2560   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
2561   _impl_._has_bits_[0] &= ~0x00000001u;
2562 }
GetAllNamespacesResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2563 GetAllNamespacesResultProto::GetAllNamespacesResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2564                          bool is_message_owned)
2565   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2566   SharedCtor(arena, is_message_owned);
2567   // @@protoc_insertion_point(arena_constructor:icing.lib.GetAllNamespacesResultProto)
2568 }
GetAllNamespacesResultProto(const GetAllNamespacesResultProto & from)2569 GetAllNamespacesResultProto::GetAllNamespacesResultProto(const GetAllNamespacesResultProto& from)
2570   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2571   GetAllNamespacesResultProto* const _this = this; (void)_this;
2572   new (&_impl_) Impl_{
2573       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2574     , /*decltype(_impl_._cached_size_)*/{}
2575     , decltype(_impl_.namespaces_){from._impl_.namespaces_}
2576     , decltype(_impl_.status_){nullptr}};
2577 
2578   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2579   if (from._internal_has_status()) {
2580     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
2581   }
2582   // @@protoc_insertion_point(copy_constructor:icing.lib.GetAllNamespacesResultProto)
2583 }
2584 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2585 inline void GetAllNamespacesResultProto::SharedCtor(
2586     ::_pb::Arena* arena, bool is_message_owned) {
2587   (void)arena;
2588   (void)is_message_owned;
2589   new (&_impl_) Impl_{
2590       decltype(_impl_._has_bits_){}
2591     , /*decltype(_impl_._cached_size_)*/{}
2592     , decltype(_impl_.namespaces_){arena}
2593     , decltype(_impl_.status_){nullptr}
2594   };
2595 }
2596 
~GetAllNamespacesResultProto()2597 GetAllNamespacesResultProto::~GetAllNamespacesResultProto() {
2598   // @@protoc_insertion_point(destructor:icing.lib.GetAllNamespacesResultProto)
2599   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2600   (void)arena;
2601     return;
2602   }
2603   SharedDtor();
2604 }
2605 
SharedDtor()2606 inline void GetAllNamespacesResultProto::SharedDtor() {
2607   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2608   _impl_.namespaces_.~RepeatedPtrField();
2609   if (this != internal_default_instance()) delete _impl_.status_;
2610 }
2611 
SetCachedSize(int size) const2612 void GetAllNamespacesResultProto::SetCachedSize(int size) const {
2613   _impl_._cached_size_.Set(size);
2614 }
2615 
Clear()2616 void GetAllNamespacesResultProto::Clear() {
2617 // @@protoc_insertion_point(message_clear_start:icing.lib.GetAllNamespacesResultProto)
2618   ::uint32_t cached_has_bits = 0;
2619   // Prevent compiler warnings about cached_has_bits being unused
2620   (void) cached_has_bits;
2621 
2622   _impl_.namespaces_.Clear();
2623   cached_has_bits = _impl_._has_bits_[0];
2624   if (cached_has_bits & 0x00000001u) {
2625     GOOGLE_DCHECK(_impl_.status_ != nullptr);
2626     _impl_.status_->Clear();
2627   }
2628   _impl_._has_bits_.Clear();
2629   _internal_metadata_.Clear<std::string>();
2630 }
2631 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2632 const char* GetAllNamespacesResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2633 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2634   _Internal::HasBits has_bits{};
2635   while (!ctx->Done(&ptr)) {
2636     ::uint32_t tag;
2637     ptr = ::_pbi::ReadTag(ptr, &tag);
2638     switch (tag >> 3) {
2639       // optional .icing.lib.StatusProto status = 1;
2640       case 1:
2641         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2642           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
2643           CHK_(ptr);
2644         } else {
2645           goto handle_unusual;
2646         }
2647         continue;
2648       // repeated string namespaces = 2;
2649       case 2:
2650         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2651           ptr -= 1;
2652           do {
2653             ptr += 1;
2654             auto str = _internal_add_namespaces();
2655             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2656             CHK_(ptr);
2657             if (!ctx->DataAvailable(ptr)) break;
2658           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
2659         } else {
2660           goto handle_unusual;
2661         }
2662         continue;
2663       default:
2664         goto handle_unusual;
2665     }  // switch
2666   handle_unusual:
2667     if ((tag == 0) || ((tag & 7) == 4)) {
2668       CHK_(ptr);
2669       ctx->SetLastTag(tag);
2670       goto message_done;
2671     }
2672     ptr = UnknownFieldParse(
2673         tag,
2674         _internal_metadata_.mutable_unknown_fields<std::string>(),
2675         ptr, ctx);
2676     CHK_(ptr != nullptr);
2677   }  // while
2678 message_done:
2679   _impl_._has_bits_.Or(has_bits);
2680   return ptr;
2681 failure:
2682   ptr = nullptr;
2683   goto message_done;
2684 #undef CHK_
2685 }
2686 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2687 ::uint8_t* GetAllNamespacesResultProto::_InternalSerialize(
2688     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2689   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.GetAllNamespacesResultProto)
2690   ::uint32_t cached_has_bits = 0;
2691   (void) cached_has_bits;
2692 
2693   cached_has_bits = _impl_._has_bits_[0];
2694   // optional .icing.lib.StatusProto status = 1;
2695   if (cached_has_bits & 0x00000001u) {
2696     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2697       InternalWriteMessage(1, _Internal::status(this),
2698         _Internal::status(this).GetCachedSize(), target, stream);
2699   }
2700 
2701   // repeated string namespaces = 2;
2702   for (int i = 0, n = this->_internal_namespaces_size(); i < n; i++) {
2703     const auto& s = this->_internal_namespaces(i);
2704     target = stream->WriteString(2, s, target);
2705   }
2706 
2707   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2708     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2709         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2710   }
2711   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.GetAllNamespacesResultProto)
2712   return target;
2713 }
2714 
ByteSizeLong() const2715 size_t GetAllNamespacesResultProto::ByteSizeLong() const {
2716 // @@protoc_insertion_point(message_byte_size_start:icing.lib.GetAllNamespacesResultProto)
2717   size_t total_size = 0;
2718 
2719   ::uint32_t cached_has_bits = 0;
2720   // Prevent compiler warnings about cached_has_bits being unused
2721   (void) cached_has_bits;
2722 
2723   // repeated string namespaces = 2;
2724   total_size += 1 *
2725       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.namespaces_.size());
2726   for (int i = 0, n = _impl_.namespaces_.size(); i < n; i++) {
2727     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2728       _impl_.namespaces_.Get(i));
2729   }
2730 
2731   // optional .icing.lib.StatusProto status = 1;
2732   cached_has_bits = _impl_._has_bits_[0];
2733   if (cached_has_bits & 0x00000001u) {
2734     total_size += 1 +
2735       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2736         *_impl_.status_);
2737   }
2738 
2739   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2740     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2741   }
2742   int cached_size = ::_pbi::ToCachedSize(total_size);
2743   SetCachedSize(cached_size);
2744   return total_size;
2745 }
2746 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2747 void GetAllNamespacesResultProto::CheckTypeAndMergeFrom(
2748     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2749   MergeFrom(*::_pbi::DownCast<const GetAllNamespacesResultProto*>(
2750       &from));
2751 }
2752 
MergeFrom(const GetAllNamespacesResultProto & from)2753 void GetAllNamespacesResultProto::MergeFrom(const GetAllNamespacesResultProto& from) {
2754   GetAllNamespacesResultProto* const _this = this;
2755   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.GetAllNamespacesResultProto)
2756   GOOGLE_DCHECK_NE(&from, _this);
2757   ::uint32_t cached_has_bits = 0;
2758   (void) cached_has_bits;
2759 
2760   _this->_impl_.namespaces_.MergeFrom(from._impl_.namespaces_);
2761   if (from._internal_has_status()) {
2762     _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
2763         from._internal_status());
2764   }
2765   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2766 }
2767 
CopyFrom(const GetAllNamespacesResultProto & from)2768 void GetAllNamespacesResultProto::CopyFrom(const GetAllNamespacesResultProto& from) {
2769 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.GetAllNamespacesResultProto)
2770   if (&from == this) return;
2771   Clear();
2772   MergeFrom(from);
2773 }
2774 
IsInitialized() const2775 bool GetAllNamespacesResultProto::IsInitialized() const {
2776   return true;
2777 }
2778 
InternalSwap(GetAllNamespacesResultProto * other)2779 void GetAllNamespacesResultProto::InternalSwap(GetAllNamespacesResultProto* other) {
2780   using std::swap;
2781   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2782   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2783   _impl_.namespaces_.InternalSwap(&other->_impl_.namespaces_);
2784   swap(_impl_.status_, other->_impl_.status_);
2785 }
2786 
GetTypeName() const2787 std::string GetAllNamespacesResultProto::GetTypeName() const {
2788   return "icing.lib.GetAllNamespacesResultProto";
2789 }
2790 
2791 
2792 // ===================================================================
2793 
2794 class DeleteResultProto::_Internal {
2795  public:
2796   using HasBits = decltype(std::declval<DeleteResultProto>()._impl_._has_bits_);
2797   static const ::icing::lib::StatusProto& status(const DeleteResultProto* msg);
set_has_status(HasBits * has_bits)2798   static void set_has_status(HasBits* has_bits) {
2799     (*has_bits)[0] |= 1u;
2800   }
2801   static const ::icing::lib::DeleteStatsProto& delete_stats(const DeleteResultProto* msg);
set_has_delete_stats(HasBits * has_bits)2802   static void set_has_delete_stats(HasBits* has_bits) {
2803     (*has_bits)[0] |= 2u;
2804   }
2805 };
2806 
2807 const ::icing::lib::StatusProto&
status(const DeleteResultProto * msg)2808 DeleteResultProto::_Internal::status(const DeleteResultProto* msg) {
2809   return *msg->_impl_.status_;
2810 }
2811 const ::icing::lib::DeleteStatsProto&
delete_stats(const DeleteResultProto * msg)2812 DeleteResultProto::_Internal::delete_stats(const DeleteResultProto* msg) {
2813   return *msg->_impl_.delete_stats_;
2814 }
clear_status()2815 void DeleteResultProto::clear_status() {
2816   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
2817   _impl_._has_bits_[0] &= ~0x00000001u;
2818 }
clear_delete_stats()2819 void DeleteResultProto::clear_delete_stats() {
2820   if (_impl_.delete_stats_ != nullptr) _impl_.delete_stats_->Clear();
2821   _impl_._has_bits_[0] &= ~0x00000002u;
2822 }
DeleteResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2823 DeleteResultProto::DeleteResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2824                          bool is_message_owned)
2825   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2826   SharedCtor(arena, is_message_owned);
2827   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteResultProto)
2828 }
DeleteResultProto(const DeleteResultProto & from)2829 DeleteResultProto::DeleteResultProto(const DeleteResultProto& from)
2830   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2831   DeleteResultProto* const _this = this; (void)_this;
2832   new (&_impl_) Impl_{
2833       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2834     , /*decltype(_impl_._cached_size_)*/{}
2835     , decltype(_impl_.status_){nullptr}
2836     , decltype(_impl_.delete_stats_){nullptr}};
2837 
2838   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2839   if (from._internal_has_status()) {
2840     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
2841   }
2842   if (from._internal_has_delete_stats()) {
2843     _this->_impl_.delete_stats_ = new ::icing::lib::DeleteStatsProto(*from._impl_.delete_stats_);
2844   }
2845   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteResultProto)
2846 }
2847 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2848 inline void DeleteResultProto::SharedCtor(
2849     ::_pb::Arena* arena, bool is_message_owned) {
2850   (void)arena;
2851   (void)is_message_owned;
2852   new (&_impl_) Impl_{
2853       decltype(_impl_._has_bits_){}
2854     , /*decltype(_impl_._cached_size_)*/{}
2855     , decltype(_impl_.status_){nullptr}
2856     , decltype(_impl_.delete_stats_){nullptr}
2857   };
2858 }
2859 
~DeleteResultProto()2860 DeleteResultProto::~DeleteResultProto() {
2861   // @@protoc_insertion_point(destructor:icing.lib.DeleteResultProto)
2862   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2863   (void)arena;
2864     return;
2865   }
2866   SharedDtor();
2867 }
2868 
SharedDtor()2869 inline void DeleteResultProto::SharedDtor() {
2870   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2871   if (this != internal_default_instance()) delete _impl_.status_;
2872   if (this != internal_default_instance()) delete _impl_.delete_stats_;
2873 }
2874 
SetCachedSize(int size) const2875 void DeleteResultProto::SetCachedSize(int size) const {
2876   _impl_._cached_size_.Set(size);
2877 }
2878 
Clear()2879 void DeleteResultProto::Clear() {
2880 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteResultProto)
2881   ::uint32_t cached_has_bits = 0;
2882   // Prevent compiler warnings about cached_has_bits being unused
2883   (void) cached_has_bits;
2884 
2885   cached_has_bits = _impl_._has_bits_[0];
2886   if (cached_has_bits & 0x00000003u) {
2887     if (cached_has_bits & 0x00000001u) {
2888       GOOGLE_DCHECK(_impl_.status_ != nullptr);
2889       _impl_.status_->Clear();
2890     }
2891     if (cached_has_bits & 0x00000002u) {
2892       GOOGLE_DCHECK(_impl_.delete_stats_ != nullptr);
2893       _impl_.delete_stats_->Clear();
2894     }
2895   }
2896   _impl_._has_bits_.Clear();
2897   _internal_metadata_.Clear<std::string>();
2898 }
2899 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2900 const char* DeleteResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2901 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2902   _Internal::HasBits has_bits{};
2903   while (!ctx->Done(&ptr)) {
2904     ::uint32_t tag;
2905     ptr = ::_pbi::ReadTag(ptr, &tag);
2906     switch (tag >> 3) {
2907       // optional .icing.lib.StatusProto status = 1;
2908       case 1:
2909         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2910           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
2911           CHK_(ptr);
2912         } else {
2913           goto handle_unusual;
2914         }
2915         continue;
2916       // optional .icing.lib.DeleteStatsProto delete_stats = 2;
2917       case 2:
2918         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2919           ptr = ctx->ParseMessage(_internal_mutable_delete_stats(), ptr);
2920           CHK_(ptr);
2921         } else {
2922           goto handle_unusual;
2923         }
2924         continue;
2925       default:
2926         goto handle_unusual;
2927     }  // switch
2928   handle_unusual:
2929     if ((tag == 0) || ((tag & 7) == 4)) {
2930       CHK_(ptr);
2931       ctx->SetLastTag(tag);
2932       goto message_done;
2933     }
2934     ptr = UnknownFieldParse(
2935         tag,
2936         _internal_metadata_.mutable_unknown_fields<std::string>(),
2937         ptr, ctx);
2938     CHK_(ptr != nullptr);
2939   }  // while
2940 message_done:
2941   _impl_._has_bits_.Or(has_bits);
2942   return ptr;
2943 failure:
2944   ptr = nullptr;
2945   goto message_done;
2946 #undef CHK_
2947 }
2948 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2949 ::uint8_t* DeleteResultProto::_InternalSerialize(
2950     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2951   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteResultProto)
2952   ::uint32_t cached_has_bits = 0;
2953   (void) cached_has_bits;
2954 
2955   cached_has_bits = _impl_._has_bits_[0];
2956   // optional .icing.lib.StatusProto status = 1;
2957   if (cached_has_bits & 0x00000001u) {
2958     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2959       InternalWriteMessage(1, _Internal::status(this),
2960         _Internal::status(this).GetCachedSize(), target, stream);
2961   }
2962 
2963   // optional .icing.lib.DeleteStatsProto delete_stats = 2;
2964   if (cached_has_bits & 0x00000002u) {
2965     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2966       InternalWriteMessage(2, _Internal::delete_stats(this),
2967         _Internal::delete_stats(this).GetCachedSize(), target, stream);
2968   }
2969 
2970   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2971     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2972         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2973   }
2974   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteResultProto)
2975   return target;
2976 }
2977 
ByteSizeLong() const2978 size_t DeleteResultProto::ByteSizeLong() const {
2979 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteResultProto)
2980   size_t total_size = 0;
2981 
2982   ::uint32_t cached_has_bits = 0;
2983   // Prevent compiler warnings about cached_has_bits being unused
2984   (void) cached_has_bits;
2985 
2986   cached_has_bits = _impl_._has_bits_[0];
2987   if (cached_has_bits & 0x00000003u) {
2988     // optional .icing.lib.StatusProto status = 1;
2989     if (cached_has_bits & 0x00000001u) {
2990       total_size += 1 +
2991         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2992           *_impl_.status_);
2993     }
2994 
2995     // optional .icing.lib.DeleteStatsProto delete_stats = 2;
2996     if (cached_has_bits & 0x00000002u) {
2997       total_size += 1 +
2998         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2999           *_impl_.delete_stats_);
3000     }
3001 
3002   }
3003   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3004     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3005   }
3006   int cached_size = ::_pbi::ToCachedSize(total_size);
3007   SetCachedSize(cached_size);
3008   return total_size;
3009 }
3010 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3011 void DeleteResultProto::CheckTypeAndMergeFrom(
3012     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3013   MergeFrom(*::_pbi::DownCast<const DeleteResultProto*>(
3014       &from));
3015 }
3016 
MergeFrom(const DeleteResultProto & from)3017 void DeleteResultProto::MergeFrom(const DeleteResultProto& from) {
3018   DeleteResultProto* const _this = this;
3019   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteResultProto)
3020   GOOGLE_DCHECK_NE(&from, _this);
3021   ::uint32_t cached_has_bits = 0;
3022   (void) cached_has_bits;
3023 
3024   cached_has_bits = from._impl_._has_bits_[0];
3025   if (cached_has_bits & 0x00000003u) {
3026     if (cached_has_bits & 0x00000001u) {
3027       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
3028           from._internal_status());
3029     }
3030     if (cached_has_bits & 0x00000002u) {
3031       _this->_internal_mutable_delete_stats()->::icing::lib::DeleteStatsProto::MergeFrom(
3032           from._internal_delete_stats());
3033     }
3034   }
3035   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3036 }
3037 
CopyFrom(const DeleteResultProto & from)3038 void DeleteResultProto::CopyFrom(const DeleteResultProto& from) {
3039 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteResultProto)
3040   if (&from == this) return;
3041   Clear();
3042   MergeFrom(from);
3043 }
3044 
IsInitialized() const3045 bool DeleteResultProto::IsInitialized() const {
3046   return true;
3047 }
3048 
InternalSwap(DeleteResultProto * other)3049 void DeleteResultProto::InternalSwap(DeleteResultProto* other) {
3050   using std::swap;
3051   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3052   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3053   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3054       PROTOBUF_FIELD_OFFSET(DeleteResultProto, _impl_.delete_stats_)
3055       + sizeof(DeleteResultProto::_impl_.delete_stats_)  // NOLINT
3056       - PROTOBUF_FIELD_OFFSET(DeleteResultProto, _impl_.status_)>(
3057           reinterpret_cast<char*>(&_impl_.status_),
3058           reinterpret_cast<char*>(&other->_impl_.status_));
3059 }
3060 
GetTypeName() const3061 std::string DeleteResultProto::GetTypeName() const {
3062   return "icing.lib.DeleteResultProto";
3063 }
3064 
3065 
3066 // ===================================================================
3067 
3068 class DeleteByNamespaceResultProto::_Internal {
3069  public:
3070   using HasBits = decltype(std::declval<DeleteByNamespaceResultProto>()._impl_._has_bits_);
3071   static const ::icing::lib::StatusProto& status(const DeleteByNamespaceResultProto* msg);
set_has_status(HasBits * has_bits)3072   static void set_has_status(HasBits* has_bits) {
3073     (*has_bits)[0] |= 1u;
3074   }
3075   static const ::icing::lib::DeleteStatsProto& delete_stats(const DeleteByNamespaceResultProto* msg);
set_has_delete_stats(HasBits * has_bits)3076   static void set_has_delete_stats(HasBits* has_bits) {
3077     (*has_bits)[0] |= 2u;
3078   }
3079 };
3080 
3081 const ::icing::lib::StatusProto&
status(const DeleteByNamespaceResultProto * msg)3082 DeleteByNamespaceResultProto::_Internal::status(const DeleteByNamespaceResultProto* msg) {
3083   return *msg->_impl_.status_;
3084 }
3085 const ::icing::lib::DeleteStatsProto&
delete_stats(const DeleteByNamespaceResultProto * msg)3086 DeleteByNamespaceResultProto::_Internal::delete_stats(const DeleteByNamespaceResultProto* msg) {
3087   return *msg->_impl_.delete_stats_;
3088 }
clear_status()3089 void DeleteByNamespaceResultProto::clear_status() {
3090   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
3091   _impl_._has_bits_[0] &= ~0x00000001u;
3092 }
clear_delete_stats()3093 void DeleteByNamespaceResultProto::clear_delete_stats() {
3094   if (_impl_.delete_stats_ != nullptr) _impl_.delete_stats_->Clear();
3095   _impl_._has_bits_[0] &= ~0x00000002u;
3096 }
DeleteByNamespaceResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3097 DeleteByNamespaceResultProto::DeleteByNamespaceResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3098                          bool is_message_owned)
3099   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3100   SharedCtor(arena, is_message_owned);
3101   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteByNamespaceResultProto)
3102 }
DeleteByNamespaceResultProto(const DeleteByNamespaceResultProto & from)3103 DeleteByNamespaceResultProto::DeleteByNamespaceResultProto(const DeleteByNamespaceResultProto& from)
3104   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3105   DeleteByNamespaceResultProto* const _this = this; (void)_this;
3106   new (&_impl_) Impl_{
3107       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3108     , /*decltype(_impl_._cached_size_)*/{}
3109     , decltype(_impl_.status_){nullptr}
3110     , decltype(_impl_.delete_stats_){nullptr}};
3111 
3112   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3113   if (from._internal_has_status()) {
3114     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
3115   }
3116   if (from._internal_has_delete_stats()) {
3117     _this->_impl_.delete_stats_ = new ::icing::lib::DeleteStatsProto(*from._impl_.delete_stats_);
3118   }
3119   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteByNamespaceResultProto)
3120 }
3121 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3122 inline void DeleteByNamespaceResultProto::SharedCtor(
3123     ::_pb::Arena* arena, bool is_message_owned) {
3124   (void)arena;
3125   (void)is_message_owned;
3126   new (&_impl_) Impl_{
3127       decltype(_impl_._has_bits_){}
3128     , /*decltype(_impl_._cached_size_)*/{}
3129     , decltype(_impl_.status_){nullptr}
3130     , decltype(_impl_.delete_stats_){nullptr}
3131   };
3132 }
3133 
~DeleteByNamespaceResultProto()3134 DeleteByNamespaceResultProto::~DeleteByNamespaceResultProto() {
3135   // @@protoc_insertion_point(destructor:icing.lib.DeleteByNamespaceResultProto)
3136   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3137   (void)arena;
3138     return;
3139   }
3140   SharedDtor();
3141 }
3142 
SharedDtor()3143 inline void DeleteByNamespaceResultProto::SharedDtor() {
3144   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3145   if (this != internal_default_instance()) delete _impl_.status_;
3146   if (this != internal_default_instance()) delete _impl_.delete_stats_;
3147 }
3148 
SetCachedSize(int size) const3149 void DeleteByNamespaceResultProto::SetCachedSize(int size) const {
3150   _impl_._cached_size_.Set(size);
3151 }
3152 
Clear()3153 void DeleteByNamespaceResultProto::Clear() {
3154 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteByNamespaceResultProto)
3155   ::uint32_t cached_has_bits = 0;
3156   // Prevent compiler warnings about cached_has_bits being unused
3157   (void) cached_has_bits;
3158 
3159   cached_has_bits = _impl_._has_bits_[0];
3160   if (cached_has_bits & 0x00000003u) {
3161     if (cached_has_bits & 0x00000001u) {
3162       GOOGLE_DCHECK(_impl_.status_ != nullptr);
3163       _impl_.status_->Clear();
3164     }
3165     if (cached_has_bits & 0x00000002u) {
3166       GOOGLE_DCHECK(_impl_.delete_stats_ != nullptr);
3167       _impl_.delete_stats_->Clear();
3168     }
3169   }
3170   _impl_._has_bits_.Clear();
3171   _internal_metadata_.Clear<std::string>();
3172 }
3173 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3174 const char* DeleteByNamespaceResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3175 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3176   _Internal::HasBits has_bits{};
3177   while (!ctx->Done(&ptr)) {
3178     ::uint32_t tag;
3179     ptr = ::_pbi::ReadTag(ptr, &tag);
3180     switch (tag >> 3) {
3181       // optional .icing.lib.StatusProto status = 1;
3182       case 1:
3183         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3184           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
3185           CHK_(ptr);
3186         } else {
3187           goto handle_unusual;
3188         }
3189         continue;
3190       // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3191       case 2:
3192         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3193           ptr = ctx->ParseMessage(_internal_mutable_delete_stats(), ptr);
3194           CHK_(ptr);
3195         } else {
3196           goto handle_unusual;
3197         }
3198         continue;
3199       default:
3200         goto handle_unusual;
3201     }  // switch
3202   handle_unusual:
3203     if ((tag == 0) || ((tag & 7) == 4)) {
3204       CHK_(ptr);
3205       ctx->SetLastTag(tag);
3206       goto message_done;
3207     }
3208     ptr = UnknownFieldParse(
3209         tag,
3210         _internal_metadata_.mutable_unknown_fields<std::string>(),
3211         ptr, ctx);
3212     CHK_(ptr != nullptr);
3213   }  // while
3214 message_done:
3215   _impl_._has_bits_.Or(has_bits);
3216   return ptr;
3217 failure:
3218   ptr = nullptr;
3219   goto message_done;
3220 #undef CHK_
3221 }
3222 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3223 ::uint8_t* DeleteByNamespaceResultProto::_InternalSerialize(
3224     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3225   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteByNamespaceResultProto)
3226   ::uint32_t cached_has_bits = 0;
3227   (void) cached_has_bits;
3228 
3229   cached_has_bits = _impl_._has_bits_[0];
3230   // optional .icing.lib.StatusProto status = 1;
3231   if (cached_has_bits & 0x00000001u) {
3232     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3233       InternalWriteMessage(1, _Internal::status(this),
3234         _Internal::status(this).GetCachedSize(), target, stream);
3235   }
3236 
3237   // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3238   if (cached_has_bits & 0x00000002u) {
3239     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3240       InternalWriteMessage(2, _Internal::delete_stats(this),
3241         _Internal::delete_stats(this).GetCachedSize(), target, stream);
3242   }
3243 
3244   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3245     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3246         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3247   }
3248   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteByNamespaceResultProto)
3249   return target;
3250 }
3251 
ByteSizeLong() const3252 size_t DeleteByNamespaceResultProto::ByteSizeLong() const {
3253 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteByNamespaceResultProto)
3254   size_t total_size = 0;
3255 
3256   ::uint32_t cached_has_bits = 0;
3257   // Prevent compiler warnings about cached_has_bits being unused
3258   (void) cached_has_bits;
3259 
3260   cached_has_bits = _impl_._has_bits_[0];
3261   if (cached_has_bits & 0x00000003u) {
3262     // optional .icing.lib.StatusProto status = 1;
3263     if (cached_has_bits & 0x00000001u) {
3264       total_size += 1 +
3265         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3266           *_impl_.status_);
3267     }
3268 
3269     // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3270     if (cached_has_bits & 0x00000002u) {
3271       total_size += 1 +
3272         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3273           *_impl_.delete_stats_);
3274     }
3275 
3276   }
3277   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3278     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3279   }
3280   int cached_size = ::_pbi::ToCachedSize(total_size);
3281   SetCachedSize(cached_size);
3282   return total_size;
3283 }
3284 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3285 void DeleteByNamespaceResultProto::CheckTypeAndMergeFrom(
3286     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3287   MergeFrom(*::_pbi::DownCast<const DeleteByNamespaceResultProto*>(
3288       &from));
3289 }
3290 
MergeFrom(const DeleteByNamespaceResultProto & from)3291 void DeleteByNamespaceResultProto::MergeFrom(const DeleteByNamespaceResultProto& from) {
3292   DeleteByNamespaceResultProto* const _this = this;
3293   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteByNamespaceResultProto)
3294   GOOGLE_DCHECK_NE(&from, _this);
3295   ::uint32_t cached_has_bits = 0;
3296   (void) cached_has_bits;
3297 
3298   cached_has_bits = from._impl_._has_bits_[0];
3299   if (cached_has_bits & 0x00000003u) {
3300     if (cached_has_bits & 0x00000001u) {
3301       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
3302           from._internal_status());
3303     }
3304     if (cached_has_bits & 0x00000002u) {
3305       _this->_internal_mutable_delete_stats()->::icing::lib::DeleteStatsProto::MergeFrom(
3306           from._internal_delete_stats());
3307     }
3308   }
3309   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3310 }
3311 
CopyFrom(const DeleteByNamespaceResultProto & from)3312 void DeleteByNamespaceResultProto::CopyFrom(const DeleteByNamespaceResultProto& from) {
3313 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteByNamespaceResultProto)
3314   if (&from == this) return;
3315   Clear();
3316   MergeFrom(from);
3317 }
3318 
IsInitialized() const3319 bool DeleteByNamespaceResultProto::IsInitialized() const {
3320   return true;
3321 }
3322 
InternalSwap(DeleteByNamespaceResultProto * other)3323 void DeleteByNamespaceResultProto::InternalSwap(DeleteByNamespaceResultProto* other) {
3324   using std::swap;
3325   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3326   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3327   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3328       PROTOBUF_FIELD_OFFSET(DeleteByNamespaceResultProto, _impl_.delete_stats_)
3329       + sizeof(DeleteByNamespaceResultProto::_impl_.delete_stats_)  // NOLINT
3330       - PROTOBUF_FIELD_OFFSET(DeleteByNamespaceResultProto, _impl_.status_)>(
3331           reinterpret_cast<char*>(&_impl_.status_),
3332           reinterpret_cast<char*>(&other->_impl_.status_));
3333 }
3334 
GetTypeName() const3335 std::string DeleteByNamespaceResultProto::GetTypeName() const {
3336   return "icing.lib.DeleteByNamespaceResultProto";
3337 }
3338 
3339 
3340 // ===================================================================
3341 
3342 class DeleteBySchemaTypeResultProto::_Internal {
3343  public:
3344   using HasBits = decltype(std::declval<DeleteBySchemaTypeResultProto>()._impl_._has_bits_);
3345   static const ::icing::lib::StatusProto& status(const DeleteBySchemaTypeResultProto* msg);
set_has_status(HasBits * has_bits)3346   static void set_has_status(HasBits* has_bits) {
3347     (*has_bits)[0] |= 1u;
3348   }
3349   static const ::icing::lib::DeleteStatsProto& delete_stats(const DeleteBySchemaTypeResultProto* msg);
set_has_delete_stats(HasBits * has_bits)3350   static void set_has_delete_stats(HasBits* has_bits) {
3351     (*has_bits)[0] |= 2u;
3352   }
3353 };
3354 
3355 const ::icing::lib::StatusProto&
status(const DeleteBySchemaTypeResultProto * msg)3356 DeleteBySchemaTypeResultProto::_Internal::status(const DeleteBySchemaTypeResultProto* msg) {
3357   return *msg->_impl_.status_;
3358 }
3359 const ::icing::lib::DeleteStatsProto&
delete_stats(const DeleteBySchemaTypeResultProto * msg)3360 DeleteBySchemaTypeResultProto::_Internal::delete_stats(const DeleteBySchemaTypeResultProto* msg) {
3361   return *msg->_impl_.delete_stats_;
3362 }
clear_status()3363 void DeleteBySchemaTypeResultProto::clear_status() {
3364   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
3365   _impl_._has_bits_[0] &= ~0x00000001u;
3366 }
clear_delete_stats()3367 void DeleteBySchemaTypeResultProto::clear_delete_stats() {
3368   if (_impl_.delete_stats_ != nullptr) _impl_.delete_stats_->Clear();
3369   _impl_._has_bits_[0] &= ~0x00000002u;
3370 }
DeleteBySchemaTypeResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3371 DeleteBySchemaTypeResultProto::DeleteBySchemaTypeResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3372                          bool is_message_owned)
3373   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3374   SharedCtor(arena, is_message_owned);
3375   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteBySchemaTypeResultProto)
3376 }
DeleteBySchemaTypeResultProto(const DeleteBySchemaTypeResultProto & from)3377 DeleteBySchemaTypeResultProto::DeleteBySchemaTypeResultProto(const DeleteBySchemaTypeResultProto& from)
3378   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3379   DeleteBySchemaTypeResultProto* const _this = this; (void)_this;
3380   new (&_impl_) Impl_{
3381       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3382     , /*decltype(_impl_._cached_size_)*/{}
3383     , decltype(_impl_.status_){nullptr}
3384     , decltype(_impl_.delete_stats_){nullptr}};
3385 
3386   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3387   if (from._internal_has_status()) {
3388     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
3389   }
3390   if (from._internal_has_delete_stats()) {
3391     _this->_impl_.delete_stats_ = new ::icing::lib::DeleteStatsProto(*from._impl_.delete_stats_);
3392   }
3393   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteBySchemaTypeResultProto)
3394 }
3395 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3396 inline void DeleteBySchemaTypeResultProto::SharedCtor(
3397     ::_pb::Arena* arena, bool is_message_owned) {
3398   (void)arena;
3399   (void)is_message_owned;
3400   new (&_impl_) Impl_{
3401       decltype(_impl_._has_bits_){}
3402     , /*decltype(_impl_._cached_size_)*/{}
3403     , decltype(_impl_.status_){nullptr}
3404     , decltype(_impl_.delete_stats_){nullptr}
3405   };
3406 }
3407 
~DeleteBySchemaTypeResultProto()3408 DeleteBySchemaTypeResultProto::~DeleteBySchemaTypeResultProto() {
3409   // @@protoc_insertion_point(destructor:icing.lib.DeleteBySchemaTypeResultProto)
3410   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3411   (void)arena;
3412     return;
3413   }
3414   SharedDtor();
3415 }
3416 
SharedDtor()3417 inline void DeleteBySchemaTypeResultProto::SharedDtor() {
3418   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3419   if (this != internal_default_instance()) delete _impl_.status_;
3420   if (this != internal_default_instance()) delete _impl_.delete_stats_;
3421 }
3422 
SetCachedSize(int size) const3423 void DeleteBySchemaTypeResultProto::SetCachedSize(int size) const {
3424   _impl_._cached_size_.Set(size);
3425 }
3426 
Clear()3427 void DeleteBySchemaTypeResultProto::Clear() {
3428 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteBySchemaTypeResultProto)
3429   ::uint32_t cached_has_bits = 0;
3430   // Prevent compiler warnings about cached_has_bits being unused
3431   (void) cached_has_bits;
3432 
3433   cached_has_bits = _impl_._has_bits_[0];
3434   if (cached_has_bits & 0x00000003u) {
3435     if (cached_has_bits & 0x00000001u) {
3436       GOOGLE_DCHECK(_impl_.status_ != nullptr);
3437       _impl_.status_->Clear();
3438     }
3439     if (cached_has_bits & 0x00000002u) {
3440       GOOGLE_DCHECK(_impl_.delete_stats_ != nullptr);
3441       _impl_.delete_stats_->Clear();
3442     }
3443   }
3444   _impl_._has_bits_.Clear();
3445   _internal_metadata_.Clear<std::string>();
3446 }
3447 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3448 const char* DeleteBySchemaTypeResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3449 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3450   _Internal::HasBits has_bits{};
3451   while (!ctx->Done(&ptr)) {
3452     ::uint32_t tag;
3453     ptr = ::_pbi::ReadTag(ptr, &tag);
3454     switch (tag >> 3) {
3455       // optional .icing.lib.StatusProto status = 1;
3456       case 1:
3457         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3458           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
3459           CHK_(ptr);
3460         } else {
3461           goto handle_unusual;
3462         }
3463         continue;
3464       // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3465       case 2:
3466         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3467           ptr = ctx->ParseMessage(_internal_mutable_delete_stats(), ptr);
3468           CHK_(ptr);
3469         } else {
3470           goto handle_unusual;
3471         }
3472         continue;
3473       default:
3474         goto handle_unusual;
3475     }  // switch
3476   handle_unusual:
3477     if ((tag == 0) || ((tag & 7) == 4)) {
3478       CHK_(ptr);
3479       ctx->SetLastTag(tag);
3480       goto message_done;
3481     }
3482     ptr = UnknownFieldParse(
3483         tag,
3484         _internal_metadata_.mutable_unknown_fields<std::string>(),
3485         ptr, ctx);
3486     CHK_(ptr != nullptr);
3487   }  // while
3488 message_done:
3489   _impl_._has_bits_.Or(has_bits);
3490   return ptr;
3491 failure:
3492   ptr = nullptr;
3493   goto message_done;
3494 #undef CHK_
3495 }
3496 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3497 ::uint8_t* DeleteBySchemaTypeResultProto::_InternalSerialize(
3498     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3499   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteBySchemaTypeResultProto)
3500   ::uint32_t cached_has_bits = 0;
3501   (void) cached_has_bits;
3502 
3503   cached_has_bits = _impl_._has_bits_[0];
3504   // optional .icing.lib.StatusProto status = 1;
3505   if (cached_has_bits & 0x00000001u) {
3506     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3507       InternalWriteMessage(1, _Internal::status(this),
3508         _Internal::status(this).GetCachedSize(), target, stream);
3509   }
3510 
3511   // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3512   if (cached_has_bits & 0x00000002u) {
3513     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3514       InternalWriteMessage(2, _Internal::delete_stats(this),
3515         _Internal::delete_stats(this).GetCachedSize(), target, stream);
3516   }
3517 
3518   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3519     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3520         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3521   }
3522   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteBySchemaTypeResultProto)
3523   return target;
3524 }
3525 
ByteSizeLong() const3526 size_t DeleteBySchemaTypeResultProto::ByteSizeLong() const {
3527 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteBySchemaTypeResultProto)
3528   size_t total_size = 0;
3529 
3530   ::uint32_t cached_has_bits = 0;
3531   // Prevent compiler warnings about cached_has_bits being unused
3532   (void) cached_has_bits;
3533 
3534   cached_has_bits = _impl_._has_bits_[0];
3535   if (cached_has_bits & 0x00000003u) {
3536     // optional .icing.lib.StatusProto status = 1;
3537     if (cached_has_bits & 0x00000001u) {
3538       total_size += 1 +
3539         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3540           *_impl_.status_);
3541     }
3542 
3543     // optional .icing.lib.DeleteStatsProto delete_stats = 2;
3544     if (cached_has_bits & 0x00000002u) {
3545       total_size += 1 +
3546         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3547           *_impl_.delete_stats_);
3548     }
3549 
3550   }
3551   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3552     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3553   }
3554   int cached_size = ::_pbi::ToCachedSize(total_size);
3555   SetCachedSize(cached_size);
3556   return total_size;
3557 }
3558 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3559 void DeleteBySchemaTypeResultProto::CheckTypeAndMergeFrom(
3560     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3561   MergeFrom(*::_pbi::DownCast<const DeleteBySchemaTypeResultProto*>(
3562       &from));
3563 }
3564 
MergeFrom(const DeleteBySchemaTypeResultProto & from)3565 void DeleteBySchemaTypeResultProto::MergeFrom(const DeleteBySchemaTypeResultProto& from) {
3566   DeleteBySchemaTypeResultProto* const _this = this;
3567   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteBySchemaTypeResultProto)
3568   GOOGLE_DCHECK_NE(&from, _this);
3569   ::uint32_t cached_has_bits = 0;
3570   (void) cached_has_bits;
3571 
3572   cached_has_bits = from._impl_._has_bits_[0];
3573   if (cached_has_bits & 0x00000003u) {
3574     if (cached_has_bits & 0x00000001u) {
3575       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
3576           from._internal_status());
3577     }
3578     if (cached_has_bits & 0x00000002u) {
3579       _this->_internal_mutable_delete_stats()->::icing::lib::DeleteStatsProto::MergeFrom(
3580           from._internal_delete_stats());
3581     }
3582   }
3583   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3584 }
3585 
CopyFrom(const DeleteBySchemaTypeResultProto & from)3586 void DeleteBySchemaTypeResultProto::CopyFrom(const DeleteBySchemaTypeResultProto& from) {
3587 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteBySchemaTypeResultProto)
3588   if (&from == this) return;
3589   Clear();
3590   MergeFrom(from);
3591 }
3592 
IsInitialized() const3593 bool DeleteBySchemaTypeResultProto::IsInitialized() const {
3594   return true;
3595 }
3596 
InternalSwap(DeleteBySchemaTypeResultProto * other)3597 void DeleteBySchemaTypeResultProto::InternalSwap(DeleteBySchemaTypeResultProto* other) {
3598   using std::swap;
3599   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3600   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3601   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3602       PROTOBUF_FIELD_OFFSET(DeleteBySchemaTypeResultProto, _impl_.delete_stats_)
3603       + sizeof(DeleteBySchemaTypeResultProto::_impl_.delete_stats_)  // NOLINT
3604       - PROTOBUF_FIELD_OFFSET(DeleteBySchemaTypeResultProto, _impl_.status_)>(
3605           reinterpret_cast<char*>(&_impl_.status_),
3606           reinterpret_cast<char*>(&other->_impl_.status_));
3607 }
3608 
GetTypeName() const3609 std::string DeleteBySchemaTypeResultProto::GetTypeName() const {
3610   return "icing.lib.DeleteBySchemaTypeResultProto";
3611 }
3612 
3613 
3614 // ===================================================================
3615 
3616 class DeleteByQueryResultProto_DocumentGroupInfo::_Internal {
3617  public:
3618   using HasBits = decltype(std::declval<DeleteByQueryResultProto_DocumentGroupInfo>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)3619   static void set_has_namespace_(HasBits* has_bits) {
3620     (*has_bits)[0] |= 1u;
3621   }
set_has_schema(HasBits * has_bits)3622   static void set_has_schema(HasBits* has_bits) {
3623     (*has_bits)[0] |= 2u;
3624   }
3625 };
3626 
DeleteByQueryResultProto_DocumentGroupInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3627 DeleteByQueryResultProto_DocumentGroupInfo::DeleteByQueryResultProto_DocumentGroupInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3628                          bool is_message_owned)
3629   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3630   SharedCtor(arena, is_message_owned);
3631   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3632 }
DeleteByQueryResultProto_DocumentGroupInfo(const DeleteByQueryResultProto_DocumentGroupInfo & from)3633 DeleteByQueryResultProto_DocumentGroupInfo::DeleteByQueryResultProto_DocumentGroupInfo(const DeleteByQueryResultProto_DocumentGroupInfo& from)
3634   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3635   DeleteByQueryResultProto_DocumentGroupInfo* const _this = this; (void)_this;
3636   new (&_impl_) Impl_{
3637       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3638     , /*decltype(_impl_._cached_size_)*/{}
3639     , decltype(_impl_.uris_){from._impl_.uris_}
3640     , decltype(_impl_.namespace__){}
3641     , decltype(_impl_.schema_){}};
3642 
3643   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3644   _impl_.namespace__.InitDefault();
3645   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3646     _impl_.namespace__.Set("", GetArenaForAllocation());
3647   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3648   if (from._internal_has_namespace_()) {
3649     _this->_impl_.namespace__.Set(from._internal_namespace_(),
3650       _this->GetArenaForAllocation());
3651   }
3652   _impl_.schema_.InitDefault();
3653   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3654     _impl_.schema_.Set("", GetArenaForAllocation());
3655   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3656   if (from._internal_has_schema()) {
3657     _this->_impl_.schema_.Set(from._internal_schema(),
3658       _this->GetArenaForAllocation());
3659   }
3660   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3661 }
3662 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3663 inline void DeleteByQueryResultProto_DocumentGroupInfo::SharedCtor(
3664     ::_pb::Arena* arena, bool is_message_owned) {
3665   (void)arena;
3666   (void)is_message_owned;
3667   new (&_impl_) Impl_{
3668       decltype(_impl_._has_bits_){}
3669     , /*decltype(_impl_._cached_size_)*/{}
3670     , decltype(_impl_.uris_){arena}
3671     , decltype(_impl_.namespace__){}
3672     , decltype(_impl_.schema_){}
3673   };
3674   _impl_.namespace__.InitDefault();
3675   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3676     _impl_.namespace__.Set("", GetArenaForAllocation());
3677   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3678   _impl_.schema_.InitDefault();
3679   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3680     _impl_.schema_.Set("", GetArenaForAllocation());
3681   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3682 }
3683 
~DeleteByQueryResultProto_DocumentGroupInfo()3684 DeleteByQueryResultProto_DocumentGroupInfo::~DeleteByQueryResultProto_DocumentGroupInfo() {
3685   // @@protoc_insertion_point(destructor:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3686   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3687   (void)arena;
3688     return;
3689   }
3690   SharedDtor();
3691 }
3692 
SharedDtor()3693 inline void DeleteByQueryResultProto_DocumentGroupInfo::SharedDtor() {
3694   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3695   _impl_.uris_.~RepeatedPtrField();
3696   _impl_.namespace__.Destroy();
3697   _impl_.schema_.Destroy();
3698 }
3699 
SetCachedSize(int size) const3700 void DeleteByQueryResultProto_DocumentGroupInfo::SetCachedSize(int size) const {
3701   _impl_._cached_size_.Set(size);
3702 }
3703 
Clear()3704 void DeleteByQueryResultProto_DocumentGroupInfo::Clear() {
3705 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3706   ::uint32_t cached_has_bits = 0;
3707   // Prevent compiler warnings about cached_has_bits being unused
3708   (void) cached_has_bits;
3709 
3710   _impl_.uris_.Clear();
3711   cached_has_bits = _impl_._has_bits_[0];
3712   if (cached_has_bits & 0x00000003u) {
3713     if (cached_has_bits & 0x00000001u) {
3714       _impl_.namespace__.ClearNonDefaultToEmpty();
3715     }
3716     if (cached_has_bits & 0x00000002u) {
3717       _impl_.schema_.ClearNonDefaultToEmpty();
3718     }
3719   }
3720   _impl_._has_bits_.Clear();
3721   _internal_metadata_.Clear<std::string>();
3722 }
3723 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3724 const char* DeleteByQueryResultProto_DocumentGroupInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3725 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3726   _Internal::HasBits has_bits{};
3727   while (!ctx->Done(&ptr)) {
3728     ::uint32_t tag;
3729     ptr = ::_pbi::ReadTag(ptr, &tag);
3730     switch (tag >> 3) {
3731       // optional string namespace = 1;
3732       case 1:
3733         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3734           auto str = _internal_mutable_namespace_();
3735           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3736           CHK_(ptr);
3737         } else {
3738           goto handle_unusual;
3739         }
3740         continue;
3741       // optional string schema = 2;
3742       case 2:
3743         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3744           auto str = _internal_mutable_schema();
3745           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3746           CHK_(ptr);
3747         } else {
3748           goto handle_unusual;
3749         }
3750         continue;
3751       // repeated string uris = 3;
3752       case 3:
3753         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3754           ptr -= 1;
3755           do {
3756             ptr += 1;
3757             auto str = _internal_add_uris();
3758             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3759             CHK_(ptr);
3760             if (!ctx->DataAvailable(ptr)) break;
3761           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
3762         } else {
3763           goto handle_unusual;
3764         }
3765         continue;
3766       default:
3767         goto handle_unusual;
3768     }  // switch
3769   handle_unusual:
3770     if ((tag == 0) || ((tag & 7) == 4)) {
3771       CHK_(ptr);
3772       ctx->SetLastTag(tag);
3773       goto message_done;
3774     }
3775     ptr = UnknownFieldParse(
3776         tag,
3777         _internal_metadata_.mutable_unknown_fields<std::string>(),
3778         ptr, ctx);
3779     CHK_(ptr != nullptr);
3780   }  // while
3781 message_done:
3782   _impl_._has_bits_.Or(has_bits);
3783   return ptr;
3784 failure:
3785   ptr = nullptr;
3786   goto message_done;
3787 #undef CHK_
3788 }
3789 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3790 ::uint8_t* DeleteByQueryResultProto_DocumentGroupInfo::_InternalSerialize(
3791     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3792   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3793   ::uint32_t cached_has_bits = 0;
3794   (void) cached_has_bits;
3795 
3796   cached_has_bits = _impl_._has_bits_[0];
3797   // optional string namespace = 1;
3798   if (cached_has_bits & 0x00000001u) {
3799     target = stream->WriteStringMaybeAliased(
3800         1, this->_internal_namespace_(), target);
3801   }
3802 
3803   // optional string schema = 2;
3804   if (cached_has_bits & 0x00000002u) {
3805     target = stream->WriteStringMaybeAliased(
3806         2, this->_internal_schema(), target);
3807   }
3808 
3809   // repeated string uris = 3;
3810   for (int i = 0, n = this->_internal_uris_size(); i < n; i++) {
3811     const auto& s = this->_internal_uris(i);
3812     target = stream->WriteString(3, s, target);
3813   }
3814 
3815   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3816     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3817         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3818   }
3819   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3820   return target;
3821 }
3822 
ByteSizeLong() const3823 size_t DeleteByQueryResultProto_DocumentGroupInfo::ByteSizeLong() const {
3824 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3825   size_t total_size = 0;
3826 
3827   ::uint32_t cached_has_bits = 0;
3828   // Prevent compiler warnings about cached_has_bits being unused
3829   (void) cached_has_bits;
3830 
3831   // repeated string uris = 3;
3832   total_size += 1 *
3833       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.uris_.size());
3834   for (int i = 0, n = _impl_.uris_.size(); i < n; i++) {
3835     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3836       _impl_.uris_.Get(i));
3837   }
3838 
3839   cached_has_bits = _impl_._has_bits_[0];
3840   if (cached_has_bits & 0x00000003u) {
3841     // optional string namespace = 1;
3842     if (cached_has_bits & 0x00000001u) {
3843       total_size += 1 +
3844         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3845           this->_internal_namespace_());
3846     }
3847 
3848     // optional string schema = 2;
3849     if (cached_has_bits & 0x00000002u) {
3850       total_size += 1 +
3851         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3852           this->_internal_schema());
3853     }
3854 
3855   }
3856   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3857     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3858   }
3859   int cached_size = ::_pbi::ToCachedSize(total_size);
3860   SetCachedSize(cached_size);
3861   return total_size;
3862 }
3863 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3864 void DeleteByQueryResultProto_DocumentGroupInfo::CheckTypeAndMergeFrom(
3865     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3866   MergeFrom(*::_pbi::DownCast<const DeleteByQueryResultProto_DocumentGroupInfo*>(
3867       &from));
3868 }
3869 
MergeFrom(const DeleteByQueryResultProto_DocumentGroupInfo & from)3870 void DeleteByQueryResultProto_DocumentGroupInfo::MergeFrom(const DeleteByQueryResultProto_DocumentGroupInfo& from) {
3871   DeleteByQueryResultProto_DocumentGroupInfo* const _this = this;
3872   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3873   GOOGLE_DCHECK_NE(&from, _this);
3874   ::uint32_t cached_has_bits = 0;
3875   (void) cached_has_bits;
3876 
3877   _this->_impl_.uris_.MergeFrom(from._impl_.uris_);
3878   cached_has_bits = from._impl_._has_bits_[0];
3879   if (cached_has_bits & 0x00000003u) {
3880     if (cached_has_bits & 0x00000001u) {
3881       _this->_internal_set_namespace_(from._internal_namespace_());
3882     }
3883     if (cached_has_bits & 0x00000002u) {
3884       _this->_internal_set_schema(from._internal_schema());
3885     }
3886   }
3887   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3888 }
3889 
CopyFrom(const DeleteByQueryResultProto_DocumentGroupInfo & from)3890 void DeleteByQueryResultProto_DocumentGroupInfo::CopyFrom(const DeleteByQueryResultProto_DocumentGroupInfo& from) {
3891 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteByQueryResultProto.DocumentGroupInfo)
3892   if (&from == this) return;
3893   Clear();
3894   MergeFrom(from);
3895 }
3896 
IsInitialized() const3897 bool DeleteByQueryResultProto_DocumentGroupInfo::IsInitialized() const {
3898   return true;
3899 }
3900 
InternalSwap(DeleteByQueryResultProto_DocumentGroupInfo * other)3901 void DeleteByQueryResultProto_DocumentGroupInfo::InternalSwap(DeleteByQueryResultProto_DocumentGroupInfo* other) {
3902   using std::swap;
3903   auto* lhs_arena = GetArenaForAllocation();
3904   auto* rhs_arena = other->GetArenaForAllocation();
3905   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3906   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3907   _impl_.uris_.InternalSwap(&other->_impl_.uris_);
3908   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3909       &_impl_.namespace__, lhs_arena,
3910       &other->_impl_.namespace__, rhs_arena
3911   );
3912   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3913       &_impl_.schema_, lhs_arena,
3914       &other->_impl_.schema_, rhs_arena
3915   );
3916 }
3917 
GetTypeName() const3918 std::string DeleteByQueryResultProto_DocumentGroupInfo::GetTypeName() const {
3919   return "icing.lib.DeleteByQueryResultProto.DocumentGroupInfo";
3920 }
3921 
3922 
3923 // ===================================================================
3924 
3925 class DeleteByQueryResultProto::_Internal {
3926  public:
3927   using HasBits = decltype(std::declval<DeleteByQueryResultProto>()._impl_._has_bits_);
3928   static const ::icing::lib::StatusProto& status(const DeleteByQueryResultProto* msg);
set_has_status(HasBits * has_bits)3929   static void set_has_status(HasBits* has_bits) {
3930     (*has_bits)[0] |= 1u;
3931   }
3932   static const ::icing::lib::DeleteByQueryStatsProto& delete_by_query_stats(const DeleteByQueryResultProto* msg);
set_has_delete_by_query_stats(HasBits * has_bits)3933   static void set_has_delete_by_query_stats(HasBits* has_bits) {
3934     (*has_bits)[0] |= 2u;
3935   }
3936 };
3937 
3938 const ::icing::lib::StatusProto&
status(const DeleteByQueryResultProto * msg)3939 DeleteByQueryResultProto::_Internal::status(const DeleteByQueryResultProto* msg) {
3940   return *msg->_impl_.status_;
3941 }
3942 const ::icing::lib::DeleteByQueryStatsProto&
delete_by_query_stats(const DeleteByQueryResultProto * msg)3943 DeleteByQueryResultProto::_Internal::delete_by_query_stats(const DeleteByQueryResultProto* msg) {
3944   return *msg->_impl_.delete_by_query_stats_;
3945 }
clear_status()3946 void DeleteByQueryResultProto::clear_status() {
3947   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
3948   _impl_._has_bits_[0] &= ~0x00000001u;
3949 }
clear_delete_by_query_stats()3950 void DeleteByQueryResultProto::clear_delete_by_query_stats() {
3951   if (_impl_.delete_by_query_stats_ != nullptr) _impl_.delete_by_query_stats_->Clear();
3952   _impl_._has_bits_[0] &= ~0x00000002u;
3953 }
DeleteByQueryResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3954 DeleteByQueryResultProto::DeleteByQueryResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3955                          bool is_message_owned)
3956   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3957   SharedCtor(arena, is_message_owned);
3958   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteByQueryResultProto)
3959 }
DeleteByQueryResultProto(const DeleteByQueryResultProto & from)3960 DeleteByQueryResultProto::DeleteByQueryResultProto(const DeleteByQueryResultProto& from)
3961   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3962   DeleteByQueryResultProto* const _this = this; (void)_this;
3963   new (&_impl_) Impl_{
3964       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3965     , /*decltype(_impl_._cached_size_)*/{}
3966     , decltype(_impl_.deleted_documents_){from._impl_.deleted_documents_}
3967     , decltype(_impl_.status_){nullptr}
3968     , decltype(_impl_.delete_by_query_stats_){nullptr}};
3969 
3970   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3971   if (from._internal_has_status()) {
3972     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
3973   }
3974   if (from._internal_has_delete_by_query_stats()) {
3975     _this->_impl_.delete_by_query_stats_ = new ::icing::lib::DeleteByQueryStatsProto(*from._impl_.delete_by_query_stats_);
3976   }
3977   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteByQueryResultProto)
3978 }
3979 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3980 inline void DeleteByQueryResultProto::SharedCtor(
3981     ::_pb::Arena* arena, bool is_message_owned) {
3982   (void)arena;
3983   (void)is_message_owned;
3984   new (&_impl_) Impl_{
3985       decltype(_impl_._has_bits_){}
3986     , /*decltype(_impl_._cached_size_)*/{}
3987     , decltype(_impl_.deleted_documents_){arena}
3988     , decltype(_impl_.status_){nullptr}
3989     , decltype(_impl_.delete_by_query_stats_){nullptr}
3990   };
3991 }
3992 
~DeleteByQueryResultProto()3993 DeleteByQueryResultProto::~DeleteByQueryResultProto() {
3994   // @@protoc_insertion_point(destructor:icing.lib.DeleteByQueryResultProto)
3995   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3996   (void)arena;
3997     return;
3998   }
3999   SharedDtor();
4000 }
4001 
SharedDtor()4002 inline void DeleteByQueryResultProto::SharedDtor() {
4003   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4004   _impl_.deleted_documents_.~RepeatedPtrField();
4005   if (this != internal_default_instance()) delete _impl_.status_;
4006   if (this != internal_default_instance()) delete _impl_.delete_by_query_stats_;
4007 }
4008 
SetCachedSize(int size) const4009 void DeleteByQueryResultProto::SetCachedSize(int size) const {
4010   _impl_._cached_size_.Set(size);
4011 }
4012 
Clear()4013 void DeleteByQueryResultProto::Clear() {
4014 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteByQueryResultProto)
4015   ::uint32_t cached_has_bits = 0;
4016   // Prevent compiler warnings about cached_has_bits being unused
4017   (void) cached_has_bits;
4018 
4019   _impl_.deleted_documents_.Clear();
4020   cached_has_bits = _impl_._has_bits_[0];
4021   if (cached_has_bits & 0x00000003u) {
4022     if (cached_has_bits & 0x00000001u) {
4023       GOOGLE_DCHECK(_impl_.status_ != nullptr);
4024       _impl_.status_->Clear();
4025     }
4026     if (cached_has_bits & 0x00000002u) {
4027       GOOGLE_DCHECK(_impl_.delete_by_query_stats_ != nullptr);
4028       _impl_.delete_by_query_stats_->Clear();
4029     }
4030   }
4031   _impl_._has_bits_.Clear();
4032   _internal_metadata_.Clear<std::string>();
4033 }
4034 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4035 const char* DeleteByQueryResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4036 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4037   _Internal::HasBits has_bits{};
4038   while (!ctx->Done(&ptr)) {
4039     ::uint32_t tag;
4040     ptr = ::_pbi::ReadTag(ptr, &tag);
4041     switch (tag >> 3) {
4042       // optional .icing.lib.StatusProto status = 1;
4043       case 1:
4044         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4045           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
4046           CHK_(ptr);
4047         } else {
4048           goto handle_unusual;
4049         }
4050         continue;
4051       // optional .icing.lib.DeleteByQueryStatsProto delete_by_query_stats = 3;
4052       case 3:
4053         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
4054           ptr = ctx->ParseMessage(_internal_mutable_delete_by_query_stats(), ptr);
4055           CHK_(ptr);
4056         } else {
4057           goto handle_unusual;
4058         }
4059         continue;
4060       // repeated .icing.lib.DeleteByQueryResultProto.DocumentGroupInfo deleted_documents = 4;
4061       case 4:
4062         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
4063           ptr -= 1;
4064           do {
4065             ptr += 1;
4066             ptr = ctx->ParseMessage(_internal_add_deleted_documents(), ptr);
4067             CHK_(ptr);
4068             if (!ctx->DataAvailable(ptr)) break;
4069           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
4070         } else {
4071           goto handle_unusual;
4072         }
4073         continue;
4074       default:
4075         goto handle_unusual;
4076     }  // switch
4077   handle_unusual:
4078     if ((tag == 0) || ((tag & 7) == 4)) {
4079       CHK_(ptr);
4080       ctx->SetLastTag(tag);
4081       goto message_done;
4082     }
4083     ptr = UnknownFieldParse(
4084         tag,
4085         _internal_metadata_.mutable_unknown_fields<std::string>(),
4086         ptr, ctx);
4087     CHK_(ptr != nullptr);
4088   }  // while
4089 message_done:
4090   _impl_._has_bits_.Or(has_bits);
4091   return ptr;
4092 failure:
4093   ptr = nullptr;
4094   goto message_done;
4095 #undef CHK_
4096 }
4097 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4098 ::uint8_t* DeleteByQueryResultProto::_InternalSerialize(
4099     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4100   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteByQueryResultProto)
4101   ::uint32_t cached_has_bits = 0;
4102   (void) cached_has_bits;
4103 
4104   cached_has_bits = _impl_._has_bits_[0];
4105   // optional .icing.lib.StatusProto status = 1;
4106   if (cached_has_bits & 0x00000001u) {
4107     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4108       InternalWriteMessage(1, _Internal::status(this),
4109         _Internal::status(this).GetCachedSize(), target, stream);
4110   }
4111 
4112   // optional .icing.lib.DeleteByQueryStatsProto delete_by_query_stats = 3;
4113   if (cached_has_bits & 0x00000002u) {
4114     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4115       InternalWriteMessage(3, _Internal::delete_by_query_stats(this),
4116         _Internal::delete_by_query_stats(this).GetCachedSize(), target, stream);
4117   }
4118 
4119   // repeated .icing.lib.DeleteByQueryResultProto.DocumentGroupInfo deleted_documents = 4;
4120   for (unsigned i = 0,
4121       n = static_cast<unsigned>(this->_internal_deleted_documents_size()); i < n; i++) {
4122     const auto& repfield = this->_internal_deleted_documents(i);
4123     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4124         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
4125   }
4126 
4127   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4128     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4129         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4130   }
4131   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteByQueryResultProto)
4132   return target;
4133 }
4134 
ByteSizeLong() const4135 size_t DeleteByQueryResultProto::ByteSizeLong() const {
4136 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteByQueryResultProto)
4137   size_t total_size = 0;
4138 
4139   ::uint32_t cached_has_bits = 0;
4140   // Prevent compiler warnings about cached_has_bits being unused
4141   (void) cached_has_bits;
4142 
4143   // repeated .icing.lib.DeleteByQueryResultProto.DocumentGroupInfo deleted_documents = 4;
4144   total_size += 1UL * this->_internal_deleted_documents_size();
4145   for (const auto& msg : this->_impl_.deleted_documents_) {
4146     total_size +=
4147       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4148   }
4149 
4150   cached_has_bits = _impl_._has_bits_[0];
4151   if (cached_has_bits & 0x00000003u) {
4152     // optional .icing.lib.StatusProto status = 1;
4153     if (cached_has_bits & 0x00000001u) {
4154       total_size += 1 +
4155         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4156           *_impl_.status_);
4157     }
4158 
4159     // optional .icing.lib.DeleteByQueryStatsProto delete_by_query_stats = 3;
4160     if (cached_has_bits & 0x00000002u) {
4161       total_size += 1 +
4162         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4163           *_impl_.delete_by_query_stats_);
4164     }
4165 
4166   }
4167   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4168     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4169   }
4170   int cached_size = ::_pbi::ToCachedSize(total_size);
4171   SetCachedSize(cached_size);
4172   return total_size;
4173 }
4174 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4175 void DeleteByQueryResultProto::CheckTypeAndMergeFrom(
4176     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4177   MergeFrom(*::_pbi::DownCast<const DeleteByQueryResultProto*>(
4178       &from));
4179 }
4180 
MergeFrom(const DeleteByQueryResultProto & from)4181 void DeleteByQueryResultProto::MergeFrom(const DeleteByQueryResultProto& from) {
4182   DeleteByQueryResultProto* const _this = this;
4183   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteByQueryResultProto)
4184   GOOGLE_DCHECK_NE(&from, _this);
4185   ::uint32_t cached_has_bits = 0;
4186   (void) cached_has_bits;
4187 
4188   _this->_impl_.deleted_documents_.MergeFrom(from._impl_.deleted_documents_);
4189   cached_has_bits = from._impl_._has_bits_[0];
4190   if (cached_has_bits & 0x00000003u) {
4191     if (cached_has_bits & 0x00000001u) {
4192       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
4193           from._internal_status());
4194     }
4195     if (cached_has_bits & 0x00000002u) {
4196       _this->_internal_mutable_delete_by_query_stats()->::icing::lib::DeleteByQueryStatsProto::MergeFrom(
4197           from._internal_delete_by_query_stats());
4198     }
4199   }
4200   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4201 }
4202 
CopyFrom(const DeleteByQueryResultProto & from)4203 void DeleteByQueryResultProto::CopyFrom(const DeleteByQueryResultProto& from) {
4204 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteByQueryResultProto)
4205   if (&from == this) return;
4206   Clear();
4207   MergeFrom(from);
4208 }
4209 
IsInitialized() const4210 bool DeleteByQueryResultProto::IsInitialized() const {
4211   return true;
4212 }
4213 
InternalSwap(DeleteByQueryResultProto * other)4214 void DeleteByQueryResultProto::InternalSwap(DeleteByQueryResultProto* other) {
4215   using std::swap;
4216   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4217   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4218   _impl_.deleted_documents_.InternalSwap(&other->_impl_.deleted_documents_);
4219   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4220       PROTOBUF_FIELD_OFFSET(DeleteByQueryResultProto, _impl_.delete_by_query_stats_)
4221       + sizeof(DeleteByQueryResultProto::_impl_.delete_by_query_stats_)  // NOLINT
4222       - PROTOBUF_FIELD_OFFSET(DeleteByQueryResultProto, _impl_.status_)>(
4223           reinterpret_cast<char*>(&_impl_.status_),
4224           reinterpret_cast<char*>(&other->_impl_.status_));
4225 }
4226 
GetTypeName() const4227 std::string DeleteByQueryResultProto::GetTypeName() const {
4228   return "icing.lib.DeleteByQueryResultProto";
4229 }
4230 
4231 
4232 // @@protoc_insertion_point(namespace_scope)
4233 }  // namespace lib
4234 }  // namespace icing
4235 PROTOBUF_NAMESPACE_OPEN
4236 template<> PROTOBUF_NOINLINE ::icing::lib::DocumentProto_InternalFields*
CreateMaybeMessage(Arena * arena)4237 Arena::CreateMaybeMessage< ::icing::lib::DocumentProto_InternalFields >(Arena* arena) {
4238   return Arena::CreateMessageInternal< ::icing::lib::DocumentProto_InternalFields >(arena);
4239 }
4240 template<> PROTOBUF_NOINLINE ::icing::lib::DocumentProto*
CreateMaybeMessage(Arena * arena)4241 Arena::CreateMaybeMessage< ::icing::lib::DocumentProto >(Arena* arena) {
4242   return Arena::CreateMessageInternal< ::icing::lib::DocumentProto >(arena);
4243 }
4244 template<> PROTOBUF_NOINLINE ::icing::lib::PropertyProto_VectorProto*
CreateMaybeMessage(Arena * arena)4245 Arena::CreateMaybeMessage< ::icing::lib::PropertyProto_VectorProto >(Arena* arena) {
4246   return Arena::CreateMessageInternal< ::icing::lib::PropertyProto_VectorProto >(arena);
4247 }
4248 template<> PROTOBUF_NOINLINE ::icing::lib::PropertyProto_BlobHandleProto*
CreateMaybeMessage(Arena * arena)4249 Arena::CreateMaybeMessage< ::icing::lib::PropertyProto_BlobHandleProto >(Arena* arena) {
4250   return Arena::CreateMessageInternal< ::icing::lib::PropertyProto_BlobHandleProto >(arena);
4251 }
4252 template<> PROTOBUF_NOINLINE ::icing::lib::PropertyProto*
CreateMaybeMessage(Arena * arena)4253 Arena::CreateMaybeMessage< ::icing::lib::PropertyProto >(Arena* arena) {
4254   return Arena::CreateMessageInternal< ::icing::lib::PropertyProto >(arena);
4255 }
4256 template<> PROTOBUF_NOINLINE ::icing::lib::PutResultProto*
CreateMaybeMessage(Arena * arena)4257 Arena::CreateMaybeMessage< ::icing::lib::PutResultProto >(Arena* arena) {
4258   return Arena::CreateMessageInternal< ::icing::lib::PutResultProto >(arena);
4259 }
4260 template<> PROTOBUF_NOINLINE ::icing::lib::GetResultProto*
CreateMaybeMessage(Arena * arena)4261 Arena::CreateMaybeMessage< ::icing::lib::GetResultProto >(Arena* arena) {
4262   return Arena::CreateMessageInternal< ::icing::lib::GetResultProto >(arena);
4263 }
4264 template<> PROTOBUF_NOINLINE ::icing::lib::GetAllNamespacesResultProto*
CreateMaybeMessage(Arena * arena)4265 Arena::CreateMaybeMessage< ::icing::lib::GetAllNamespacesResultProto >(Arena* arena) {
4266   return Arena::CreateMessageInternal< ::icing::lib::GetAllNamespacesResultProto >(arena);
4267 }
4268 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteResultProto*
CreateMaybeMessage(Arena * arena)4269 Arena::CreateMaybeMessage< ::icing::lib::DeleteResultProto >(Arena* arena) {
4270   return Arena::CreateMessageInternal< ::icing::lib::DeleteResultProto >(arena);
4271 }
4272 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteByNamespaceResultProto*
CreateMaybeMessage(Arena * arena)4273 Arena::CreateMaybeMessage< ::icing::lib::DeleteByNamespaceResultProto >(Arena* arena) {
4274   return Arena::CreateMessageInternal< ::icing::lib::DeleteByNamespaceResultProto >(arena);
4275 }
4276 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteBySchemaTypeResultProto*
CreateMaybeMessage(Arena * arena)4277 Arena::CreateMaybeMessage< ::icing::lib::DeleteBySchemaTypeResultProto >(Arena* arena) {
4278   return Arena::CreateMessageInternal< ::icing::lib::DeleteBySchemaTypeResultProto >(arena);
4279 }
4280 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteByQueryResultProto_DocumentGroupInfo*
CreateMaybeMessage(Arena * arena)4281 Arena::CreateMaybeMessage< ::icing::lib::DeleteByQueryResultProto_DocumentGroupInfo >(Arena* arena) {
4282   return Arena::CreateMessageInternal< ::icing::lib::DeleteByQueryResultProto_DocumentGroupInfo >(arena);
4283 }
4284 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteByQueryResultProto*
CreateMaybeMessage(Arena * arena)4285 Arena::CreateMaybeMessage< ::icing::lib::DeleteByQueryResultProto >(Arena* arena) {
4286   return Arena::CreateMessageInternal< ::icing::lib::DeleteByQueryResultProto >(arena);
4287 }
4288 PROTOBUF_NAMESPACE_CLOSE
4289 
4290 // @@protoc_insertion_point(global_scope)
4291 #include <google/protobuf/port_undef.inc>
4292