1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: protos/perfetto/config/power/android_power_config.proto
3 
4 #include "protos/perfetto/config/power/android_power_config.pb.h"
5 
6 #include <algorithm>
7 #include <cstdint>
8 
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15 
16 PROTOBUF_PRAGMA_INIT_SEG
17 
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20 
21 namespace perfetto {
22 namespace protos {
AndroidPowerConfig(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR AndroidPowerConfig::AndroidPowerConfig(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.battery_counters_)*/{}
28   , /*decltype(_impl_.battery_poll_ms_)*/0u
29   , /*decltype(_impl_.collect_power_rails_)*/false
30   , /*decltype(_impl_.collect_energy_estimation_breakdown_)*/false
31   , /*decltype(_impl_.collect_entity_state_residency_)*/false} {}
32 struct AndroidPowerConfigDefaultTypeInternal {
AndroidPowerConfigDefaultTypeInternalperfetto::protos::AndroidPowerConfigDefaultTypeInternal33   PROTOBUF_CONSTEXPR AndroidPowerConfigDefaultTypeInternal()
34       : _instance(::_pbi::ConstantInitialized{}) {}
~AndroidPowerConfigDefaultTypeInternalperfetto::protos::AndroidPowerConfigDefaultTypeInternal35   ~AndroidPowerConfigDefaultTypeInternal() {}
36   union {  // NOLINT(misc-non-private-member-variables-in-classes)
37     AndroidPowerConfig _instance;
38   };
39 };
40 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AndroidPowerConfigDefaultTypeInternal _AndroidPowerConfig_default_instance_;
41 }  // namespace protos
42 }  // namespace perfetto
43 namespace perfetto {
44 namespace protos {
AndroidPowerConfig_BatteryCounters_IsValid(int value)45 bool AndroidPowerConfig_BatteryCounters_IsValid(int value) {
46   switch (value) {
47     case 0:
48     case 1:
49     case 2:
50     case 3:
51     case 4:
52     case 5:
53       return true;
54     default:
55       return false;
56   }
57 }
58 
59 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> AndroidPowerConfig_BatteryCounters_strings[6] = {};
60 
61 static const char AndroidPowerConfig_BatteryCounters_names[] =
62   "BATTERY_COUNTER_CAPACITY_PERCENT"
63   "BATTERY_COUNTER_CHARGE"
64   "BATTERY_COUNTER_CURRENT"
65   "BATTERY_COUNTER_CURRENT_AVG"
66   "BATTERY_COUNTER_UNSPECIFIED"
67   "BATTERY_COUNTER_VOLTAGE";
68 
69 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AndroidPowerConfig_BatteryCounters_entries[] = {
70   { {AndroidPowerConfig_BatteryCounters_names + 0, 32}, 2 },
71   { {AndroidPowerConfig_BatteryCounters_names + 32, 22}, 1 },
72   { {AndroidPowerConfig_BatteryCounters_names + 54, 23}, 3 },
73   { {AndroidPowerConfig_BatteryCounters_names + 77, 27}, 4 },
74   { {AndroidPowerConfig_BatteryCounters_names + 104, 27}, 0 },
75   { {AndroidPowerConfig_BatteryCounters_names + 131, 23}, 5 },
76 };
77 
78 static const int AndroidPowerConfig_BatteryCounters_entries_by_number[] = {
79   4, // 0 -> BATTERY_COUNTER_UNSPECIFIED
80   1, // 1 -> BATTERY_COUNTER_CHARGE
81   0, // 2 -> BATTERY_COUNTER_CAPACITY_PERCENT
82   2, // 3 -> BATTERY_COUNTER_CURRENT
83   3, // 4 -> BATTERY_COUNTER_CURRENT_AVG
84   5, // 5 -> BATTERY_COUNTER_VOLTAGE
85 };
86 
AndroidPowerConfig_BatteryCounters_Name(AndroidPowerConfig_BatteryCounters value)87 const std::string& AndroidPowerConfig_BatteryCounters_Name(
88     AndroidPowerConfig_BatteryCounters value) {
89   static const bool dummy =
90       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
91           AndroidPowerConfig_BatteryCounters_entries,
92           AndroidPowerConfig_BatteryCounters_entries_by_number,
93           6, AndroidPowerConfig_BatteryCounters_strings);
94   (void) dummy;
95   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
96       AndroidPowerConfig_BatteryCounters_entries,
97       AndroidPowerConfig_BatteryCounters_entries_by_number,
98       6, value);
99   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
100                      AndroidPowerConfig_BatteryCounters_strings[idx].get();
101 }
AndroidPowerConfig_BatteryCounters_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,AndroidPowerConfig_BatteryCounters * value)102 bool AndroidPowerConfig_BatteryCounters_Parse(
103     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AndroidPowerConfig_BatteryCounters* value) {
104   int int_value;
105   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
106       AndroidPowerConfig_BatteryCounters_entries, 6, name, &int_value);
107   if (success) {
108     *value = static_cast<AndroidPowerConfig_BatteryCounters>(int_value);
109   }
110   return success;
111 }
112 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
113 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_UNSPECIFIED;
114 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_CHARGE;
115 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_CAPACITY_PERCENT;
116 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_CURRENT;
117 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_CURRENT_AVG;
118 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BATTERY_COUNTER_VOLTAGE;
119 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BatteryCounters_MIN;
120 constexpr AndroidPowerConfig_BatteryCounters AndroidPowerConfig::BatteryCounters_MAX;
121 constexpr int AndroidPowerConfig::BatteryCounters_ARRAYSIZE;
122 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
123 
124 // ===================================================================
125 
126 class AndroidPowerConfig::_Internal {
127  public:
128   using HasBits = decltype(std::declval<AndroidPowerConfig>()._impl_._has_bits_);
set_has_battery_poll_ms(HasBits * has_bits)129   static void set_has_battery_poll_ms(HasBits* has_bits) {
130     (*has_bits)[0] |= 1u;
131   }
set_has_collect_power_rails(HasBits * has_bits)132   static void set_has_collect_power_rails(HasBits* has_bits) {
133     (*has_bits)[0] |= 2u;
134   }
set_has_collect_energy_estimation_breakdown(HasBits * has_bits)135   static void set_has_collect_energy_estimation_breakdown(HasBits* has_bits) {
136     (*has_bits)[0] |= 4u;
137   }
set_has_collect_entity_state_residency(HasBits * has_bits)138   static void set_has_collect_entity_state_residency(HasBits* has_bits) {
139     (*has_bits)[0] |= 8u;
140   }
141 };
142 
AndroidPowerConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)143 AndroidPowerConfig::AndroidPowerConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
144                          bool is_message_owned)
145   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
146   SharedCtor(arena, is_message_owned);
147   // @@protoc_insertion_point(arena_constructor:perfetto.protos.AndroidPowerConfig)
148 }
AndroidPowerConfig(const AndroidPowerConfig & from)149 AndroidPowerConfig::AndroidPowerConfig(const AndroidPowerConfig& from)
150   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
151   AndroidPowerConfig* const _this = this; (void)_this;
152   new (&_impl_) Impl_{
153       decltype(_impl_._has_bits_){from._impl_._has_bits_}
154     , /*decltype(_impl_._cached_size_)*/{}
155     , decltype(_impl_.battery_counters_){from._impl_.battery_counters_}
156     , decltype(_impl_.battery_poll_ms_){}
157     , decltype(_impl_.collect_power_rails_){}
158     , decltype(_impl_.collect_energy_estimation_breakdown_){}
159     , decltype(_impl_.collect_entity_state_residency_){}};
160 
161   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
162   ::memcpy(&_impl_.battery_poll_ms_, &from._impl_.battery_poll_ms_,
163     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.collect_entity_state_residency_) -
164     reinterpret_cast<char*>(&_impl_.battery_poll_ms_)) + sizeof(_impl_.collect_entity_state_residency_));
165   // @@protoc_insertion_point(copy_constructor:perfetto.protos.AndroidPowerConfig)
166 }
167 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)168 inline void AndroidPowerConfig::SharedCtor(
169     ::_pb::Arena* arena, bool is_message_owned) {
170   (void)arena;
171   (void)is_message_owned;
172   new (&_impl_) Impl_{
173       decltype(_impl_._has_bits_){}
174     , /*decltype(_impl_._cached_size_)*/{}
175     , decltype(_impl_.battery_counters_){arena}
176     , decltype(_impl_.battery_poll_ms_){0u}
177     , decltype(_impl_.collect_power_rails_){false}
178     , decltype(_impl_.collect_energy_estimation_breakdown_){false}
179     , decltype(_impl_.collect_entity_state_residency_){false}
180   };
181 }
182 
~AndroidPowerConfig()183 AndroidPowerConfig::~AndroidPowerConfig() {
184   // @@protoc_insertion_point(destructor:perfetto.protos.AndroidPowerConfig)
185   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
186   (void)arena;
187     return;
188   }
189   SharedDtor();
190 }
191 
SharedDtor()192 inline void AndroidPowerConfig::SharedDtor() {
193   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
194   _impl_.battery_counters_.~RepeatedField();
195 }
196 
SetCachedSize(int size) const197 void AndroidPowerConfig::SetCachedSize(int size) const {
198   _impl_._cached_size_.Set(size);
199 }
200 
Clear()201 void AndroidPowerConfig::Clear() {
202 // @@protoc_insertion_point(message_clear_start:perfetto.protos.AndroidPowerConfig)
203   ::uint32_t cached_has_bits = 0;
204   // Prevent compiler warnings about cached_has_bits being unused
205   (void) cached_has_bits;
206 
207   _impl_.battery_counters_.Clear();
208   cached_has_bits = _impl_._has_bits_[0];
209   if (cached_has_bits & 0x0000000fu) {
210     ::memset(&_impl_.battery_poll_ms_, 0, static_cast<size_t>(
211         reinterpret_cast<char*>(&_impl_.collect_entity_state_residency_) -
212         reinterpret_cast<char*>(&_impl_.battery_poll_ms_)) + sizeof(_impl_.collect_entity_state_residency_));
213   }
214   _impl_._has_bits_.Clear();
215   _internal_metadata_.Clear<std::string>();
216 }
217 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)218 const char* AndroidPowerConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
219 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
220   _Internal::HasBits has_bits{};
221   while (!ctx->Done(&ptr)) {
222     ::uint32_t tag;
223     ptr = ::_pbi::ReadTag(ptr, &tag);
224     switch (tag >> 3) {
225       // optional uint32 battery_poll_ms = 1;
226       case 1:
227         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
228           _Internal::set_has_battery_poll_ms(&has_bits);
229           _impl_.battery_poll_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
230           CHK_(ptr);
231         } else {
232           goto handle_unusual;
233         }
234         continue;
235       // repeated .perfetto.protos.AndroidPowerConfig.BatteryCounters battery_counters = 2;
236       case 2:
237         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
238           ptr -= 1;
239           do {
240             ptr += 1;
241             ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
242             CHK_(ptr);
243             if (PROTOBUF_PREDICT_TRUE(::perfetto::protos::AndroidPowerConfig_BatteryCounters_IsValid(val))) {
244               _internal_add_battery_counters(static_cast<::perfetto::protos::AndroidPowerConfig_BatteryCounters>(val));
245             } else {
246               ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
247             }
248             if (!ctx->DataAvailable(ptr)) break;
249           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
250         } else if (static_cast<::uint8_t>(tag) == 18) {
251           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_battery_counters(), ptr, ctx, ::perfetto::protos::AndroidPowerConfig_BatteryCounters_IsValid, &_internal_metadata_, 2);
252           CHK_(ptr);
253         } else {
254           goto handle_unusual;
255         }
256         continue;
257       // optional bool collect_power_rails = 3;
258       case 3:
259         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
260           _Internal::set_has_collect_power_rails(&has_bits);
261           _impl_.collect_power_rails_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
262           CHK_(ptr);
263         } else {
264           goto handle_unusual;
265         }
266         continue;
267       // optional bool collect_energy_estimation_breakdown = 4;
268       case 4:
269         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
270           _Internal::set_has_collect_energy_estimation_breakdown(&has_bits);
271           _impl_.collect_energy_estimation_breakdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
272           CHK_(ptr);
273         } else {
274           goto handle_unusual;
275         }
276         continue;
277       // optional bool collect_entity_state_residency = 5;
278       case 5:
279         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
280           _Internal::set_has_collect_entity_state_residency(&has_bits);
281           _impl_.collect_entity_state_residency_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
282           CHK_(ptr);
283         } else {
284           goto handle_unusual;
285         }
286         continue;
287       default:
288         goto handle_unusual;
289     }  // switch
290   handle_unusual:
291     if ((tag == 0) || ((tag & 7) == 4)) {
292       CHK_(ptr);
293       ctx->SetLastTag(tag);
294       goto message_done;
295     }
296     ptr = UnknownFieldParse(
297         tag,
298         _internal_metadata_.mutable_unknown_fields<std::string>(),
299         ptr, ctx);
300     CHK_(ptr != nullptr);
301   }  // while
302 message_done:
303   _impl_._has_bits_.Or(has_bits);
304   return ptr;
305 failure:
306   ptr = nullptr;
307   goto message_done;
308 #undef CHK_
309 }
310 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const311 ::uint8_t* AndroidPowerConfig::_InternalSerialize(
312     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
313   // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.AndroidPowerConfig)
314   ::uint32_t cached_has_bits = 0;
315   (void) cached_has_bits;
316 
317   cached_has_bits = _impl_._has_bits_[0];
318   // optional uint32 battery_poll_ms = 1;
319   if (cached_has_bits & 0x00000001u) {
320     target = stream->EnsureSpace(target);
321     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_battery_poll_ms(), target);
322   }
323 
324   // repeated .perfetto.protos.AndroidPowerConfig.BatteryCounters battery_counters = 2;
325   for (int i = 0, n = this->_internal_battery_counters_size(); i < n; i++) {
326     target = stream->EnsureSpace(target);
327     target = ::_pbi::WireFormatLite::WriteEnumToArray(
328         2, this->_internal_battery_counters(i), target);
329   }
330 
331   // optional bool collect_power_rails = 3;
332   if (cached_has_bits & 0x00000002u) {
333     target = stream->EnsureSpace(target);
334     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_collect_power_rails(), target);
335   }
336 
337   // optional bool collect_energy_estimation_breakdown = 4;
338   if (cached_has_bits & 0x00000004u) {
339     target = stream->EnsureSpace(target);
340     target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_collect_energy_estimation_breakdown(), target);
341   }
342 
343   // optional bool collect_entity_state_residency = 5;
344   if (cached_has_bits & 0x00000008u) {
345     target = stream->EnsureSpace(target);
346     target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_collect_entity_state_residency(), target);
347   }
348 
349   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
350     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
351         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
352   }
353   // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.AndroidPowerConfig)
354   return target;
355 }
356 
ByteSizeLong() const357 size_t AndroidPowerConfig::ByteSizeLong() const {
358 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.AndroidPowerConfig)
359   size_t total_size = 0;
360 
361   ::uint32_t cached_has_bits = 0;
362   // Prevent compiler warnings about cached_has_bits being unused
363   (void) cached_has_bits;
364 
365   // repeated .perfetto.protos.AndroidPowerConfig.BatteryCounters battery_counters = 2;
366   {
367     size_t data_size = 0;
368     unsigned int count = static_cast<unsigned int>(this->_internal_battery_counters_size());for (unsigned int i = 0; i < count; i++) {
369       data_size += ::_pbi::WireFormatLite::EnumSize(
370         this->_internal_battery_counters(static_cast<int>(i)));
371     }
372     total_size += (1UL * count) + data_size;
373   }
374 
375   cached_has_bits = _impl_._has_bits_[0];
376   if (cached_has_bits & 0x0000000fu) {
377     // optional uint32 battery_poll_ms = 1;
378     if (cached_has_bits & 0x00000001u) {
379       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_battery_poll_ms());
380     }
381 
382     // optional bool collect_power_rails = 3;
383     if (cached_has_bits & 0x00000002u) {
384       total_size += 1 + 1;
385     }
386 
387     // optional bool collect_energy_estimation_breakdown = 4;
388     if (cached_has_bits & 0x00000004u) {
389       total_size += 1 + 1;
390     }
391 
392     // optional bool collect_entity_state_residency = 5;
393     if (cached_has_bits & 0x00000008u) {
394       total_size += 1 + 1;
395     }
396 
397   }
398   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
399     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
400   }
401   int cached_size = ::_pbi::ToCachedSize(total_size);
402   SetCachedSize(cached_size);
403   return total_size;
404 }
405 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)406 void AndroidPowerConfig::CheckTypeAndMergeFrom(
407     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
408   MergeFrom(*::_pbi::DownCast<const AndroidPowerConfig*>(
409       &from));
410 }
411 
MergeFrom(const AndroidPowerConfig & from)412 void AndroidPowerConfig::MergeFrom(const AndroidPowerConfig& from) {
413   AndroidPowerConfig* const _this = this;
414   // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.AndroidPowerConfig)
415   GOOGLE_DCHECK_NE(&from, _this);
416   ::uint32_t cached_has_bits = 0;
417   (void) cached_has_bits;
418 
419   _this->_impl_.battery_counters_.MergeFrom(from._impl_.battery_counters_);
420   cached_has_bits = from._impl_._has_bits_[0];
421   if (cached_has_bits & 0x0000000fu) {
422     if (cached_has_bits & 0x00000001u) {
423       _this->_impl_.battery_poll_ms_ = from._impl_.battery_poll_ms_;
424     }
425     if (cached_has_bits & 0x00000002u) {
426       _this->_impl_.collect_power_rails_ = from._impl_.collect_power_rails_;
427     }
428     if (cached_has_bits & 0x00000004u) {
429       _this->_impl_.collect_energy_estimation_breakdown_ = from._impl_.collect_energy_estimation_breakdown_;
430     }
431     if (cached_has_bits & 0x00000008u) {
432       _this->_impl_.collect_entity_state_residency_ = from._impl_.collect_entity_state_residency_;
433     }
434     _this->_impl_._has_bits_[0] |= cached_has_bits;
435   }
436   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
437 }
438 
CopyFrom(const AndroidPowerConfig & from)439 void AndroidPowerConfig::CopyFrom(const AndroidPowerConfig& from) {
440 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.AndroidPowerConfig)
441   if (&from == this) return;
442   Clear();
443   MergeFrom(from);
444 }
445 
IsInitialized() const446 bool AndroidPowerConfig::IsInitialized() const {
447   return true;
448 }
449 
InternalSwap(AndroidPowerConfig * other)450 void AndroidPowerConfig::InternalSwap(AndroidPowerConfig* other) {
451   using std::swap;
452   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
453   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
454   _impl_.battery_counters_.InternalSwap(&other->_impl_.battery_counters_);
455   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
456       PROTOBUF_FIELD_OFFSET(AndroidPowerConfig, _impl_.collect_entity_state_residency_)
457       + sizeof(AndroidPowerConfig::_impl_.collect_entity_state_residency_)  // NOLINT
458       - PROTOBUF_FIELD_OFFSET(AndroidPowerConfig, _impl_.battery_poll_ms_)>(
459           reinterpret_cast<char*>(&_impl_.battery_poll_ms_),
460           reinterpret_cast<char*>(&other->_impl_.battery_poll_ms_));
461 }
462 
GetTypeName() const463 std::string AndroidPowerConfig::GetTypeName() const {
464   return "perfetto.protos.AndroidPowerConfig";
465 }
466 
467 
468 // @@protoc_insertion_point(namespace_scope)
469 }  // namespace protos
470 }  // namespace perfetto
471 PROTOBUF_NAMESPACE_OPEN
472 template<> PROTOBUF_NOINLINE ::perfetto::protos::AndroidPowerConfig*
CreateMaybeMessage(Arena * arena)473 Arena::CreateMaybeMessage< ::perfetto::protos::AndroidPowerConfig >(Arena* arena) {
474   return Arena::CreateMessageInternal< ::perfetto::protos::AndroidPowerConfig >(arena);
475 }
476 PROTOBUF_NAMESPACE_CLOSE
477 
478 // @@protoc_insertion_point(global_scope)
479 #include <google/protobuf/port_undef.inc>
480