1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/android/shell_transition.proto
3 
4 #include "protos/perfetto/trace/android/shell_transition.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 {
ShellTransition_Target(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR ShellTransition_Target::ShellTransition_Target(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.mode_)*/0
28   , /*decltype(_impl_.layer_id_)*/0
29   , /*decltype(_impl_.window_id_)*/0
30   , /*decltype(_impl_.flags_)*/0} {}
31 struct ShellTransition_TargetDefaultTypeInternal {
ShellTransition_TargetDefaultTypeInternalperfetto::protos::ShellTransition_TargetDefaultTypeInternal32   PROTOBUF_CONSTEXPR ShellTransition_TargetDefaultTypeInternal()
33       : _instance(::_pbi::ConstantInitialized{}) {}
~ShellTransition_TargetDefaultTypeInternalperfetto::protos::ShellTransition_TargetDefaultTypeInternal34   ~ShellTransition_TargetDefaultTypeInternal() {}
35   union {  // NOLINT(misc-non-private-member-variables-in-classes)
36     ShellTransition_Target _instance;
37   };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShellTransition_TargetDefaultTypeInternal _ShellTransition_Target_default_instance_;
ShellTransition(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR ShellTransition::ShellTransition(
41     ::_pbi::ConstantInitialized): _impl_{
42     /*decltype(_impl_._has_bits_)*/{}
43   , /*decltype(_impl_._cached_size_)*/{}
44   , /*decltype(_impl_.targets_)*/{}
45   , /*decltype(_impl_.create_time_ns_)*/::int64_t{0}
46   , /*decltype(_impl_.send_time_ns_)*/::int64_t{0}
47   , /*decltype(_impl_.dispatch_time_ns_)*/::int64_t{0}
48   , /*decltype(_impl_.merge_time_ns_)*/::int64_t{0}
49   , /*decltype(_impl_.merge_request_time_ns_)*/::int64_t{0}
50   , /*decltype(_impl_.id_)*/0
51   , /*decltype(_impl_.handler_)*/0
52   , /*decltype(_impl_.shell_abort_time_ns_)*/::int64_t{0}
53   , /*decltype(_impl_.wm_abort_time_ns_)*/::int64_t{0}
54   , /*decltype(_impl_.finish_time_ns_)*/::int64_t{0}
55   , /*decltype(_impl_.start_transaction_id_)*/::uint64_t{0u}
56   , /*decltype(_impl_.finish_transaction_id_)*/::uint64_t{0u}
57   , /*decltype(_impl_.type_)*/0
58   , /*decltype(_impl_.merge_target_)*/0
59   , /*decltype(_impl_.starting_window_remove_time_ns_)*/::int64_t{0}
60   , /*decltype(_impl_.flags_)*/0} {}
61 struct ShellTransitionDefaultTypeInternal {
ShellTransitionDefaultTypeInternalperfetto::protos::ShellTransitionDefaultTypeInternal62   PROTOBUF_CONSTEXPR ShellTransitionDefaultTypeInternal()
63       : _instance(::_pbi::ConstantInitialized{}) {}
~ShellTransitionDefaultTypeInternalperfetto::protos::ShellTransitionDefaultTypeInternal64   ~ShellTransitionDefaultTypeInternal() {}
65   union {  // NOLINT(misc-non-private-member-variables-in-classes)
66     ShellTransition _instance;
67   };
68 };
69 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShellTransitionDefaultTypeInternal _ShellTransition_default_instance_;
ShellHandlerMappings(::_pbi::ConstantInitialized)70 PROTOBUF_CONSTEXPR ShellHandlerMappings::ShellHandlerMappings(
71     ::_pbi::ConstantInitialized): _impl_{
72     /*decltype(_impl_.mapping_)*/{}
73   , /*decltype(_impl_._cached_size_)*/{}} {}
74 struct ShellHandlerMappingsDefaultTypeInternal {
ShellHandlerMappingsDefaultTypeInternalperfetto::protos::ShellHandlerMappingsDefaultTypeInternal75   PROTOBUF_CONSTEXPR ShellHandlerMappingsDefaultTypeInternal()
76       : _instance(::_pbi::ConstantInitialized{}) {}
~ShellHandlerMappingsDefaultTypeInternalperfetto::protos::ShellHandlerMappingsDefaultTypeInternal77   ~ShellHandlerMappingsDefaultTypeInternal() {}
78   union {  // NOLINT(misc-non-private-member-variables-in-classes)
79     ShellHandlerMappings _instance;
80   };
81 };
82 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShellHandlerMappingsDefaultTypeInternal _ShellHandlerMappings_default_instance_;
ShellHandlerMapping(::_pbi::ConstantInitialized)83 PROTOBUF_CONSTEXPR ShellHandlerMapping::ShellHandlerMapping(
84     ::_pbi::ConstantInitialized): _impl_{
85     /*decltype(_impl_._has_bits_)*/{}
86   , /*decltype(_impl_._cached_size_)*/{}
87   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
88   , /*decltype(_impl_.id_)*/0} {}
89 struct ShellHandlerMappingDefaultTypeInternal {
ShellHandlerMappingDefaultTypeInternalperfetto::protos::ShellHandlerMappingDefaultTypeInternal90   PROTOBUF_CONSTEXPR ShellHandlerMappingDefaultTypeInternal()
91       : _instance(::_pbi::ConstantInitialized{}) {}
~ShellHandlerMappingDefaultTypeInternalperfetto::protos::ShellHandlerMappingDefaultTypeInternal92   ~ShellHandlerMappingDefaultTypeInternal() {}
93   union {  // NOLINT(misc-non-private-member-variables-in-classes)
94     ShellHandlerMapping _instance;
95   };
96 };
97 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShellHandlerMappingDefaultTypeInternal _ShellHandlerMapping_default_instance_;
98 }  // namespace protos
99 }  // namespace perfetto
100 namespace perfetto {
101 namespace protos {
102 
103 // ===================================================================
104 
105 class ShellTransition_Target::_Internal {
106  public:
107   using HasBits = decltype(std::declval<ShellTransition_Target>()._impl_._has_bits_);
set_has_mode(HasBits * has_bits)108   static void set_has_mode(HasBits* has_bits) {
109     (*has_bits)[0] |= 1u;
110   }
set_has_layer_id(HasBits * has_bits)111   static void set_has_layer_id(HasBits* has_bits) {
112     (*has_bits)[0] |= 2u;
113   }
set_has_window_id(HasBits * has_bits)114   static void set_has_window_id(HasBits* has_bits) {
115     (*has_bits)[0] |= 4u;
116   }
set_has_flags(HasBits * has_bits)117   static void set_has_flags(HasBits* has_bits) {
118     (*has_bits)[0] |= 8u;
119   }
120 };
121 
ShellTransition_Target(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)122 ShellTransition_Target::ShellTransition_Target(::PROTOBUF_NAMESPACE_ID::Arena* arena,
123                          bool is_message_owned)
124   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
125   SharedCtor(arena, is_message_owned);
126   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ShellTransition.Target)
127 }
ShellTransition_Target(const ShellTransition_Target & from)128 ShellTransition_Target::ShellTransition_Target(const ShellTransition_Target& from)
129   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
130   ShellTransition_Target* const _this = this; (void)_this;
131   new (&_impl_) Impl_{
132       decltype(_impl_._has_bits_){from._impl_._has_bits_}
133     , /*decltype(_impl_._cached_size_)*/{}
134     , decltype(_impl_.mode_){}
135     , decltype(_impl_.layer_id_){}
136     , decltype(_impl_.window_id_){}
137     , decltype(_impl_.flags_){}};
138 
139   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
140   ::memcpy(&_impl_.mode_, &from._impl_.mode_,
141     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.flags_) -
142     reinterpret_cast<char*>(&_impl_.mode_)) + sizeof(_impl_.flags_));
143   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ShellTransition.Target)
144 }
145 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)146 inline void ShellTransition_Target::SharedCtor(
147     ::_pb::Arena* arena, bool is_message_owned) {
148   (void)arena;
149   (void)is_message_owned;
150   new (&_impl_) Impl_{
151       decltype(_impl_._has_bits_){}
152     , /*decltype(_impl_._cached_size_)*/{}
153     , decltype(_impl_.mode_){0}
154     , decltype(_impl_.layer_id_){0}
155     , decltype(_impl_.window_id_){0}
156     , decltype(_impl_.flags_){0}
157   };
158 }
159 
~ShellTransition_Target()160 ShellTransition_Target::~ShellTransition_Target() {
161   // @@protoc_insertion_point(destructor:perfetto.protos.ShellTransition.Target)
162   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
163   (void)arena;
164     return;
165   }
166   SharedDtor();
167 }
168 
SharedDtor()169 inline void ShellTransition_Target::SharedDtor() {
170   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
171 }
172 
SetCachedSize(int size) const173 void ShellTransition_Target::SetCachedSize(int size) const {
174   _impl_._cached_size_.Set(size);
175 }
176 
Clear()177 void ShellTransition_Target::Clear() {
178 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ShellTransition.Target)
179   ::uint32_t cached_has_bits = 0;
180   // Prevent compiler warnings about cached_has_bits being unused
181   (void) cached_has_bits;
182 
183   cached_has_bits = _impl_._has_bits_[0];
184   if (cached_has_bits & 0x0000000fu) {
185     ::memset(&_impl_.mode_, 0, static_cast<size_t>(
186         reinterpret_cast<char*>(&_impl_.flags_) -
187         reinterpret_cast<char*>(&_impl_.mode_)) + sizeof(_impl_.flags_));
188   }
189   _impl_._has_bits_.Clear();
190   _internal_metadata_.Clear<std::string>();
191 }
192 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)193 const char* ShellTransition_Target::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
194 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
195   _Internal::HasBits has_bits{};
196   while (!ctx->Done(&ptr)) {
197     ::uint32_t tag;
198     ptr = ::_pbi::ReadTag(ptr, &tag);
199     switch (tag >> 3) {
200       // optional int32 mode = 1;
201       case 1:
202         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
203           _Internal::set_has_mode(&has_bits);
204           _impl_.mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
205           CHK_(ptr);
206         } else {
207           goto handle_unusual;
208         }
209         continue;
210       // optional int32 layer_id = 2;
211       case 2:
212         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
213           _Internal::set_has_layer_id(&has_bits);
214           _impl_.layer_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
215           CHK_(ptr);
216         } else {
217           goto handle_unusual;
218         }
219         continue;
220       // optional int32 window_id = 3;
221       case 3:
222         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
223           _Internal::set_has_window_id(&has_bits);
224           _impl_.window_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
225           CHK_(ptr);
226         } else {
227           goto handle_unusual;
228         }
229         continue;
230       // optional int32 flags = 4;
231       case 4:
232         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
233           _Internal::set_has_flags(&has_bits);
234           _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
235           CHK_(ptr);
236         } else {
237           goto handle_unusual;
238         }
239         continue;
240       default:
241         goto handle_unusual;
242     }  // switch
243   handle_unusual:
244     if ((tag == 0) || ((tag & 7) == 4)) {
245       CHK_(ptr);
246       ctx->SetLastTag(tag);
247       goto message_done;
248     }
249     ptr = UnknownFieldParse(
250         tag,
251         _internal_metadata_.mutable_unknown_fields<std::string>(),
252         ptr, ctx);
253     CHK_(ptr != nullptr);
254   }  // while
255 message_done:
256   _impl_._has_bits_.Or(has_bits);
257   return ptr;
258 failure:
259   ptr = nullptr;
260   goto message_done;
261 #undef CHK_
262 }
263 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const264 ::uint8_t* ShellTransition_Target::_InternalSerialize(
265     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
266   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ShellTransition.Target)
267   ::uint32_t cached_has_bits = 0;
268   (void) cached_has_bits;
269 
270   cached_has_bits = _impl_._has_bits_[0];
271   // optional int32 mode = 1;
272   if (cached_has_bits & 0x00000001u) {
273     target = stream->EnsureSpace(target);
274     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_mode(), target);
275   }
276 
277   // optional int32 layer_id = 2;
278   if (cached_has_bits & 0x00000002u) {
279     target = stream->EnsureSpace(target);
280     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_layer_id(), target);
281   }
282 
283   // optional int32 window_id = 3;
284   if (cached_has_bits & 0x00000004u) {
285     target = stream->EnsureSpace(target);
286     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_window_id(), target);
287   }
288 
289   // optional int32 flags = 4;
290   if (cached_has_bits & 0x00000008u) {
291     target = stream->EnsureSpace(target);
292     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_flags(), target);
293   }
294 
295   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
296     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
297         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
298   }
299   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ShellTransition.Target)
300   return target;
301 }
302 
ByteSizeLong() const303 size_t ShellTransition_Target::ByteSizeLong() const {
304 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ShellTransition.Target)
305   size_t total_size = 0;
306 
307   ::uint32_t cached_has_bits = 0;
308   // Prevent compiler warnings about cached_has_bits being unused
309   (void) cached_has_bits;
310 
311   cached_has_bits = _impl_._has_bits_[0];
312   if (cached_has_bits & 0x0000000fu) {
313     // optional int32 mode = 1;
314     if (cached_has_bits & 0x00000001u) {
315       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mode());
316     }
317 
318     // optional int32 layer_id = 2;
319     if (cached_has_bits & 0x00000002u) {
320       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_layer_id());
321     }
322 
323     // optional int32 window_id = 3;
324     if (cached_has_bits & 0x00000004u) {
325       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_window_id());
326     }
327 
328     // optional int32 flags = 4;
329     if (cached_has_bits & 0x00000008u) {
330       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_flags());
331     }
332 
333   }
334   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
335     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
336   }
337   int cached_size = ::_pbi::ToCachedSize(total_size);
338   SetCachedSize(cached_size);
339   return total_size;
340 }
341 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)342 void ShellTransition_Target::CheckTypeAndMergeFrom(
343     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
344   MergeFrom(*::_pbi::DownCast<const ShellTransition_Target*>(
345       &from));
346 }
347 
MergeFrom(const ShellTransition_Target & from)348 void ShellTransition_Target::MergeFrom(const ShellTransition_Target& from) {
349   ShellTransition_Target* const _this = this;
350   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ShellTransition.Target)
351   GOOGLE_DCHECK_NE(&from, _this);
352   ::uint32_t cached_has_bits = 0;
353   (void) cached_has_bits;
354 
355   cached_has_bits = from._impl_._has_bits_[0];
356   if (cached_has_bits & 0x0000000fu) {
357     if (cached_has_bits & 0x00000001u) {
358       _this->_impl_.mode_ = from._impl_.mode_;
359     }
360     if (cached_has_bits & 0x00000002u) {
361       _this->_impl_.layer_id_ = from._impl_.layer_id_;
362     }
363     if (cached_has_bits & 0x00000004u) {
364       _this->_impl_.window_id_ = from._impl_.window_id_;
365     }
366     if (cached_has_bits & 0x00000008u) {
367       _this->_impl_.flags_ = from._impl_.flags_;
368     }
369     _this->_impl_._has_bits_[0] |= cached_has_bits;
370   }
371   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
372 }
373 
CopyFrom(const ShellTransition_Target & from)374 void ShellTransition_Target::CopyFrom(const ShellTransition_Target& from) {
375 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ShellTransition.Target)
376   if (&from == this) return;
377   Clear();
378   MergeFrom(from);
379 }
380 
IsInitialized() const381 bool ShellTransition_Target::IsInitialized() const {
382   return true;
383 }
384 
InternalSwap(ShellTransition_Target * other)385 void ShellTransition_Target::InternalSwap(ShellTransition_Target* other) {
386   using std::swap;
387   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
388   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
389   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
390       PROTOBUF_FIELD_OFFSET(ShellTransition_Target, _impl_.flags_)
391       + sizeof(ShellTransition_Target::_impl_.flags_)  // NOLINT
392       - PROTOBUF_FIELD_OFFSET(ShellTransition_Target, _impl_.mode_)>(
393           reinterpret_cast<char*>(&_impl_.mode_),
394           reinterpret_cast<char*>(&other->_impl_.mode_));
395 }
396 
GetTypeName() const397 std::string ShellTransition_Target::GetTypeName() const {
398   return "perfetto.protos.ShellTransition.Target";
399 }
400 
401 
402 // ===================================================================
403 
404 class ShellTransition::_Internal {
405  public:
406   using HasBits = decltype(std::declval<ShellTransition>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)407   static void set_has_id(HasBits* has_bits) {
408     (*has_bits)[0] |= 32u;
409   }
set_has_create_time_ns(HasBits * has_bits)410   static void set_has_create_time_ns(HasBits* has_bits) {
411     (*has_bits)[0] |= 1u;
412   }
set_has_send_time_ns(HasBits * has_bits)413   static void set_has_send_time_ns(HasBits* has_bits) {
414     (*has_bits)[0] |= 2u;
415   }
set_has_dispatch_time_ns(HasBits * has_bits)416   static void set_has_dispatch_time_ns(HasBits* has_bits) {
417     (*has_bits)[0] |= 4u;
418   }
set_has_merge_time_ns(HasBits * has_bits)419   static void set_has_merge_time_ns(HasBits* has_bits) {
420     (*has_bits)[0] |= 8u;
421   }
set_has_merge_request_time_ns(HasBits * has_bits)422   static void set_has_merge_request_time_ns(HasBits* has_bits) {
423     (*has_bits)[0] |= 16u;
424   }
set_has_shell_abort_time_ns(HasBits * has_bits)425   static void set_has_shell_abort_time_ns(HasBits* has_bits) {
426     (*has_bits)[0] |= 128u;
427   }
set_has_wm_abort_time_ns(HasBits * has_bits)428   static void set_has_wm_abort_time_ns(HasBits* has_bits) {
429     (*has_bits)[0] |= 256u;
430   }
set_has_finish_time_ns(HasBits * has_bits)431   static void set_has_finish_time_ns(HasBits* has_bits) {
432     (*has_bits)[0] |= 512u;
433   }
set_has_start_transaction_id(HasBits * has_bits)434   static void set_has_start_transaction_id(HasBits* has_bits) {
435     (*has_bits)[0] |= 1024u;
436   }
set_has_finish_transaction_id(HasBits * has_bits)437   static void set_has_finish_transaction_id(HasBits* has_bits) {
438     (*has_bits)[0] |= 2048u;
439   }
set_has_handler(HasBits * has_bits)440   static void set_has_handler(HasBits* has_bits) {
441     (*has_bits)[0] |= 64u;
442   }
set_has_type(HasBits * has_bits)443   static void set_has_type(HasBits* has_bits) {
444     (*has_bits)[0] |= 4096u;
445   }
set_has_merge_target(HasBits * has_bits)446   static void set_has_merge_target(HasBits* has_bits) {
447     (*has_bits)[0] |= 8192u;
448   }
set_has_flags(HasBits * has_bits)449   static void set_has_flags(HasBits* has_bits) {
450     (*has_bits)[0] |= 32768u;
451   }
set_has_starting_window_remove_time_ns(HasBits * has_bits)452   static void set_has_starting_window_remove_time_ns(HasBits* has_bits) {
453     (*has_bits)[0] |= 16384u;
454   }
455 };
456 
ShellTransition(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)457 ShellTransition::ShellTransition(::PROTOBUF_NAMESPACE_ID::Arena* arena,
458                          bool is_message_owned)
459   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
460   SharedCtor(arena, is_message_owned);
461   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ShellTransition)
462 }
ShellTransition(const ShellTransition & from)463 ShellTransition::ShellTransition(const ShellTransition& from)
464   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
465   ShellTransition* const _this = this; (void)_this;
466   new (&_impl_) Impl_{
467       decltype(_impl_._has_bits_){from._impl_._has_bits_}
468     , /*decltype(_impl_._cached_size_)*/{}
469     , decltype(_impl_.targets_){from._impl_.targets_}
470     , decltype(_impl_.create_time_ns_){}
471     , decltype(_impl_.send_time_ns_){}
472     , decltype(_impl_.dispatch_time_ns_){}
473     , decltype(_impl_.merge_time_ns_){}
474     , decltype(_impl_.merge_request_time_ns_){}
475     , decltype(_impl_.id_){}
476     , decltype(_impl_.handler_){}
477     , decltype(_impl_.shell_abort_time_ns_){}
478     , decltype(_impl_.wm_abort_time_ns_){}
479     , decltype(_impl_.finish_time_ns_){}
480     , decltype(_impl_.start_transaction_id_){}
481     , decltype(_impl_.finish_transaction_id_){}
482     , decltype(_impl_.type_){}
483     , decltype(_impl_.merge_target_){}
484     , decltype(_impl_.starting_window_remove_time_ns_){}
485     , decltype(_impl_.flags_){}};
486 
487   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
488   ::memcpy(&_impl_.create_time_ns_, &from._impl_.create_time_ns_,
489     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.flags_) -
490     reinterpret_cast<char*>(&_impl_.create_time_ns_)) + sizeof(_impl_.flags_));
491   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ShellTransition)
492 }
493 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)494 inline void ShellTransition::SharedCtor(
495     ::_pb::Arena* arena, bool is_message_owned) {
496   (void)arena;
497   (void)is_message_owned;
498   new (&_impl_) Impl_{
499       decltype(_impl_._has_bits_){}
500     , /*decltype(_impl_._cached_size_)*/{}
501     , decltype(_impl_.targets_){arena}
502     , decltype(_impl_.create_time_ns_){::int64_t{0}}
503     , decltype(_impl_.send_time_ns_){::int64_t{0}}
504     , decltype(_impl_.dispatch_time_ns_){::int64_t{0}}
505     , decltype(_impl_.merge_time_ns_){::int64_t{0}}
506     , decltype(_impl_.merge_request_time_ns_){::int64_t{0}}
507     , decltype(_impl_.id_){0}
508     , decltype(_impl_.handler_){0}
509     , decltype(_impl_.shell_abort_time_ns_){::int64_t{0}}
510     , decltype(_impl_.wm_abort_time_ns_){::int64_t{0}}
511     , decltype(_impl_.finish_time_ns_){::int64_t{0}}
512     , decltype(_impl_.start_transaction_id_){::uint64_t{0u}}
513     , decltype(_impl_.finish_transaction_id_){::uint64_t{0u}}
514     , decltype(_impl_.type_){0}
515     , decltype(_impl_.merge_target_){0}
516     , decltype(_impl_.starting_window_remove_time_ns_){::int64_t{0}}
517     , decltype(_impl_.flags_){0}
518   };
519 }
520 
~ShellTransition()521 ShellTransition::~ShellTransition() {
522   // @@protoc_insertion_point(destructor:perfetto.protos.ShellTransition)
523   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
524   (void)arena;
525     return;
526   }
527   SharedDtor();
528 }
529 
SharedDtor()530 inline void ShellTransition::SharedDtor() {
531   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
532   _impl_.targets_.~RepeatedPtrField();
533 }
534 
SetCachedSize(int size) const535 void ShellTransition::SetCachedSize(int size) const {
536   _impl_._cached_size_.Set(size);
537 }
538 
Clear()539 void ShellTransition::Clear() {
540 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ShellTransition)
541   ::uint32_t cached_has_bits = 0;
542   // Prevent compiler warnings about cached_has_bits being unused
543   (void) cached_has_bits;
544 
545   _impl_.targets_.Clear();
546   cached_has_bits = _impl_._has_bits_[0];
547   if (cached_has_bits & 0x000000ffu) {
548     ::memset(&_impl_.create_time_ns_, 0, static_cast<size_t>(
549         reinterpret_cast<char*>(&_impl_.shell_abort_time_ns_) -
550         reinterpret_cast<char*>(&_impl_.create_time_ns_)) + sizeof(_impl_.shell_abort_time_ns_));
551   }
552   if (cached_has_bits & 0x0000ff00u) {
553     ::memset(&_impl_.wm_abort_time_ns_, 0, static_cast<size_t>(
554         reinterpret_cast<char*>(&_impl_.flags_) -
555         reinterpret_cast<char*>(&_impl_.wm_abort_time_ns_)) + sizeof(_impl_.flags_));
556   }
557   _impl_._has_bits_.Clear();
558   _internal_metadata_.Clear<std::string>();
559 }
560 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)561 const char* ShellTransition::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
562 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
563   _Internal::HasBits has_bits{};
564   while (!ctx->Done(&ptr)) {
565     ::uint32_t tag;
566     ptr = ::_pbi::ReadTag(ptr, &tag);
567     switch (tag >> 3) {
568       // optional int32 id = 1;
569       case 1:
570         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
571           _Internal::set_has_id(&has_bits);
572           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
573           CHK_(ptr);
574         } else {
575           goto handle_unusual;
576         }
577         continue;
578       // optional int64 create_time_ns = 2;
579       case 2:
580         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
581           _Internal::set_has_create_time_ns(&has_bits);
582           _impl_.create_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
583           CHK_(ptr);
584         } else {
585           goto handle_unusual;
586         }
587         continue;
588       // optional int64 send_time_ns = 3;
589       case 3:
590         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
591           _Internal::set_has_send_time_ns(&has_bits);
592           _impl_.send_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
593           CHK_(ptr);
594         } else {
595           goto handle_unusual;
596         }
597         continue;
598       // optional int64 dispatch_time_ns = 4;
599       case 4:
600         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
601           _Internal::set_has_dispatch_time_ns(&has_bits);
602           _impl_.dispatch_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
603           CHK_(ptr);
604         } else {
605           goto handle_unusual;
606         }
607         continue;
608       // optional int64 merge_time_ns = 5;
609       case 5:
610         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
611           _Internal::set_has_merge_time_ns(&has_bits);
612           _impl_.merge_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
613           CHK_(ptr);
614         } else {
615           goto handle_unusual;
616         }
617         continue;
618       // optional int64 merge_request_time_ns = 6;
619       case 6:
620         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
621           _Internal::set_has_merge_request_time_ns(&has_bits);
622           _impl_.merge_request_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
623           CHK_(ptr);
624         } else {
625           goto handle_unusual;
626         }
627         continue;
628       // optional int64 shell_abort_time_ns = 7;
629       case 7:
630         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
631           _Internal::set_has_shell_abort_time_ns(&has_bits);
632           _impl_.shell_abort_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
633           CHK_(ptr);
634         } else {
635           goto handle_unusual;
636         }
637         continue;
638       // optional int64 wm_abort_time_ns = 8;
639       case 8:
640         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
641           _Internal::set_has_wm_abort_time_ns(&has_bits);
642           _impl_.wm_abort_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
643           CHK_(ptr);
644         } else {
645           goto handle_unusual;
646         }
647         continue;
648       // optional int64 finish_time_ns = 9;
649       case 9:
650         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
651           _Internal::set_has_finish_time_ns(&has_bits);
652           _impl_.finish_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
653           CHK_(ptr);
654         } else {
655           goto handle_unusual;
656         }
657         continue;
658       // optional uint64 start_transaction_id = 10;
659       case 10:
660         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
661           _Internal::set_has_start_transaction_id(&has_bits);
662           _impl_.start_transaction_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
663           CHK_(ptr);
664         } else {
665           goto handle_unusual;
666         }
667         continue;
668       // optional uint64 finish_transaction_id = 11;
669       case 11:
670         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
671           _Internal::set_has_finish_transaction_id(&has_bits);
672           _impl_.finish_transaction_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
673           CHK_(ptr);
674         } else {
675           goto handle_unusual;
676         }
677         continue;
678       // optional int32 handler = 12;
679       case 12:
680         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
681           _Internal::set_has_handler(&has_bits);
682           _impl_.handler_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
683           CHK_(ptr);
684         } else {
685           goto handle_unusual;
686         }
687         continue;
688       // optional int32 type = 13;
689       case 13:
690         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
691           _Internal::set_has_type(&has_bits);
692           _impl_.type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
693           CHK_(ptr);
694         } else {
695           goto handle_unusual;
696         }
697         continue;
698       // repeated .perfetto.protos.ShellTransition.Target targets = 14;
699       case 14:
700         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
701           ptr -= 1;
702           do {
703             ptr += 1;
704             ptr = ctx->ParseMessage(_internal_add_targets(), ptr);
705             CHK_(ptr);
706             if (!ctx->DataAvailable(ptr)) break;
707           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
708         } else {
709           goto handle_unusual;
710         }
711         continue;
712       // optional int32 merge_target = 15;
713       case 15:
714         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
715           _Internal::set_has_merge_target(&has_bits);
716           _impl_.merge_target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
717           CHK_(ptr);
718         } else {
719           goto handle_unusual;
720         }
721         continue;
722       // optional int32 flags = 16;
723       case 16:
724         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
725           _Internal::set_has_flags(&has_bits);
726           _impl_.flags_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
727           CHK_(ptr);
728         } else {
729           goto handle_unusual;
730         }
731         continue;
732       // optional int64 starting_window_remove_time_ns = 17;
733       case 17:
734         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
735           _Internal::set_has_starting_window_remove_time_ns(&has_bits);
736           _impl_.starting_window_remove_time_ns_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
737           CHK_(ptr);
738         } else {
739           goto handle_unusual;
740         }
741         continue;
742       default:
743         goto handle_unusual;
744     }  // switch
745   handle_unusual:
746     if ((tag == 0) || ((tag & 7) == 4)) {
747       CHK_(ptr);
748       ctx->SetLastTag(tag);
749       goto message_done;
750     }
751     ptr = UnknownFieldParse(
752         tag,
753         _internal_metadata_.mutable_unknown_fields<std::string>(),
754         ptr, ctx);
755     CHK_(ptr != nullptr);
756   }  // while
757 message_done:
758   _impl_._has_bits_.Or(has_bits);
759   return ptr;
760 failure:
761   ptr = nullptr;
762   goto message_done;
763 #undef CHK_
764 }
765 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const766 ::uint8_t* ShellTransition::_InternalSerialize(
767     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
768   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ShellTransition)
769   ::uint32_t cached_has_bits = 0;
770   (void) cached_has_bits;
771 
772   cached_has_bits = _impl_._has_bits_[0];
773   // optional int32 id = 1;
774   if (cached_has_bits & 0x00000020u) {
775     target = stream->EnsureSpace(target);
776     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
777   }
778 
779   // optional int64 create_time_ns = 2;
780   if (cached_has_bits & 0x00000001u) {
781     target = stream->EnsureSpace(target);
782     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_create_time_ns(), target);
783   }
784 
785   // optional int64 send_time_ns = 3;
786   if (cached_has_bits & 0x00000002u) {
787     target = stream->EnsureSpace(target);
788     target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_send_time_ns(), target);
789   }
790 
791   // optional int64 dispatch_time_ns = 4;
792   if (cached_has_bits & 0x00000004u) {
793     target = stream->EnsureSpace(target);
794     target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_dispatch_time_ns(), target);
795   }
796 
797   // optional int64 merge_time_ns = 5;
798   if (cached_has_bits & 0x00000008u) {
799     target = stream->EnsureSpace(target);
800     target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_merge_time_ns(), target);
801   }
802 
803   // optional int64 merge_request_time_ns = 6;
804   if (cached_has_bits & 0x00000010u) {
805     target = stream->EnsureSpace(target);
806     target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_merge_request_time_ns(), target);
807   }
808 
809   // optional int64 shell_abort_time_ns = 7;
810   if (cached_has_bits & 0x00000080u) {
811     target = stream->EnsureSpace(target);
812     target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_shell_abort_time_ns(), target);
813   }
814 
815   // optional int64 wm_abort_time_ns = 8;
816   if (cached_has_bits & 0x00000100u) {
817     target = stream->EnsureSpace(target);
818     target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_wm_abort_time_ns(), target);
819   }
820 
821   // optional int64 finish_time_ns = 9;
822   if (cached_has_bits & 0x00000200u) {
823     target = stream->EnsureSpace(target);
824     target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_finish_time_ns(), target);
825   }
826 
827   // optional uint64 start_transaction_id = 10;
828   if (cached_has_bits & 0x00000400u) {
829     target = stream->EnsureSpace(target);
830     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(10, this->_internal_start_transaction_id(), target);
831   }
832 
833   // optional uint64 finish_transaction_id = 11;
834   if (cached_has_bits & 0x00000800u) {
835     target = stream->EnsureSpace(target);
836     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(11, this->_internal_finish_transaction_id(), target);
837   }
838 
839   // optional int32 handler = 12;
840   if (cached_has_bits & 0x00000040u) {
841     target = stream->EnsureSpace(target);
842     target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_handler(), target);
843   }
844 
845   // optional int32 type = 13;
846   if (cached_has_bits & 0x00001000u) {
847     target = stream->EnsureSpace(target);
848     target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_type(), target);
849   }
850 
851   // repeated .perfetto.protos.ShellTransition.Target targets = 14;
852   for (unsigned i = 0,
853       n = static_cast<unsigned>(this->_internal_targets_size()); i < n; i++) {
854     const auto& repfield = this->_internal_targets(i);
855     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
856         InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
857   }
858 
859   // optional int32 merge_target = 15;
860   if (cached_has_bits & 0x00002000u) {
861     target = stream->EnsureSpace(target);
862     target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_merge_target(), target);
863   }
864 
865   // optional int32 flags = 16;
866   if (cached_has_bits & 0x00008000u) {
867     target = stream->EnsureSpace(target);
868     target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_flags(), target);
869   }
870 
871   // optional int64 starting_window_remove_time_ns = 17;
872   if (cached_has_bits & 0x00004000u) {
873     target = stream->EnsureSpace(target);
874     target = ::_pbi::WireFormatLite::WriteInt64ToArray(17, this->_internal_starting_window_remove_time_ns(), target);
875   }
876 
877   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
878     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
879         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
880   }
881   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ShellTransition)
882   return target;
883 }
884 
ByteSizeLong() const885 size_t ShellTransition::ByteSizeLong() const {
886 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ShellTransition)
887   size_t total_size = 0;
888 
889   ::uint32_t cached_has_bits = 0;
890   // Prevent compiler warnings about cached_has_bits being unused
891   (void) cached_has_bits;
892 
893   // repeated .perfetto.protos.ShellTransition.Target targets = 14;
894   total_size += 1UL * this->_internal_targets_size();
895   for (const auto& msg : this->_impl_.targets_) {
896     total_size +=
897       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
898   }
899 
900   cached_has_bits = _impl_._has_bits_[0];
901   if (cached_has_bits & 0x000000ffu) {
902     // optional int64 create_time_ns = 2;
903     if (cached_has_bits & 0x00000001u) {
904       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_create_time_ns());
905     }
906 
907     // optional int64 send_time_ns = 3;
908     if (cached_has_bits & 0x00000002u) {
909       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_send_time_ns());
910     }
911 
912     // optional int64 dispatch_time_ns = 4;
913     if (cached_has_bits & 0x00000004u) {
914       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_dispatch_time_ns());
915     }
916 
917     // optional int64 merge_time_ns = 5;
918     if (cached_has_bits & 0x00000008u) {
919       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_merge_time_ns());
920     }
921 
922     // optional int64 merge_request_time_ns = 6;
923     if (cached_has_bits & 0x00000010u) {
924       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_merge_request_time_ns());
925     }
926 
927     // optional int32 id = 1;
928     if (cached_has_bits & 0x00000020u) {
929       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
930     }
931 
932     // optional int32 handler = 12;
933     if (cached_has_bits & 0x00000040u) {
934       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_handler());
935     }
936 
937     // optional int64 shell_abort_time_ns = 7;
938     if (cached_has_bits & 0x00000080u) {
939       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_shell_abort_time_ns());
940     }
941 
942   }
943   if (cached_has_bits & 0x0000ff00u) {
944     // optional int64 wm_abort_time_ns = 8;
945     if (cached_has_bits & 0x00000100u) {
946       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_wm_abort_time_ns());
947     }
948 
949     // optional int64 finish_time_ns = 9;
950     if (cached_has_bits & 0x00000200u) {
951       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_finish_time_ns());
952     }
953 
954     // optional uint64 start_transaction_id = 10;
955     if (cached_has_bits & 0x00000400u) {
956       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_start_transaction_id());
957     }
958 
959     // optional uint64 finish_transaction_id = 11;
960     if (cached_has_bits & 0x00000800u) {
961       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_finish_transaction_id());
962     }
963 
964     // optional int32 type = 13;
965     if (cached_has_bits & 0x00001000u) {
966       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_type());
967     }
968 
969     // optional int32 merge_target = 15;
970     if (cached_has_bits & 0x00002000u) {
971       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_merge_target());
972     }
973 
974     // optional int64 starting_window_remove_time_ns = 17;
975     if (cached_has_bits & 0x00004000u) {
976       total_size += 2 +
977         ::_pbi::WireFormatLite::Int64Size(
978           this->_internal_starting_window_remove_time_ns());
979     }
980 
981     // optional int32 flags = 16;
982     if (cached_has_bits & 0x00008000u) {
983       total_size += 2 +
984         ::_pbi::WireFormatLite::Int32Size(
985           this->_internal_flags());
986     }
987 
988   }
989   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
990     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
991   }
992   int cached_size = ::_pbi::ToCachedSize(total_size);
993   SetCachedSize(cached_size);
994   return total_size;
995 }
996 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)997 void ShellTransition::CheckTypeAndMergeFrom(
998     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
999   MergeFrom(*::_pbi::DownCast<const ShellTransition*>(
1000       &from));
1001 }
1002 
MergeFrom(const ShellTransition & from)1003 void ShellTransition::MergeFrom(const ShellTransition& from) {
1004   ShellTransition* const _this = this;
1005   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ShellTransition)
1006   GOOGLE_DCHECK_NE(&from, _this);
1007   ::uint32_t cached_has_bits = 0;
1008   (void) cached_has_bits;
1009 
1010   _this->_impl_.targets_.MergeFrom(from._impl_.targets_);
1011   cached_has_bits = from._impl_._has_bits_[0];
1012   if (cached_has_bits & 0x000000ffu) {
1013     if (cached_has_bits & 0x00000001u) {
1014       _this->_impl_.create_time_ns_ = from._impl_.create_time_ns_;
1015     }
1016     if (cached_has_bits & 0x00000002u) {
1017       _this->_impl_.send_time_ns_ = from._impl_.send_time_ns_;
1018     }
1019     if (cached_has_bits & 0x00000004u) {
1020       _this->_impl_.dispatch_time_ns_ = from._impl_.dispatch_time_ns_;
1021     }
1022     if (cached_has_bits & 0x00000008u) {
1023       _this->_impl_.merge_time_ns_ = from._impl_.merge_time_ns_;
1024     }
1025     if (cached_has_bits & 0x00000010u) {
1026       _this->_impl_.merge_request_time_ns_ = from._impl_.merge_request_time_ns_;
1027     }
1028     if (cached_has_bits & 0x00000020u) {
1029       _this->_impl_.id_ = from._impl_.id_;
1030     }
1031     if (cached_has_bits & 0x00000040u) {
1032       _this->_impl_.handler_ = from._impl_.handler_;
1033     }
1034     if (cached_has_bits & 0x00000080u) {
1035       _this->_impl_.shell_abort_time_ns_ = from._impl_.shell_abort_time_ns_;
1036     }
1037     _this->_impl_._has_bits_[0] |= cached_has_bits;
1038   }
1039   if (cached_has_bits & 0x0000ff00u) {
1040     if (cached_has_bits & 0x00000100u) {
1041       _this->_impl_.wm_abort_time_ns_ = from._impl_.wm_abort_time_ns_;
1042     }
1043     if (cached_has_bits & 0x00000200u) {
1044       _this->_impl_.finish_time_ns_ = from._impl_.finish_time_ns_;
1045     }
1046     if (cached_has_bits & 0x00000400u) {
1047       _this->_impl_.start_transaction_id_ = from._impl_.start_transaction_id_;
1048     }
1049     if (cached_has_bits & 0x00000800u) {
1050       _this->_impl_.finish_transaction_id_ = from._impl_.finish_transaction_id_;
1051     }
1052     if (cached_has_bits & 0x00001000u) {
1053       _this->_impl_.type_ = from._impl_.type_;
1054     }
1055     if (cached_has_bits & 0x00002000u) {
1056       _this->_impl_.merge_target_ = from._impl_.merge_target_;
1057     }
1058     if (cached_has_bits & 0x00004000u) {
1059       _this->_impl_.starting_window_remove_time_ns_ = from._impl_.starting_window_remove_time_ns_;
1060     }
1061     if (cached_has_bits & 0x00008000u) {
1062       _this->_impl_.flags_ = from._impl_.flags_;
1063     }
1064     _this->_impl_._has_bits_[0] |= cached_has_bits;
1065   }
1066   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1067 }
1068 
CopyFrom(const ShellTransition & from)1069 void ShellTransition::CopyFrom(const ShellTransition& from) {
1070 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ShellTransition)
1071   if (&from == this) return;
1072   Clear();
1073   MergeFrom(from);
1074 }
1075 
IsInitialized() const1076 bool ShellTransition::IsInitialized() const {
1077   return true;
1078 }
1079 
InternalSwap(ShellTransition * other)1080 void ShellTransition::InternalSwap(ShellTransition* other) {
1081   using std::swap;
1082   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1083   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1084   _impl_.targets_.InternalSwap(&other->_impl_.targets_);
1085   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1086       PROTOBUF_FIELD_OFFSET(ShellTransition, _impl_.flags_)
1087       + sizeof(ShellTransition::_impl_.flags_)  // NOLINT
1088       - PROTOBUF_FIELD_OFFSET(ShellTransition, _impl_.create_time_ns_)>(
1089           reinterpret_cast<char*>(&_impl_.create_time_ns_),
1090           reinterpret_cast<char*>(&other->_impl_.create_time_ns_));
1091 }
1092 
GetTypeName() const1093 std::string ShellTransition::GetTypeName() const {
1094   return "perfetto.protos.ShellTransition";
1095 }
1096 
1097 
1098 // ===================================================================
1099 
1100 class ShellHandlerMappings::_Internal {
1101  public:
1102 };
1103 
ShellHandlerMappings(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1104 ShellHandlerMappings::ShellHandlerMappings(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1105                          bool is_message_owned)
1106   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1107   SharedCtor(arena, is_message_owned);
1108   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ShellHandlerMappings)
1109 }
ShellHandlerMappings(const ShellHandlerMappings & from)1110 ShellHandlerMappings::ShellHandlerMappings(const ShellHandlerMappings& from)
1111   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1112   ShellHandlerMappings* const _this = this; (void)_this;
1113   new (&_impl_) Impl_{
1114       decltype(_impl_.mapping_){from._impl_.mapping_}
1115     , /*decltype(_impl_._cached_size_)*/{}};
1116 
1117   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1118   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ShellHandlerMappings)
1119 }
1120 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1121 inline void ShellHandlerMappings::SharedCtor(
1122     ::_pb::Arena* arena, bool is_message_owned) {
1123   (void)arena;
1124   (void)is_message_owned;
1125   new (&_impl_) Impl_{
1126       decltype(_impl_.mapping_){arena}
1127     , /*decltype(_impl_._cached_size_)*/{}
1128   };
1129 }
1130 
~ShellHandlerMappings()1131 ShellHandlerMappings::~ShellHandlerMappings() {
1132   // @@protoc_insertion_point(destructor:perfetto.protos.ShellHandlerMappings)
1133   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1134   (void)arena;
1135     return;
1136   }
1137   SharedDtor();
1138 }
1139 
SharedDtor()1140 inline void ShellHandlerMappings::SharedDtor() {
1141   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1142   _impl_.mapping_.~RepeatedPtrField();
1143 }
1144 
SetCachedSize(int size) const1145 void ShellHandlerMappings::SetCachedSize(int size) const {
1146   _impl_._cached_size_.Set(size);
1147 }
1148 
Clear()1149 void ShellHandlerMappings::Clear() {
1150 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ShellHandlerMappings)
1151   ::uint32_t cached_has_bits = 0;
1152   // Prevent compiler warnings about cached_has_bits being unused
1153   (void) cached_has_bits;
1154 
1155   _impl_.mapping_.Clear();
1156   _internal_metadata_.Clear<std::string>();
1157 }
1158 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1159 const char* ShellHandlerMappings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1160 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1161   while (!ctx->Done(&ptr)) {
1162     ::uint32_t tag;
1163     ptr = ::_pbi::ReadTag(ptr, &tag);
1164     switch (tag >> 3) {
1165       // repeated .perfetto.protos.ShellHandlerMapping mapping = 1;
1166       case 1:
1167         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1168           ptr -= 1;
1169           do {
1170             ptr += 1;
1171             ptr = ctx->ParseMessage(_internal_add_mapping(), ptr);
1172             CHK_(ptr);
1173             if (!ctx->DataAvailable(ptr)) break;
1174           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1175         } else {
1176           goto handle_unusual;
1177         }
1178         continue;
1179       default:
1180         goto handle_unusual;
1181     }  // switch
1182   handle_unusual:
1183     if ((tag == 0) || ((tag & 7) == 4)) {
1184       CHK_(ptr);
1185       ctx->SetLastTag(tag);
1186       goto message_done;
1187     }
1188     ptr = UnknownFieldParse(
1189         tag,
1190         _internal_metadata_.mutable_unknown_fields<std::string>(),
1191         ptr, ctx);
1192     CHK_(ptr != nullptr);
1193   }  // while
1194 message_done:
1195   return ptr;
1196 failure:
1197   ptr = nullptr;
1198   goto message_done;
1199 #undef CHK_
1200 }
1201 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1202 ::uint8_t* ShellHandlerMappings::_InternalSerialize(
1203     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1204   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ShellHandlerMappings)
1205   ::uint32_t cached_has_bits = 0;
1206   (void) cached_has_bits;
1207 
1208   // repeated .perfetto.protos.ShellHandlerMapping mapping = 1;
1209   for (unsigned i = 0,
1210       n = static_cast<unsigned>(this->_internal_mapping_size()); i < n; i++) {
1211     const auto& repfield = this->_internal_mapping(i);
1212     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1213         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1214   }
1215 
1216   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1217     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1218         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1219   }
1220   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ShellHandlerMappings)
1221   return target;
1222 }
1223 
ByteSizeLong() const1224 size_t ShellHandlerMappings::ByteSizeLong() const {
1225 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ShellHandlerMappings)
1226   size_t total_size = 0;
1227 
1228   ::uint32_t cached_has_bits = 0;
1229   // Prevent compiler warnings about cached_has_bits being unused
1230   (void) cached_has_bits;
1231 
1232   // repeated .perfetto.protos.ShellHandlerMapping mapping = 1;
1233   total_size += 1UL * this->_internal_mapping_size();
1234   for (const auto& msg : this->_impl_.mapping_) {
1235     total_size +=
1236       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1237   }
1238 
1239   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1240     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1241   }
1242   int cached_size = ::_pbi::ToCachedSize(total_size);
1243   SetCachedSize(cached_size);
1244   return total_size;
1245 }
1246 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1247 void ShellHandlerMappings::CheckTypeAndMergeFrom(
1248     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1249   MergeFrom(*::_pbi::DownCast<const ShellHandlerMappings*>(
1250       &from));
1251 }
1252 
MergeFrom(const ShellHandlerMappings & from)1253 void ShellHandlerMappings::MergeFrom(const ShellHandlerMappings& from) {
1254   ShellHandlerMappings* const _this = this;
1255   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ShellHandlerMappings)
1256   GOOGLE_DCHECK_NE(&from, _this);
1257   ::uint32_t cached_has_bits = 0;
1258   (void) cached_has_bits;
1259 
1260   _this->_impl_.mapping_.MergeFrom(from._impl_.mapping_);
1261   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1262 }
1263 
CopyFrom(const ShellHandlerMappings & from)1264 void ShellHandlerMappings::CopyFrom(const ShellHandlerMappings& from) {
1265 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ShellHandlerMappings)
1266   if (&from == this) return;
1267   Clear();
1268   MergeFrom(from);
1269 }
1270 
IsInitialized() const1271 bool ShellHandlerMappings::IsInitialized() const {
1272   return true;
1273 }
1274 
InternalSwap(ShellHandlerMappings * other)1275 void ShellHandlerMappings::InternalSwap(ShellHandlerMappings* other) {
1276   using std::swap;
1277   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1278   _impl_.mapping_.InternalSwap(&other->_impl_.mapping_);
1279 }
1280 
GetTypeName() const1281 std::string ShellHandlerMappings::GetTypeName() const {
1282   return "perfetto.protos.ShellHandlerMappings";
1283 }
1284 
1285 
1286 // ===================================================================
1287 
1288 class ShellHandlerMapping::_Internal {
1289  public:
1290   using HasBits = decltype(std::declval<ShellHandlerMapping>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)1291   static void set_has_id(HasBits* has_bits) {
1292     (*has_bits)[0] |= 2u;
1293   }
set_has_name(HasBits * has_bits)1294   static void set_has_name(HasBits* has_bits) {
1295     (*has_bits)[0] |= 1u;
1296   }
1297 };
1298 
ShellHandlerMapping(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1299 ShellHandlerMapping::ShellHandlerMapping(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1300                          bool is_message_owned)
1301   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1302   SharedCtor(arena, is_message_owned);
1303   // @@protoc_insertion_point(arena_constructor:perfetto.protos.ShellHandlerMapping)
1304 }
ShellHandlerMapping(const ShellHandlerMapping & from)1305 ShellHandlerMapping::ShellHandlerMapping(const ShellHandlerMapping& from)
1306   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1307   ShellHandlerMapping* const _this = this; (void)_this;
1308   new (&_impl_) Impl_{
1309       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1310     , /*decltype(_impl_._cached_size_)*/{}
1311     , decltype(_impl_.name_){}
1312     , decltype(_impl_.id_){}};
1313 
1314   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1315   _impl_.name_.InitDefault();
1316   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1317     _impl_.name_.Set("", GetArenaForAllocation());
1318   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1319   if (from._internal_has_name()) {
1320     _this->_impl_.name_.Set(from._internal_name(),
1321       _this->GetArenaForAllocation());
1322   }
1323   _this->_impl_.id_ = from._impl_.id_;
1324   // @@protoc_insertion_point(copy_constructor:perfetto.protos.ShellHandlerMapping)
1325 }
1326 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1327 inline void ShellHandlerMapping::SharedCtor(
1328     ::_pb::Arena* arena, bool is_message_owned) {
1329   (void)arena;
1330   (void)is_message_owned;
1331   new (&_impl_) Impl_{
1332       decltype(_impl_._has_bits_){}
1333     , /*decltype(_impl_._cached_size_)*/{}
1334     , decltype(_impl_.name_){}
1335     , decltype(_impl_.id_){0}
1336   };
1337   _impl_.name_.InitDefault();
1338   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1339     _impl_.name_.Set("", GetArenaForAllocation());
1340   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1341 }
1342 
~ShellHandlerMapping()1343 ShellHandlerMapping::~ShellHandlerMapping() {
1344   // @@protoc_insertion_point(destructor:perfetto.protos.ShellHandlerMapping)
1345   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1346   (void)arena;
1347     return;
1348   }
1349   SharedDtor();
1350 }
1351 
SharedDtor()1352 inline void ShellHandlerMapping::SharedDtor() {
1353   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1354   _impl_.name_.Destroy();
1355 }
1356 
SetCachedSize(int size) const1357 void ShellHandlerMapping::SetCachedSize(int size) const {
1358   _impl_._cached_size_.Set(size);
1359 }
1360 
Clear()1361 void ShellHandlerMapping::Clear() {
1362 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ShellHandlerMapping)
1363   ::uint32_t cached_has_bits = 0;
1364   // Prevent compiler warnings about cached_has_bits being unused
1365   (void) cached_has_bits;
1366 
1367   cached_has_bits = _impl_._has_bits_[0];
1368   if (cached_has_bits & 0x00000001u) {
1369     _impl_.name_.ClearNonDefaultToEmpty();
1370   }
1371   _impl_.id_ = 0;
1372   _impl_._has_bits_.Clear();
1373   _internal_metadata_.Clear<std::string>();
1374 }
1375 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1376 const char* ShellHandlerMapping::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1377 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1378   _Internal::HasBits has_bits{};
1379   while (!ctx->Done(&ptr)) {
1380     ::uint32_t tag;
1381     ptr = ::_pbi::ReadTag(ptr, &tag);
1382     switch (tag >> 3) {
1383       // optional int32 id = 1;
1384       case 1:
1385         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1386           _Internal::set_has_id(&has_bits);
1387           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1388           CHK_(ptr);
1389         } else {
1390           goto handle_unusual;
1391         }
1392         continue;
1393       // optional string name = 2;
1394       case 2:
1395         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1396           auto str = _internal_mutable_name();
1397           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1398           CHK_(ptr);
1399         } else {
1400           goto handle_unusual;
1401         }
1402         continue;
1403       default:
1404         goto handle_unusual;
1405     }  // switch
1406   handle_unusual:
1407     if ((tag == 0) || ((tag & 7) == 4)) {
1408       CHK_(ptr);
1409       ctx->SetLastTag(tag);
1410       goto message_done;
1411     }
1412     ptr = UnknownFieldParse(
1413         tag,
1414         _internal_metadata_.mutable_unknown_fields<std::string>(),
1415         ptr, ctx);
1416     CHK_(ptr != nullptr);
1417   }  // while
1418 message_done:
1419   _impl_._has_bits_.Or(has_bits);
1420   return ptr;
1421 failure:
1422   ptr = nullptr;
1423   goto message_done;
1424 #undef CHK_
1425 }
1426 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1427 ::uint8_t* ShellHandlerMapping::_InternalSerialize(
1428     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1429   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ShellHandlerMapping)
1430   ::uint32_t cached_has_bits = 0;
1431   (void) cached_has_bits;
1432 
1433   cached_has_bits = _impl_._has_bits_[0];
1434   // optional int32 id = 1;
1435   if (cached_has_bits & 0x00000002u) {
1436     target = stream->EnsureSpace(target);
1437     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_id(), target);
1438   }
1439 
1440   // optional string name = 2;
1441   if (cached_has_bits & 0x00000001u) {
1442     target = stream->WriteStringMaybeAliased(
1443         2, this->_internal_name(), target);
1444   }
1445 
1446   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1447     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1448         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1449   }
1450   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ShellHandlerMapping)
1451   return target;
1452 }
1453 
ByteSizeLong() const1454 size_t ShellHandlerMapping::ByteSizeLong() const {
1455 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ShellHandlerMapping)
1456   size_t total_size = 0;
1457 
1458   ::uint32_t cached_has_bits = 0;
1459   // Prevent compiler warnings about cached_has_bits being unused
1460   (void) cached_has_bits;
1461 
1462   cached_has_bits = _impl_._has_bits_[0];
1463   if (cached_has_bits & 0x00000003u) {
1464     // optional string name = 2;
1465     if (cached_has_bits & 0x00000001u) {
1466       total_size += 1 +
1467         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1468           this->_internal_name());
1469     }
1470 
1471     // optional int32 id = 1;
1472     if (cached_has_bits & 0x00000002u) {
1473       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
1474     }
1475 
1476   }
1477   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1478     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1479   }
1480   int cached_size = ::_pbi::ToCachedSize(total_size);
1481   SetCachedSize(cached_size);
1482   return total_size;
1483 }
1484 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1485 void ShellHandlerMapping::CheckTypeAndMergeFrom(
1486     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1487   MergeFrom(*::_pbi::DownCast<const ShellHandlerMapping*>(
1488       &from));
1489 }
1490 
MergeFrom(const ShellHandlerMapping & from)1491 void ShellHandlerMapping::MergeFrom(const ShellHandlerMapping& from) {
1492   ShellHandlerMapping* const _this = this;
1493   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ShellHandlerMapping)
1494   GOOGLE_DCHECK_NE(&from, _this);
1495   ::uint32_t cached_has_bits = 0;
1496   (void) cached_has_bits;
1497 
1498   cached_has_bits = from._impl_._has_bits_[0];
1499   if (cached_has_bits & 0x00000003u) {
1500     if (cached_has_bits & 0x00000001u) {
1501       _this->_internal_set_name(from._internal_name());
1502     }
1503     if (cached_has_bits & 0x00000002u) {
1504       _this->_impl_.id_ = from._impl_.id_;
1505     }
1506     _this->_impl_._has_bits_[0] |= cached_has_bits;
1507   }
1508   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1509 }
1510 
CopyFrom(const ShellHandlerMapping & from)1511 void ShellHandlerMapping::CopyFrom(const ShellHandlerMapping& from) {
1512 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ShellHandlerMapping)
1513   if (&from == this) return;
1514   Clear();
1515   MergeFrom(from);
1516 }
1517 
IsInitialized() const1518 bool ShellHandlerMapping::IsInitialized() const {
1519   return true;
1520 }
1521 
InternalSwap(ShellHandlerMapping * other)1522 void ShellHandlerMapping::InternalSwap(ShellHandlerMapping* other) {
1523   using std::swap;
1524   auto* lhs_arena = GetArenaForAllocation();
1525   auto* rhs_arena = other->GetArenaForAllocation();
1526   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1527   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1528   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1529       &_impl_.name_, lhs_arena,
1530       &other->_impl_.name_, rhs_arena
1531   );
1532   swap(_impl_.id_, other->_impl_.id_);
1533 }
1534 
GetTypeName() const1535 std::string ShellHandlerMapping::GetTypeName() const {
1536   return "perfetto.protos.ShellHandlerMapping";
1537 }
1538 
1539 
1540 // @@protoc_insertion_point(namespace_scope)
1541 }  // namespace protos
1542 }  // namespace perfetto
1543 PROTOBUF_NAMESPACE_OPEN
1544 template<> PROTOBUF_NOINLINE ::perfetto::protos::ShellTransition_Target*
CreateMaybeMessage(Arena * arena)1545 Arena::CreateMaybeMessage< ::perfetto::protos::ShellTransition_Target >(Arena* arena) {
1546   return Arena::CreateMessageInternal< ::perfetto::protos::ShellTransition_Target >(arena);
1547 }
1548 template<> PROTOBUF_NOINLINE ::perfetto::protos::ShellTransition*
CreateMaybeMessage(Arena * arena)1549 Arena::CreateMaybeMessage< ::perfetto::protos::ShellTransition >(Arena* arena) {
1550   return Arena::CreateMessageInternal< ::perfetto::protos::ShellTransition >(arena);
1551 }
1552 template<> PROTOBUF_NOINLINE ::perfetto::protos::ShellHandlerMappings*
CreateMaybeMessage(Arena * arena)1553 Arena::CreateMaybeMessage< ::perfetto::protos::ShellHandlerMappings >(Arena* arena) {
1554   return Arena::CreateMessageInternal< ::perfetto::protos::ShellHandlerMappings >(arena);
1555 }
1556 template<> PROTOBUF_NOINLINE ::perfetto::protos::ShellHandlerMapping*
CreateMaybeMessage(Arena * arena)1557 Arena::CreateMaybeMessage< ::perfetto::protos::ShellHandlerMapping >(Arena* arena) {
1558   return Arena::CreateMessageInternal< ::perfetto::protos::ShellHandlerMapping >(arena);
1559 }
1560 PROTOBUF_NAMESPACE_CLOSE
1561 
1562 // @@protoc_insertion_point(global_scope)
1563 #include <google/protobuf/port_undef.inc>
1564