1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: packages/modules/StatsD/statsd/src/shell/shell_config.proto
3
4 #include "packages/modules/StatsD/statsd/src/shell/shell_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 android {
22 namespace os {
23 namespace statsd {
PulledAtomSubscription(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR PulledAtomSubscription::PulledAtomSubscription(
25 ::_pbi::ConstantInitialized): _impl_{
26 /*decltype(_impl_._has_bits_)*/{}
27 , /*decltype(_impl_._cached_size_)*/{}
28 , /*decltype(_impl_.packages_)*/{}
29 , /*decltype(_impl_.matcher_)*/nullptr
30 , /*decltype(_impl_.freq_millis_)*/::int64_t{0}} {}
31 struct PulledAtomSubscriptionDefaultTypeInternal {
PulledAtomSubscriptionDefaultTypeInternalandroid::os::statsd::PulledAtomSubscriptionDefaultTypeInternal32 PROTOBUF_CONSTEXPR PulledAtomSubscriptionDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~PulledAtomSubscriptionDefaultTypeInternalandroid::os::statsd::PulledAtomSubscriptionDefaultTypeInternal34 ~PulledAtomSubscriptionDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 PulledAtomSubscription _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PulledAtomSubscriptionDefaultTypeInternal _PulledAtomSubscription_default_instance_;
ShellSubscription(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR ShellSubscription::ShellSubscription(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_.pushed_)*/{}
43 , /*decltype(_impl_.pulled_)*/{}
44 , /*decltype(_impl_._cached_size_)*/{}} {}
45 struct ShellSubscriptionDefaultTypeInternal {
ShellSubscriptionDefaultTypeInternalandroid::os::statsd::ShellSubscriptionDefaultTypeInternal46 PROTOBUF_CONSTEXPR ShellSubscriptionDefaultTypeInternal()
47 : _instance(::_pbi::ConstantInitialized{}) {}
~ShellSubscriptionDefaultTypeInternalandroid::os::statsd::ShellSubscriptionDefaultTypeInternal48 ~ShellSubscriptionDefaultTypeInternal() {}
49 union { // NOLINT(misc-non-private-member-variables-in-classes)
50 ShellSubscription _instance;
51 };
52 };
53 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShellSubscriptionDefaultTypeInternal _ShellSubscription_default_instance_;
54 } // namespace statsd
55 } // namespace os
56 } // namespace android
57 namespace android {
58 namespace os {
59 namespace statsd {
60
61 // ===================================================================
62
63 class PulledAtomSubscription::_Internal {
64 public:
65 using HasBits = decltype(std::declval<PulledAtomSubscription>()._impl_._has_bits_);
66 static const ::android::os::statsd::SimpleAtomMatcher& matcher(const PulledAtomSubscription* msg);
set_has_matcher(HasBits * has_bits)67 static void set_has_matcher(HasBits* has_bits) {
68 (*has_bits)[0] |= 1u;
69 }
set_has_freq_millis(HasBits * has_bits)70 static void set_has_freq_millis(HasBits* has_bits) {
71 (*has_bits)[0] |= 2u;
72 }
73 };
74
75 const ::android::os::statsd::SimpleAtomMatcher&
matcher(const PulledAtomSubscription * msg)76 PulledAtomSubscription::_Internal::matcher(const PulledAtomSubscription* msg) {
77 return *msg->_impl_.matcher_;
78 }
clear_matcher()79 void PulledAtomSubscription::clear_matcher() {
80 if (_impl_.matcher_ != nullptr) _impl_.matcher_->Clear();
81 _impl_._has_bits_[0] &= ~0x00000001u;
82 }
PulledAtomSubscription(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)83 PulledAtomSubscription::PulledAtomSubscription(::PROTOBUF_NAMESPACE_ID::Arena* arena,
84 bool is_message_owned)
85 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
86 SharedCtor(arena, is_message_owned);
87 // @@protoc_insertion_point(arena_constructor:android.os.statsd.PulledAtomSubscription)
88 }
PulledAtomSubscription(const PulledAtomSubscription & from)89 PulledAtomSubscription::PulledAtomSubscription(const PulledAtomSubscription& from)
90 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
91 PulledAtomSubscription* const _this = this; (void)_this;
92 new (&_impl_) Impl_{
93 decltype(_impl_._has_bits_){from._impl_._has_bits_}
94 , /*decltype(_impl_._cached_size_)*/{}
95 , decltype(_impl_.packages_){from._impl_.packages_}
96 , decltype(_impl_.matcher_){nullptr}
97 , decltype(_impl_.freq_millis_){}};
98
99 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
100 if (from._internal_has_matcher()) {
101 _this->_impl_.matcher_ = new ::android::os::statsd::SimpleAtomMatcher(*from._impl_.matcher_);
102 }
103 _this->_impl_.freq_millis_ = from._impl_.freq_millis_;
104 // @@protoc_insertion_point(copy_constructor:android.os.statsd.PulledAtomSubscription)
105 }
106
SharedCtor(::_pb::Arena * arena,bool is_message_owned)107 inline void PulledAtomSubscription::SharedCtor(
108 ::_pb::Arena* arena, bool is_message_owned) {
109 (void)arena;
110 (void)is_message_owned;
111 new (&_impl_) Impl_{
112 decltype(_impl_._has_bits_){}
113 , /*decltype(_impl_._cached_size_)*/{}
114 , decltype(_impl_.packages_){arena}
115 , decltype(_impl_.matcher_){nullptr}
116 , decltype(_impl_.freq_millis_){::int64_t{0}}
117 };
118 }
119
~PulledAtomSubscription()120 PulledAtomSubscription::~PulledAtomSubscription() {
121 // @@protoc_insertion_point(destructor:android.os.statsd.PulledAtomSubscription)
122 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
123 (void)arena;
124 return;
125 }
126 SharedDtor();
127 }
128
SharedDtor()129 inline void PulledAtomSubscription::SharedDtor() {
130 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
131 _impl_.packages_.~RepeatedPtrField();
132 if (this != internal_default_instance()) delete _impl_.matcher_;
133 }
134
SetCachedSize(int size) const135 void PulledAtomSubscription::SetCachedSize(int size) const {
136 _impl_._cached_size_.Set(size);
137 }
138
Clear()139 void PulledAtomSubscription::Clear() {
140 // @@protoc_insertion_point(message_clear_start:android.os.statsd.PulledAtomSubscription)
141 ::uint32_t cached_has_bits = 0;
142 // Prevent compiler warnings about cached_has_bits being unused
143 (void) cached_has_bits;
144
145 _impl_.packages_.Clear();
146 cached_has_bits = _impl_._has_bits_[0];
147 if (cached_has_bits & 0x00000001u) {
148 GOOGLE_DCHECK(_impl_.matcher_ != nullptr);
149 _impl_.matcher_->Clear();
150 }
151 _impl_.freq_millis_ = ::int64_t{0};
152 _impl_._has_bits_.Clear();
153 _internal_metadata_.Clear<std::string>();
154 }
155
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)156 const char* PulledAtomSubscription::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
157 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
158 _Internal::HasBits has_bits{};
159 while (!ctx->Done(&ptr)) {
160 ::uint32_t tag;
161 ptr = ::_pbi::ReadTag(ptr, &tag);
162 switch (tag >> 3) {
163 // optional .android.os.statsd.SimpleAtomMatcher matcher = 1;
164 case 1:
165 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
166 ptr = ctx->ParseMessage(_internal_mutable_matcher(), ptr);
167 CHK_(ptr);
168 } else {
169 goto handle_unusual;
170 }
171 continue;
172 // optional int64 freq_millis = 2;
173 case 2:
174 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
175 _Internal::set_has_freq_millis(&has_bits);
176 _impl_.freq_millis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
177 CHK_(ptr);
178 } else {
179 goto handle_unusual;
180 }
181 continue;
182 // repeated string packages = 3;
183 case 3:
184 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
185 ptr -= 1;
186 do {
187 ptr += 1;
188 auto str = _internal_add_packages();
189 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
190 CHK_(ptr);
191 if (!ctx->DataAvailable(ptr)) break;
192 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
193 } else {
194 goto handle_unusual;
195 }
196 continue;
197 default:
198 goto handle_unusual;
199 } // switch
200 handle_unusual:
201 if ((tag == 0) || ((tag & 7) == 4)) {
202 CHK_(ptr);
203 ctx->SetLastTag(tag);
204 goto message_done;
205 }
206 ptr = UnknownFieldParse(
207 tag,
208 _internal_metadata_.mutable_unknown_fields<std::string>(),
209 ptr, ctx);
210 CHK_(ptr != nullptr);
211 } // while
212 message_done:
213 _impl_._has_bits_.Or(has_bits);
214 return ptr;
215 failure:
216 ptr = nullptr;
217 goto message_done;
218 #undef CHK_
219 }
220
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const221 ::uint8_t* PulledAtomSubscription::_InternalSerialize(
222 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
223 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.PulledAtomSubscription)
224 ::uint32_t cached_has_bits = 0;
225 (void) cached_has_bits;
226
227 cached_has_bits = _impl_._has_bits_[0];
228 // optional .android.os.statsd.SimpleAtomMatcher matcher = 1;
229 if (cached_has_bits & 0x00000001u) {
230 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
231 InternalWriteMessage(1, _Internal::matcher(this),
232 _Internal::matcher(this).GetCachedSize(), target, stream);
233 }
234
235 // optional int64 freq_millis = 2;
236 if (cached_has_bits & 0x00000002u) {
237 target = stream->EnsureSpace(target);
238 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_freq_millis(), target);
239 }
240
241 // repeated string packages = 3;
242 for (int i = 0, n = this->_internal_packages_size(); i < n; i++) {
243 const auto& s = this->_internal_packages(i);
244 target = stream->WriteString(3, s, target);
245 }
246
247 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
248 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
249 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
250 }
251 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.PulledAtomSubscription)
252 return target;
253 }
254
ByteSizeLong() const255 size_t PulledAtomSubscription::ByteSizeLong() const {
256 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.PulledAtomSubscription)
257 size_t total_size = 0;
258
259 ::uint32_t cached_has_bits = 0;
260 // Prevent compiler warnings about cached_has_bits being unused
261 (void) cached_has_bits;
262
263 // repeated string packages = 3;
264 total_size += 1 *
265 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.packages_.size());
266 for (int i = 0, n = _impl_.packages_.size(); i < n; i++) {
267 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
268 _impl_.packages_.Get(i));
269 }
270
271 cached_has_bits = _impl_._has_bits_[0];
272 if (cached_has_bits & 0x00000003u) {
273 // optional .android.os.statsd.SimpleAtomMatcher matcher = 1;
274 if (cached_has_bits & 0x00000001u) {
275 total_size += 1 +
276 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
277 *_impl_.matcher_);
278 }
279
280 // optional int64 freq_millis = 2;
281 if (cached_has_bits & 0x00000002u) {
282 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_freq_millis());
283 }
284
285 }
286 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
287 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
288 }
289 int cached_size = ::_pbi::ToCachedSize(total_size);
290 SetCachedSize(cached_size);
291 return total_size;
292 }
293
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)294 void PulledAtomSubscription::CheckTypeAndMergeFrom(
295 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
296 MergeFrom(*::_pbi::DownCast<const PulledAtomSubscription*>(
297 &from));
298 }
299
MergeFrom(const PulledAtomSubscription & from)300 void PulledAtomSubscription::MergeFrom(const PulledAtomSubscription& from) {
301 PulledAtomSubscription* const _this = this;
302 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.PulledAtomSubscription)
303 GOOGLE_DCHECK_NE(&from, _this);
304 ::uint32_t cached_has_bits = 0;
305 (void) cached_has_bits;
306
307 _this->_impl_.packages_.MergeFrom(from._impl_.packages_);
308 cached_has_bits = from._impl_._has_bits_[0];
309 if (cached_has_bits & 0x00000003u) {
310 if (cached_has_bits & 0x00000001u) {
311 _this->_internal_mutable_matcher()->::android::os::statsd::SimpleAtomMatcher::MergeFrom(
312 from._internal_matcher());
313 }
314 if (cached_has_bits & 0x00000002u) {
315 _this->_impl_.freq_millis_ = from._impl_.freq_millis_;
316 }
317 _this->_impl_._has_bits_[0] |= cached_has_bits;
318 }
319 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
320 }
321
CopyFrom(const PulledAtomSubscription & from)322 void PulledAtomSubscription::CopyFrom(const PulledAtomSubscription& from) {
323 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.PulledAtomSubscription)
324 if (&from == this) return;
325 Clear();
326 MergeFrom(from);
327 }
328
IsInitialized() const329 bool PulledAtomSubscription::IsInitialized() const {
330 return true;
331 }
332
InternalSwap(PulledAtomSubscription * other)333 void PulledAtomSubscription::InternalSwap(PulledAtomSubscription* other) {
334 using std::swap;
335 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
336 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
337 _impl_.packages_.InternalSwap(&other->_impl_.packages_);
338 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
339 PROTOBUF_FIELD_OFFSET(PulledAtomSubscription, _impl_.freq_millis_)
340 + sizeof(PulledAtomSubscription::_impl_.freq_millis_) // NOLINT
341 - PROTOBUF_FIELD_OFFSET(PulledAtomSubscription, _impl_.matcher_)>(
342 reinterpret_cast<char*>(&_impl_.matcher_),
343 reinterpret_cast<char*>(&other->_impl_.matcher_));
344 }
345
GetTypeName() const346 std::string PulledAtomSubscription::GetTypeName() const {
347 return "android.os.statsd.PulledAtomSubscription";
348 }
349
350
351 // ===================================================================
352
353 class ShellSubscription::_Internal {
354 public:
355 };
356
clear_pushed()357 void ShellSubscription::clear_pushed() {
358 _impl_.pushed_.Clear();
359 }
ShellSubscription(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)360 ShellSubscription::ShellSubscription(::PROTOBUF_NAMESPACE_ID::Arena* arena,
361 bool is_message_owned)
362 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
363 SharedCtor(arena, is_message_owned);
364 // @@protoc_insertion_point(arena_constructor:android.os.statsd.ShellSubscription)
365 }
ShellSubscription(const ShellSubscription & from)366 ShellSubscription::ShellSubscription(const ShellSubscription& from)
367 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
368 ShellSubscription* const _this = this; (void)_this;
369 new (&_impl_) Impl_{
370 decltype(_impl_.pushed_){from._impl_.pushed_}
371 , decltype(_impl_.pulled_){from._impl_.pulled_}
372 , /*decltype(_impl_._cached_size_)*/{}};
373
374 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
375 // @@protoc_insertion_point(copy_constructor:android.os.statsd.ShellSubscription)
376 }
377
SharedCtor(::_pb::Arena * arena,bool is_message_owned)378 inline void ShellSubscription::SharedCtor(
379 ::_pb::Arena* arena, bool is_message_owned) {
380 (void)arena;
381 (void)is_message_owned;
382 new (&_impl_) Impl_{
383 decltype(_impl_.pushed_){arena}
384 , decltype(_impl_.pulled_){arena}
385 , /*decltype(_impl_._cached_size_)*/{}
386 };
387 }
388
~ShellSubscription()389 ShellSubscription::~ShellSubscription() {
390 // @@protoc_insertion_point(destructor:android.os.statsd.ShellSubscription)
391 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
392 (void)arena;
393 return;
394 }
395 SharedDtor();
396 }
397
SharedDtor()398 inline void ShellSubscription::SharedDtor() {
399 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
400 _impl_.pushed_.~RepeatedPtrField();
401 _impl_.pulled_.~RepeatedPtrField();
402 }
403
SetCachedSize(int size) const404 void ShellSubscription::SetCachedSize(int size) const {
405 _impl_._cached_size_.Set(size);
406 }
407
Clear()408 void ShellSubscription::Clear() {
409 // @@protoc_insertion_point(message_clear_start:android.os.statsd.ShellSubscription)
410 ::uint32_t cached_has_bits = 0;
411 // Prevent compiler warnings about cached_has_bits being unused
412 (void) cached_has_bits;
413
414 _impl_.pushed_.Clear();
415 _impl_.pulled_.Clear();
416 _internal_metadata_.Clear<std::string>();
417 }
418
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)419 const char* ShellSubscription::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
420 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
421 while (!ctx->Done(&ptr)) {
422 ::uint32_t tag;
423 ptr = ::_pbi::ReadTag(ptr, &tag);
424 switch (tag >> 3) {
425 // repeated .android.os.statsd.SimpleAtomMatcher pushed = 1;
426 case 1:
427 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
428 ptr -= 1;
429 do {
430 ptr += 1;
431 ptr = ctx->ParseMessage(_internal_add_pushed(), ptr);
432 CHK_(ptr);
433 if (!ctx->DataAvailable(ptr)) break;
434 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
435 } else {
436 goto handle_unusual;
437 }
438 continue;
439 // repeated .android.os.statsd.PulledAtomSubscription pulled = 2;
440 case 2:
441 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
442 ptr -= 1;
443 do {
444 ptr += 1;
445 ptr = ctx->ParseMessage(_internal_add_pulled(), ptr);
446 CHK_(ptr);
447 if (!ctx->DataAvailable(ptr)) break;
448 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
449 } else {
450 goto handle_unusual;
451 }
452 continue;
453 default:
454 goto handle_unusual;
455 } // switch
456 handle_unusual:
457 if ((tag == 0) || ((tag & 7) == 4)) {
458 CHK_(ptr);
459 ctx->SetLastTag(tag);
460 goto message_done;
461 }
462 ptr = UnknownFieldParse(
463 tag,
464 _internal_metadata_.mutable_unknown_fields<std::string>(),
465 ptr, ctx);
466 CHK_(ptr != nullptr);
467 } // while
468 message_done:
469 return ptr;
470 failure:
471 ptr = nullptr;
472 goto message_done;
473 #undef CHK_
474 }
475
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const476 ::uint8_t* ShellSubscription::_InternalSerialize(
477 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
478 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.ShellSubscription)
479 ::uint32_t cached_has_bits = 0;
480 (void) cached_has_bits;
481
482 // repeated .android.os.statsd.SimpleAtomMatcher pushed = 1;
483 for (unsigned i = 0,
484 n = static_cast<unsigned>(this->_internal_pushed_size()); i < n; i++) {
485 const auto& repfield = this->_internal_pushed(i);
486 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
487 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
488 }
489
490 // repeated .android.os.statsd.PulledAtomSubscription pulled = 2;
491 for (unsigned i = 0,
492 n = static_cast<unsigned>(this->_internal_pulled_size()); i < n; i++) {
493 const auto& repfield = this->_internal_pulled(i);
494 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
495 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
496 }
497
498 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
499 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
500 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
501 }
502 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.ShellSubscription)
503 return target;
504 }
505
ByteSizeLong() const506 size_t ShellSubscription::ByteSizeLong() const {
507 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.ShellSubscription)
508 size_t total_size = 0;
509
510 ::uint32_t cached_has_bits = 0;
511 // Prevent compiler warnings about cached_has_bits being unused
512 (void) cached_has_bits;
513
514 // repeated .android.os.statsd.SimpleAtomMatcher pushed = 1;
515 total_size += 1UL * this->_internal_pushed_size();
516 for (const auto& msg : this->_impl_.pushed_) {
517 total_size +=
518 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
519 }
520
521 // repeated .android.os.statsd.PulledAtomSubscription pulled = 2;
522 total_size += 1UL * this->_internal_pulled_size();
523 for (const auto& msg : this->_impl_.pulled_) {
524 total_size +=
525 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
526 }
527
528 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
529 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
530 }
531 int cached_size = ::_pbi::ToCachedSize(total_size);
532 SetCachedSize(cached_size);
533 return total_size;
534 }
535
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)536 void ShellSubscription::CheckTypeAndMergeFrom(
537 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
538 MergeFrom(*::_pbi::DownCast<const ShellSubscription*>(
539 &from));
540 }
541
MergeFrom(const ShellSubscription & from)542 void ShellSubscription::MergeFrom(const ShellSubscription& from) {
543 ShellSubscription* const _this = this;
544 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.ShellSubscription)
545 GOOGLE_DCHECK_NE(&from, _this);
546 ::uint32_t cached_has_bits = 0;
547 (void) cached_has_bits;
548
549 _this->_impl_.pushed_.MergeFrom(from._impl_.pushed_);
550 _this->_impl_.pulled_.MergeFrom(from._impl_.pulled_);
551 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
552 }
553
CopyFrom(const ShellSubscription & from)554 void ShellSubscription::CopyFrom(const ShellSubscription& from) {
555 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.ShellSubscription)
556 if (&from == this) return;
557 Clear();
558 MergeFrom(from);
559 }
560
IsInitialized() const561 bool ShellSubscription::IsInitialized() const {
562 return true;
563 }
564
InternalSwap(ShellSubscription * other)565 void ShellSubscription::InternalSwap(ShellSubscription* other) {
566 using std::swap;
567 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
568 _impl_.pushed_.InternalSwap(&other->_impl_.pushed_);
569 _impl_.pulled_.InternalSwap(&other->_impl_.pulled_);
570 }
571
GetTypeName() const572 std::string ShellSubscription::GetTypeName() const {
573 return "android.os.statsd.ShellSubscription";
574 }
575
576
577 // @@protoc_insertion_point(namespace_scope)
578 } // namespace statsd
579 } // namespace os
580 } // namespace android
581 PROTOBUF_NAMESPACE_OPEN
582 template<> PROTOBUF_NOINLINE ::android::os::statsd::PulledAtomSubscription*
CreateMaybeMessage(Arena * arena)583 Arena::CreateMaybeMessage< ::android::os::statsd::PulledAtomSubscription >(Arena* arena) {
584 return Arena::CreateMessageInternal< ::android::os::statsd::PulledAtomSubscription >(arena);
585 }
586 template<> PROTOBUF_NOINLINE ::android::os::statsd::ShellSubscription*
CreateMaybeMessage(Arena * arena)587 Arena::CreateMaybeMessage< ::android::os::statsd::ShellSubscription >(Arena* arena) {
588 return Arena::CreateMessageInternal< ::android::os::statsd::ShellSubscription >(arena);
589 }
590 PROTOBUF_NAMESPACE_CLOSE
591
592 // @@protoc_insertion_point(global_scope)
593 #include <google/protobuf/port_undef.inc>
594