1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: packages/modules/StatsD/statsd/src/active_config_list.proto
3 
4 #include "packages/modules/StatsD/statsd/src/active_config_list.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 android {
22 namespace os {
23 namespace statsd {
ActiveEventActivation(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR ActiveEventActivation::ActiveEventActivation(
25     ::_pbi::ConstantInitialized): _impl_{
26     /*decltype(_impl_._has_bits_)*/{}
27   , /*decltype(_impl_._cached_size_)*/{}
28   , /*decltype(_impl_.remaining_ttl_nanos_)*/::int64_t{0}
29   , /*decltype(_impl_.atom_matcher_index_)*/0
30   , /*decltype(_impl_.state_)*/0} {}
31 struct ActiveEventActivationDefaultTypeInternal {
ActiveEventActivationDefaultTypeInternalandroid::os::statsd::ActiveEventActivationDefaultTypeInternal32   PROTOBUF_CONSTEXPR ActiveEventActivationDefaultTypeInternal()
33       : _instance(::_pbi::ConstantInitialized{}) {}
~ActiveEventActivationDefaultTypeInternalandroid::os::statsd::ActiveEventActivationDefaultTypeInternal34   ~ActiveEventActivationDefaultTypeInternal() {}
35   union {  // NOLINT(misc-non-private-member-variables-in-classes)
36     ActiveEventActivation _instance;
37   };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ActiveEventActivationDefaultTypeInternal _ActiveEventActivation_default_instance_;
ActiveMetric(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR ActiveMetric::ActiveMetric(
41     ::_pbi::ConstantInitialized): _impl_{
42     /*decltype(_impl_._has_bits_)*/{}
43   , /*decltype(_impl_._cached_size_)*/{}
44   , /*decltype(_impl_.activation_)*/{}
45   , /*decltype(_impl_.id_)*/::int64_t{0}} {}
46 struct ActiveMetricDefaultTypeInternal {
ActiveMetricDefaultTypeInternalandroid::os::statsd::ActiveMetricDefaultTypeInternal47   PROTOBUF_CONSTEXPR ActiveMetricDefaultTypeInternal()
48       : _instance(::_pbi::ConstantInitialized{}) {}
~ActiveMetricDefaultTypeInternalandroid::os::statsd::ActiveMetricDefaultTypeInternal49   ~ActiveMetricDefaultTypeInternal() {}
50   union {  // NOLINT(misc-non-private-member-variables-in-classes)
51     ActiveMetric _instance;
52   };
53 };
54 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ActiveMetricDefaultTypeInternal _ActiveMetric_default_instance_;
ActiveConfig(::_pbi::ConstantInitialized)55 PROTOBUF_CONSTEXPR ActiveConfig::ActiveConfig(
56     ::_pbi::ConstantInitialized): _impl_{
57     /*decltype(_impl_._has_bits_)*/{}
58   , /*decltype(_impl_._cached_size_)*/{}
59   , /*decltype(_impl_.metric_)*/{}
60   , /*decltype(_impl_.id_)*/::int64_t{0}
61   , /*decltype(_impl_.uid_)*/0} {}
62 struct ActiveConfigDefaultTypeInternal {
ActiveConfigDefaultTypeInternalandroid::os::statsd::ActiveConfigDefaultTypeInternal63   PROTOBUF_CONSTEXPR ActiveConfigDefaultTypeInternal()
64       : _instance(::_pbi::ConstantInitialized{}) {}
~ActiveConfigDefaultTypeInternalandroid::os::statsd::ActiveConfigDefaultTypeInternal65   ~ActiveConfigDefaultTypeInternal() {}
66   union {  // NOLINT(misc-non-private-member-variables-in-classes)
67     ActiveConfig _instance;
68   };
69 };
70 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ActiveConfigDefaultTypeInternal _ActiveConfig_default_instance_;
ActiveConfigList(::_pbi::ConstantInitialized)71 PROTOBUF_CONSTEXPR ActiveConfigList::ActiveConfigList(
72     ::_pbi::ConstantInitialized): _impl_{
73     /*decltype(_impl_.config_)*/{}
74   , /*decltype(_impl_._cached_size_)*/{}} {}
75 struct ActiveConfigListDefaultTypeInternal {
ActiveConfigListDefaultTypeInternalandroid::os::statsd::ActiveConfigListDefaultTypeInternal76   PROTOBUF_CONSTEXPR ActiveConfigListDefaultTypeInternal()
77       : _instance(::_pbi::ConstantInitialized{}) {}
~ActiveConfigListDefaultTypeInternalandroid::os::statsd::ActiveConfigListDefaultTypeInternal78   ~ActiveConfigListDefaultTypeInternal() {}
79   union {  // NOLINT(misc-non-private-member-variables-in-classes)
80     ActiveConfigList _instance;
81   };
82 };
83 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ActiveConfigListDefaultTypeInternal _ActiveConfigList_default_instance_;
84 }  // namespace statsd
85 }  // namespace os
86 }  // namespace android
87 namespace android {
88 namespace os {
89 namespace statsd {
ActiveEventActivation_State_IsValid(int value)90 bool ActiveEventActivation_State_IsValid(int value) {
91   switch (value) {
92     case 0:
93     case 1:
94     case 2:
95       return true;
96     default:
97       return false;
98   }
99 }
100 
101 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ActiveEventActivation_State_strings[3] = {};
102 
103 static const char ActiveEventActivation_State_names[] =
104   "ACTIVATE_ON_BOOT"
105   "ACTIVE"
106   "UNNKNOWN";
107 
108 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ActiveEventActivation_State_entries[] = {
109   { {ActiveEventActivation_State_names + 0, 16}, 2 },
110   { {ActiveEventActivation_State_names + 16, 6}, 1 },
111   { {ActiveEventActivation_State_names + 22, 8}, 0 },
112 };
113 
114 static const int ActiveEventActivation_State_entries_by_number[] = {
115   2, // 0 -> UNNKNOWN
116   1, // 1 -> ACTIVE
117   0, // 2 -> ACTIVATE_ON_BOOT
118 };
119 
ActiveEventActivation_State_Name(ActiveEventActivation_State value)120 const std::string& ActiveEventActivation_State_Name(
121     ActiveEventActivation_State value) {
122   static const bool dummy =
123       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
124           ActiveEventActivation_State_entries,
125           ActiveEventActivation_State_entries_by_number,
126           3, ActiveEventActivation_State_strings);
127   (void) dummy;
128   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
129       ActiveEventActivation_State_entries,
130       ActiveEventActivation_State_entries_by_number,
131       3, value);
132   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
133                      ActiveEventActivation_State_strings[idx].get();
134 }
ActiveEventActivation_State_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ActiveEventActivation_State * value)135 bool ActiveEventActivation_State_Parse(
136     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ActiveEventActivation_State* value) {
137   int int_value;
138   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
139       ActiveEventActivation_State_entries, 3, name, &int_value);
140   if (success) {
141     *value = static_cast<ActiveEventActivation_State>(int_value);
142   }
143   return success;
144 }
145 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
146 constexpr ActiveEventActivation_State ActiveEventActivation::UNNKNOWN;
147 constexpr ActiveEventActivation_State ActiveEventActivation::ACTIVE;
148 constexpr ActiveEventActivation_State ActiveEventActivation::ACTIVATE_ON_BOOT;
149 constexpr ActiveEventActivation_State ActiveEventActivation::State_MIN;
150 constexpr ActiveEventActivation_State ActiveEventActivation::State_MAX;
151 constexpr int ActiveEventActivation::State_ARRAYSIZE;
152 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
153 
154 // ===================================================================
155 
156 class ActiveEventActivation::_Internal {
157  public:
158   using HasBits = decltype(std::declval<ActiveEventActivation>()._impl_._has_bits_);
set_has_atom_matcher_index(HasBits * has_bits)159   static void set_has_atom_matcher_index(HasBits* has_bits) {
160     (*has_bits)[0] |= 2u;
161   }
set_has_remaining_ttl_nanos(HasBits * has_bits)162   static void set_has_remaining_ttl_nanos(HasBits* has_bits) {
163     (*has_bits)[0] |= 1u;
164   }
set_has_state(HasBits * has_bits)165   static void set_has_state(HasBits* has_bits) {
166     (*has_bits)[0] |= 4u;
167   }
168 };
169 
ActiveEventActivation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)170 ActiveEventActivation::ActiveEventActivation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
171                          bool is_message_owned)
172   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
173   SharedCtor(arena, is_message_owned);
174   // @@protoc_insertion_point(arena_constructor:android.os.statsd.ActiveEventActivation)
175 }
ActiveEventActivation(const ActiveEventActivation & from)176 ActiveEventActivation::ActiveEventActivation(const ActiveEventActivation& from)
177   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
178   ActiveEventActivation* const _this = this; (void)_this;
179   new (&_impl_) Impl_{
180       decltype(_impl_._has_bits_){from._impl_._has_bits_}
181     , /*decltype(_impl_._cached_size_)*/{}
182     , decltype(_impl_.remaining_ttl_nanos_){}
183     , decltype(_impl_.atom_matcher_index_){}
184     , decltype(_impl_.state_){}};
185 
186   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
187   ::memcpy(&_impl_.remaining_ttl_nanos_, &from._impl_.remaining_ttl_nanos_,
188     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.state_) -
189     reinterpret_cast<char*>(&_impl_.remaining_ttl_nanos_)) + sizeof(_impl_.state_));
190   // @@protoc_insertion_point(copy_constructor:android.os.statsd.ActiveEventActivation)
191 }
192 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)193 inline void ActiveEventActivation::SharedCtor(
194     ::_pb::Arena* arena, bool is_message_owned) {
195   (void)arena;
196   (void)is_message_owned;
197   new (&_impl_) Impl_{
198       decltype(_impl_._has_bits_){}
199     , /*decltype(_impl_._cached_size_)*/{}
200     , decltype(_impl_.remaining_ttl_nanos_){::int64_t{0}}
201     , decltype(_impl_.atom_matcher_index_){0}
202     , decltype(_impl_.state_){0}
203   };
204 }
205 
~ActiveEventActivation()206 ActiveEventActivation::~ActiveEventActivation() {
207   // @@protoc_insertion_point(destructor:android.os.statsd.ActiveEventActivation)
208   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
209   (void)arena;
210     return;
211   }
212   SharedDtor();
213 }
214 
SharedDtor()215 inline void ActiveEventActivation::SharedDtor() {
216   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
217 }
218 
SetCachedSize(int size) const219 void ActiveEventActivation::SetCachedSize(int size) const {
220   _impl_._cached_size_.Set(size);
221 }
222 
Clear()223 void ActiveEventActivation::Clear() {
224 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ActiveEventActivation)
225   ::uint32_t cached_has_bits = 0;
226   // Prevent compiler warnings about cached_has_bits being unused
227   (void) cached_has_bits;
228 
229   cached_has_bits = _impl_._has_bits_[0];
230   if (cached_has_bits & 0x00000007u) {
231     ::memset(&_impl_.remaining_ttl_nanos_, 0, static_cast<size_t>(
232         reinterpret_cast<char*>(&_impl_.state_) -
233         reinterpret_cast<char*>(&_impl_.remaining_ttl_nanos_)) + sizeof(_impl_.state_));
234   }
235   _impl_._has_bits_.Clear();
236   _internal_metadata_.Clear<std::string>();
237 }
238 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)239 const char* ActiveEventActivation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
240 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
241   _Internal::HasBits has_bits{};
242   while (!ctx->Done(&ptr)) {
243     ::uint32_t tag;
244     ptr = ::_pbi::ReadTag(ptr, &tag);
245     switch (tag >> 3) {
246       // optional int32 atom_matcher_index = 1;
247       case 1:
248         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
249           _Internal::set_has_atom_matcher_index(&has_bits);
250           _impl_.atom_matcher_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
251           CHK_(ptr);
252         } else {
253           goto handle_unusual;
254         }
255         continue;
256       // optional int64 remaining_ttl_nanos = 2;
257       case 2:
258         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
259           _Internal::set_has_remaining_ttl_nanos(&has_bits);
260           _impl_.remaining_ttl_nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
261           CHK_(ptr);
262         } else {
263           goto handle_unusual;
264         }
265         continue;
266       // optional .android.os.statsd.ActiveEventActivation.State state = 3;
267       case 3:
268         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
269           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
270           CHK_(ptr);
271           if (PROTOBUF_PREDICT_TRUE(::android::os::statsd::ActiveEventActivation_State_IsValid(val))) {
272             _internal_set_state(static_cast<::android::os::statsd::ActiveEventActivation_State>(val));
273           } else {
274             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
275           }
276         } else {
277           goto handle_unusual;
278         }
279         continue;
280       default:
281         goto handle_unusual;
282     }  // switch
283   handle_unusual:
284     if ((tag == 0) || ((tag & 7) == 4)) {
285       CHK_(ptr);
286       ctx->SetLastTag(tag);
287       goto message_done;
288     }
289     ptr = UnknownFieldParse(
290         tag,
291         _internal_metadata_.mutable_unknown_fields<std::string>(),
292         ptr, ctx);
293     CHK_(ptr != nullptr);
294   }  // while
295 message_done:
296   _impl_._has_bits_.Or(has_bits);
297   return ptr;
298 failure:
299   ptr = nullptr;
300   goto message_done;
301 #undef CHK_
302 }
303 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const304 ::uint8_t* ActiveEventActivation::_InternalSerialize(
305     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
306   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ActiveEventActivation)
307   ::uint32_t cached_has_bits = 0;
308   (void) cached_has_bits;
309 
310   cached_has_bits = _impl_._has_bits_[0];
311   // optional int32 atom_matcher_index = 1;
312   if (cached_has_bits & 0x00000002u) {
313     target = stream->EnsureSpace(target);
314     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_atom_matcher_index(), target);
315   }
316 
317   // optional int64 remaining_ttl_nanos = 2;
318   if (cached_has_bits & 0x00000001u) {
319     target = stream->EnsureSpace(target);
320     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_remaining_ttl_nanos(), target);
321   }
322 
323   // optional .android.os.statsd.ActiveEventActivation.State state = 3;
324   if (cached_has_bits & 0x00000004u) {
325     target = stream->EnsureSpace(target);
326     target = ::_pbi::WireFormatLite::WriteEnumToArray(
327       3, this->_internal_state(), target);
328   }
329 
330   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
331     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
332         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
333   }
334   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ActiveEventActivation)
335   return target;
336 }
337 
ByteSizeLong() const338 size_t ActiveEventActivation::ByteSizeLong() const {
339 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ActiveEventActivation)
340   size_t total_size = 0;
341 
342   ::uint32_t cached_has_bits = 0;
343   // Prevent compiler warnings about cached_has_bits being unused
344   (void) cached_has_bits;
345 
346   cached_has_bits = _impl_._has_bits_[0];
347   if (cached_has_bits & 0x00000007u) {
348     // optional int64 remaining_ttl_nanos = 2;
349     if (cached_has_bits & 0x00000001u) {
350       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_remaining_ttl_nanos());
351     }
352 
353     // optional int32 atom_matcher_index = 1;
354     if (cached_has_bits & 0x00000002u) {
355       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_atom_matcher_index());
356     }
357 
358     // optional .android.os.statsd.ActiveEventActivation.State state = 3;
359     if (cached_has_bits & 0x00000004u) {
360       total_size += 1 +
361         ::_pbi::WireFormatLite::EnumSize(this->_internal_state());
362     }
363 
364   }
365   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
366     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
367   }
368   int cached_size = ::_pbi::ToCachedSize(total_size);
369   SetCachedSize(cached_size);
370   return total_size;
371 }
372 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)373 void ActiveEventActivation::CheckTypeAndMergeFrom(
374     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
375   MergeFrom(*::_pbi::DownCast<const ActiveEventActivation*>(
376       &from));
377 }
378 
MergeFrom(const ActiveEventActivation & from)379 void ActiveEventActivation::MergeFrom(const ActiveEventActivation& from) {
380   ActiveEventActivation* const _this = this;
381   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ActiveEventActivation)
382   GOOGLE_DCHECK_NE(&from, _this);
383   ::uint32_t cached_has_bits = 0;
384   (void) cached_has_bits;
385 
386   cached_has_bits = from._impl_._has_bits_[0];
387   if (cached_has_bits & 0x00000007u) {
388     if (cached_has_bits & 0x00000001u) {
389       _this->_impl_.remaining_ttl_nanos_ = from._impl_.remaining_ttl_nanos_;
390     }
391     if (cached_has_bits & 0x00000002u) {
392       _this->_impl_.atom_matcher_index_ = from._impl_.atom_matcher_index_;
393     }
394     if (cached_has_bits & 0x00000004u) {
395       _this->_impl_.state_ = from._impl_.state_;
396     }
397     _this->_impl_._has_bits_[0] |= cached_has_bits;
398   }
399   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
400 }
401 
CopyFrom(const ActiveEventActivation & from)402 void ActiveEventActivation::CopyFrom(const ActiveEventActivation& from) {
403 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ActiveEventActivation)
404   if (&from == this) return;
405   Clear();
406   MergeFrom(from);
407 }
408 
IsInitialized() const409 bool ActiveEventActivation::IsInitialized() const {
410   return true;
411 }
412 
InternalSwap(ActiveEventActivation * other)413 void ActiveEventActivation::InternalSwap(ActiveEventActivation* other) {
414   using std::swap;
415   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
416   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
417   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
418       PROTOBUF_FIELD_OFFSET(ActiveEventActivation, _impl_.state_)
419       + sizeof(ActiveEventActivation::_impl_.state_)  // NOLINT
420       - PROTOBUF_FIELD_OFFSET(ActiveEventActivation, _impl_.remaining_ttl_nanos_)>(
421           reinterpret_cast<char*>(&_impl_.remaining_ttl_nanos_),
422           reinterpret_cast<char*>(&other->_impl_.remaining_ttl_nanos_));
423 }
424 
GetTypeName() const425 std::string ActiveEventActivation::GetTypeName() const {
426   return "android.os.statsd.ActiveEventActivation";
427 }
428 
429 
430 // ===================================================================
431 
432 class ActiveMetric::_Internal {
433  public:
434   using HasBits = decltype(std::declval<ActiveMetric>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)435   static void set_has_id(HasBits* has_bits) {
436     (*has_bits)[0] |= 1u;
437   }
438 };
439 
ActiveMetric(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)440 ActiveMetric::ActiveMetric(::PROTOBUF_NAMESPACE_ID::Arena* arena,
441                          bool is_message_owned)
442   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
443   SharedCtor(arena, is_message_owned);
444   // @@protoc_insertion_point(arena_constructor:android.os.statsd.ActiveMetric)
445 }
ActiveMetric(const ActiveMetric & from)446 ActiveMetric::ActiveMetric(const ActiveMetric& from)
447   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
448   ActiveMetric* const _this = this; (void)_this;
449   new (&_impl_) Impl_{
450       decltype(_impl_._has_bits_){from._impl_._has_bits_}
451     , /*decltype(_impl_._cached_size_)*/{}
452     , decltype(_impl_.activation_){from._impl_.activation_}
453     , decltype(_impl_.id_){}};
454 
455   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
456   _this->_impl_.id_ = from._impl_.id_;
457   // @@protoc_insertion_point(copy_constructor:android.os.statsd.ActiveMetric)
458 }
459 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)460 inline void ActiveMetric::SharedCtor(
461     ::_pb::Arena* arena, bool is_message_owned) {
462   (void)arena;
463   (void)is_message_owned;
464   new (&_impl_) Impl_{
465       decltype(_impl_._has_bits_){}
466     , /*decltype(_impl_._cached_size_)*/{}
467     , decltype(_impl_.activation_){arena}
468     , decltype(_impl_.id_){::int64_t{0}}
469   };
470 }
471 
~ActiveMetric()472 ActiveMetric::~ActiveMetric() {
473   // @@protoc_insertion_point(destructor:android.os.statsd.ActiveMetric)
474   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
475   (void)arena;
476     return;
477   }
478   SharedDtor();
479 }
480 
SharedDtor()481 inline void ActiveMetric::SharedDtor() {
482   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
483   _impl_.activation_.~RepeatedPtrField();
484 }
485 
SetCachedSize(int size) const486 void ActiveMetric::SetCachedSize(int size) const {
487   _impl_._cached_size_.Set(size);
488 }
489 
Clear()490 void ActiveMetric::Clear() {
491 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ActiveMetric)
492   ::uint32_t cached_has_bits = 0;
493   // Prevent compiler warnings about cached_has_bits being unused
494   (void) cached_has_bits;
495 
496   _impl_.activation_.Clear();
497   _impl_.id_ = ::int64_t{0};
498   _impl_._has_bits_.Clear();
499   _internal_metadata_.Clear<std::string>();
500 }
501 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)502 const char* ActiveMetric::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
503 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
504   _Internal::HasBits has_bits{};
505   while (!ctx->Done(&ptr)) {
506     ::uint32_t tag;
507     ptr = ::_pbi::ReadTag(ptr, &tag);
508     switch (tag >> 3) {
509       // optional int64 id = 1;
510       case 1:
511         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
512           _Internal::set_has_id(&has_bits);
513           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
514           CHK_(ptr);
515         } else {
516           goto handle_unusual;
517         }
518         continue;
519       // repeated .android.os.statsd.ActiveEventActivation activation = 2;
520       case 2:
521         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
522           ptr -= 1;
523           do {
524             ptr += 1;
525             ptr = ctx->ParseMessage(_internal_add_activation(), ptr);
526             CHK_(ptr);
527             if (!ctx->DataAvailable(ptr)) break;
528           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
529         } else {
530           goto handle_unusual;
531         }
532         continue;
533       default:
534         goto handle_unusual;
535     }  // switch
536   handle_unusual:
537     if ((tag == 0) || ((tag & 7) == 4)) {
538       CHK_(ptr);
539       ctx->SetLastTag(tag);
540       goto message_done;
541     }
542     ptr = UnknownFieldParse(
543         tag,
544         _internal_metadata_.mutable_unknown_fields<std::string>(),
545         ptr, ctx);
546     CHK_(ptr != nullptr);
547   }  // while
548 message_done:
549   _impl_._has_bits_.Or(has_bits);
550   return ptr;
551 failure:
552   ptr = nullptr;
553   goto message_done;
554 #undef CHK_
555 }
556 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const557 ::uint8_t* ActiveMetric::_InternalSerialize(
558     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
559   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ActiveMetric)
560   ::uint32_t cached_has_bits = 0;
561   (void) cached_has_bits;
562 
563   cached_has_bits = _impl_._has_bits_[0];
564   // optional int64 id = 1;
565   if (cached_has_bits & 0x00000001u) {
566     target = stream->EnsureSpace(target);
567     target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_id(), target);
568   }
569 
570   // repeated .android.os.statsd.ActiveEventActivation activation = 2;
571   for (unsigned i = 0,
572       n = static_cast<unsigned>(this->_internal_activation_size()); i < n; i++) {
573     const auto& repfield = this->_internal_activation(i);
574     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
575         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
576   }
577 
578   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
579     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
580         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
581   }
582   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ActiveMetric)
583   return target;
584 }
585 
ByteSizeLong() const586 size_t ActiveMetric::ByteSizeLong() const {
587 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ActiveMetric)
588   size_t total_size = 0;
589 
590   ::uint32_t cached_has_bits = 0;
591   // Prevent compiler warnings about cached_has_bits being unused
592   (void) cached_has_bits;
593 
594   // repeated .android.os.statsd.ActiveEventActivation activation = 2;
595   total_size += 1UL * this->_internal_activation_size();
596   for (const auto& msg : this->_impl_.activation_) {
597     total_size +=
598       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
599   }
600 
601   // optional int64 id = 1;
602   cached_has_bits = _impl_._has_bits_[0];
603   if (cached_has_bits & 0x00000001u) {
604     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_id());
605   }
606 
607   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
608     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
609   }
610   int cached_size = ::_pbi::ToCachedSize(total_size);
611   SetCachedSize(cached_size);
612   return total_size;
613 }
614 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)615 void ActiveMetric::CheckTypeAndMergeFrom(
616     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
617   MergeFrom(*::_pbi::DownCast<const ActiveMetric*>(
618       &from));
619 }
620 
MergeFrom(const ActiveMetric & from)621 void ActiveMetric::MergeFrom(const ActiveMetric& from) {
622   ActiveMetric* const _this = this;
623   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ActiveMetric)
624   GOOGLE_DCHECK_NE(&from, _this);
625   ::uint32_t cached_has_bits = 0;
626   (void) cached_has_bits;
627 
628   _this->_impl_.activation_.MergeFrom(from._impl_.activation_);
629   if (from._internal_has_id()) {
630     _this->_internal_set_id(from._internal_id());
631   }
632   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
633 }
634 
CopyFrom(const ActiveMetric & from)635 void ActiveMetric::CopyFrom(const ActiveMetric& from) {
636 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ActiveMetric)
637   if (&from == this) return;
638   Clear();
639   MergeFrom(from);
640 }
641 
IsInitialized() const642 bool ActiveMetric::IsInitialized() const {
643   return true;
644 }
645 
InternalSwap(ActiveMetric * other)646 void ActiveMetric::InternalSwap(ActiveMetric* other) {
647   using std::swap;
648   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
649   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
650   _impl_.activation_.InternalSwap(&other->_impl_.activation_);
651   swap(_impl_.id_, other->_impl_.id_);
652 }
653 
GetTypeName() const654 std::string ActiveMetric::GetTypeName() const {
655   return "android.os.statsd.ActiveMetric";
656 }
657 
658 
659 // ===================================================================
660 
661 class ActiveConfig::_Internal {
662  public:
663   using HasBits = decltype(std::declval<ActiveConfig>()._impl_._has_bits_);
set_has_id(HasBits * has_bits)664   static void set_has_id(HasBits* has_bits) {
665     (*has_bits)[0] |= 1u;
666   }
set_has_uid(HasBits * has_bits)667   static void set_has_uid(HasBits* has_bits) {
668     (*has_bits)[0] |= 2u;
669   }
670 };
671 
ActiveConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)672 ActiveConfig::ActiveConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
673                          bool is_message_owned)
674   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
675   SharedCtor(arena, is_message_owned);
676   // @@protoc_insertion_point(arena_constructor:android.os.statsd.ActiveConfig)
677 }
ActiveConfig(const ActiveConfig & from)678 ActiveConfig::ActiveConfig(const ActiveConfig& from)
679   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
680   ActiveConfig* const _this = this; (void)_this;
681   new (&_impl_) Impl_{
682       decltype(_impl_._has_bits_){from._impl_._has_bits_}
683     , /*decltype(_impl_._cached_size_)*/{}
684     , decltype(_impl_.metric_){from._impl_.metric_}
685     , decltype(_impl_.id_){}
686     , decltype(_impl_.uid_){}};
687 
688   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
689   ::memcpy(&_impl_.id_, &from._impl_.id_,
690     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.uid_) -
691     reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.uid_));
692   // @@protoc_insertion_point(copy_constructor:android.os.statsd.ActiveConfig)
693 }
694 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)695 inline void ActiveConfig::SharedCtor(
696     ::_pb::Arena* arena, bool is_message_owned) {
697   (void)arena;
698   (void)is_message_owned;
699   new (&_impl_) Impl_{
700       decltype(_impl_._has_bits_){}
701     , /*decltype(_impl_._cached_size_)*/{}
702     , decltype(_impl_.metric_){arena}
703     , decltype(_impl_.id_){::int64_t{0}}
704     , decltype(_impl_.uid_){0}
705   };
706 }
707 
~ActiveConfig()708 ActiveConfig::~ActiveConfig() {
709   // @@protoc_insertion_point(destructor:android.os.statsd.ActiveConfig)
710   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
711   (void)arena;
712     return;
713   }
714   SharedDtor();
715 }
716 
SharedDtor()717 inline void ActiveConfig::SharedDtor() {
718   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
719   _impl_.metric_.~RepeatedPtrField();
720 }
721 
SetCachedSize(int size) const722 void ActiveConfig::SetCachedSize(int size) const {
723   _impl_._cached_size_.Set(size);
724 }
725 
Clear()726 void ActiveConfig::Clear() {
727 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ActiveConfig)
728   ::uint32_t cached_has_bits = 0;
729   // Prevent compiler warnings about cached_has_bits being unused
730   (void) cached_has_bits;
731 
732   _impl_.metric_.Clear();
733   cached_has_bits = _impl_._has_bits_[0];
734   if (cached_has_bits & 0x00000003u) {
735     ::memset(&_impl_.id_, 0, static_cast<size_t>(
736         reinterpret_cast<char*>(&_impl_.uid_) -
737         reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.uid_));
738   }
739   _impl_._has_bits_.Clear();
740   _internal_metadata_.Clear<std::string>();
741 }
742 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)743 const char* ActiveConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
744 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
745   _Internal::HasBits has_bits{};
746   while (!ctx->Done(&ptr)) {
747     ::uint32_t tag;
748     ptr = ::_pbi::ReadTag(ptr, &tag);
749     switch (tag >> 3) {
750       // optional int64 id = 1;
751       case 1:
752         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
753           _Internal::set_has_id(&has_bits);
754           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
755           CHK_(ptr);
756         } else {
757           goto handle_unusual;
758         }
759         continue;
760       // optional int32 uid = 2;
761       case 2:
762         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
763           _Internal::set_has_uid(&has_bits);
764           _impl_.uid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
765           CHK_(ptr);
766         } else {
767           goto handle_unusual;
768         }
769         continue;
770       // repeated .android.os.statsd.ActiveMetric metric = 3;
771       case 3:
772         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
773           ptr -= 1;
774           do {
775             ptr += 1;
776             ptr = ctx->ParseMessage(_internal_add_metric(), ptr);
777             CHK_(ptr);
778             if (!ctx->DataAvailable(ptr)) break;
779           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
780         } else {
781           goto handle_unusual;
782         }
783         continue;
784       default:
785         goto handle_unusual;
786     }  // switch
787   handle_unusual:
788     if ((tag == 0) || ((tag & 7) == 4)) {
789       CHK_(ptr);
790       ctx->SetLastTag(tag);
791       goto message_done;
792     }
793     ptr = UnknownFieldParse(
794         tag,
795         _internal_metadata_.mutable_unknown_fields<std::string>(),
796         ptr, ctx);
797     CHK_(ptr != nullptr);
798   }  // while
799 message_done:
800   _impl_._has_bits_.Or(has_bits);
801   return ptr;
802 failure:
803   ptr = nullptr;
804   goto message_done;
805 #undef CHK_
806 }
807 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const808 ::uint8_t* ActiveConfig::_InternalSerialize(
809     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
810   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ActiveConfig)
811   ::uint32_t cached_has_bits = 0;
812   (void) cached_has_bits;
813 
814   cached_has_bits = _impl_._has_bits_[0];
815   // optional int64 id = 1;
816   if (cached_has_bits & 0x00000001u) {
817     target = stream->EnsureSpace(target);
818     target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_id(), target);
819   }
820 
821   // optional int32 uid = 2;
822   if (cached_has_bits & 0x00000002u) {
823     target = stream->EnsureSpace(target);
824     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_uid(), target);
825   }
826 
827   // repeated .android.os.statsd.ActiveMetric metric = 3;
828   for (unsigned i = 0,
829       n = static_cast<unsigned>(this->_internal_metric_size()); i < n; i++) {
830     const auto& repfield = this->_internal_metric(i);
831     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
832         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
833   }
834 
835   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
836     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
837         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
838   }
839   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ActiveConfig)
840   return target;
841 }
842 
ByteSizeLong() const843 size_t ActiveConfig::ByteSizeLong() const {
844 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ActiveConfig)
845   size_t total_size = 0;
846 
847   ::uint32_t cached_has_bits = 0;
848   // Prevent compiler warnings about cached_has_bits being unused
849   (void) cached_has_bits;
850 
851   // repeated .android.os.statsd.ActiveMetric metric = 3;
852   total_size += 1UL * this->_internal_metric_size();
853   for (const auto& msg : this->_impl_.metric_) {
854     total_size +=
855       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
856   }
857 
858   cached_has_bits = _impl_._has_bits_[0];
859   if (cached_has_bits & 0x00000003u) {
860     // optional int64 id = 1;
861     if (cached_has_bits & 0x00000001u) {
862       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_id());
863     }
864 
865     // optional int32 uid = 2;
866     if (cached_has_bits & 0x00000002u) {
867       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_uid());
868     }
869 
870   }
871   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
872     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
873   }
874   int cached_size = ::_pbi::ToCachedSize(total_size);
875   SetCachedSize(cached_size);
876   return total_size;
877 }
878 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)879 void ActiveConfig::CheckTypeAndMergeFrom(
880     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
881   MergeFrom(*::_pbi::DownCast<const ActiveConfig*>(
882       &from));
883 }
884 
MergeFrom(const ActiveConfig & from)885 void ActiveConfig::MergeFrom(const ActiveConfig& from) {
886   ActiveConfig* const _this = this;
887   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ActiveConfig)
888   GOOGLE_DCHECK_NE(&from, _this);
889   ::uint32_t cached_has_bits = 0;
890   (void) cached_has_bits;
891 
892   _this->_impl_.metric_.MergeFrom(from._impl_.metric_);
893   cached_has_bits = from._impl_._has_bits_[0];
894   if (cached_has_bits & 0x00000003u) {
895     if (cached_has_bits & 0x00000001u) {
896       _this->_impl_.id_ = from._impl_.id_;
897     }
898     if (cached_has_bits & 0x00000002u) {
899       _this->_impl_.uid_ = from._impl_.uid_;
900     }
901     _this->_impl_._has_bits_[0] |= cached_has_bits;
902   }
903   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
904 }
905 
CopyFrom(const ActiveConfig & from)906 void ActiveConfig::CopyFrom(const ActiveConfig& from) {
907 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ActiveConfig)
908   if (&from == this) return;
909   Clear();
910   MergeFrom(from);
911 }
912 
IsInitialized() const913 bool ActiveConfig::IsInitialized() const {
914   return true;
915 }
916 
InternalSwap(ActiveConfig * other)917 void ActiveConfig::InternalSwap(ActiveConfig* other) {
918   using std::swap;
919   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
920   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
921   _impl_.metric_.InternalSwap(&other->_impl_.metric_);
922   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
923       PROTOBUF_FIELD_OFFSET(ActiveConfig, _impl_.uid_)
924       + sizeof(ActiveConfig::_impl_.uid_)  // NOLINT
925       - PROTOBUF_FIELD_OFFSET(ActiveConfig, _impl_.id_)>(
926           reinterpret_cast<char*>(&_impl_.id_),
927           reinterpret_cast<char*>(&other->_impl_.id_));
928 }
929 
GetTypeName() const930 std::string ActiveConfig::GetTypeName() const {
931   return "android.os.statsd.ActiveConfig";
932 }
933 
934 
935 // ===================================================================
936 
937 class ActiveConfigList::_Internal {
938  public:
939 };
940 
ActiveConfigList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)941 ActiveConfigList::ActiveConfigList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
942                          bool is_message_owned)
943   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
944   SharedCtor(arena, is_message_owned);
945   // @@protoc_insertion_point(arena_constructor:android.os.statsd.ActiveConfigList)
946 }
ActiveConfigList(const ActiveConfigList & from)947 ActiveConfigList::ActiveConfigList(const ActiveConfigList& from)
948   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
949   ActiveConfigList* const _this = this; (void)_this;
950   new (&_impl_) Impl_{
951       decltype(_impl_.config_){from._impl_.config_}
952     , /*decltype(_impl_._cached_size_)*/{}};
953 
954   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
955   // @@protoc_insertion_point(copy_constructor:android.os.statsd.ActiveConfigList)
956 }
957 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)958 inline void ActiveConfigList::SharedCtor(
959     ::_pb::Arena* arena, bool is_message_owned) {
960   (void)arena;
961   (void)is_message_owned;
962   new (&_impl_) Impl_{
963       decltype(_impl_.config_){arena}
964     , /*decltype(_impl_._cached_size_)*/{}
965   };
966 }
967 
~ActiveConfigList()968 ActiveConfigList::~ActiveConfigList() {
969   // @@protoc_insertion_point(destructor:android.os.statsd.ActiveConfigList)
970   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
971   (void)arena;
972     return;
973   }
974   SharedDtor();
975 }
976 
SharedDtor()977 inline void ActiveConfigList::SharedDtor() {
978   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
979   _impl_.config_.~RepeatedPtrField();
980 }
981 
SetCachedSize(int size) const982 void ActiveConfigList::SetCachedSize(int size) const {
983   _impl_._cached_size_.Set(size);
984 }
985 
Clear()986 void ActiveConfigList::Clear() {
987 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ActiveConfigList)
988   ::uint32_t cached_has_bits = 0;
989   // Prevent compiler warnings about cached_has_bits being unused
990   (void) cached_has_bits;
991 
992   _impl_.config_.Clear();
993   _internal_metadata_.Clear<std::string>();
994 }
995 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)996 const char* ActiveConfigList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
997 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
998   while (!ctx->Done(&ptr)) {
999     ::uint32_t tag;
1000     ptr = ::_pbi::ReadTag(ptr, &tag);
1001     switch (tag >> 3) {
1002       // repeated .android.os.statsd.ActiveConfig config = 1;
1003       case 1:
1004         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1005           ptr -= 1;
1006           do {
1007             ptr += 1;
1008             ptr = ctx->ParseMessage(_internal_add_config(), ptr);
1009             CHK_(ptr);
1010             if (!ctx->DataAvailable(ptr)) break;
1011           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1012         } else {
1013           goto handle_unusual;
1014         }
1015         continue;
1016       default:
1017         goto handle_unusual;
1018     }  // switch
1019   handle_unusual:
1020     if ((tag == 0) || ((tag & 7) == 4)) {
1021       CHK_(ptr);
1022       ctx->SetLastTag(tag);
1023       goto message_done;
1024     }
1025     ptr = UnknownFieldParse(
1026         tag,
1027         _internal_metadata_.mutable_unknown_fields<std::string>(),
1028         ptr, ctx);
1029     CHK_(ptr != nullptr);
1030   }  // while
1031 message_done:
1032   return ptr;
1033 failure:
1034   ptr = nullptr;
1035   goto message_done;
1036 #undef CHK_
1037 }
1038 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1039 ::uint8_t* ActiveConfigList::_InternalSerialize(
1040     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1041   // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ActiveConfigList)
1042   ::uint32_t cached_has_bits = 0;
1043   (void) cached_has_bits;
1044 
1045   // repeated .android.os.statsd.ActiveConfig config = 1;
1046   for (unsigned i = 0,
1047       n = static_cast<unsigned>(this->_internal_config_size()); i < n; i++) {
1048     const auto& repfield = this->_internal_config(i);
1049     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1050         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1051   }
1052 
1053   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1054     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1055         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1056   }
1057   // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ActiveConfigList)
1058   return target;
1059 }
1060 
ByteSizeLong() const1061 size_t ActiveConfigList::ByteSizeLong() const {
1062 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ActiveConfigList)
1063   size_t total_size = 0;
1064 
1065   ::uint32_t cached_has_bits = 0;
1066   // Prevent compiler warnings about cached_has_bits being unused
1067   (void) cached_has_bits;
1068 
1069   // repeated .android.os.statsd.ActiveConfig config = 1;
1070   total_size += 1UL * this->_internal_config_size();
1071   for (const auto& msg : this->_impl_.config_) {
1072     total_size +=
1073       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1074   }
1075 
1076   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1077     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1078   }
1079   int cached_size = ::_pbi::ToCachedSize(total_size);
1080   SetCachedSize(cached_size);
1081   return total_size;
1082 }
1083 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1084 void ActiveConfigList::CheckTypeAndMergeFrom(
1085     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1086   MergeFrom(*::_pbi::DownCast<const ActiveConfigList*>(
1087       &from));
1088 }
1089 
MergeFrom(const ActiveConfigList & from)1090 void ActiveConfigList::MergeFrom(const ActiveConfigList& from) {
1091   ActiveConfigList* const _this = this;
1092   // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ActiveConfigList)
1093   GOOGLE_DCHECK_NE(&from, _this);
1094   ::uint32_t cached_has_bits = 0;
1095   (void) cached_has_bits;
1096 
1097   _this->_impl_.config_.MergeFrom(from._impl_.config_);
1098   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1099 }
1100 
CopyFrom(const ActiveConfigList & from)1101 void ActiveConfigList::CopyFrom(const ActiveConfigList& from) {
1102 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ActiveConfigList)
1103   if (&from == this) return;
1104   Clear();
1105   MergeFrom(from);
1106 }
1107 
IsInitialized() const1108 bool ActiveConfigList::IsInitialized() const {
1109   return true;
1110 }
1111 
InternalSwap(ActiveConfigList * other)1112 void ActiveConfigList::InternalSwap(ActiveConfigList* other) {
1113   using std::swap;
1114   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1115   _impl_.config_.InternalSwap(&other->_impl_.config_);
1116 }
1117 
GetTypeName() const1118 std::string ActiveConfigList::GetTypeName() const {
1119   return "android.os.statsd.ActiveConfigList";
1120 }
1121 
1122 
1123 // @@protoc_insertion_point(namespace_scope)
1124 }  // namespace statsd
1125 }  // namespace os
1126 }  // namespace android
1127 PROTOBUF_NAMESPACE_OPEN
1128 template<> PROTOBUF_NOINLINE ::android::os::statsd::ActiveEventActivation*
CreateMaybeMessage(Arena * arena)1129 Arena::CreateMaybeMessage< ::android::os::statsd::ActiveEventActivation >(Arena* arena) {
1130   return Arena::CreateMessageInternal< ::android::os::statsd::ActiveEventActivation >(arena);
1131 }
1132 template<> PROTOBUF_NOINLINE ::android::os::statsd::ActiveMetric*
CreateMaybeMessage(Arena * arena)1133 Arena::CreateMaybeMessage< ::android::os::statsd::ActiveMetric >(Arena* arena) {
1134   return Arena::CreateMessageInternal< ::android::os::statsd::ActiveMetric >(arena);
1135 }
1136 template<> PROTOBUF_NOINLINE ::android::os::statsd::ActiveConfig*
CreateMaybeMessage(Arena * arena)1137 Arena::CreateMaybeMessage< ::android::os::statsd::ActiveConfig >(Arena* arena) {
1138   return Arena::CreateMessageInternal< ::android::os::statsd::ActiveConfig >(arena);
1139 }
1140 template<> PROTOBUF_NOINLINE ::android::os::statsd::ActiveConfigList*
CreateMaybeMessage(Arena * arena)1141 Arena::CreateMaybeMessage< ::android::os::statsd::ActiveConfigList >(Arena* arena) {
1142   return Arena::CreateMessageInternal< ::android::os::statsd::ActiveConfigList >(arena);
1143 }
1144 PROTOBUF_NAMESPACE_CLOSE
1145 
1146 // @@protoc_insertion_point(global_scope)
1147 #include <google/protobuf/port_undef.inc>
1148