1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/config/inode_file/inode_file_config.proto
3 
4 #include "protos/perfetto/config/inode_file/inode_file_config.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 perfetto {
22 namespace protos {
InodeFileConfig_MountPointMappingEntry(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR InodeFileConfig_MountPointMappingEntry::InodeFileConfig_MountPointMappingEntry(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.scan_roots_)*/{}
28   , /*decltype(_impl_.mountpoint_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
29 struct InodeFileConfig_MountPointMappingEntryDefaultTypeInternal {
InodeFileConfig_MountPointMappingEntryDefaultTypeInternalperfetto::protos::InodeFileConfig_MountPointMappingEntryDefaultTypeInternal30   PROTOBUF_CONSTEXPR InodeFileConfig_MountPointMappingEntryDefaultTypeInternal()
31       : _instance(::_pbi::ConstantInitialized{}) {}
~InodeFileConfig_MountPointMappingEntryDefaultTypeInternalperfetto::protos::InodeFileConfig_MountPointMappingEntryDefaultTypeInternal32   ~InodeFileConfig_MountPointMappingEntryDefaultTypeInternal() {}
33   union {  // NOLINT(misc-non-private-member-variables-in-classes)
34     InodeFileConfig_MountPointMappingEntry _instance;
35   };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InodeFileConfig_MountPointMappingEntryDefaultTypeInternal _InodeFileConfig_MountPointMappingEntry_default_instance_;
InodeFileConfig(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR InodeFileConfig::InodeFileConfig(
39     ::_pbi::ConstantInitialized): _impl_{
40     /*decltype(_impl_._has_bits_)*/{}
41   , /*decltype(_impl_._cached_size_)*/{}
42   , /*decltype(_impl_.scan_mount_points_)*/{}
43   , /*decltype(_impl_.mount_point_mapping_)*/{}
44   , /*decltype(_impl_.scan_interval_ms_)*/0u
45   , /*decltype(_impl_.scan_delay_ms_)*/0u
46   , /*decltype(_impl_.scan_batch_size_)*/0u
47   , /*decltype(_impl_.do_not_scan_)*/false} {}
48 struct InodeFileConfigDefaultTypeInternal {
InodeFileConfigDefaultTypeInternalperfetto::protos::InodeFileConfigDefaultTypeInternal49   PROTOBUF_CONSTEXPR InodeFileConfigDefaultTypeInternal()
50       : _instance(::_pbi::ConstantInitialized{}) {}
~InodeFileConfigDefaultTypeInternalperfetto::protos::InodeFileConfigDefaultTypeInternal51   ~InodeFileConfigDefaultTypeInternal() {}
52   union {  // NOLINT(misc-non-private-member-variables-in-classes)
53     InodeFileConfig _instance;
54   };
55 };
56 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InodeFileConfigDefaultTypeInternal _InodeFileConfig_default_instance_;
57 }  // namespace protos
58 }  // namespace perfetto
59 namespace perfetto {
60 namespace protos {
61 
62 // ===================================================================
63 
64 class InodeFileConfig_MountPointMappingEntry::_Internal {
65  public:
66   using HasBits = decltype(std::declval<InodeFileConfig_MountPointMappingEntry>()._impl_._has_bits_);
set_has_mountpoint(HasBits * has_bits)67   static void set_has_mountpoint(HasBits* has_bits) {
68     (*has_bits)[0] |= 1u;
69   }
70 };
71 
InodeFileConfig_MountPointMappingEntry(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)72 InodeFileConfig_MountPointMappingEntry::InodeFileConfig_MountPointMappingEntry(::PROTOBUF_NAMESPACE_ID::Arena* arena,
73                          bool is_message_owned)
74   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
75   SharedCtor(arena, is_message_owned);
76   // @@protoc_insertion_point(arena_constructor:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
77 }
InodeFileConfig_MountPointMappingEntry(const InodeFileConfig_MountPointMappingEntry & from)78 InodeFileConfig_MountPointMappingEntry::InodeFileConfig_MountPointMappingEntry(const InodeFileConfig_MountPointMappingEntry& from)
79   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
80   InodeFileConfig_MountPointMappingEntry* const _this = this; (void)_this;
81   new (&_impl_) Impl_{
82       decltype(_impl_._has_bits_){from._impl_._has_bits_}
83     , /*decltype(_impl_._cached_size_)*/{}
84     , decltype(_impl_.scan_roots_){from._impl_.scan_roots_}
85     , decltype(_impl_.mountpoint_){}};
86 
87   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
88   _impl_.mountpoint_.InitDefault();
89   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
90     _impl_.mountpoint_.Set("", GetArenaForAllocation());
91   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
92   if (from._internal_has_mountpoint()) {
93     _this->_impl_.mountpoint_.Set(from._internal_mountpoint(),
94       _this->GetArenaForAllocation());
95   }
96   // @@protoc_insertion_point(copy_constructor:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
97 }
98 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)99 inline void InodeFileConfig_MountPointMappingEntry::SharedCtor(
100     ::_pb::Arena* arena, bool is_message_owned) {
101   (void)arena;
102   (void)is_message_owned;
103   new (&_impl_) Impl_{
104       decltype(_impl_._has_bits_){}
105     , /*decltype(_impl_._cached_size_)*/{}
106     , decltype(_impl_.scan_roots_){arena}
107     , decltype(_impl_.mountpoint_){}
108   };
109   _impl_.mountpoint_.InitDefault();
110   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
111     _impl_.mountpoint_.Set("", GetArenaForAllocation());
112   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
113 }
114 
~InodeFileConfig_MountPointMappingEntry()115 InodeFileConfig_MountPointMappingEntry::~InodeFileConfig_MountPointMappingEntry() {
116   // @@protoc_insertion_point(destructor:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
117   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
118   (void)arena;
119     return;
120   }
121   SharedDtor();
122 }
123 
SharedDtor()124 inline void InodeFileConfig_MountPointMappingEntry::SharedDtor() {
125   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
126   _impl_.scan_roots_.~RepeatedPtrField();
127   _impl_.mountpoint_.Destroy();
128 }
129 
SetCachedSize(int size) const130 void InodeFileConfig_MountPointMappingEntry::SetCachedSize(int size) const {
131   _impl_._cached_size_.Set(size);
132 }
133 
Clear()134 void InodeFileConfig_MountPointMappingEntry::Clear() {
135 // @@protoc_insertion_point(message_clear_start:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
136   ::uint32_t cached_has_bits = 0;
137   // Prevent compiler warnings about cached_has_bits being unused
138   (void) cached_has_bits;
139 
140   _impl_.scan_roots_.Clear();
141   cached_has_bits = _impl_._has_bits_[0];
142   if (cached_has_bits & 0x00000001u) {
143     _impl_.mountpoint_.ClearNonDefaultToEmpty();
144   }
145   _impl_._has_bits_.Clear();
146   _internal_metadata_.Clear<std::string>();
147 }
148 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)149 const char* InodeFileConfig_MountPointMappingEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
150 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
151   _Internal::HasBits has_bits{};
152   while (!ctx->Done(&ptr)) {
153     ::uint32_t tag;
154     ptr = ::_pbi::ReadTag(ptr, &tag);
155     switch (tag >> 3) {
156       // optional string mountpoint = 1;
157       case 1:
158         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
159           auto str = _internal_mutable_mountpoint();
160           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
161           CHK_(ptr);
162         } else {
163           goto handle_unusual;
164         }
165         continue;
166       // repeated string scan_roots = 2;
167       case 2:
168         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
169           ptr -= 1;
170           do {
171             ptr += 1;
172             auto str = _internal_add_scan_roots();
173             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
174             CHK_(ptr);
175             if (!ctx->DataAvailable(ptr)) break;
176           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
177         } else {
178           goto handle_unusual;
179         }
180         continue;
181       default:
182         goto handle_unusual;
183     }  // switch
184   handle_unusual:
185     if ((tag == 0) || ((tag & 7) == 4)) {
186       CHK_(ptr);
187       ctx->SetLastTag(tag);
188       goto message_done;
189     }
190     ptr = UnknownFieldParse(
191         tag,
192         _internal_metadata_.mutable_unknown_fields<std::string>(),
193         ptr, ctx);
194     CHK_(ptr != nullptr);
195   }  // while
196 message_done:
197   _impl_._has_bits_.Or(has_bits);
198   return ptr;
199 failure:
200   ptr = nullptr;
201   goto message_done;
202 #undef CHK_
203 }
204 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const205 ::uint8_t* InodeFileConfig_MountPointMappingEntry::_InternalSerialize(
206     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
207   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
208   ::uint32_t cached_has_bits = 0;
209   (void) cached_has_bits;
210 
211   cached_has_bits = _impl_._has_bits_[0];
212   // optional string mountpoint = 1;
213   if (cached_has_bits & 0x00000001u) {
214     target = stream->WriteStringMaybeAliased(
215         1, this->_internal_mountpoint(), target);
216   }
217 
218   // repeated string scan_roots = 2;
219   for (int i = 0, n = this->_internal_scan_roots_size(); i < n; i++) {
220     const auto& s = this->_internal_scan_roots(i);
221     target = stream->WriteString(2, s, target);
222   }
223 
224   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
225     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
226         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
227   }
228   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
229   return target;
230 }
231 
ByteSizeLong() const232 size_t InodeFileConfig_MountPointMappingEntry::ByteSizeLong() const {
233 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
234   size_t total_size = 0;
235 
236   ::uint32_t cached_has_bits = 0;
237   // Prevent compiler warnings about cached_has_bits being unused
238   (void) cached_has_bits;
239 
240   // repeated string scan_roots = 2;
241   total_size += 1 *
242       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.scan_roots_.size());
243   for (int i = 0, n = _impl_.scan_roots_.size(); i < n; i++) {
244     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
245       _impl_.scan_roots_.Get(i));
246   }
247 
248   // optional string mountpoint = 1;
249   cached_has_bits = _impl_._has_bits_[0];
250   if (cached_has_bits & 0x00000001u) {
251     total_size += 1 +
252       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
253         this->_internal_mountpoint());
254   }
255 
256   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
257     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
258   }
259   int cached_size = ::_pbi::ToCachedSize(total_size);
260   SetCachedSize(cached_size);
261   return total_size;
262 }
263 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)264 void InodeFileConfig_MountPointMappingEntry::CheckTypeAndMergeFrom(
265     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
266   MergeFrom(*::_pbi::DownCast<const InodeFileConfig_MountPointMappingEntry*>(
267       &from));
268 }
269 
MergeFrom(const InodeFileConfig_MountPointMappingEntry & from)270 void InodeFileConfig_MountPointMappingEntry::MergeFrom(const InodeFileConfig_MountPointMappingEntry& from) {
271   InodeFileConfig_MountPointMappingEntry* const _this = this;
272   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
273   GOOGLE_DCHECK_NE(&from, _this);
274   ::uint32_t cached_has_bits = 0;
275   (void) cached_has_bits;
276 
277   _this->_impl_.scan_roots_.MergeFrom(from._impl_.scan_roots_);
278   if (from._internal_has_mountpoint()) {
279     _this->_internal_set_mountpoint(from._internal_mountpoint());
280   }
281   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
282 }
283 
CopyFrom(const InodeFileConfig_MountPointMappingEntry & from)284 void InodeFileConfig_MountPointMappingEntry::CopyFrom(const InodeFileConfig_MountPointMappingEntry& from) {
285 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.InodeFileConfig.MountPointMappingEntry)
286   if (&from == this) return;
287   Clear();
288   MergeFrom(from);
289 }
290 
IsInitialized() const291 bool InodeFileConfig_MountPointMappingEntry::IsInitialized() const {
292   return true;
293 }
294 
InternalSwap(InodeFileConfig_MountPointMappingEntry * other)295 void InodeFileConfig_MountPointMappingEntry::InternalSwap(InodeFileConfig_MountPointMappingEntry* other) {
296   using std::swap;
297   auto* lhs_arena = GetArenaForAllocation();
298   auto* rhs_arena = other->GetArenaForAllocation();
299   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
300   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
301   _impl_.scan_roots_.InternalSwap(&other->_impl_.scan_roots_);
302   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
303       &_impl_.mountpoint_, lhs_arena,
304       &other->_impl_.mountpoint_, rhs_arena
305   );
306 }
307 
GetTypeName() const308 std::string InodeFileConfig_MountPointMappingEntry::GetTypeName() const {
309   return "perfetto.protos.InodeFileConfig.MountPointMappingEntry";
310 }
311 
312 
313 // ===================================================================
314 
315 class InodeFileConfig::_Internal {
316  public:
317   using HasBits = decltype(std::declval<InodeFileConfig>()._impl_._has_bits_);
set_has_scan_interval_ms(HasBits * has_bits)318   static void set_has_scan_interval_ms(HasBits* has_bits) {
319     (*has_bits)[0] |= 1u;
320   }
set_has_scan_delay_ms(HasBits * has_bits)321   static void set_has_scan_delay_ms(HasBits* has_bits) {
322     (*has_bits)[0] |= 2u;
323   }
set_has_scan_batch_size(HasBits * has_bits)324   static void set_has_scan_batch_size(HasBits* has_bits) {
325     (*has_bits)[0] |= 4u;
326   }
set_has_do_not_scan(HasBits * has_bits)327   static void set_has_do_not_scan(HasBits* has_bits) {
328     (*has_bits)[0] |= 8u;
329   }
330 };
331 
InodeFileConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)332 InodeFileConfig::InodeFileConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
333                          bool is_message_owned)
334   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
335   SharedCtor(arena, is_message_owned);
336   // @@protoc_insertion_point(arena_constructor:perfetto.protos.InodeFileConfig)
337 }
InodeFileConfig(const InodeFileConfig & from)338 InodeFileConfig::InodeFileConfig(const InodeFileConfig& from)
339   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
340   InodeFileConfig* const _this = this; (void)_this;
341   new (&_impl_) Impl_{
342       decltype(_impl_._has_bits_){from._impl_._has_bits_}
343     , /*decltype(_impl_._cached_size_)*/{}
344     , decltype(_impl_.scan_mount_points_){from._impl_.scan_mount_points_}
345     , decltype(_impl_.mount_point_mapping_){from._impl_.mount_point_mapping_}
346     , decltype(_impl_.scan_interval_ms_){}
347     , decltype(_impl_.scan_delay_ms_){}
348     , decltype(_impl_.scan_batch_size_){}
349     , decltype(_impl_.do_not_scan_){}};
350 
351   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
352   ::memcpy(&_impl_.scan_interval_ms_, &from._impl_.scan_interval_ms_,
353     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.do_not_scan_) -
354     reinterpret_cast<char*>(&_impl_.scan_interval_ms_)) + sizeof(_impl_.do_not_scan_));
355   // @@protoc_insertion_point(copy_constructor:perfetto.protos.InodeFileConfig)
356 }
357 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)358 inline void InodeFileConfig::SharedCtor(
359     ::_pb::Arena* arena, bool is_message_owned) {
360   (void)arena;
361   (void)is_message_owned;
362   new (&_impl_) Impl_{
363       decltype(_impl_._has_bits_){}
364     , /*decltype(_impl_._cached_size_)*/{}
365     , decltype(_impl_.scan_mount_points_){arena}
366     , decltype(_impl_.mount_point_mapping_){arena}
367     , decltype(_impl_.scan_interval_ms_){0u}
368     , decltype(_impl_.scan_delay_ms_){0u}
369     , decltype(_impl_.scan_batch_size_){0u}
370     , decltype(_impl_.do_not_scan_){false}
371   };
372 }
373 
~InodeFileConfig()374 InodeFileConfig::~InodeFileConfig() {
375   // @@protoc_insertion_point(destructor:perfetto.protos.InodeFileConfig)
376   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
377   (void)arena;
378     return;
379   }
380   SharedDtor();
381 }
382 
SharedDtor()383 inline void InodeFileConfig::SharedDtor() {
384   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
385   _impl_.scan_mount_points_.~RepeatedPtrField();
386   _impl_.mount_point_mapping_.~RepeatedPtrField();
387 }
388 
SetCachedSize(int size) const389 void InodeFileConfig::SetCachedSize(int size) const {
390   _impl_._cached_size_.Set(size);
391 }
392 
Clear()393 void InodeFileConfig::Clear() {
394 // @@protoc_insertion_point(message_clear_start:perfetto.protos.InodeFileConfig)
395   ::uint32_t cached_has_bits = 0;
396   // Prevent compiler warnings about cached_has_bits being unused
397   (void) cached_has_bits;
398 
399   _impl_.scan_mount_points_.Clear();
400   _impl_.mount_point_mapping_.Clear();
401   cached_has_bits = _impl_._has_bits_[0];
402   if (cached_has_bits & 0x0000000fu) {
403     ::memset(&_impl_.scan_interval_ms_, 0, static_cast<size_t>(
404         reinterpret_cast<char*>(&_impl_.do_not_scan_) -
405         reinterpret_cast<char*>(&_impl_.scan_interval_ms_)) + sizeof(_impl_.do_not_scan_));
406   }
407   _impl_._has_bits_.Clear();
408   _internal_metadata_.Clear<std::string>();
409 }
410 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)411 const char* InodeFileConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
412 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
413   _Internal::HasBits has_bits{};
414   while (!ctx->Done(&ptr)) {
415     ::uint32_t tag;
416     ptr = ::_pbi::ReadTag(ptr, &tag);
417     switch (tag >> 3) {
418       // optional uint32 scan_interval_ms = 1;
419       case 1:
420         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
421           _Internal::set_has_scan_interval_ms(&has_bits);
422           _impl_.scan_interval_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
423           CHK_(ptr);
424         } else {
425           goto handle_unusual;
426         }
427         continue;
428       // optional uint32 scan_delay_ms = 2;
429       case 2:
430         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
431           _Internal::set_has_scan_delay_ms(&has_bits);
432           _impl_.scan_delay_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
433           CHK_(ptr);
434         } else {
435           goto handle_unusual;
436         }
437         continue;
438       // optional uint32 scan_batch_size = 3;
439       case 3:
440         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
441           _Internal::set_has_scan_batch_size(&has_bits);
442           _impl_.scan_batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
443           CHK_(ptr);
444         } else {
445           goto handle_unusual;
446         }
447         continue;
448       // optional bool do_not_scan = 4;
449       case 4:
450         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
451           _Internal::set_has_do_not_scan(&has_bits);
452           _impl_.do_not_scan_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
453           CHK_(ptr);
454         } else {
455           goto handle_unusual;
456         }
457         continue;
458       // repeated string scan_mount_points = 5;
459       case 5:
460         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
461           ptr -= 1;
462           do {
463             ptr += 1;
464             auto str = _internal_add_scan_mount_points();
465             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
466             CHK_(ptr);
467             if (!ctx->DataAvailable(ptr)) break;
468           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
469         } else {
470           goto handle_unusual;
471         }
472         continue;
473       // repeated .perfetto.protos.InodeFileConfig.MountPointMappingEntry mount_point_mapping = 6;
474       case 6:
475         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
476           ptr -= 1;
477           do {
478             ptr += 1;
479             ptr = ctx->ParseMessage(_internal_add_mount_point_mapping(), ptr);
480             CHK_(ptr);
481             if (!ctx->DataAvailable(ptr)) break;
482           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
483         } else {
484           goto handle_unusual;
485         }
486         continue;
487       default:
488         goto handle_unusual;
489     }  // switch
490   handle_unusual:
491     if ((tag == 0) || ((tag & 7) == 4)) {
492       CHK_(ptr);
493       ctx->SetLastTag(tag);
494       goto message_done;
495     }
496     ptr = UnknownFieldParse(
497         tag,
498         _internal_metadata_.mutable_unknown_fields<std::string>(),
499         ptr, ctx);
500     CHK_(ptr != nullptr);
501   }  // while
502 message_done:
503   _impl_._has_bits_.Or(has_bits);
504   return ptr;
505 failure:
506   ptr = nullptr;
507   goto message_done;
508 #undef CHK_
509 }
510 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const511 ::uint8_t* InodeFileConfig::_InternalSerialize(
512     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
513   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.InodeFileConfig)
514   ::uint32_t cached_has_bits = 0;
515   (void) cached_has_bits;
516 
517   cached_has_bits = _impl_._has_bits_[0];
518   // optional uint32 scan_interval_ms = 1;
519   if (cached_has_bits & 0x00000001u) {
520     target = stream->EnsureSpace(target);
521     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_scan_interval_ms(), target);
522   }
523 
524   // optional uint32 scan_delay_ms = 2;
525   if (cached_has_bits & 0x00000002u) {
526     target = stream->EnsureSpace(target);
527     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_scan_delay_ms(), target);
528   }
529 
530   // optional uint32 scan_batch_size = 3;
531   if (cached_has_bits & 0x00000004u) {
532     target = stream->EnsureSpace(target);
533     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_scan_batch_size(), target);
534   }
535 
536   // optional bool do_not_scan = 4;
537   if (cached_has_bits & 0x00000008u) {
538     target = stream->EnsureSpace(target);
539     target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_do_not_scan(), target);
540   }
541 
542   // repeated string scan_mount_points = 5;
543   for (int i = 0, n = this->_internal_scan_mount_points_size(); i < n; i++) {
544     const auto& s = this->_internal_scan_mount_points(i);
545     target = stream->WriteString(5, s, target);
546   }
547 
548   // repeated .perfetto.protos.InodeFileConfig.MountPointMappingEntry mount_point_mapping = 6;
549   for (unsigned i = 0,
550       n = static_cast<unsigned>(this->_internal_mount_point_mapping_size()); i < n; i++) {
551     const auto& repfield = this->_internal_mount_point_mapping(i);
552     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
553         InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
554   }
555 
556   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
557     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
558         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
559   }
560   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.InodeFileConfig)
561   return target;
562 }
563 
ByteSizeLong() const564 size_t InodeFileConfig::ByteSizeLong() const {
565 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.InodeFileConfig)
566   size_t total_size = 0;
567 
568   ::uint32_t cached_has_bits = 0;
569   // Prevent compiler warnings about cached_has_bits being unused
570   (void) cached_has_bits;
571 
572   // repeated string scan_mount_points = 5;
573   total_size += 1 *
574       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.scan_mount_points_.size());
575   for (int i = 0, n = _impl_.scan_mount_points_.size(); i < n; i++) {
576     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
577       _impl_.scan_mount_points_.Get(i));
578   }
579 
580   // repeated .perfetto.protos.InodeFileConfig.MountPointMappingEntry mount_point_mapping = 6;
581   total_size += 1UL * this->_internal_mount_point_mapping_size();
582   for (const auto& msg : this->_impl_.mount_point_mapping_) {
583     total_size +=
584       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
585   }
586 
587   cached_has_bits = _impl_._has_bits_[0];
588   if (cached_has_bits & 0x0000000fu) {
589     // optional uint32 scan_interval_ms = 1;
590     if (cached_has_bits & 0x00000001u) {
591       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_scan_interval_ms());
592     }
593 
594     // optional uint32 scan_delay_ms = 2;
595     if (cached_has_bits & 0x00000002u) {
596       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_scan_delay_ms());
597     }
598 
599     // optional uint32 scan_batch_size = 3;
600     if (cached_has_bits & 0x00000004u) {
601       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_scan_batch_size());
602     }
603 
604     // optional bool do_not_scan = 4;
605     if (cached_has_bits & 0x00000008u) {
606       total_size += 1 + 1;
607     }
608 
609   }
610   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
611     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
612   }
613   int cached_size = ::_pbi::ToCachedSize(total_size);
614   SetCachedSize(cached_size);
615   return total_size;
616 }
617 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)618 void InodeFileConfig::CheckTypeAndMergeFrom(
619     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
620   MergeFrom(*::_pbi::DownCast<const InodeFileConfig*>(
621       &from));
622 }
623 
MergeFrom(const InodeFileConfig & from)624 void InodeFileConfig::MergeFrom(const InodeFileConfig& from) {
625   InodeFileConfig* const _this = this;
626   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.InodeFileConfig)
627   GOOGLE_DCHECK_NE(&from, _this);
628   ::uint32_t cached_has_bits = 0;
629   (void) cached_has_bits;
630 
631   _this->_impl_.scan_mount_points_.MergeFrom(from._impl_.scan_mount_points_);
632   _this->_impl_.mount_point_mapping_.MergeFrom(from._impl_.mount_point_mapping_);
633   cached_has_bits = from._impl_._has_bits_[0];
634   if (cached_has_bits & 0x0000000fu) {
635     if (cached_has_bits & 0x00000001u) {
636       _this->_impl_.scan_interval_ms_ = from._impl_.scan_interval_ms_;
637     }
638     if (cached_has_bits & 0x00000002u) {
639       _this->_impl_.scan_delay_ms_ = from._impl_.scan_delay_ms_;
640     }
641     if (cached_has_bits & 0x00000004u) {
642       _this->_impl_.scan_batch_size_ = from._impl_.scan_batch_size_;
643     }
644     if (cached_has_bits & 0x00000008u) {
645       _this->_impl_.do_not_scan_ = from._impl_.do_not_scan_;
646     }
647     _this->_impl_._has_bits_[0] |= cached_has_bits;
648   }
649   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
650 }
651 
CopyFrom(const InodeFileConfig & from)652 void InodeFileConfig::CopyFrom(const InodeFileConfig& from) {
653 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.InodeFileConfig)
654   if (&from == this) return;
655   Clear();
656   MergeFrom(from);
657 }
658 
IsInitialized() const659 bool InodeFileConfig::IsInitialized() const {
660   return true;
661 }
662 
InternalSwap(InodeFileConfig * other)663 void InodeFileConfig::InternalSwap(InodeFileConfig* other) {
664   using std::swap;
665   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
666   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
667   _impl_.scan_mount_points_.InternalSwap(&other->_impl_.scan_mount_points_);
668   _impl_.mount_point_mapping_.InternalSwap(&other->_impl_.mount_point_mapping_);
669   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
670       PROTOBUF_FIELD_OFFSET(InodeFileConfig, _impl_.do_not_scan_)
671       + sizeof(InodeFileConfig::_impl_.do_not_scan_)  // NOLINT
672       - PROTOBUF_FIELD_OFFSET(InodeFileConfig, _impl_.scan_interval_ms_)>(
673           reinterpret_cast<char*>(&_impl_.scan_interval_ms_),
674           reinterpret_cast<char*>(&other->_impl_.scan_interval_ms_));
675 }
676 
GetTypeName() const677 std::string InodeFileConfig::GetTypeName() const {
678   return "perfetto.protos.InodeFileConfig";
679 }
680 
681 
682 // @@protoc_insertion_point(namespace_scope)
683 }  // namespace protos
684 }  // namespace perfetto
685 PROTOBUF_NAMESPACE_OPEN
686 template<> PROTOBUF_NOINLINE ::perfetto::protos::InodeFileConfig_MountPointMappingEntry*
CreateMaybeMessage(Arena * arena)687 Arena::CreateMaybeMessage< ::perfetto::protos::InodeFileConfig_MountPointMappingEntry >(Arena* arena) {
688   return Arena::CreateMessageInternal< ::perfetto::protos::InodeFileConfig_MountPointMappingEntry >(arena);
689 }
690 template<> PROTOBUF_NOINLINE ::perfetto::protos::InodeFileConfig*
CreateMaybeMessage(Arena * arena)691 Arena::CreateMaybeMessage< ::perfetto::protos::InodeFileConfig >(Arena* arena) {
692   return Arena::CreateMessageInternal< ::perfetto::protos::InodeFileConfig >(arena);
693 }
694 PROTOBUF_NAMESPACE_CLOSE
695 
696 // @@protoc_insertion_point(global_scope)
697 #include <google/protobuf/port_undef.inc>
698