1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/trace/track_event/debug_annotation.proto
3 
4 #include "protos/perfetto/trace/track_event/debug_annotation.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 {
DebugAnnotation_NestedValue(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR DebugAnnotation_NestedValue::DebugAnnotation_NestedValue(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.dict_keys_)*/{}
28   , /*decltype(_impl_.dict_values_)*/{}
29   , /*decltype(_impl_.array_values_)*/{}
30   , /*decltype(_impl_.string_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
31   , /*decltype(_impl_.nested_type_)*/0
32   , /*decltype(_impl_.bool_value_)*/false
33   , /*decltype(_impl_.int_value_)*/::int64_t{0}
34   , /*decltype(_impl_.double_value_)*/0} {}
35 struct DebugAnnotation_NestedValueDefaultTypeInternal {
DebugAnnotation_NestedValueDefaultTypeInternalperfetto::protos::DebugAnnotation_NestedValueDefaultTypeInternal36   PROTOBUF_CONSTEXPR DebugAnnotation_NestedValueDefaultTypeInternal()
37       : _instance(::_pbi::ConstantInitialized{}) {}
~DebugAnnotation_NestedValueDefaultTypeInternalperfetto::protos::DebugAnnotation_NestedValueDefaultTypeInternal38   ~DebugAnnotation_NestedValueDefaultTypeInternal() {}
39   union {  // NOLINT(misc-non-private-member-variables-in-classes)
40     DebugAnnotation_NestedValue _instance;
41   };
42 };
43 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugAnnotation_NestedValueDefaultTypeInternal _DebugAnnotation_NestedValue_default_instance_;
DebugAnnotation(::_pbi::ConstantInitialized)44 PROTOBUF_CONSTEXPR DebugAnnotation::DebugAnnotation(
45     ::_pbi::ConstantInitialized): _impl_{
46     /*decltype(_impl_._has_bits_)*/{}
47   , /*decltype(_impl_._cached_size_)*/{}
48   , /*decltype(_impl_.dict_entries_)*/{}
49   , /*decltype(_impl_.array_values_)*/{}
50   , /*decltype(_impl_.proto_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
51   , /*decltype(_impl_.name_field_)*/{}
52   , /*decltype(_impl_.value_)*/{}
53   , /*decltype(_impl_.proto_type_descriptor_)*/{}
54   , /*decltype(_impl_._oneof_case_)*/{}} {}
55 struct DebugAnnotationDefaultTypeInternal {
DebugAnnotationDefaultTypeInternalperfetto::protos::DebugAnnotationDefaultTypeInternal56   PROTOBUF_CONSTEXPR DebugAnnotationDefaultTypeInternal()
57       : _instance(::_pbi::ConstantInitialized{}) {}
~DebugAnnotationDefaultTypeInternalperfetto::protos::DebugAnnotationDefaultTypeInternal58   ~DebugAnnotationDefaultTypeInternal() {}
59   union {  // NOLINT(misc-non-private-member-variables-in-classes)
60     DebugAnnotation _instance;
61   };
62 };
63 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugAnnotationDefaultTypeInternal _DebugAnnotation_default_instance_;
DebugAnnotationName(::_pbi::ConstantInitialized)64 PROTOBUF_CONSTEXPR DebugAnnotationName::DebugAnnotationName(
65     ::_pbi::ConstantInitialized): _impl_{
66     /*decltype(_impl_._has_bits_)*/{}
67   , /*decltype(_impl_._cached_size_)*/{}
68   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
69   , /*decltype(_impl_.iid_)*/::uint64_t{0u}} {}
70 struct DebugAnnotationNameDefaultTypeInternal {
DebugAnnotationNameDefaultTypeInternalperfetto::protos::DebugAnnotationNameDefaultTypeInternal71   PROTOBUF_CONSTEXPR DebugAnnotationNameDefaultTypeInternal()
72       : _instance(::_pbi::ConstantInitialized{}) {}
~DebugAnnotationNameDefaultTypeInternalperfetto::protos::DebugAnnotationNameDefaultTypeInternal73   ~DebugAnnotationNameDefaultTypeInternal() {}
74   union {  // NOLINT(misc-non-private-member-variables-in-classes)
75     DebugAnnotationName _instance;
76   };
77 };
78 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugAnnotationNameDefaultTypeInternal _DebugAnnotationName_default_instance_;
DebugAnnotationValueTypeName(::_pbi::ConstantInitialized)79 PROTOBUF_CONSTEXPR DebugAnnotationValueTypeName::DebugAnnotationValueTypeName(
80     ::_pbi::ConstantInitialized): _impl_{
81     /*decltype(_impl_._has_bits_)*/{}
82   , /*decltype(_impl_._cached_size_)*/{}
83   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
84   , /*decltype(_impl_.iid_)*/::uint64_t{0u}} {}
85 struct DebugAnnotationValueTypeNameDefaultTypeInternal {
DebugAnnotationValueTypeNameDefaultTypeInternalperfetto::protos::DebugAnnotationValueTypeNameDefaultTypeInternal86   PROTOBUF_CONSTEXPR DebugAnnotationValueTypeNameDefaultTypeInternal()
87       : _instance(::_pbi::ConstantInitialized{}) {}
~DebugAnnotationValueTypeNameDefaultTypeInternalperfetto::protos::DebugAnnotationValueTypeNameDefaultTypeInternal88   ~DebugAnnotationValueTypeNameDefaultTypeInternal() {}
89   union {  // NOLINT(misc-non-private-member-variables-in-classes)
90     DebugAnnotationValueTypeName _instance;
91   };
92 };
93 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugAnnotationValueTypeNameDefaultTypeInternal _DebugAnnotationValueTypeName_default_instance_;
94 }  // namespace protos
95 }  // namespace perfetto
96 namespace perfetto {
97 namespace protos {
DebugAnnotation_NestedValue_NestedType_IsValid(int value)98 bool DebugAnnotation_NestedValue_NestedType_IsValid(int value) {
99   switch (value) {
100     case 0:
101     case 1:
102     case 2:
103       return true;
104     default:
105       return false;
106   }
107 }
108 
109 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> DebugAnnotation_NestedValue_NestedType_strings[3] = {};
110 
111 static const char DebugAnnotation_NestedValue_NestedType_names[] =
112   "ARRAY"
113   "DICT"
114   "UNSPECIFIED";
115 
116 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DebugAnnotation_NestedValue_NestedType_entries[] = {
117   { {DebugAnnotation_NestedValue_NestedType_names + 0, 5}, 2 },
118   { {DebugAnnotation_NestedValue_NestedType_names + 5, 4}, 1 },
119   { {DebugAnnotation_NestedValue_NestedType_names + 9, 11}, 0 },
120 };
121 
122 static const int DebugAnnotation_NestedValue_NestedType_entries_by_number[] = {
123   2, // 0 -> UNSPECIFIED
124   1, // 1 -> DICT
125   0, // 2 -> ARRAY
126 };
127 
DebugAnnotation_NestedValue_NestedType_Name(DebugAnnotation_NestedValue_NestedType value)128 const std::string& DebugAnnotation_NestedValue_NestedType_Name(
129     DebugAnnotation_NestedValue_NestedType value) {
130   static const bool dummy =
131       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
132           DebugAnnotation_NestedValue_NestedType_entries,
133           DebugAnnotation_NestedValue_NestedType_entries_by_number,
134           3, DebugAnnotation_NestedValue_NestedType_strings);
135   (void) dummy;
136   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
137       DebugAnnotation_NestedValue_NestedType_entries,
138       DebugAnnotation_NestedValue_NestedType_entries_by_number,
139       3, value);
140   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
141                      DebugAnnotation_NestedValue_NestedType_strings[idx].get();
142 }
DebugAnnotation_NestedValue_NestedType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,DebugAnnotation_NestedValue_NestedType * value)143 bool DebugAnnotation_NestedValue_NestedType_Parse(
144     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DebugAnnotation_NestedValue_NestedType* value) {
145   int int_value;
146   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
147       DebugAnnotation_NestedValue_NestedType_entries, 3, name, &int_value);
148   if (success) {
149     *value = static_cast<DebugAnnotation_NestedValue_NestedType>(int_value);
150   }
151   return success;
152 }
153 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
154 constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue::UNSPECIFIED;
155 constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue::DICT;
156 constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue::ARRAY;
157 constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue::NestedType_MIN;
158 constexpr DebugAnnotation_NestedValue_NestedType DebugAnnotation_NestedValue::NestedType_MAX;
159 constexpr int DebugAnnotation_NestedValue::NestedType_ARRAYSIZE;
160 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
161 
162 // ===================================================================
163 
164 class DebugAnnotation_NestedValue::_Internal {
165  public:
166   using HasBits = decltype(std::declval<DebugAnnotation_NestedValue>()._impl_._has_bits_);
set_has_nested_type(HasBits * has_bits)167   static void set_has_nested_type(HasBits* has_bits) {
168     (*has_bits)[0] |= 2u;
169   }
set_has_int_value(HasBits * has_bits)170   static void set_has_int_value(HasBits* has_bits) {
171     (*has_bits)[0] |= 8u;
172   }
set_has_double_value(HasBits * has_bits)173   static void set_has_double_value(HasBits* has_bits) {
174     (*has_bits)[0] |= 16u;
175   }
set_has_bool_value(HasBits * has_bits)176   static void set_has_bool_value(HasBits* has_bits) {
177     (*has_bits)[0] |= 4u;
178   }
set_has_string_value(HasBits * has_bits)179   static void set_has_string_value(HasBits* has_bits) {
180     (*has_bits)[0] |= 1u;
181   }
182 };
183 
DebugAnnotation_NestedValue(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)184 DebugAnnotation_NestedValue::DebugAnnotation_NestedValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
185                          bool is_message_owned)
186   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
187   SharedCtor(arena, is_message_owned);
188   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DebugAnnotation.NestedValue)
189 }
DebugAnnotation_NestedValue(const DebugAnnotation_NestedValue & from)190 DebugAnnotation_NestedValue::DebugAnnotation_NestedValue(const DebugAnnotation_NestedValue& from)
191   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
192   DebugAnnotation_NestedValue* const _this = this; (void)_this;
193   new (&_impl_) Impl_{
194       decltype(_impl_._has_bits_){from._impl_._has_bits_}
195     , /*decltype(_impl_._cached_size_)*/{}
196     , decltype(_impl_.dict_keys_){from._impl_.dict_keys_}
197     , decltype(_impl_.dict_values_){from._impl_.dict_values_}
198     , decltype(_impl_.array_values_){from._impl_.array_values_}
199     , decltype(_impl_.string_value_){}
200     , decltype(_impl_.nested_type_){}
201     , decltype(_impl_.bool_value_){}
202     , decltype(_impl_.int_value_){}
203     , decltype(_impl_.double_value_){}};
204 
205   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
206   _impl_.string_value_.InitDefault();
207   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
208     _impl_.string_value_.Set("", GetArenaForAllocation());
209   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
210   if (from._internal_has_string_value()) {
211     _this->_impl_.string_value_.Set(from._internal_string_value(),
212       _this->GetArenaForAllocation());
213   }
214   ::memcpy(&_impl_.nested_type_, &from._impl_.nested_type_,
215     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.double_value_) -
216     reinterpret_cast<char*>(&_impl_.nested_type_)) + sizeof(_impl_.double_value_));
217   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DebugAnnotation.NestedValue)
218 }
219 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)220 inline void DebugAnnotation_NestedValue::SharedCtor(
221     ::_pb::Arena* arena, bool is_message_owned) {
222   (void)arena;
223   (void)is_message_owned;
224   new (&_impl_) Impl_{
225       decltype(_impl_._has_bits_){}
226     , /*decltype(_impl_._cached_size_)*/{}
227     , decltype(_impl_.dict_keys_){arena}
228     , decltype(_impl_.dict_values_){arena}
229     , decltype(_impl_.array_values_){arena}
230     , decltype(_impl_.string_value_){}
231     , decltype(_impl_.nested_type_){0}
232     , decltype(_impl_.bool_value_){false}
233     , decltype(_impl_.int_value_){::int64_t{0}}
234     , decltype(_impl_.double_value_){0}
235   };
236   _impl_.string_value_.InitDefault();
237   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
238     _impl_.string_value_.Set("", GetArenaForAllocation());
239   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
240 }
241 
~DebugAnnotation_NestedValue()242 DebugAnnotation_NestedValue::~DebugAnnotation_NestedValue() {
243   // @@protoc_insertion_point(destructor:perfetto.protos.DebugAnnotation.NestedValue)
244   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
245   (void)arena;
246     return;
247   }
248   SharedDtor();
249 }
250 
SharedDtor()251 inline void DebugAnnotation_NestedValue::SharedDtor() {
252   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
253   _impl_.dict_keys_.~RepeatedPtrField();
254   _impl_.dict_values_.~RepeatedPtrField();
255   _impl_.array_values_.~RepeatedPtrField();
256   _impl_.string_value_.Destroy();
257 }
258 
SetCachedSize(int size) const259 void DebugAnnotation_NestedValue::SetCachedSize(int size) const {
260   _impl_._cached_size_.Set(size);
261 }
262 
Clear()263 void DebugAnnotation_NestedValue::Clear() {
264 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DebugAnnotation.NestedValue)
265   ::uint32_t cached_has_bits = 0;
266   // Prevent compiler warnings about cached_has_bits being unused
267   (void) cached_has_bits;
268 
269   _impl_.dict_keys_.Clear();
270   _impl_.dict_values_.Clear();
271   _impl_.array_values_.Clear();
272   cached_has_bits = _impl_._has_bits_[0];
273   if (cached_has_bits & 0x00000001u) {
274     _impl_.string_value_.ClearNonDefaultToEmpty();
275   }
276   if (cached_has_bits & 0x0000001eu) {
277     ::memset(&_impl_.nested_type_, 0, static_cast<size_t>(
278         reinterpret_cast<char*>(&_impl_.double_value_) -
279         reinterpret_cast<char*>(&_impl_.nested_type_)) + sizeof(_impl_.double_value_));
280   }
281   _impl_._has_bits_.Clear();
282   _internal_metadata_.Clear<std::string>();
283 }
284 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)285 const char* DebugAnnotation_NestedValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
286 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
287   _Internal::HasBits has_bits{};
288   while (!ctx->Done(&ptr)) {
289     ::uint32_t tag;
290     ptr = ::_pbi::ReadTag(ptr, &tag);
291     switch (tag >> 3) {
292       // optional .perfetto.protos.DebugAnnotation.NestedValue.NestedType nested_type = 1;
293       case 1:
294         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
295           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
296           CHK_(ptr);
297           if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::DebugAnnotation_NestedValue_NestedType_IsValid(val))) {
298             _internal_set_nested_type(static_cast<::perfetto::protos::DebugAnnotation_NestedValue_NestedType>(val));
299           } else {
300             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
301           }
302         } else {
303           goto handle_unusual;
304         }
305         continue;
306       // repeated string dict_keys = 2;
307       case 2:
308         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
309           ptr -= 1;
310           do {
311             ptr += 1;
312             auto str = _internal_add_dict_keys();
313             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
314             CHK_(ptr);
315             if (!ctx->DataAvailable(ptr)) break;
316           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
317         } else {
318           goto handle_unusual;
319         }
320         continue;
321       // repeated .perfetto.protos.DebugAnnotation.NestedValue dict_values = 3;
322       case 3:
323         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
324           ptr -= 1;
325           do {
326             ptr += 1;
327             ptr = ctx->ParseMessage(_internal_add_dict_values(), ptr);
328             CHK_(ptr);
329             if (!ctx->DataAvailable(ptr)) break;
330           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
331         } else {
332           goto handle_unusual;
333         }
334         continue;
335       // repeated .perfetto.protos.DebugAnnotation.NestedValue array_values = 4;
336       case 4:
337         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
338           ptr -= 1;
339           do {
340             ptr += 1;
341             ptr = ctx->ParseMessage(_internal_add_array_values(), ptr);
342             CHK_(ptr);
343             if (!ctx->DataAvailable(ptr)) break;
344           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
345         } else {
346           goto handle_unusual;
347         }
348         continue;
349       // optional int64 int_value = 5;
350       case 5:
351         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
352           _Internal::set_has_int_value(&has_bits);
353           _impl_.int_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
354           CHK_(ptr);
355         } else {
356           goto handle_unusual;
357         }
358         continue;
359       // optional double double_value = 6;
360       case 6:
361         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 49)) {
362           _Internal::set_has_double_value(&has_bits);
363           _impl_.double_value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
364           ptr += sizeof(double);
365         } else {
366           goto handle_unusual;
367         }
368         continue;
369       // optional bool bool_value = 7;
370       case 7:
371         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
372           _Internal::set_has_bool_value(&has_bits);
373           _impl_.bool_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
374           CHK_(ptr);
375         } else {
376           goto handle_unusual;
377         }
378         continue;
379       // optional string string_value = 8;
380       case 8:
381         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
382           auto str = _internal_mutable_string_value();
383           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
384           CHK_(ptr);
385         } else {
386           goto handle_unusual;
387         }
388         continue;
389       default:
390         goto handle_unusual;
391     }  // switch
392   handle_unusual:
393     if ((tag == 0) || ((tag & 7) == 4)) {
394       CHK_(ptr);
395       ctx->SetLastTag(tag);
396       goto message_done;
397     }
398     ptr = UnknownFieldParse(
399         tag,
400         _internal_metadata_.mutable_unknown_fields<std::string>(),
401         ptr, ctx);
402     CHK_(ptr != nullptr);
403   }  // while
404 message_done:
405   _impl_._has_bits_.Or(has_bits);
406   return ptr;
407 failure:
408   ptr = nullptr;
409   goto message_done;
410 #undef CHK_
411 }
412 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const413 ::uint8_t* DebugAnnotation_NestedValue::_InternalSerialize(
414     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
415   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DebugAnnotation.NestedValue)
416   ::uint32_t cached_has_bits = 0;
417   (void) cached_has_bits;
418 
419   cached_has_bits = _impl_._has_bits_[0];
420   // optional .perfetto.protos.DebugAnnotation.NestedValue.NestedType nested_type = 1;
421   if (cached_has_bits & 0x00000002u) {
422     target = stream->EnsureSpace(target);
423     target = ::_pbi::WireFormatLite::WriteEnumToArray(
424       1, this->_internal_nested_type(), target);
425   }
426 
427   // repeated string dict_keys = 2;
428   for (int i = 0, n = this->_internal_dict_keys_size(); i < n; i++) {
429     const auto& s = this->_internal_dict_keys(i);
430     target = stream->WriteString(2, s, target);
431   }
432 
433   // repeated .perfetto.protos.DebugAnnotation.NestedValue dict_values = 3;
434   for (unsigned i = 0,
435       n = static_cast<unsigned>(this->_internal_dict_values_size()); i < n; i++) {
436     const auto& repfield = this->_internal_dict_values(i);
437     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
438         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
439   }
440 
441   // repeated .perfetto.protos.DebugAnnotation.NestedValue array_values = 4;
442   for (unsigned i = 0,
443       n = static_cast<unsigned>(this->_internal_array_values_size()); i < n; i++) {
444     const auto& repfield = this->_internal_array_values(i);
445     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
446         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
447   }
448 
449   // optional int64 int_value = 5;
450   if (cached_has_bits & 0x00000008u) {
451     target = stream->EnsureSpace(target);
452     target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_int_value(), target);
453   }
454 
455   // optional double double_value = 6;
456   if (cached_has_bits & 0x00000010u) {
457     target = stream->EnsureSpace(target);
458     target = ::_pbi::WireFormatLite::WriteDoubleToArray(6, this->_internal_double_value(), target);
459   }
460 
461   // optional bool bool_value = 7;
462   if (cached_has_bits & 0x00000004u) {
463     target = stream->EnsureSpace(target);
464     target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_bool_value(), target);
465   }
466 
467   // optional string string_value = 8;
468   if (cached_has_bits & 0x00000001u) {
469     target = stream->WriteStringMaybeAliased(
470         8, this->_internal_string_value(), target);
471   }
472 
473   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
474     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
475         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
476   }
477   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DebugAnnotation.NestedValue)
478   return target;
479 }
480 
ByteSizeLong() const481 size_t DebugAnnotation_NestedValue::ByteSizeLong() const {
482 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DebugAnnotation.NestedValue)
483   size_t total_size = 0;
484 
485   ::uint32_t cached_has_bits = 0;
486   // Prevent compiler warnings about cached_has_bits being unused
487   (void) cached_has_bits;
488 
489   // repeated string dict_keys = 2;
490   total_size += 1 *
491       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.dict_keys_.size());
492   for (int i = 0, n = _impl_.dict_keys_.size(); i < n; i++) {
493     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
494       _impl_.dict_keys_.Get(i));
495   }
496 
497   // repeated .perfetto.protos.DebugAnnotation.NestedValue dict_values = 3;
498   total_size += 1UL * this->_internal_dict_values_size();
499   for (const auto& msg : this->_impl_.dict_values_) {
500     total_size +=
501       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
502   }
503 
504   // repeated .perfetto.protos.DebugAnnotation.NestedValue array_values = 4;
505   total_size += 1UL * this->_internal_array_values_size();
506   for (const auto& msg : this->_impl_.array_values_) {
507     total_size +=
508       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
509   }
510 
511   cached_has_bits = _impl_._has_bits_[0];
512   if (cached_has_bits & 0x0000001fu) {
513     // optional string string_value = 8;
514     if (cached_has_bits & 0x00000001u) {
515       total_size += 1 +
516         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
517           this->_internal_string_value());
518     }
519 
520     // optional .perfetto.protos.DebugAnnotation.NestedValue.NestedType nested_type = 1;
521     if (cached_has_bits & 0x00000002u) {
522       total_size += 1 +
523         ::_pbi::WireFormatLite::EnumSize(this->_internal_nested_type());
524     }
525 
526     // optional bool bool_value = 7;
527     if (cached_has_bits & 0x00000004u) {
528       total_size += 1 + 1;
529     }
530 
531     // optional int64 int_value = 5;
532     if (cached_has_bits & 0x00000008u) {
533       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_int_value());
534     }
535 
536     // optional double double_value = 6;
537     if (cached_has_bits & 0x00000010u) {
538       total_size += 1 + 8;
539     }
540 
541   }
542   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
543     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
544   }
545   int cached_size = ::_pbi::ToCachedSize(total_size);
546   SetCachedSize(cached_size);
547   return total_size;
548 }
549 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)550 void DebugAnnotation_NestedValue::CheckTypeAndMergeFrom(
551     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
552   MergeFrom(*::_pbi::DownCast<const DebugAnnotation_NestedValue*>(
553       &from));
554 }
555 
MergeFrom(const DebugAnnotation_NestedValue & from)556 void DebugAnnotation_NestedValue::MergeFrom(const DebugAnnotation_NestedValue& from) {
557   DebugAnnotation_NestedValue* const _this = this;
558   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DebugAnnotation.NestedValue)
559   GOOGLE_DCHECK_NE(&from, _this);
560   ::uint32_t cached_has_bits = 0;
561   (void) cached_has_bits;
562 
563   _this->_impl_.dict_keys_.MergeFrom(from._impl_.dict_keys_);
564   _this->_impl_.dict_values_.MergeFrom(from._impl_.dict_values_);
565   _this->_impl_.array_values_.MergeFrom(from._impl_.array_values_);
566   cached_has_bits = from._impl_._has_bits_[0];
567   if (cached_has_bits & 0x0000001fu) {
568     if (cached_has_bits & 0x00000001u) {
569       _this->_internal_set_string_value(from._internal_string_value());
570     }
571     if (cached_has_bits & 0x00000002u) {
572       _this->_impl_.nested_type_ = from._impl_.nested_type_;
573     }
574     if (cached_has_bits & 0x00000004u) {
575       _this->_impl_.bool_value_ = from._impl_.bool_value_;
576     }
577     if (cached_has_bits & 0x00000008u) {
578       _this->_impl_.int_value_ = from._impl_.int_value_;
579     }
580     if (cached_has_bits & 0x00000010u) {
581       _this->_impl_.double_value_ = from._impl_.double_value_;
582     }
583     _this->_impl_._has_bits_[0] |= cached_has_bits;
584   }
585   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
586 }
587 
CopyFrom(const DebugAnnotation_NestedValue & from)588 void DebugAnnotation_NestedValue::CopyFrom(const DebugAnnotation_NestedValue& from) {
589 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DebugAnnotation.NestedValue)
590   if (&from == this) return;
591   Clear();
592   MergeFrom(from);
593 }
594 
IsInitialized() const595 bool DebugAnnotation_NestedValue::IsInitialized() const {
596   return true;
597 }
598 
InternalSwap(DebugAnnotation_NestedValue * other)599 void DebugAnnotation_NestedValue::InternalSwap(DebugAnnotation_NestedValue* other) {
600   using std::swap;
601   auto* lhs_arena = GetArenaForAllocation();
602   auto* rhs_arena = other->GetArenaForAllocation();
603   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
604   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
605   _impl_.dict_keys_.InternalSwap(&other->_impl_.dict_keys_);
606   _impl_.dict_values_.InternalSwap(&other->_impl_.dict_values_);
607   _impl_.array_values_.InternalSwap(&other->_impl_.array_values_);
608   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
609       &_impl_.string_value_, lhs_arena,
610       &other->_impl_.string_value_, rhs_arena
611   );
612   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
613       PROTOBUF_FIELD_OFFSET(DebugAnnotation_NestedValue, _impl_.double_value_)
614       + sizeof(DebugAnnotation_NestedValue::_impl_.double_value_)  // NOLINT
615       - PROTOBUF_FIELD_OFFSET(DebugAnnotation_NestedValue, _impl_.nested_type_)>(
616           reinterpret_cast<char*>(&_impl_.nested_type_),
617           reinterpret_cast<char*>(&other->_impl_.nested_type_));
618 }
619 
GetTypeName() const620 std::string DebugAnnotation_NestedValue::GetTypeName() const {
621   return "perfetto.protos.DebugAnnotation.NestedValue";
622 }
623 
624 
625 // ===================================================================
626 
627 class DebugAnnotation::_Internal {
628  public:
629   using HasBits = decltype(std::declval<DebugAnnotation>()._impl_._has_bits_);
630   static const ::perfetto::protos::DebugAnnotation_NestedValue& nested_value(const DebugAnnotation* msg);
set_has_proto_value(HasBits * has_bits)631   static void set_has_proto_value(HasBits* has_bits) {
632     (*has_bits)[0] |= 1u;
633   }
634 };
635 
636 const ::perfetto::protos::DebugAnnotation_NestedValue&
nested_value(const DebugAnnotation * msg)637 DebugAnnotation::_Internal::nested_value(const DebugAnnotation* msg) {
638   return *msg->_impl_.value_.nested_value_;
639 }
set_allocated_nested_value(::perfetto::protos::DebugAnnotation_NestedValue * nested_value)640 void DebugAnnotation::set_allocated_nested_value(::perfetto::protos::DebugAnnotation_NestedValue* nested_value) {
641   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
642   clear_value();
643   if (nested_value) {
644     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
645       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(nested_value);
646     if (message_arena != submessage_arena) {
647       nested_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
648           message_arena, nested_value, submessage_arena);
649     }
650     set_has_nested_value();
651     _impl_.value_.nested_value_ = nested_value;
652   }
653   // @@protoc_insertion_point(field_set_allocated:perfetto.protos.DebugAnnotation.nested_value)
654 }
DebugAnnotation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)655 DebugAnnotation::DebugAnnotation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
656                          bool is_message_owned)
657   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
658   SharedCtor(arena, is_message_owned);
659   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DebugAnnotation)
660 }
DebugAnnotation(const DebugAnnotation & from)661 DebugAnnotation::DebugAnnotation(const DebugAnnotation& from)
662   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
663   DebugAnnotation* const _this = this; (void)_this;
664   new (&_impl_) Impl_{
665       decltype(_impl_._has_bits_){from._impl_._has_bits_}
666     , /*decltype(_impl_._cached_size_)*/{}
667     , decltype(_impl_.dict_entries_){from._impl_.dict_entries_}
668     , decltype(_impl_.array_values_){from._impl_.array_values_}
669     , decltype(_impl_.proto_value_){}
670     , decltype(_impl_.name_field_){}
671     , decltype(_impl_.value_){}
672     , decltype(_impl_.proto_type_descriptor_){}
673     , /*decltype(_impl_._oneof_case_)*/{}};
674 
675   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
676   _impl_.proto_value_.InitDefault();
677   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
678     _impl_.proto_value_.Set("", GetArenaForAllocation());
679   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
680   if (from._internal_has_proto_value()) {
681     _this->_impl_.proto_value_.Set(from._internal_proto_value(),
682       _this->GetArenaForAllocation());
683   }
684   clear_has_name_field();
685   switch (from.name_field_case()) {
686     case kNameIid: {
687       _this->_internal_set_name_iid(from._internal_name_iid());
688       break;
689     }
690     case kName: {
691       _this->_internal_set_name(from._internal_name());
692       break;
693     }
694     case NAME_FIELD_NOT_SET: {
695       break;
696     }
697   }
698   clear_has_value();
699   switch (from.value_case()) {
700     case kBoolValue: {
701       _this->_internal_set_bool_value(from._internal_bool_value());
702       break;
703     }
704     case kUintValue: {
705       _this->_internal_set_uint_value(from._internal_uint_value());
706       break;
707     }
708     case kIntValue: {
709       _this->_internal_set_int_value(from._internal_int_value());
710       break;
711     }
712     case kDoubleValue: {
713       _this->_internal_set_double_value(from._internal_double_value());
714       break;
715     }
716     case kPointerValue: {
717       _this->_internal_set_pointer_value(from._internal_pointer_value());
718       break;
719     }
720     case kNestedValue: {
721       _this->_internal_mutable_nested_value()->::perfetto::protos::DebugAnnotation_NestedValue::MergeFrom(
722           from._internal_nested_value());
723       break;
724     }
725     case kLegacyJsonValue: {
726       _this->_internal_set_legacy_json_value(from._internal_legacy_json_value());
727       break;
728     }
729     case kStringValue: {
730       _this->_internal_set_string_value(from._internal_string_value());
731       break;
732     }
733     case kStringValueIid: {
734       _this->_internal_set_string_value_iid(from._internal_string_value_iid());
735       break;
736     }
737     case VALUE_NOT_SET: {
738       break;
739     }
740   }
741   clear_has_proto_type_descriptor();
742   switch (from.proto_type_descriptor_case()) {
743     case kProtoTypeName: {
744       _this->_internal_set_proto_type_name(from._internal_proto_type_name());
745       break;
746     }
747     case kProtoTypeNameIid: {
748       _this->_internal_set_proto_type_name_iid(from._internal_proto_type_name_iid());
749       break;
750     }
751     case PROTO_TYPE_DESCRIPTOR_NOT_SET: {
752       break;
753     }
754   }
755   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DebugAnnotation)
756 }
757 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)758 inline void DebugAnnotation::SharedCtor(
759     ::_pb::Arena* arena, bool is_message_owned) {
760   (void)arena;
761   (void)is_message_owned;
762   new (&_impl_) Impl_{
763       decltype(_impl_._has_bits_){}
764     , /*decltype(_impl_._cached_size_)*/{}
765     , decltype(_impl_.dict_entries_){arena}
766     , decltype(_impl_.array_values_){arena}
767     , decltype(_impl_.proto_value_){}
768     , decltype(_impl_.name_field_){}
769     , decltype(_impl_.value_){}
770     , decltype(_impl_.proto_type_descriptor_){}
771     , /*decltype(_impl_._oneof_case_)*/{}
772   };
773   _impl_.proto_value_.InitDefault();
774   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
775     _impl_.proto_value_.Set("", GetArenaForAllocation());
776   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
777   clear_has_name_field();
778   clear_has_value();
779   clear_has_proto_type_descriptor();
780 }
781 
~DebugAnnotation()782 DebugAnnotation::~DebugAnnotation() {
783   // @@protoc_insertion_point(destructor:perfetto.protos.DebugAnnotation)
784   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
785   (void)arena;
786     return;
787   }
788   SharedDtor();
789 }
790 
SharedDtor()791 inline void DebugAnnotation::SharedDtor() {
792   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
793   _impl_.dict_entries_.~RepeatedPtrField();
794   _impl_.array_values_.~RepeatedPtrField();
795   _impl_.proto_value_.Destroy();
796   if (has_name_field()) {
797     clear_name_field();
798   }
799   if (has_value()) {
800     clear_value();
801   }
802   if (has_proto_type_descriptor()) {
803     clear_proto_type_descriptor();
804   }
805 }
806 
SetCachedSize(int size) const807 void DebugAnnotation::SetCachedSize(int size) const {
808   _impl_._cached_size_.Set(size);
809 }
810 
clear_name_field()811 void DebugAnnotation::clear_name_field() {
812 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.DebugAnnotation)
813   switch (name_field_case()) {
814     case kNameIid: {
815       // No need to clear
816       break;
817     }
818     case kName: {
819       _impl_.name_field_.name_.Destroy();
820       break;
821     }
822     case NAME_FIELD_NOT_SET: {
823       break;
824     }
825   }
826   _impl_._oneof_case_[0] = NAME_FIELD_NOT_SET;
827 }
828 
clear_value()829 void DebugAnnotation::clear_value() {
830 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.DebugAnnotation)
831   switch (value_case()) {
832     case kBoolValue: {
833       // No need to clear
834       break;
835     }
836     case kUintValue: {
837       // No need to clear
838       break;
839     }
840     case kIntValue: {
841       // No need to clear
842       break;
843     }
844     case kDoubleValue: {
845       // No need to clear
846       break;
847     }
848     case kPointerValue: {
849       // No need to clear
850       break;
851     }
852     case kNestedValue: {
853       if (GetArenaForAllocation() == nullptr) {
854         delete _impl_.value_.nested_value_;
855       }
856       break;
857     }
858     case kLegacyJsonValue: {
859       _impl_.value_.legacy_json_value_.Destroy();
860       break;
861     }
862     case kStringValue: {
863       _impl_.value_.string_value_.Destroy();
864       break;
865     }
866     case kStringValueIid: {
867       // No need to clear
868       break;
869     }
870     case VALUE_NOT_SET: {
871       break;
872     }
873   }
874   _impl_._oneof_case_[1] = VALUE_NOT_SET;
875 }
876 
clear_proto_type_descriptor()877 void DebugAnnotation::clear_proto_type_descriptor() {
878 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.DebugAnnotation)
879   switch (proto_type_descriptor_case()) {
880     case kProtoTypeName: {
881       _impl_.proto_type_descriptor_.proto_type_name_.Destroy();
882       break;
883     }
884     case kProtoTypeNameIid: {
885       // No need to clear
886       break;
887     }
888     case PROTO_TYPE_DESCRIPTOR_NOT_SET: {
889       break;
890     }
891   }
892   _impl_._oneof_case_[2] = PROTO_TYPE_DESCRIPTOR_NOT_SET;
893 }
894 
895 
Clear()896 void DebugAnnotation::Clear() {
897 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DebugAnnotation)
898   ::uint32_t cached_has_bits = 0;
899   // Prevent compiler warnings about cached_has_bits being unused
900   (void) cached_has_bits;
901 
902   _impl_.dict_entries_.Clear();
903   _impl_.array_values_.Clear();
904   cached_has_bits = _impl_._has_bits_[0];
905   if (cached_has_bits & 0x00000001u) {
906     _impl_.proto_value_.ClearNonDefaultToEmpty();
907   }
908   clear_name_field();
909   clear_value();
910   clear_proto_type_descriptor();
911   _impl_._has_bits_.Clear();
912   _internal_metadata_.Clear<std::string>();
913 }
914 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)915 const char* DebugAnnotation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
916 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
917   _Internal::HasBits has_bits{};
918   while (!ctx->Done(&ptr)) {
919     ::uint32_t tag;
920     ptr = ::_pbi::ReadTag(ptr, &tag);
921     switch (tag >> 3) {
922       // uint64 name_iid = 1;
923       case 1:
924         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
925           _internal_set_name_iid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
926           CHK_(ptr);
927         } else {
928           goto handle_unusual;
929         }
930         continue;
931       // bool bool_value = 2;
932       case 2:
933         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
934           _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
935           CHK_(ptr);
936         } else {
937           goto handle_unusual;
938         }
939         continue;
940       // uint64 uint_value = 3;
941       case 3:
942         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
943           _internal_set_uint_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
944           CHK_(ptr);
945         } else {
946           goto handle_unusual;
947         }
948         continue;
949       // int64 int_value = 4;
950       case 4:
951         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
952           _internal_set_int_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
953           CHK_(ptr);
954         } else {
955           goto handle_unusual;
956         }
957         continue;
958       // double double_value = 5;
959       case 5:
960         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 41)) {
961           _internal_set_double_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
962           ptr += sizeof(double);
963         } else {
964           goto handle_unusual;
965         }
966         continue;
967       // string string_value = 6;
968       case 6:
969         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
970           auto str = _internal_mutable_string_value();
971           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
972           CHK_(ptr);
973         } else {
974           goto handle_unusual;
975         }
976         continue;
977       // uint64 pointer_value = 7;
978       case 7:
979         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
980           _internal_set_pointer_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
981           CHK_(ptr);
982         } else {
983           goto handle_unusual;
984         }
985         continue;
986       // .perfetto.protos.DebugAnnotation.NestedValue nested_value = 8;
987       case 8:
988         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
989           ptr = ctx->ParseMessage(_internal_mutable_nested_value(), ptr);
990           CHK_(ptr);
991         } else {
992           goto handle_unusual;
993         }
994         continue;
995       // string legacy_json_value = 9;
996       case 9:
997         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
998           auto str = _internal_mutable_legacy_json_value();
999           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1000           CHK_(ptr);
1001         } else {
1002           goto handle_unusual;
1003         }
1004         continue;
1005       // string name = 10;
1006       case 10:
1007         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
1008           auto str = _internal_mutable_name();
1009           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1010           CHK_(ptr);
1011         } else {
1012           goto handle_unusual;
1013         }
1014         continue;
1015       // repeated .perfetto.protos.DebugAnnotation dict_entries = 11;
1016       case 11:
1017         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
1018           ptr -= 1;
1019           do {
1020             ptr += 1;
1021             ptr = ctx->ParseMessage(_internal_add_dict_entries(), ptr);
1022             CHK_(ptr);
1023             if (!ctx->DataAvailable(ptr)) break;
1024           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
1025         } else {
1026           goto handle_unusual;
1027         }
1028         continue;
1029       // repeated .perfetto.protos.DebugAnnotation array_values = 12;
1030       case 12:
1031         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
1032           ptr -= 1;
1033           do {
1034             ptr += 1;
1035             ptr = ctx->ParseMessage(_internal_add_array_values(), ptr);
1036             CHK_(ptr);
1037             if (!ctx->DataAvailable(ptr)) break;
1038           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
1039         } else {
1040           goto handle_unusual;
1041         }
1042         continue;
1043       // uint64 proto_type_name_iid = 13;
1044       case 13:
1045         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
1046           _internal_set_proto_type_name_iid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1047           CHK_(ptr);
1048         } else {
1049           goto handle_unusual;
1050         }
1051         continue;
1052       // optional bytes proto_value = 14;
1053       case 14:
1054         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
1055           auto str = _internal_mutable_proto_value();
1056           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1057           CHK_(ptr);
1058         } else {
1059           goto handle_unusual;
1060         }
1061         continue;
1062       // string proto_type_name = 16;
1063       case 16:
1064         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
1065           auto str = _internal_mutable_proto_type_name();
1066           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1067           CHK_(ptr);
1068         } else {
1069           goto handle_unusual;
1070         }
1071         continue;
1072       // uint64 string_value_iid = 17;
1073       case 17:
1074         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1075           _internal_set_string_value_iid(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
1076           CHK_(ptr);
1077         } else {
1078           goto handle_unusual;
1079         }
1080         continue;
1081       default:
1082         goto handle_unusual;
1083     }  // switch
1084   handle_unusual:
1085     if ((tag == 0) || ((tag & 7) == 4)) {
1086       CHK_(ptr);
1087       ctx->SetLastTag(tag);
1088       goto message_done;
1089     }
1090     ptr = UnknownFieldParse(
1091         tag,
1092         _internal_metadata_.mutable_unknown_fields<std::string>(),
1093         ptr, ctx);
1094     CHK_(ptr != nullptr);
1095   }  // while
1096 message_done:
1097   _impl_._has_bits_.Or(has_bits);
1098   return ptr;
1099 failure:
1100   ptr = nullptr;
1101   goto message_done;
1102 #undef CHK_
1103 }
1104 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1105 ::uint8_t* DebugAnnotation::_InternalSerialize(
1106     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1107   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DebugAnnotation)
1108   ::uint32_t cached_has_bits = 0;
1109   (void) cached_has_bits;
1110 
1111   // uint64 name_iid = 1;
1112   if (_internal_has_name_iid()) {
1113     target = stream->EnsureSpace(target);
1114     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_name_iid(), target);
1115   }
1116 
1117   switch (value_case()) {
1118     case kBoolValue: {
1119       target = stream->EnsureSpace(target);
1120       target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_bool_value(), target);
1121       break;
1122     }
1123     case kUintValue: {
1124       target = stream->EnsureSpace(target);
1125       target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_uint_value(), target);
1126       break;
1127     }
1128     case kIntValue: {
1129       target = stream->EnsureSpace(target);
1130       target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_int_value(), target);
1131       break;
1132     }
1133     case kDoubleValue: {
1134       target = stream->EnsureSpace(target);
1135       target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_double_value(), target);
1136       break;
1137     }
1138     case kStringValue: {
1139       target = stream->WriteStringMaybeAliased(
1140           6, this->_internal_string_value(), target);
1141       break;
1142     }
1143     case kPointerValue: {
1144       target = stream->EnsureSpace(target);
1145       target = ::_pbi::WireFormatLite::WriteUInt64ToArray(7, this->_internal_pointer_value(), target);
1146       break;
1147     }
1148     case kNestedValue: {
1149       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1150         InternalWriteMessage(8, _Internal::nested_value(this),
1151           _Internal::nested_value(this).GetCachedSize(), target, stream);
1152       break;
1153     }
1154     case kLegacyJsonValue: {
1155       target = stream->WriteStringMaybeAliased(
1156           9, this->_internal_legacy_json_value(), target);
1157       break;
1158     }
1159     default: ;
1160   }
1161   // string name = 10;
1162   if (_internal_has_name()) {
1163     target = stream->WriteStringMaybeAliased(
1164         10, this->_internal_name(), target);
1165   }
1166 
1167   // repeated .perfetto.protos.DebugAnnotation dict_entries = 11;
1168   for (unsigned i = 0,
1169       n = static_cast<unsigned>(this->_internal_dict_entries_size()); i < n; i++) {
1170     const auto& repfield = this->_internal_dict_entries(i);
1171     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1172         InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
1173   }
1174 
1175   // repeated .perfetto.protos.DebugAnnotation array_values = 12;
1176   for (unsigned i = 0,
1177       n = static_cast<unsigned>(this->_internal_array_values_size()); i < n; i++) {
1178     const auto& repfield = this->_internal_array_values(i);
1179     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1180         InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
1181   }
1182 
1183   // uint64 proto_type_name_iid = 13;
1184   if (_internal_has_proto_type_name_iid()) {
1185     target = stream->EnsureSpace(target);
1186     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(13, this->_internal_proto_type_name_iid(), target);
1187   }
1188 
1189   cached_has_bits = _impl_._has_bits_[0];
1190   // optional bytes proto_value = 14;
1191   if (cached_has_bits & 0x00000001u) {
1192     target = stream->WriteBytesMaybeAliased(
1193         14, this->_internal_proto_value(), target);
1194   }
1195 
1196   // string proto_type_name = 16;
1197   if (_internal_has_proto_type_name()) {
1198     target = stream->WriteStringMaybeAliased(
1199         16, this->_internal_proto_type_name(), target);
1200   }
1201 
1202   // uint64 string_value_iid = 17;
1203   if (_internal_has_string_value_iid()) {
1204     target = stream->EnsureSpace(target);
1205     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(17, this->_internal_string_value_iid(), target);
1206   }
1207 
1208   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1209     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1210         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1211   }
1212   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DebugAnnotation)
1213   return target;
1214 }
1215 
ByteSizeLong() const1216 size_t DebugAnnotation::ByteSizeLong() const {
1217 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DebugAnnotation)
1218   size_t total_size = 0;
1219 
1220   ::uint32_t cached_has_bits = 0;
1221   // Prevent compiler warnings about cached_has_bits being unused
1222   (void) cached_has_bits;
1223 
1224   // repeated .perfetto.protos.DebugAnnotation dict_entries = 11;
1225   total_size += 1UL * this->_internal_dict_entries_size();
1226   for (const auto& msg : this->_impl_.dict_entries_) {
1227     total_size +=
1228       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1229   }
1230 
1231   // repeated .perfetto.protos.DebugAnnotation array_values = 12;
1232   total_size += 1UL * this->_internal_array_values_size();
1233   for (const auto& msg : this->_impl_.array_values_) {
1234     total_size +=
1235       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1236   }
1237 
1238   // optional bytes proto_value = 14;
1239   cached_has_bits = _impl_._has_bits_[0];
1240   if (cached_has_bits & 0x00000001u) {
1241     total_size += 1 +
1242       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
1243         this->_internal_proto_value());
1244   }
1245 
1246   switch (name_field_case()) {
1247     // uint64 name_iid = 1;
1248     case kNameIid: {
1249       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_name_iid());
1250       break;
1251     }
1252     // string name = 10;
1253     case kName: {
1254       total_size += 1 +
1255         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1256           this->_internal_name());
1257       break;
1258     }
1259     case NAME_FIELD_NOT_SET: {
1260       break;
1261     }
1262   }
1263   switch (value_case()) {
1264     // bool bool_value = 2;
1265     case kBoolValue: {
1266       total_size += 1 + 1;
1267       break;
1268     }
1269     // uint64 uint_value = 3;
1270     case kUintValue: {
1271       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_uint_value());
1272       break;
1273     }
1274     // int64 int_value = 4;
1275     case kIntValue: {
1276       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_int_value());
1277       break;
1278     }
1279     // double double_value = 5;
1280     case kDoubleValue: {
1281       total_size += 1 + 8;
1282       break;
1283     }
1284     // uint64 pointer_value = 7;
1285     case kPointerValue: {
1286       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_pointer_value());
1287       break;
1288     }
1289     // .perfetto.protos.DebugAnnotation.NestedValue nested_value = 8;
1290     case kNestedValue: {
1291       total_size += 1 +
1292         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1293           *_impl_.value_.nested_value_);
1294       break;
1295     }
1296     // string legacy_json_value = 9;
1297     case kLegacyJsonValue: {
1298       total_size += 1 +
1299         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1300           this->_internal_legacy_json_value());
1301       break;
1302     }
1303     // string string_value = 6;
1304     case kStringValue: {
1305       total_size += 1 +
1306         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1307           this->_internal_string_value());
1308       break;
1309     }
1310     // uint64 string_value_iid = 17;
1311     case kStringValueIid: {
1312       total_size += 2 +
1313         ::_pbi::WireFormatLite::UInt64Size(
1314           this->_internal_string_value_iid());
1315       break;
1316     }
1317     case VALUE_NOT_SET: {
1318       break;
1319     }
1320   }
1321   switch (proto_type_descriptor_case()) {
1322     // string proto_type_name = 16;
1323     case kProtoTypeName: {
1324       total_size += 2 +
1325         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1326           this->_internal_proto_type_name());
1327       break;
1328     }
1329     // uint64 proto_type_name_iid = 13;
1330     case kProtoTypeNameIid: {
1331       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_proto_type_name_iid());
1332       break;
1333     }
1334     case PROTO_TYPE_DESCRIPTOR_NOT_SET: {
1335       break;
1336     }
1337   }
1338   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1339     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1340   }
1341   int cached_size = ::_pbi::ToCachedSize(total_size);
1342   SetCachedSize(cached_size);
1343   return total_size;
1344 }
1345 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1346 void DebugAnnotation::CheckTypeAndMergeFrom(
1347     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1348   MergeFrom(*::_pbi::DownCast<const DebugAnnotation*>(
1349       &from));
1350 }
1351 
MergeFrom(const DebugAnnotation & from)1352 void DebugAnnotation::MergeFrom(const DebugAnnotation& from) {
1353   DebugAnnotation* const _this = this;
1354   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DebugAnnotation)
1355   GOOGLE_DCHECK_NE(&from, _this);
1356   ::uint32_t cached_has_bits = 0;
1357   (void) cached_has_bits;
1358 
1359   _this->_impl_.dict_entries_.MergeFrom(from._impl_.dict_entries_);
1360   _this->_impl_.array_values_.MergeFrom(from._impl_.array_values_);
1361   if (from._internal_has_proto_value()) {
1362     _this->_internal_set_proto_value(from._internal_proto_value());
1363   }
1364   switch (from.name_field_case()) {
1365     case kNameIid: {
1366       _this->_internal_set_name_iid(from._internal_name_iid());
1367       break;
1368     }
1369     case kName: {
1370       _this->_internal_set_name(from._internal_name());
1371       break;
1372     }
1373     case NAME_FIELD_NOT_SET: {
1374       break;
1375     }
1376   }
1377   switch (from.value_case()) {
1378     case kBoolValue: {
1379       _this->_internal_set_bool_value(from._internal_bool_value());
1380       break;
1381     }
1382     case kUintValue: {
1383       _this->_internal_set_uint_value(from._internal_uint_value());
1384       break;
1385     }
1386     case kIntValue: {
1387       _this->_internal_set_int_value(from._internal_int_value());
1388       break;
1389     }
1390     case kDoubleValue: {
1391       _this->_internal_set_double_value(from._internal_double_value());
1392       break;
1393     }
1394     case kPointerValue: {
1395       _this->_internal_set_pointer_value(from._internal_pointer_value());
1396       break;
1397     }
1398     case kNestedValue: {
1399       _this->_internal_mutable_nested_value()->::perfetto::protos::DebugAnnotation_NestedValue::MergeFrom(
1400           from._internal_nested_value());
1401       break;
1402     }
1403     case kLegacyJsonValue: {
1404       _this->_internal_set_legacy_json_value(from._internal_legacy_json_value());
1405       break;
1406     }
1407     case kStringValue: {
1408       _this->_internal_set_string_value(from._internal_string_value());
1409       break;
1410     }
1411     case kStringValueIid: {
1412       _this->_internal_set_string_value_iid(from._internal_string_value_iid());
1413       break;
1414     }
1415     case VALUE_NOT_SET: {
1416       break;
1417     }
1418   }
1419   switch (from.proto_type_descriptor_case()) {
1420     case kProtoTypeName: {
1421       _this->_internal_set_proto_type_name(from._internal_proto_type_name());
1422       break;
1423     }
1424     case kProtoTypeNameIid: {
1425       _this->_internal_set_proto_type_name_iid(from._internal_proto_type_name_iid());
1426       break;
1427     }
1428     case PROTO_TYPE_DESCRIPTOR_NOT_SET: {
1429       break;
1430     }
1431   }
1432   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1433 }
1434 
CopyFrom(const DebugAnnotation & from)1435 void DebugAnnotation::CopyFrom(const DebugAnnotation& from) {
1436 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DebugAnnotation)
1437   if (&from == this) return;
1438   Clear();
1439   MergeFrom(from);
1440 }
1441 
IsInitialized() const1442 bool DebugAnnotation::IsInitialized() const {
1443   return true;
1444 }
1445 
InternalSwap(DebugAnnotation * other)1446 void DebugAnnotation::InternalSwap(DebugAnnotation* other) {
1447   using std::swap;
1448   auto* lhs_arena = GetArenaForAllocation();
1449   auto* rhs_arena = other->GetArenaForAllocation();
1450   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1451   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1452   _impl_.dict_entries_.InternalSwap(&other->_impl_.dict_entries_);
1453   _impl_.array_values_.InternalSwap(&other->_impl_.array_values_);
1454   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1455       &_impl_.proto_value_, lhs_arena,
1456       &other->_impl_.proto_value_, rhs_arena
1457   );
1458   swap(_impl_.name_field_, other->_impl_.name_field_);
1459   swap(_impl_.value_, other->_impl_.value_);
1460   swap(_impl_.proto_type_descriptor_, other->_impl_.proto_type_descriptor_);
1461   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1462   swap(_impl_._oneof_case_[1], other->_impl_._oneof_case_[1]);
1463   swap(_impl_._oneof_case_[2], other->_impl_._oneof_case_[2]);
1464 }
1465 
GetTypeName() const1466 std::string DebugAnnotation::GetTypeName() const {
1467   return "perfetto.protos.DebugAnnotation";
1468 }
1469 
1470 
1471 // ===================================================================
1472 
1473 class DebugAnnotationName::_Internal {
1474  public:
1475   using HasBits = decltype(std::declval<DebugAnnotationName>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)1476   static void set_has_iid(HasBits* has_bits) {
1477     (*has_bits)[0] |= 2u;
1478   }
set_has_name(HasBits * has_bits)1479   static void set_has_name(HasBits* has_bits) {
1480     (*has_bits)[0] |= 1u;
1481   }
1482 };
1483 
DebugAnnotationName(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1484 DebugAnnotationName::DebugAnnotationName(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1485                          bool is_message_owned)
1486   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1487   SharedCtor(arena, is_message_owned);
1488   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DebugAnnotationName)
1489 }
DebugAnnotationName(const DebugAnnotationName & from)1490 DebugAnnotationName::DebugAnnotationName(const DebugAnnotationName& from)
1491   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1492   DebugAnnotationName* const _this = this; (void)_this;
1493   new (&_impl_) Impl_{
1494       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1495     , /*decltype(_impl_._cached_size_)*/{}
1496     , decltype(_impl_.name_){}
1497     , decltype(_impl_.iid_){}};
1498 
1499   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1500   _impl_.name_.InitDefault();
1501   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1502     _impl_.name_.Set("", GetArenaForAllocation());
1503   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1504   if (from._internal_has_name()) {
1505     _this->_impl_.name_.Set(from._internal_name(),
1506       _this->GetArenaForAllocation());
1507   }
1508   _this->_impl_.iid_ = from._impl_.iid_;
1509   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DebugAnnotationName)
1510 }
1511 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1512 inline void DebugAnnotationName::SharedCtor(
1513     ::_pb::Arena* arena, bool is_message_owned) {
1514   (void)arena;
1515   (void)is_message_owned;
1516   new (&_impl_) Impl_{
1517       decltype(_impl_._has_bits_){}
1518     , /*decltype(_impl_._cached_size_)*/{}
1519     , decltype(_impl_.name_){}
1520     , decltype(_impl_.iid_){::uint64_t{0u}}
1521   };
1522   _impl_.name_.InitDefault();
1523   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1524     _impl_.name_.Set("", GetArenaForAllocation());
1525   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1526 }
1527 
~DebugAnnotationName()1528 DebugAnnotationName::~DebugAnnotationName() {
1529   // @@protoc_insertion_point(destructor:perfetto.protos.DebugAnnotationName)
1530   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1531   (void)arena;
1532     return;
1533   }
1534   SharedDtor();
1535 }
1536 
SharedDtor()1537 inline void DebugAnnotationName::SharedDtor() {
1538   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1539   _impl_.name_.Destroy();
1540 }
1541 
SetCachedSize(int size) const1542 void DebugAnnotationName::SetCachedSize(int size) const {
1543   _impl_._cached_size_.Set(size);
1544 }
1545 
Clear()1546 void DebugAnnotationName::Clear() {
1547 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DebugAnnotationName)
1548   ::uint32_t cached_has_bits = 0;
1549   // Prevent compiler warnings about cached_has_bits being unused
1550   (void) cached_has_bits;
1551 
1552   cached_has_bits = _impl_._has_bits_[0];
1553   if (cached_has_bits & 0x00000001u) {
1554     _impl_.name_.ClearNonDefaultToEmpty();
1555   }
1556   _impl_.iid_ = ::uint64_t{0u};
1557   _impl_._has_bits_.Clear();
1558   _internal_metadata_.Clear<std::string>();
1559 }
1560 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1561 const char* DebugAnnotationName::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1562 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1563   _Internal::HasBits has_bits{};
1564   while (!ctx->Done(&ptr)) {
1565     ::uint32_t tag;
1566     ptr = ::_pbi::ReadTag(ptr, &tag);
1567     switch (tag >> 3) {
1568       // optional uint64 iid = 1;
1569       case 1:
1570         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1571           _Internal::set_has_iid(&has_bits);
1572           _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1573           CHK_(ptr);
1574         } else {
1575           goto handle_unusual;
1576         }
1577         continue;
1578       // optional string name = 2;
1579       case 2:
1580         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1581           auto str = _internal_mutable_name();
1582           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1583           CHK_(ptr);
1584         } else {
1585           goto handle_unusual;
1586         }
1587         continue;
1588       default:
1589         goto handle_unusual;
1590     }  // switch
1591   handle_unusual:
1592     if ((tag == 0) || ((tag & 7) == 4)) {
1593       CHK_(ptr);
1594       ctx->SetLastTag(tag);
1595       goto message_done;
1596     }
1597     ptr = UnknownFieldParse(
1598         tag,
1599         _internal_metadata_.mutable_unknown_fields<std::string>(),
1600         ptr, ctx);
1601     CHK_(ptr != nullptr);
1602   }  // while
1603 message_done:
1604   _impl_._has_bits_.Or(has_bits);
1605   return ptr;
1606 failure:
1607   ptr = nullptr;
1608   goto message_done;
1609 #undef CHK_
1610 }
1611 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1612 ::uint8_t* DebugAnnotationName::_InternalSerialize(
1613     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1614   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DebugAnnotationName)
1615   ::uint32_t cached_has_bits = 0;
1616   (void) cached_has_bits;
1617 
1618   cached_has_bits = _impl_._has_bits_[0];
1619   // optional uint64 iid = 1;
1620   if (cached_has_bits & 0x00000002u) {
1621     target = stream->EnsureSpace(target);
1622     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
1623   }
1624 
1625   // optional string name = 2;
1626   if (cached_has_bits & 0x00000001u) {
1627     target = stream->WriteStringMaybeAliased(
1628         2, this->_internal_name(), target);
1629   }
1630 
1631   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1632     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1633         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1634   }
1635   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DebugAnnotationName)
1636   return target;
1637 }
1638 
ByteSizeLong() const1639 size_t DebugAnnotationName::ByteSizeLong() const {
1640 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DebugAnnotationName)
1641   size_t total_size = 0;
1642 
1643   ::uint32_t cached_has_bits = 0;
1644   // Prevent compiler warnings about cached_has_bits being unused
1645   (void) cached_has_bits;
1646 
1647   cached_has_bits = _impl_._has_bits_[0];
1648   if (cached_has_bits & 0x00000003u) {
1649     // optional string name = 2;
1650     if (cached_has_bits & 0x00000001u) {
1651       total_size += 1 +
1652         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1653           this->_internal_name());
1654     }
1655 
1656     // optional uint64 iid = 1;
1657     if (cached_has_bits & 0x00000002u) {
1658       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
1659     }
1660 
1661   }
1662   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1663     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1664   }
1665   int cached_size = ::_pbi::ToCachedSize(total_size);
1666   SetCachedSize(cached_size);
1667   return total_size;
1668 }
1669 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1670 void DebugAnnotationName::CheckTypeAndMergeFrom(
1671     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1672   MergeFrom(*::_pbi::DownCast<const DebugAnnotationName*>(
1673       &from));
1674 }
1675 
MergeFrom(const DebugAnnotationName & from)1676 void DebugAnnotationName::MergeFrom(const DebugAnnotationName& from) {
1677   DebugAnnotationName* const _this = this;
1678   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DebugAnnotationName)
1679   GOOGLE_DCHECK_NE(&from, _this);
1680   ::uint32_t cached_has_bits = 0;
1681   (void) cached_has_bits;
1682 
1683   cached_has_bits = from._impl_._has_bits_[0];
1684   if (cached_has_bits & 0x00000003u) {
1685     if (cached_has_bits & 0x00000001u) {
1686       _this->_internal_set_name(from._internal_name());
1687     }
1688     if (cached_has_bits & 0x00000002u) {
1689       _this->_impl_.iid_ = from._impl_.iid_;
1690     }
1691     _this->_impl_._has_bits_[0] |= cached_has_bits;
1692   }
1693   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1694 }
1695 
CopyFrom(const DebugAnnotationName & from)1696 void DebugAnnotationName::CopyFrom(const DebugAnnotationName& from) {
1697 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DebugAnnotationName)
1698   if (&from == this) return;
1699   Clear();
1700   MergeFrom(from);
1701 }
1702 
IsInitialized() const1703 bool DebugAnnotationName::IsInitialized() const {
1704   return true;
1705 }
1706 
InternalSwap(DebugAnnotationName * other)1707 void DebugAnnotationName::InternalSwap(DebugAnnotationName* other) {
1708   using std::swap;
1709   auto* lhs_arena = GetArenaForAllocation();
1710   auto* rhs_arena = other->GetArenaForAllocation();
1711   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1712   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1713   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1714       &_impl_.name_, lhs_arena,
1715       &other->_impl_.name_, rhs_arena
1716   );
1717   swap(_impl_.iid_, other->_impl_.iid_);
1718 }
1719 
GetTypeName() const1720 std::string DebugAnnotationName::GetTypeName() const {
1721   return "perfetto.protos.DebugAnnotationName";
1722 }
1723 
1724 
1725 // ===================================================================
1726 
1727 class DebugAnnotationValueTypeName::_Internal {
1728  public:
1729   using HasBits = decltype(std::declval<DebugAnnotationValueTypeName>()._impl_._has_bits_);
set_has_iid(HasBits * has_bits)1730   static void set_has_iid(HasBits* has_bits) {
1731     (*has_bits)[0] |= 2u;
1732   }
set_has_name(HasBits * has_bits)1733   static void set_has_name(HasBits* has_bits) {
1734     (*has_bits)[0] |= 1u;
1735   }
1736 };
1737 
DebugAnnotationValueTypeName(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1738 DebugAnnotationValueTypeName::DebugAnnotationValueTypeName(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1739                          bool is_message_owned)
1740   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1741   SharedCtor(arena, is_message_owned);
1742   // @@protoc_insertion_point(arena_constructor:perfetto.protos.DebugAnnotationValueTypeName)
1743 }
DebugAnnotationValueTypeName(const DebugAnnotationValueTypeName & from)1744 DebugAnnotationValueTypeName::DebugAnnotationValueTypeName(const DebugAnnotationValueTypeName& from)
1745   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1746   DebugAnnotationValueTypeName* const _this = this; (void)_this;
1747   new (&_impl_) Impl_{
1748       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1749     , /*decltype(_impl_._cached_size_)*/{}
1750     , decltype(_impl_.name_){}
1751     , decltype(_impl_.iid_){}};
1752 
1753   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1754   _impl_.name_.InitDefault();
1755   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1756     _impl_.name_.Set("", GetArenaForAllocation());
1757   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1758   if (from._internal_has_name()) {
1759     _this->_impl_.name_.Set(from._internal_name(),
1760       _this->GetArenaForAllocation());
1761   }
1762   _this->_impl_.iid_ = from._impl_.iid_;
1763   // @@protoc_insertion_point(copy_constructor:perfetto.protos.DebugAnnotationValueTypeName)
1764 }
1765 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1766 inline void DebugAnnotationValueTypeName::SharedCtor(
1767     ::_pb::Arena* arena, bool is_message_owned) {
1768   (void)arena;
1769   (void)is_message_owned;
1770   new (&_impl_) Impl_{
1771       decltype(_impl_._has_bits_){}
1772     , /*decltype(_impl_._cached_size_)*/{}
1773     , decltype(_impl_.name_){}
1774     , decltype(_impl_.iid_){::uint64_t{0u}}
1775   };
1776   _impl_.name_.InitDefault();
1777   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1778     _impl_.name_.Set("", GetArenaForAllocation());
1779   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1780 }
1781 
~DebugAnnotationValueTypeName()1782 DebugAnnotationValueTypeName::~DebugAnnotationValueTypeName() {
1783   // @@protoc_insertion_point(destructor:perfetto.protos.DebugAnnotationValueTypeName)
1784   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1785   (void)arena;
1786     return;
1787   }
1788   SharedDtor();
1789 }
1790 
SharedDtor()1791 inline void DebugAnnotationValueTypeName::SharedDtor() {
1792   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1793   _impl_.name_.Destroy();
1794 }
1795 
SetCachedSize(int size) const1796 void DebugAnnotationValueTypeName::SetCachedSize(int size) const {
1797   _impl_._cached_size_.Set(size);
1798 }
1799 
Clear()1800 void DebugAnnotationValueTypeName::Clear() {
1801 // @@protoc_insertion_point(message_clear_start:perfetto.protos.DebugAnnotationValueTypeName)
1802   ::uint32_t cached_has_bits = 0;
1803   // Prevent compiler warnings about cached_has_bits being unused
1804   (void) cached_has_bits;
1805 
1806   cached_has_bits = _impl_._has_bits_[0];
1807   if (cached_has_bits & 0x00000001u) {
1808     _impl_.name_.ClearNonDefaultToEmpty();
1809   }
1810   _impl_.iid_ = ::uint64_t{0u};
1811   _impl_._has_bits_.Clear();
1812   _internal_metadata_.Clear<std::string>();
1813 }
1814 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1815 const char* DebugAnnotationValueTypeName::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1816 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1817   _Internal::HasBits has_bits{};
1818   while (!ctx->Done(&ptr)) {
1819     ::uint32_t tag;
1820     ptr = ::_pbi::ReadTag(ptr, &tag);
1821     switch (tag >> 3) {
1822       // optional uint64 iid = 1;
1823       case 1:
1824         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1825           _Internal::set_has_iid(&has_bits);
1826           _impl_.iid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1827           CHK_(ptr);
1828         } else {
1829           goto handle_unusual;
1830         }
1831         continue;
1832       // optional string name = 2;
1833       case 2:
1834         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1835           auto str = _internal_mutable_name();
1836           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1837           CHK_(ptr);
1838         } else {
1839           goto handle_unusual;
1840         }
1841         continue;
1842       default:
1843         goto handle_unusual;
1844     }  // switch
1845   handle_unusual:
1846     if ((tag == 0) || ((tag & 7) == 4)) {
1847       CHK_(ptr);
1848       ctx->SetLastTag(tag);
1849       goto message_done;
1850     }
1851     ptr = UnknownFieldParse(
1852         tag,
1853         _internal_metadata_.mutable_unknown_fields<std::string>(),
1854         ptr, ctx);
1855     CHK_(ptr != nullptr);
1856   }  // while
1857 message_done:
1858   _impl_._has_bits_.Or(has_bits);
1859   return ptr;
1860 failure:
1861   ptr = nullptr;
1862   goto message_done;
1863 #undef CHK_
1864 }
1865 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1866 ::uint8_t* DebugAnnotationValueTypeName::_InternalSerialize(
1867     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1868   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.DebugAnnotationValueTypeName)
1869   ::uint32_t cached_has_bits = 0;
1870   (void) cached_has_bits;
1871 
1872   cached_has_bits = _impl_._has_bits_[0];
1873   // optional uint64 iid = 1;
1874   if (cached_has_bits & 0x00000002u) {
1875     target = stream->EnsureSpace(target);
1876     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_iid(), target);
1877   }
1878 
1879   // optional string name = 2;
1880   if (cached_has_bits & 0x00000001u) {
1881     target = stream->WriteStringMaybeAliased(
1882         2, this->_internal_name(), target);
1883   }
1884 
1885   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1886     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1887         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1888   }
1889   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.DebugAnnotationValueTypeName)
1890   return target;
1891 }
1892 
ByteSizeLong() const1893 size_t DebugAnnotationValueTypeName::ByteSizeLong() const {
1894 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.DebugAnnotationValueTypeName)
1895   size_t total_size = 0;
1896 
1897   ::uint32_t cached_has_bits = 0;
1898   // Prevent compiler warnings about cached_has_bits being unused
1899   (void) cached_has_bits;
1900 
1901   cached_has_bits = _impl_._has_bits_[0];
1902   if (cached_has_bits & 0x00000003u) {
1903     // optional string name = 2;
1904     if (cached_has_bits & 0x00000001u) {
1905       total_size += 1 +
1906         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1907           this->_internal_name());
1908     }
1909 
1910     // optional uint64 iid = 1;
1911     if (cached_has_bits & 0x00000002u) {
1912       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_iid());
1913     }
1914 
1915   }
1916   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1917     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1918   }
1919   int cached_size = ::_pbi::ToCachedSize(total_size);
1920   SetCachedSize(cached_size);
1921   return total_size;
1922 }
1923 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1924 void DebugAnnotationValueTypeName::CheckTypeAndMergeFrom(
1925     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1926   MergeFrom(*::_pbi::DownCast<const DebugAnnotationValueTypeName*>(
1927       &from));
1928 }
1929 
MergeFrom(const DebugAnnotationValueTypeName & from)1930 void DebugAnnotationValueTypeName::MergeFrom(const DebugAnnotationValueTypeName& from) {
1931   DebugAnnotationValueTypeName* const _this = this;
1932   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.DebugAnnotationValueTypeName)
1933   GOOGLE_DCHECK_NE(&from, _this);
1934   ::uint32_t cached_has_bits = 0;
1935   (void) cached_has_bits;
1936 
1937   cached_has_bits = from._impl_._has_bits_[0];
1938   if (cached_has_bits & 0x00000003u) {
1939     if (cached_has_bits & 0x00000001u) {
1940       _this->_internal_set_name(from._internal_name());
1941     }
1942     if (cached_has_bits & 0x00000002u) {
1943       _this->_impl_.iid_ = from._impl_.iid_;
1944     }
1945     _this->_impl_._has_bits_[0] |= cached_has_bits;
1946   }
1947   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1948 }
1949 
CopyFrom(const DebugAnnotationValueTypeName & from)1950 void DebugAnnotationValueTypeName::CopyFrom(const DebugAnnotationValueTypeName& from) {
1951 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.DebugAnnotationValueTypeName)
1952   if (&from == this) return;
1953   Clear();
1954   MergeFrom(from);
1955 }
1956 
IsInitialized() const1957 bool DebugAnnotationValueTypeName::IsInitialized() const {
1958   return true;
1959 }
1960 
InternalSwap(DebugAnnotationValueTypeName * other)1961 void DebugAnnotationValueTypeName::InternalSwap(DebugAnnotationValueTypeName* other) {
1962   using std::swap;
1963   auto* lhs_arena = GetArenaForAllocation();
1964   auto* rhs_arena = other->GetArenaForAllocation();
1965   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1966   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1967   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1968       &_impl_.name_, lhs_arena,
1969       &other->_impl_.name_, rhs_arena
1970   );
1971   swap(_impl_.iid_, other->_impl_.iid_);
1972 }
1973 
GetTypeName() const1974 std::string DebugAnnotationValueTypeName::GetTypeName() const {
1975   return "perfetto.protos.DebugAnnotationValueTypeName";
1976 }
1977 
1978 
1979 // @@protoc_insertion_point(namespace_scope)
1980 }  // namespace protos
1981 }  // namespace perfetto
1982 PROTOBUF_NAMESPACE_OPEN
1983 template<> PROTOBUF_NOINLINE ::perfetto::protos::DebugAnnotation_NestedValue*
CreateMaybeMessage(Arena * arena)1984 Arena::CreateMaybeMessage< ::perfetto::protos::DebugAnnotation_NestedValue >(Arena* arena) {
1985   return Arena::CreateMessageInternal< ::perfetto::protos::DebugAnnotation_NestedValue >(arena);
1986 }
1987 template<> PROTOBUF_NOINLINE ::perfetto::protos::DebugAnnotation*
CreateMaybeMessage(Arena * arena)1988 Arena::CreateMaybeMessage< ::perfetto::protos::DebugAnnotation >(Arena* arena) {
1989   return Arena::CreateMessageInternal< ::perfetto::protos::DebugAnnotation >(arena);
1990 }
1991 template<> PROTOBUF_NOINLINE ::perfetto::protos::DebugAnnotationName*
CreateMaybeMessage(Arena * arena)1992 Arena::CreateMaybeMessage< ::perfetto::protos::DebugAnnotationName >(Arena* arena) {
1993   return Arena::CreateMessageInternal< ::perfetto::protos::DebugAnnotationName >(arena);
1994 }
1995 template<> PROTOBUF_NOINLINE ::perfetto::protos::DebugAnnotationValueTypeName*
CreateMaybeMessage(Arena * arena)1996 Arena::CreateMaybeMessage< ::perfetto::protos::DebugAnnotationValueTypeName >(Arena* arena) {
1997   return Arena::CreateMessageInternal< ::perfetto::protos::DebugAnnotationValueTypeName >(arena);
1998 }
1999 PROTOBUF_NAMESPACE_CLOSE
2000 
2001 // @@protoc_insertion_point(global_scope)
2002 #include <google/protobuf/port_undef.inc>
2003