1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/trace/power/android_entity_state_residency.proto
3
4 #include "protos/perfetto/trace/power/android_entity_state_residency.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 {
EntityStateResidency_PowerEntityState(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR EntityStateResidency_PowerEntityState::EntityStateResidency_PowerEntityState(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.entity_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.state_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.entity_index_)*/0
30 , /*decltype(_impl_.state_index_)*/0} {}
31 struct EntityStateResidency_PowerEntityStateDefaultTypeInternal {
EntityStateResidency_PowerEntityStateDefaultTypeInternalperfetto::protos::EntityStateResidency_PowerEntityStateDefaultTypeInternal32 PROTOBUF_CONSTEXPR EntityStateResidency_PowerEntityStateDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~EntityStateResidency_PowerEntityStateDefaultTypeInternalperfetto::protos::EntityStateResidency_PowerEntityStateDefaultTypeInternal34 ~EntityStateResidency_PowerEntityStateDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 EntityStateResidency_PowerEntityState _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EntityStateResidency_PowerEntityStateDefaultTypeInternal _EntityStateResidency_PowerEntityState_default_instance_;
EntityStateResidency_StateResidency(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR EntityStateResidency_StateResidency::EntityStateResidency_StateResidency(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_._has_bits_)*/{}
43 , /*decltype(_impl_._cached_size_)*/{}
44 , /*decltype(_impl_.entity_index_)*/0
45 , /*decltype(_impl_.state_index_)*/0
46 , /*decltype(_impl_.total_time_in_state_ms_)*/::uint64_t{0u}
47 , /*decltype(_impl_.total_state_entry_count_)*/::uint64_t{0u}
48 , /*decltype(_impl_.last_entry_timestamp_ms_)*/::uint64_t{0u}} {}
49 struct EntityStateResidency_StateResidencyDefaultTypeInternal {
EntityStateResidency_StateResidencyDefaultTypeInternalperfetto::protos::EntityStateResidency_StateResidencyDefaultTypeInternal50 PROTOBUF_CONSTEXPR EntityStateResidency_StateResidencyDefaultTypeInternal()
51 : _instance(::_pbi::ConstantInitialized{}) {}
~EntityStateResidency_StateResidencyDefaultTypeInternalperfetto::protos::EntityStateResidency_StateResidencyDefaultTypeInternal52 ~EntityStateResidency_StateResidencyDefaultTypeInternal() {}
53 union { // NOLINT(misc-non-private-member-variables-in-classes)
54 EntityStateResidency_StateResidency _instance;
55 };
56 };
57 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EntityStateResidency_StateResidencyDefaultTypeInternal _EntityStateResidency_StateResidency_default_instance_;
EntityStateResidency(::_pbi::ConstantInitialized)58 PROTOBUF_CONSTEXPR EntityStateResidency::EntityStateResidency(
59 ::_pbi::ConstantInitialized): _impl_{
60 /*decltype(_impl_.power_entity_state_)*/{}
61 , /*decltype(_impl_.residency_)*/{}
62 , /*decltype(_impl_._cached_size_)*/{}} {}
63 struct EntityStateResidencyDefaultTypeInternal {
EntityStateResidencyDefaultTypeInternalperfetto::protos::EntityStateResidencyDefaultTypeInternal64 PROTOBUF_CONSTEXPR EntityStateResidencyDefaultTypeInternal()
65 : _instance(::_pbi::ConstantInitialized{}) {}
~EntityStateResidencyDefaultTypeInternalperfetto::protos::EntityStateResidencyDefaultTypeInternal66 ~EntityStateResidencyDefaultTypeInternal() {}
67 union { // NOLINT(misc-non-private-member-variables-in-classes)
68 EntityStateResidency _instance;
69 };
70 };
71 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EntityStateResidencyDefaultTypeInternal _EntityStateResidency_default_instance_;
72 } // namespace protos
73 } // namespace perfetto
74 namespace perfetto {
75 namespace protos {
76
77 // ===================================================================
78
79 class EntityStateResidency_PowerEntityState::_Internal {
80 public:
81 using HasBits = decltype(std::declval<EntityStateResidency_PowerEntityState>()._impl_._has_bits_);
set_has_entity_index(HasBits * has_bits)82 static void set_has_entity_index(HasBits* has_bits) {
83 (*has_bits)[0] |= 4u;
84 }
set_has_state_index(HasBits * has_bits)85 static void set_has_state_index(HasBits* has_bits) {
86 (*has_bits)[0] |= 8u;
87 }
set_has_entity_name(HasBits * has_bits)88 static void set_has_entity_name(HasBits* has_bits) {
89 (*has_bits)[0] |= 1u;
90 }
set_has_state_name(HasBits * has_bits)91 static void set_has_state_name(HasBits* has_bits) {
92 (*has_bits)[0] |= 2u;
93 }
94 };
95
EntityStateResidency_PowerEntityState(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)96 EntityStateResidency_PowerEntityState::EntityStateResidency_PowerEntityState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
97 bool is_message_owned)
98 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
99 SharedCtor(arena, is_message_owned);
100 // @@protoc_insertion_point(arena_constructor:perfetto.protos.EntityStateResidency.PowerEntityState)
101 }
EntityStateResidency_PowerEntityState(const EntityStateResidency_PowerEntityState & from)102 EntityStateResidency_PowerEntityState::EntityStateResidency_PowerEntityState(const EntityStateResidency_PowerEntityState& from)
103 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
104 EntityStateResidency_PowerEntityState* const _this = this; (void)_this;
105 new (&_impl_) Impl_{
106 decltype(_impl_._has_bits_){from._impl_._has_bits_}
107 , /*decltype(_impl_._cached_size_)*/{}
108 , decltype(_impl_.entity_name_){}
109 , decltype(_impl_.state_name_){}
110 , decltype(_impl_.entity_index_){}
111 , decltype(_impl_.state_index_){}};
112
113 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
114 _impl_.entity_name_.InitDefault();
115 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
116 _impl_.entity_name_.Set("", GetArenaForAllocation());
117 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
118 if (from._internal_has_entity_name()) {
119 _this->_impl_.entity_name_.Set(from._internal_entity_name(),
120 _this->GetArenaForAllocation());
121 }
122 _impl_.state_name_.InitDefault();
123 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
124 _impl_.state_name_.Set("", GetArenaForAllocation());
125 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
126 if (from._internal_has_state_name()) {
127 _this->_impl_.state_name_.Set(from._internal_state_name(),
128 _this->GetArenaForAllocation());
129 }
130 ::memcpy(&_impl_.entity_index_, &from._impl_.entity_index_,
131 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.state_index_) -
132 reinterpret_cast<char*>(&_impl_.entity_index_)) + sizeof(_impl_.state_index_));
133 // @@protoc_insertion_point(copy_constructor:perfetto.protos.EntityStateResidency.PowerEntityState)
134 }
135
SharedCtor(::_pb::Arena * arena,bool is_message_owned)136 inline void EntityStateResidency_PowerEntityState::SharedCtor(
137 ::_pb::Arena* arena, bool is_message_owned) {
138 (void)arena;
139 (void)is_message_owned;
140 new (&_impl_) Impl_{
141 decltype(_impl_._has_bits_){}
142 , /*decltype(_impl_._cached_size_)*/{}
143 , decltype(_impl_.entity_name_){}
144 , decltype(_impl_.state_name_){}
145 , decltype(_impl_.entity_index_){0}
146 , decltype(_impl_.state_index_){0}
147 };
148 _impl_.entity_name_.InitDefault();
149 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
150 _impl_.entity_name_.Set("", GetArenaForAllocation());
151 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
152 _impl_.state_name_.InitDefault();
153 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
154 _impl_.state_name_.Set("", GetArenaForAllocation());
155 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
156 }
157
~EntityStateResidency_PowerEntityState()158 EntityStateResidency_PowerEntityState::~EntityStateResidency_PowerEntityState() {
159 // @@protoc_insertion_point(destructor:perfetto.protos.EntityStateResidency.PowerEntityState)
160 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
161 (void)arena;
162 return;
163 }
164 SharedDtor();
165 }
166
SharedDtor()167 inline void EntityStateResidency_PowerEntityState::SharedDtor() {
168 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
169 _impl_.entity_name_.Destroy();
170 _impl_.state_name_.Destroy();
171 }
172
SetCachedSize(int size) const173 void EntityStateResidency_PowerEntityState::SetCachedSize(int size) const {
174 _impl_._cached_size_.Set(size);
175 }
176
Clear()177 void EntityStateResidency_PowerEntityState::Clear() {
178 // @@protoc_insertion_point(message_clear_start:perfetto.protos.EntityStateResidency.PowerEntityState)
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 & 0x00000003u) {
185 if (cached_has_bits & 0x00000001u) {
186 _impl_.entity_name_.ClearNonDefaultToEmpty();
187 }
188 if (cached_has_bits & 0x00000002u) {
189 _impl_.state_name_.ClearNonDefaultToEmpty();
190 }
191 }
192 if (cached_has_bits & 0x0000000cu) {
193 ::memset(&_impl_.entity_index_, 0, static_cast<size_t>(
194 reinterpret_cast<char*>(&_impl_.state_index_) -
195 reinterpret_cast<char*>(&_impl_.entity_index_)) + sizeof(_impl_.state_index_));
196 }
197 _impl_._has_bits_.Clear();
198 _internal_metadata_.Clear<std::string>();
199 }
200
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)201 const char* EntityStateResidency_PowerEntityState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
202 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
203 _Internal::HasBits has_bits{};
204 while (!ctx->Done(&ptr)) {
205 ::uint32_t tag;
206 ptr = ::_pbi::ReadTag(ptr, &tag);
207 switch (tag >> 3) {
208 // optional int32 entity_index = 1;
209 case 1:
210 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
211 _Internal::set_has_entity_index(&has_bits);
212 _impl_.entity_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
213 CHK_(ptr);
214 } else {
215 goto handle_unusual;
216 }
217 continue;
218 // optional int32 state_index = 2;
219 case 2:
220 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
221 _Internal::set_has_state_index(&has_bits);
222 _impl_.state_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
223 CHK_(ptr);
224 } else {
225 goto handle_unusual;
226 }
227 continue;
228 // optional string entity_name = 3;
229 case 3:
230 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
231 auto str = _internal_mutable_entity_name();
232 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
233 CHK_(ptr);
234 } else {
235 goto handle_unusual;
236 }
237 continue;
238 // optional string state_name = 4;
239 case 4:
240 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
241 auto str = _internal_mutable_state_name();
242 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
243 CHK_(ptr);
244 } else {
245 goto handle_unusual;
246 }
247 continue;
248 default:
249 goto handle_unusual;
250 } // switch
251 handle_unusual:
252 if ((tag == 0) || ((tag & 7) == 4)) {
253 CHK_(ptr);
254 ctx->SetLastTag(tag);
255 goto message_done;
256 }
257 ptr = UnknownFieldParse(
258 tag,
259 _internal_metadata_.mutable_unknown_fields<std::string>(),
260 ptr, ctx);
261 CHK_(ptr != nullptr);
262 } // while
263 message_done:
264 _impl_._has_bits_.Or(has_bits);
265 return ptr;
266 failure:
267 ptr = nullptr;
268 goto message_done;
269 #undef CHK_
270 }
271
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const272 ::uint8_t* EntityStateResidency_PowerEntityState::_InternalSerialize(
273 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
274 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.EntityStateResidency.PowerEntityState)
275 ::uint32_t cached_has_bits = 0;
276 (void) cached_has_bits;
277
278 cached_has_bits = _impl_._has_bits_[0];
279 // optional int32 entity_index = 1;
280 if (cached_has_bits & 0x00000004u) {
281 target = stream->EnsureSpace(target);
282 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_entity_index(), target);
283 }
284
285 // optional int32 state_index = 2;
286 if (cached_has_bits & 0x00000008u) {
287 target = stream->EnsureSpace(target);
288 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_state_index(), target);
289 }
290
291 // optional string entity_name = 3;
292 if (cached_has_bits & 0x00000001u) {
293 target = stream->WriteStringMaybeAliased(
294 3, this->_internal_entity_name(), target);
295 }
296
297 // optional string state_name = 4;
298 if (cached_has_bits & 0x00000002u) {
299 target = stream->WriteStringMaybeAliased(
300 4, this->_internal_state_name(), target);
301 }
302
303 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
304 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
305 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
306 }
307 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.EntityStateResidency.PowerEntityState)
308 return target;
309 }
310
ByteSizeLong() const311 size_t EntityStateResidency_PowerEntityState::ByteSizeLong() const {
312 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.EntityStateResidency.PowerEntityState)
313 size_t total_size = 0;
314
315 ::uint32_t cached_has_bits = 0;
316 // Prevent compiler warnings about cached_has_bits being unused
317 (void) cached_has_bits;
318
319 cached_has_bits = _impl_._has_bits_[0];
320 if (cached_has_bits & 0x0000000fu) {
321 // optional string entity_name = 3;
322 if (cached_has_bits & 0x00000001u) {
323 total_size += 1 +
324 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
325 this->_internal_entity_name());
326 }
327
328 // optional string state_name = 4;
329 if (cached_has_bits & 0x00000002u) {
330 total_size += 1 +
331 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
332 this->_internal_state_name());
333 }
334
335 // optional int32 entity_index = 1;
336 if (cached_has_bits & 0x00000004u) {
337 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_entity_index());
338 }
339
340 // optional int32 state_index = 2;
341 if (cached_has_bits & 0x00000008u) {
342 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_state_index());
343 }
344
345 }
346 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
347 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
348 }
349 int cached_size = ::_pbi::ToCachedSize(total_size);
350 SetCachedSize(cached_size);
351 return total_size;
352 }
353
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)354 void EntityStateResidency_PowerEntityState::CheckTypeAndMergeFrom(
355 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
356 MergeFrom(*::_pbi::DownCast<const EntityStateResidency_PowerEntityState*>(
357 &from));
358 }
359
MergeFrom(const EntityStateResidency_PowerEntityState & from)360 void EntityStateResidency_PowerEntityState::MergeFrom(const EntityStateResidency_PowerEntityState& from) {
361 EntityStateResidency_PowerEntityState* const _this = this;
362 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.EntityStateResidency.PowerEntityState)
363 GOOGLE_DCHECK_NE(&from, _this);
364 ::uint32_t cached_has_bits = 0;
365 (void) cached_has_bits;
366
367 cached_has_bits = from._impl_._has_bits_[0];
368 if (cached_has_bits & 0x0000000fu) {
369 if (cached_has_bits & 0x00000001u) {
370 _this->_internal_set_entity_name(from._internal_entity_name());
371 }
372 if (cached_has_bits & 0x00000002u) {
373 _this->_internal_set_state_name(from._internal_state_name());
374 }
375 if (cached_has_bits & 0x00000004u) {
376 _this->_impl_.entity_index_ = from._impl_.entity_index_;
377 }
378 if (cached_has_bits & 0x00000008u) {
379 _this->_impl_.state_index_ = from._impl_.state_index_;
380 }
381 _this->_impl_._has_bits_[0] |= cached_has_bits;
382 }
383 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
384 }
385
CopyFrom(const EntityStateResidency_PowerEntityState & from)386 void EntityStateResidency_PowerEntityState::CopyFrom(const EntityStateResidency_PowerEntityState& from) {
387 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.EntityStateResidency.PowerEntityState)
388 if (&from == this) return;
389 Clear();
390 MergeFrom(from);
391 }
392
IsInitialized() const393 bool EntityStateResidency_PowerEntityState::IsInitialized() const {
394 return true;
395 }
396
InternalSwap(EntityStateResidency_PowerEntityState * other)397 void EntityStateResidency_PowerEntityState::InternalSwap(EntityStateResidency_PowerEntityState* other) {
398 using std::swap;
399 auto* lhs_arena = GetArenaForAllocation();
400 auto* rhs_arena = other->GetArenaForAllocation();
401 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
402 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
403 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
404 &_impl_.entity_name_, lhs_arena,
405 &other->_impl_.entity_name_, rhs_arena
406 );
407 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
408 &_impl_.state_name_, lhs_arena,
409 &other->_impl_.state_name_, rhs_arena
410 );
411 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
412 PROTOBUF_FIELD_OFFSET(EntityStateResidency_PowerEntityState, _impl_.state_index_)
413 + sizeof(EntityStateResidency_PowerEntityState::_impl_.state_index_) // NOLINT
414 - PROTOBUF_FIELD_OFFSET(EntityStateResidency_PowerEntityState, _impl_.entity_index_)>(
415 reinterpret_cast<char*>(&_impl_.entity_index_),
416 reinterpret_cast<char*>(&other->_impl_.entity_index_));
417 }
418
GetTypeName() const419 std::string EntityStateResidency_PowerEntityState::GetTypeName() const {
420 return "perfetto.protos.EntityStateResidency.PowerEntityState";
421 }
422
423
424 // ===================================================================
425
426 class EntityStateResidency_StateResidency::_Internal {
427 public:
428 using HasBits = decltype(std::declval<EntityStateResidency_StateResidency>()._impl_._has_bits_);
set_has_entity_index(HasBits * has_bits)429 static void set_has_entity_index(HasBits* has_bits) {
430 (*has_bits)[0] |= 1u;
431 }
set_has_state_index(HasBits * has_bits)432 static void set_has_state_index(HasBits* has_bits) {
433 (*has_bits)[0] |= 2u;
434 }
set_has_total_time_in_state_ms(HasBits * has_bits)435 static void set_has_total_time_in_state_ms(HasBits* has_bits) {
436 (*has_bits)[0] |= 4u;
437 }
set_has_total_state_entry_count(HasBits * has_bits)438 static void set_has_total_state_entry_count(HasBits* has_bits) {
439 (*has_bits)[0] |= 8u;
440 }
set_has_last_entry_timestamp_ms(HasBits * has_bits)441 static void set_has_last_entry_timestamp_ms(HasBits* has_bits) {
442 (*has_bits)[0] |= 16u;
443 }
444 };
445
EntityStateResidency_StateResidency(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)446 EntityStateResidency_StateResidency::EntityStateResidency_StateResidency(::PROTOBUF_NAMESPACE_ID::Arena* arena,
447 bool is_message_owned)
448 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
449 SharedCtor(arena, is_message_owned);
450 // @@protoc_insertion_point(arena_constructor:perfetto.protos.EntityStateResidency.StateResidency)
451 }
EntityStateResidency_StateResidency(const EntityStateResidency_StateResidency & from)452 EntityStateResidency_StateResidency::EntityStateResidency_StateResidency(const EntityStateResidency_StateResidency& from)
453 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
454 EntityStateResidency_StateResidency* const _this = this; (void)_this;
455 new (&_impl_) Impl_{
456 decltype(_impl_._has_bits_){from._impl_._has_bits_}
457 , /*decltype(_impl_._cached_size_)*/{}
458 , decltype(_impl_.entity_index_){}
459 , decltype(_impl_.state_index_){}
460 , decltype(_impl_.total_time_in_state_ms_){}
461 , decltype(_impl_.total_state_entry_count_){}
462 , decltype(_impl_.last_entry_timestamp_ms_){}};
463
464 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
465 ::memcpy(&_impl_.entity_index_, &from._impl_.entity_index_,
466 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.last_entry_timestamp_ms_) -
467 reinterpret_cast<char*>(&_impl_.entity_index_)) + sizeof(_impl_.last_entry_timestamp_ms_));
468 // @@protoc_insertion_point(copy_constructor:perfetto.protos.EntityStateResidency.StateResidency)
469 }
470
SharedCtor(::_pb::Arena * arena,bool is_message_owned)471 inline void EntityStateResidency_StateResidency::SharedCtor(
472 ::_pb::Arena* arena, bool is_message_owned) {
473 (void)arena;
474 (void)is_message_owned;
475 new (&_impl_) Impl_{
476 decltype(_impl_._has_bits_){}
477 , /*decltype(_impl_._cached_size_)*/{}
478 , decltype(_impl_.entity_index_){0}
479 , decltype(_impl_.state_index_){0}
480 , decltype(_impl_.total_time_in_state_ms_){::uint64_t{0u}}
481 , decltype(_impl_.total_state_entry_count_){::uint64_t{0u}}
482 , decltype(_impl_.last_entry_timestamp_ms_){::uint64_t{0u}}
483 };
484 }
485
~EntityStateResidency_StateResidency()486 EntityStateResidency_StateResidency::~EntityStateResidency_StateResidency() {
487 // @@protoc_insertion_point(destructor:perfetto.protos.EntityStateResidency.StateResidency)
488 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
489 (void)arena;
490 return;
491 }
492 SharedDtor();
493 }
494
SharedDtor()495 inline void EntityStateResidency_StateResidency::SharedDtor() {
496 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
497 }
498
SetCachedSize(int size) const499 void EntityStateResidency_StateResidency::SetCachedSize(int size) const {
500 _impl_._cached_size_.Set(size);
501 }
502
Clear()503 void EntityStateResidency_StateResidency::Clear() {
504 // @@protoc_insertion_point(message_clear_start:perfetto.protos.EntityStateResidency.StateResidency)
505 ::uint32_t cached_has_bits = 0;
506 // Prevent compiler warnings about cached_has_bits being unused
507 (void) cached_has_bits;
508
509 cached_has_bits = _impl_._has_bits_[0];
510 if (cached_has_bits & 0x0000001fu) {
511 ::memset(&_impl_.entity_index_, 0, static_cast<size_t>(
512 reinterpret_cast<char*>(&_impl_.last_entry_timestamp_ms_) -
513 reinterpret_cast<char*>(&_impl_.entity_index_)) + sizeof(_impl_.last_entry_timestamp_ms_));
514 }
515 _impl_._has_bits_.Clear();
516 _internal_metadata_.Clear<std::string>();
517 }
518
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)519 const char* EntityStateResidency_StateResidency::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
520 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
521 _Internal::HasBits has_bits{};
522 while (!ctx->Done(&ptr)) {
523 ::uint32_t tag;
524 ptr = ::_pbi::ReadTag(ptr, &tag);
525 switch (tag >> 3) {
526 // optional int32 entity_index = 1;
527 case 1:
528 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
529 _Internal::set_has_entity_index(&has_bits);
530 _impl_.entity_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
531 CHK_(ptr);
532 } else {
533 goto handle_unusual;
534 }
535 continue;
536 // optional int32 state_index = 2;
537 case 2:
538 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
539 _Internal::set_has_state_index(&has_bits);
540 _impl_.state_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
541 CHK_(ptr);
542 } else {
543 goto handle_unusual;
544 }
545 continue;
546 // optional uint64 total_time_in_state_ms = 3;
547 case 3:
548 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
549 _Internal::set_has_total_time_in_state_ms(&has_bits);
550 _impl_.total_time_in_state_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
551 CHK_(ptr);
552 } else {
553 goto handle_unusual;
554 }
555 continue;
556 // optional uint64 total_state_entry_count = 4;
557 case 4:
558 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
559 _Internal::set_has_total_state_entry_count(&has_bits);
560 _impl_.total_state_entry_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
561 CHK_(ptr);
562 } else {
563 goto handle_unusual;
564 }
565 continue;
566 // optional uint64 last_entry_timestamp_ms = 5;
567 case 5:
568 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
569 _Internal::set_has_last_entry_timestamp_ms(&has_bits);
570 _impl_.last_entry_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
571 CHK_(ptr);
572 } else {
573 goto handle_unusual;
574 }
575 continue;
576 default:
577 goto handle_unusual;
578 } // switch
579 handle_unusual:
580 if ((tag == 0) || ((tag & 7) == 4)) {
581 CHK_(ptr);
582 ctx->SetLastTag(tag);
583 goto message_done;
584 }
585 ptr = UnknownFieldParse(
586 tag,
587 _internal_metadata_.mutable_unknown_fields<std::string>(),
588 ptr, ctx);
589 CHK_(ptr != nullptr);
590 } // while
591 message_done:
592 _impl_._has_bits_.Or(has_bits);
593 return ptr;
594 failure:
595 ptr = nullptr;
596 goto message_done;
597 #undef CHK_
598 }
599
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const600 ::uint8_t* EntityStateResidency_StateResidency::_InternalSerialize(
601 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
602 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.EntityStateResidency.StateResidency)
603 ::uint32_t cached_has_bits = 0;
604 (void) cached_has_bits;
605
606 cached_has_bits = _impl_._has_bits_[0];
607 // optional int32 entity_index = 1;
608 if (cached_has_bits & 0x00000001u) {
609 target = stream->EnsureSpace(target);
610 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_entity_index(), target);
611 }
612
613 // optional int32 state_index = 2;
614 if (cached_has_bits & 0x00000002u) {
615 target = stream->EnsureSpace(target);
616 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_state_index(), target);
617 }
618
619 // optional uint64 total_time_in_state_ms = 3;
620 if (cached_has_bits & 0x00000004u) {
621 target = stream->EnsureSpace(target);
622 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_total_time_in_state_ms(), target);
623 }
624
625 // optional uint64 total_state_entry_count = 4;
626 if (cached_has_bits & 0x00000008u) {
627 target = stream->EnsureSpace(target);
628 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_total_state_entry_count(), target);
629 }
630
631 // optional uint64 last_entry_timestamp_ms = 5;
632 if (cached_has_bits & 0x00000010u) {
633 target = stream->EnsureSpace(target);
634 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_last_entry_timestamp_ms(), target);
635 }
636
637 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
638 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
639 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
640 }
641 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.EntityStateResidency.StateResidency)
642 return target;
643 }
644
ByteSizeLong() const645 size_t EntityStateResidency_StateResidency::ByteSizeLong() const {
646 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.EntityStateResidency.StateResidency)
647 size_t total_size = 0;
648
649 ::uint32_t cached_has_bits = 0;
650 // Prevent compiler warnings about cached_has_bits being unused
651 (void) cached_has_bits;
652
653 cached_has_bits = _impl_._has_bits_[0];
654 if (cached_has_bits & 0x0000001fu) {
655 // optional int32 entity_index = 1;
656 if (cached_has_bits & 0x00000001u) {
657 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_entity_index());
658 }
659
660 // optional int32 state_index = 2;
661 if (cached_has_bits & 0x00000002u) {
662 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_state_index());
663 }
664
665 // optional uint64 total_time_in_state_ms = 3;
666 if (cached_has_bits & 0x00000004u) {
667 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_total_time_in_state_ms());
668 }
669
670 // optional uint64 total_state_entry_count = 4;
671 if (cached_has_bits & 0x00000008u) {
672 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_total_state_entry_count());
673 }
674
675 // optional uint64 last_entry_timestamp_ms = 5;
676 if (cached_has_bits & 0x00000010u) {
677 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_last_entry_timestamp_ms());
678 }
679
680 }
681 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
682 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
683 }
684 int cached_size = ::_pbi::ToCachedSize(total_size);
685 SetCachedSize(cached_size);
686 return total_size;
687 }
688
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)689 void EntityStateResidency_StateResidency::CheckTypeAndMergeFrom(
690 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
691 MergeFrom(*::_pbi::DownCast<const EntityStateResidency_StateResidency*>(
692 &from));
693 }
694
MergeFrom(const EntityStateResidency_StateResidency & from)695 void EntityStateResidency_StateResidency::MergeFrom(const EntityStateResidency_StateResidency& from) {
696 EntityStateResidency_StateResidency* const _this = this;
697 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.EntityStateResidency.StateResidency)
698 GOOGLE_DCHECK_NE(&from, _this);
699 ::uint32_t cached_has_bits = 0;
700 (void) cached_has_bits;
701
702 cached_has_bits = from._impl_._has_bits_[0];
703 if (cached_has_bits & 0x0000001fu) {
704 if (cached_has_bits & 0x00000001u) {
705 _this->_impl_.entity_index_ = from._impl_.entity_index_;
706 }
707 if (cached_has_bits & 0x00000002u) {
708 _this->_impl_.state_index_ = from._impl_.state_index_;
709 }
710 if (cached_has_bits & 0x00000004u) {
711 _this->_impl_.total_time_in_state_ms_ = from._impl_.total_time_in_state_ms_;
712 }
713 if (cached_has_bits & 0x00000008u) {
714 _this->_impl_.total_state_entry_count_ = from._impl_.total_state_entry_count_;
715 }
716 if (cached_has_bits & 0x00000010u) {
717 _this->_impl_.last_entry_timestamp_ms_ = from._impl_.last_entry_timestamp_ms_;
718 }
719 _this->_impl_._has_bits_[0] |= cached_has_bits;
720 }
721 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
722 }
723
CopyFrom(const EntityStateResidency_StateResidency & from)724 void EntityStateResidency_StateResidency::CopyFrom(const EntityStateResidency_StateResidency& from) {
725 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.EntityStateResidency.StateResidency)
726 if (&from == this) return;
727 Clear();
728 MergeFrom(from);
729 }
730
IsInitialized() const731 bool EntityStateResidency_StateResidency::IsInitialized() const {
732 return true;
733 }
734
InternalSwap(EntityStateResidency_StateResidency * other)735 void EntityStateResidency_StateResidency::InternalSwap(EntityStateResidency_StateResidency* other) {
736 using std::swap;
737 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
738 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
739 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
740 PROTOBUF_FIELD_OFFSET(EntityStateResidency_StateResidency, _impl_.last_entry_timestamp_ms_)
741 + sizeof(EntityStateResidency_StateResidency::_impl_.last_entry_timestamp_ms_) // NOLINT
742 - PROTOBUF_FIELD_OFFSET(EntityStateResidency_StateResidency, _impl_.entity_index_)>(
743 reinterpret_cast<char*>(&_impl_.entity_index_),
744 reinterpret_cast<char*>(&other->_impl_.entity_index_));
745 }
746
GetTypeName() const747 std::string EntityStateResidency_StateResidency::GetTypeName() const {
748 return "perfetto.protos.EntityStateResidency.StateResidency";
749 }
750
751
752 // ===================================================================
753
754 class EntityStateResidency::_Internal {
755 public:
756 };
757
EntityStateResidency(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)758 EntityStateResidency::EntityStateResidency(::PROTOBUF_NAMESPACE_ID::Arena* arena,
759 bool is_message_owned)
760 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
761 SharedCtor(arena, is_message_owned);
762 // @@protoc_insertion_point(arena_constructor:perfetto.protos.EntityStateResidency)
763 }
EntityStateResidency(const EntityStateResidency & from)764 EntityStateResidency::EntityStateResidency(const EntityStateResidency& from)
765 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
766 EntityStateResidency* const _this = this; (void)_this;
767 new (&_impl_) Impl_{
768 decltype(_impl_.power_entity_state_){from._impl_.power_entity_state_}
769 , decltype(_impl_.residency_){from._impl_.residency_}
770 , /*decltype(_impl_._cached_size_)*/{}};
771
772 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
773 // @@protoc_insertion_point(copy_constructor:perfetto.protos.EntityStateResidency)
774 }
775
SharedCtor(::_pb::Arena * arena,bool is_message_owned)776 inline void EntityStateResidency::SharedCtor(
777 ::_pb::Arena* arena, bool is_message_owned) {
778 (void)arena;
779 (void)is_message_owned;
780 new (&_impl_) Impl_{
781 decltype(_impl_.power_entity_state_){arena}
782 , decltype(_impl_.residency_){arena}
783 , /*decltype(_impl_._cached_size_)*/{}
784 };
785 }
786
~EntityStateResidency()787 EntityStateResidency::~EntityStateResidency() {
788 // @@protoc_insertion_point(destructor:perfetto.protos.EntityStateResidency)
789 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
790 (void)arena;
791 return;
792 }
793 SharedDtor();
794 }
795
SharedDtor()796 inline void EntityStateResidency::SharedDtor() {
797 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
798 _impl_.power_entity_state_.~RepeatedPtrField();
799 _impl_.residency_.~RepeatedPtrField();
800 }
801
SetCachedSize(int size) const802 void EntityStateResidency::SetCachedSize(int size) const {
803 _impl_._cached_size_.Set(size);
804 }
805
Clear()806 void EntityStateResidency::Clear() {
807 // @@protoc_insertion_point(message_clear_start:perfetto.protos.EntityStateResidency)
808 ::uint32_t cached_has_bits = 0;
809 // Prevent compiler warnings about cached_has_bits being unused
810 (void) cached_has_bits;
811
812 _impl_.power_entity_state_.Clear();
813 _impl_.residency_.Clear();
814 _internal_metadata_.Clear<std::string>();
815 }
816
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)817 const char* EntityStateResidency::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
818 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
819 while (!ctx->Done(&ptr)) {
820 ::uint32_t tag;
821 ptr = ::_pbi::ReadTag(ptr, &tag);
822 switch (tag >> 3) {
823 // repeated .perfetto.protos.EntityStateResidency.PowerEntityState power_entity_state = 1;
824 case 1:
825 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
826 ptr -= 1;
827 do {
828 ptr += 1;
829 ptr = ctx->ParseMessage(_internal_add_power_entity_state(), ptr);
830 CHK_(ptr);
831 if (!ctx->DataAvailable(ptr)) break;
832 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
833 } else {
834 goto handle_unusual;
835 }
836 continue;
837 // repeated .perfetto.protos.EntityStateResidency.StateResidency residency = 2;
838 case 2:
839 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
840 ptr -= 1;
841 do {
842 ptr += 1;
843 ptr = ctx->ParseMessage(_internal_add_residency(), ptr);
844 CHK_(ptr);
845 if (!ctx->DataAvailable(ptr)) break;
846 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
847 } else {
848 goto handle_unusual;
849 }
850 continue;
851 default:
852 goto handle_unusual;
853 } // switch
854 handle_unusual:
855 if ((tag == 0) || ((tag & 7) == 4)) {
856 CHK_(ptr);
857 ctx->SetLastTag(tag);
858 goto message_done;
859 }
860 ptr = UnknownFieldParse(
861 tag,
862 _internal_metadata_.mutable_unknown_fields<std::string>(),
863 ptr, ctx);
864 CHK_(ptr != nullptr);
865 } // while
866 message_done:
867 return ptr;
868 failure:
869 ptr = nullptr;
870 goto message_done;
871 #undef CHK_
872 }
873
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const874 ::uint8_t* EntityStateResidency::_InternalSerialize(
875 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
876 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.EntityStateResidency)
877 ::uint32_t cached_has_bits = 0;
878 (void) cached_has_bits;
879
880 // repeated .perfetto.protos.EntityStateResidency.PowerEntityState power_entity_state = 1;
881 for (unsigned i = 0,
882 n = static_cast<unsigned>(this->_internal_power_entity_state_size()); i < n; i++) {
883 const auto& repfield = this->_internal_power_entity_state(i);
884 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
885 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
886 }
887
888 // repeated .perfetto.protos.EntityStateResidency.StateResidency residency = 2;
889 for (unsigned i = 0,
890 n = static_cast<unsigned>(this->_internal_residency_size()); i < n; i++) {
891 const auto& repfield = this->_internal_residency(i);
892 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
893 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
894 }
895
896 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
897 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
898 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
899 }
900 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.EntityStateResidency)
901 return target;
902 }
903
ByteSizeLong() const904 size_t EntityStateResidency::ByteSizeLong() const {
905 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.EntityStateResidency)
906 size_t total_size = 0;
907
908 ::uint32_t cached_has_bits = 0;
909 // Prevent compiler warnings about cached_has_bits being unused
910 (void) cached_has_bits;
911
912 // repeated .perfetto.protos.EntityStateResidency.PowerEntityState power_entity_state = 1;
913 total_size += 1UL * this->_internal_power_entity_state_size();
914 for (const auto& msg : this->_impl_.power_entity_state_) {
915 total_size +=
916 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
917 }
918
919 // repeated .perfetto.protos.EntityStateResidency.StateResidency residency = 2;
920 total_size += 1UL * this->_internal_residency_size();
921 for (const auto& msg : this->_impl_.residency_) {
922 total_size +=
923 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
924 }
925
926 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
927 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
928 }
929 int cached_size = ::_pbi::ToCachedSize(total_size);
930 SetCachedSize(cached_size);
931 return total_size;
932 }
933
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)934 void EntityStateResidency::CheckTypeAndMergeFrom(
935 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
936 MergeFrom(*::_pbi::DownCast<const EntityStateResidency*>(
937 &from));
938 }
939
MergeFrom(const EntityStateResidency & from)940 void EntityStateResidency::MergeFrom(const EntityStateResidency& from) {
941 EntityStateResidency* const _this = this;
942 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.EntityStateResidency)
943 GOOGLE_DCHECK_NE(&from, _this);
944 ::uint32_t cached_has_bits = 0;
945 (void) cached_has_bits;
946
947 _this->_impl_.power_entity_state_.MergeFrom(from._impl_.power_entity_state_);
948 _this->_impl_.residency_.MergeFrom(from._impl_.residency_);
949 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
950 }
951
CopyFrom(const EntityStateResidency & from)952 void EntityStateResidency::CopyFrom(const EntityStateResidency& from) {
953 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.EntityStateResidency)
954 if (&from == this) return;
955 Clear();
956 MergeFrom(from);
957 }
958
IsInitialized() const959 bool EntityStateResidency::IsInitialized() const {
960 return true;
961 }
962
InternalSwap(EntityStateResidency * other)963 void EntityStateResidency::InternalSwap(EntityStateResidency* other) {
964 using std::swap;
965 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
966 _impl_.power_entity_state_.InternalSwap(&other->_impl_.power_entity_state_);
967 _impl_.residency_.InternalSwap(&other->_impl_.residency_);
968 }
969
GetTypeName() const970 std::string EntityStateResidency::GetTypeName() const {
971 return "perfetto.protos.EntityStateResidency";
972 }
973
974
975 // @@protoc_insertion_point(namespace_scope)
976 } // namespace protos
977 } // namespace perfetto
978 PROTOBUF_NAMESPACE_OPEN
979 template<> PROTOBUF_NOINLINE ::perfetto::protos::EntityStateResidency_PowerEntityState*
CreateMaybeMessage(Arena * arena)980 Arena::CreateMaybeMessage< ::perfetto::protos::EntityStateResidency_PowerEntityState >(Arena* arena) {
981 return Arena::CreateMessageInternal< ::perfetto::protos::EntityStateResidency_PowerEntityState >(arena);
982 }
983 template<> PROTOBUF_NOINLINE ::perfetto::protos::EntityStateResidency_StateResidency*
CreateMaybeMessage(Arena * arena)984 Arena::CreateMaybeMessage< ::perfetto::protos::EntityStateResidency_StateResidency >(Arena* arena) {
985 return Arena::CreateMessageInternal< ::perfetto::protos::EntityStateResidency_StateResidency >(arena);
986 }
987 template<> PROTOBUF_NOINLINE ::perfetto::protos::EntityStateResidency*
CreateMaybeMessage(Arena * arena)988 Arena::CreateMaybeMessage< ::perfetto::protos::EntityStateResidency >(Arena* arena) {
989 return Arena::CreateMessageInternal< ::perfetto::protos::EntityStateResidency >(arena);
990 }
991 PROTOBUF_NAMESPACE_CLOSE
992
993 // @@protoc_insertion_point(global_scope)
994 #include <google/protobuf/port_undef.inc>
995