1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: protos/perfetto/config/chrome/scenario_config.proto
3
4 #include "protos/perfetto/config/chrome/scenario_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 {
TriggerRule_HistogramTrigger(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger(
24 ::_pbi::ConstantInitialized): _impl_{
25 /*decltype(_impl_._has_bits_)*/{}
26 , /*decltype(_impl_._cached_size_)*/{}
27 , /*decltype(_impl_.histogram_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.min_value_)*/::int64_t{0}
29 , /*decltype(_impl_.max_value_)*/::int64_t{0}} {}
30 struct TriggerRule_HistogramTriggerDefaultTypeInternal {
TriggerRule_HistogramTriggerDefaultTypeInternalperfetto::protos::TriggerRule_HistogramTriggerDefaultTypeInternal31 PROTOBUF_CONSTEXPR TriggerRule_HistogramTriggerDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~TriggerRule_HistogramTriggerDefaultTypeInternalperfetto::protos::TriggerRule_HistogramTriggerDefaultTypeInternal33 ~TriggerRule_HistogramTriggerDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 TriggerRule_HistogramTrigger _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TriggerRule_HistogramTriggerDefaultTypeInternal _TriggerRule_HistogramTrigger_default_instance_;
TriggerRule_RepeatingInterval(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_._has_bits_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}
43 , /*decltype(_impl_.period_ms_)*/::uint64_t{0u}
44 , /*decltype(_impl_.randomized_)*/false} {}
45 struct TriggerRule_RepeatingIntervalDefaultTypeInternal {
TriggerRule_RepeatingIntervalDefaultTypeInternalperfetto::protos::TriggerRule_RepeatingIntervalDefaultTypeInternal46 PROTOBUF_CONSTEXPR TriggerRule_RepeatingIntervalDefaultTypeInternal()
47 : _instance(::_pbi::ConstantInitialized{}) {}
~TriggerRule_RepeatingIntervalDefaultTypeInternalperfetto::protos::TriggerRule_RepeatingIntervalDefaultTypeInternal48 ~TriggerRule_RepeatingIntervalDefaultTypeInternal() {}
49 union { // NOLINT(misc-non-private-member-variables-in-classes)
50 TriggerRule_RepeatingInterval _instance;
51 };
52 };
53 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TriggerRule_RepeatingIntervalDefaultTypeInternal _TriggerRule_RepeatingInterval_default_instance_;
TriggerRule(::_pbi::ConstantInitialized)54 PROTOBUF_CONSTEXPR TriggerRule::TriggerRule(
55 ::_pbi::ConstantInitialized): _impl_{
56 /*decltype(_impl_._has_bits_)*/{}
57 , /*decltype(_impl_._cached_size_)*/{}
58 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
59 , /*decltype(_impl_.delay_ms_)*/::uint64_t{0u}
60 , /*decltype(_impl_.activation_delay_ms_)*/::uint64_t{0u}
61 , /*decltype(_impl_.trigger_chance_)*/0
62 , /*decltype(_impl_.trigger_)*/{}
63 , /*decltype(_impl_._oneof_case_)*/{}} {}
64 struct TriggerRuleDefaultTypeInternal {
TriggerRuleDefaultTypeInternalperfetto::protos::TriggerRuleDefaultTypeInternal65 PROTOBUF_CONSTEXPR TriggerRuleDefaultTypeInternal()
66 : _instance(::_pbi::ConstantInitialized{}) {}
~TriggerRuleDefaultTypeInternalperfetto::protos::TriggerRuleDefaultTypeInternal67 ~TriggerRuleDefaultTypeInternal() {}
68 union { // NOLINT(misc-non-private-member-variables-in-classes)
69 TriggerRule _instance;
70 };
71 };
72 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TriggerRuleDefaultTypeInternal _TriggerRule_default_instance_;
NestedScenarioConfig(::_pbi::ConstantInitialized)73 PROTOBUF_CONSTEXPR NestedScenarioConfig::NestedScenarioConfig(
74 ::_pbi::ConstantInitialized): _impl_{
75 /*decltype(_impl_._has_bits_)*/{}
76 , /*decltype(_impl_._cached_size_)*/{}
77 , /*decltype(_impl_.start_rules_)*/{}
78 , /*decltype(_impl_.stop_rules_)*/{}
79 , /*decltype(_impl_.upload_rules_)*/{}
80 , /*decltype(_impl_.scenario_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
81 struct NestedScenarioConfigDefaultTypeInternal {
NestedScenarioConfigDefaultTypeInternalperfetto::protos::NestedScenarioConfigDefaultTypeInternal82 PROTOBUF_CONSTEXPR NestedScenarioConfigDefaultTypeInternal()
83 : _instance(::_pbi::ConstantInitialized{}) {}
~NestedScenarioConfigDefaultTypeInternalperfetto::protos::NestedScenarioConfigDefaultTypeInternal84 ~NestedScenarioConfigDefaultTypeInternal() {}
85 union { // NOLINT(misc-non-private-member-variables-in-classes)
86 NestedScenarioConfig _instance;
87 };
88 };
89 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NestedScenarioConfigDefaultTypeInternal _NestedScenarioConfig_default_instance_;
ScenarioConfig(::_pbi::ConstantInitialized)90 PROTOBUF_CONSTEXPR ScenarioConfig::ScenarioConfig(
91 ::_pbi::ConstantInitialized): _impl_{
92 /*decltype(_impl_._has_bits_)*/{}
93 , /*decltype(_impl_._cached_size_)*/{}
94 , /*decltype(_impl_.start_rules_)*/{}
95 , /*decltype(_impl_.stop_rules_)*/{}
96 , /*decltype(_impl_.upload_rules_)*/{}
97 , /*decltype(_impl_.setup_rules_)*/{}
98 , /*decltype(_impl_.nested_scenarios_)*/{}
99 , /*decltype(_impl_.scenario_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
100 , /*decltype(_impl_.trace_config_)*/nullptr} {}
101 struct ScenarioConfigDefaultTypeInternal {
ScenarioConfigDefaultTypeInternalperfetto::protos::ScenarioConfigDefaultTypeInternal102 PROTOBUF_CONSTEXPR ScenarioConfigDefaultTypeInternal()
103 : _instance(::_pbi::ConstantInitialized{}) {}
~ScenarioConfigDefaultTypeInternalperfetto::protos::ScenarioConfigDefaultTypeInternal104 ~ScenarioConfigDefaultTypeInternal() {}
105 union { // NOLINT(misc-non-private-member-variables-in-classes)
106 ScenarioConfig _instance;
107 };
108 };
109 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScenarioConfigDefaultTypeInternal _ScenarioConfig_default_instance_;
ChromeFieldTracingConfig(::_pbi::ConstantInitialized)110 PROTOBUF_CONSTEXPR ChromeFieldTracingConfig::ChromeFieldTracingConfig(
111 ::_pbi::ConstantInitialized): _impl_{
112 /*decltype(_impl_.scenarios_)*/{}
113 , /*decltype(_impl_._cached_size_)*/{}} {}
114 struct ChromeFieldTracingConfigDefaultTypeInternal {
ChromeFieldTracingConfigDefaultTypeInternalperfetto::protos::ChromeFieldTracingConfigDefaultTypeInternal115 PROTOBUF_CONSTEXPR ChromeFieldTracingConfigDefaultTypeInternal()
116 : _instance(::_pbi::ConstantInitialized{}) {}
~ChromeFieldTracingConfigDefaultTypeInternalperfetto::protos::ChromeFieldTracingConfigDefaultTypeInternal117 ~ChromeFieldTracingConfigDefaultTypeInternal() {}
118 union { // NOLINT(misc-non-private-member-variables-in-classes)
119 ChromeFieldTracingConfig _instance;
120 };
121 };
122 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ChromeFieldTracingConfigDefaultTypeInternal _ChromeFieldTracingConfig_default_instance_;
TracingTriggerRulesConfig(::_pbi::ConstantInitialized)123 PROTOBUF_CONSTEXPR TracingTriggerRulesConfig::TracingTriggerRulesConfig(
124 ::_pbi::ConstantInitialized): _impl_{
125 /*decltype(_impl_.rules_)*/{}
126 , /*decltype(_impl_._cached_size_)*/{}} {}
127 struct TracingTriggerRulesConfigDefaultTypeInternal {
TracingTriggerRulesConfigDefaultTypeInternalperfetto::protos::TracingTriggerRulesConfigDefaultTypeInternal128 PROTOBUF_CONSTEXPR TracingTriggerRulesConfigDefaultTypeInternal()
129 : _instance(::_pbi::ConstantInitialized{}) {}
~TracingTriggerRulesConfigDefaultTypeInternalperfetto::protos::TracingTriggerRulesConfigDefaultTypeInternal130 ~TracingTriggerRulesConfigDefaultTypeInternal() {}
131 union { // NOLINT(misc-non-private-member-variables-in-classes)
132 TracingTriggerRulesConfig _instance;
133 };
134 };
135 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TracingTriggerRulesConfigDefaultTypeInternal _TracingTriggerRulesConfig_default_instance_;
136 } // namespace protos
137 } // namespace perfetto
138 namespace perfetto {
139 namespace protos {
140
141 // ===================================================================
142
143 class TriggerRule_HistogramTrigger::_Internal {
144 public:
145 using HasBits = decltype(std::declval<TriggerRule_HistogramTrigger>()._impl_._has_bits_);
set_has_histogram_name(HasBits * has_bits)146 static void set_has_histogram_name(HasBits* has_bits) {
147 (*has_bits)[0] |= 1u;
148 }
set_has_min_value(HasBits * has_bits)149 static void set_has_min_value(HasBits* has_bits) {
150 (*has_bits)[0] |= 2u;
151 }
set_has_max_value(HasBits * has_bits)152 static void set_has_max_value(HasBits* has_bits) {
153 (*has_bits)[0] |= 4u;
154 }
155 };
156
TriggerRule_HistogramTrigger(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)157 TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger(::PROTOBUF_NAMESPACE_ID::Arena* arena,
158 bool is_message_owned)
159 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
160 SharedCtor(arena, is_message_owned);
161 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TriggerRule.HistogramTrigger)
162 }
TriggerRule_HistogramTrigger(const TriggerRule_HistogramTrigger & from)163 TriggerRule_HistogramTrigger::TriggerRule_HistogramTrigger(const TriggerRule_HistogramTrigger& from)
164 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
165 TriggerRule_HistogramTrigger* const _this = this; (void)_this;
166 new (&_impl_) Impl_{
167 decltype(_impl_._has_bits_){from._impl_._has_bits_}
168 , /*decltype(_impl_._cached_size_)*/{}
169 , decltype(_impl_.histogram_name_){}
170 , decltype(_impl_.min_value_){}
171 , decltype(_impl_.max_value_){}};
172
173 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
174 _impl_.histogram_name_.InitDefault();
175 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
176 _impl_.histogram_name_.Set("", GetArenaForAllocation());
177 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
178 if (from._internal_has_histogram_name()) {
179 _this->_impl_.histogram_name_.Set(from._internal_histogram_name(),
180 _this->GetArenaForAllocation());
181 }
182 ::memcpy(&_impl_.min_value_, &from._impl_.min_value_,
183 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_value_) -
184 reinterpret_cast<char*>(&_impl_.min_value_)) + sizeof(_impl_.max_value_));
185 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TriggerRule.HistogramTrigger)
186 }
187
SharedCtor(::_pb::Arena * arena,bool is_message_owned)188 inline void TriggerRule_HistogramTrigger::SharedCtor(
189 ::_pb::Arena* arena, bool is_message_owned) {
190 (void)arena;
191 (void)is_message_owned;
192 new (&_impl_) Impl_{
193 decltype(_impl_._has_bits_){}
194 , /*decltype(_impl_._cached_size_)*/{}
195 , decltype(_impl_.histogram_name_){}
196 , decltype(_impl_.min_value_){::int64_t{0}}
197 , decltype(_impl_.max_value_){::int64_t{0}}
198 };
199 _impl_.histogram_name_.InitDefault();
200 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
201 _impl_.histogram_name_.Set("", GetArenaForAllocation());
202 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
203 }
204
~TriggerRule_HistogramTrigger()205 TriggerRule_HistogramTrigger::~TriggerRule_HistogramTrigger() {
206 // @@protoc_insertion_point(destructor:perfetto.protos.TriggerRule.HistogramTrigger)
207 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
208 (void)arena;
209 return;
210 }
211 SharedDtor();
212 }
213
SharedDtor()214 inline void TriggerRule_HistogramTrigger::SharedDtor() {
215 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
216 _impl_.histogram_name_.Destroy();
217 }
218
SetCachedSize(int size) const219 void TriggerRule_HistogramTrigger::SetCachedSize(int size) const {
220 _impl_._cached_size_.Set(size);
221 }
222
Clear()223 void TriggerRule_HistogramTrigger::Clear() {
224 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TriggerRule.HistogramTrigger)
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 & 0x00000001u) {
231 _impl_.histogram_name_.ClearNonDefaultToEmpty();
232 }
233 if (cached_has_bits & 0x00000006u) {
234 ::memset(&_impl_.min_value_, 0, static_cast<size_t>(
235 reinterpret_cast<char*>(&_impl_.max_value_) -
236 reinterpret_cast<char*>(&_impl_.min_value_)) + sizeof(_impl_.max_value_));
237 }
238 _impl_._has_bits_.Clear();
239 _internal_metadata_.Clear<std::string>();
240 }
241
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)242 const char* TriggerRule_HistogramTrigger::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
243 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
244 _Internal::HasBits has_bits{};
245 while (!ctx->Done(&ptr)) {
246 ::uint32_t tag;
247 ptr = ::_pbi::ReadTag(ptr, &tag);
248 switch (tag >> 3) {
249 // optional string histogram_name = 1;
250 case 1:
251 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
252 auto str = _internal_mutable_histogram_name();
253 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
254 CHK_(ptr);
255 } else {
256 goto handle_unusual;
257 }
258 continue;
259 // optional int64 min_value = 2;
260 case 2:
261 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
262 _Internal::set_has_min_value(&has_bits);
263 _impl_.min_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
264 CHK_(ptr);
265 } else {
266 goto handle_unusual;
267 }
268 continue;
269 // optional int64 max_value = 3;
270 case 3:
271 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
272 _Internal::set_has_max_value(&has_bits);
273 _impl_.max_value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
274 CHK_(ptr);
275 } else {
276 goto handle_unusual;
277 }
278 continue;
279 default:
280 goto handle_unusual;
281 } // switch
282 handle_unusual:
283 if ((tag == 0) || ((tag & 7) == 4)) {
284 CHK_(ptr);
285 ctx->SetLastTag(tag);
286 goto message_done;
287 }
288 ptr = UnknownFieldParse(
289 tag,
290 _internal_metadata_.mutable_unknown_fields<std::string>(),
291 ptr, ctx);
292 CHK_(ptr != nullptr);
293 } // while
294 message_done:
295 _impl_._has_bits_.Or(has_bits);
296 return ptr;
297 failure:
298 ptr = nullptr;
299 goto message_done;
300 #undef CHK_
301 }
302
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const303 ::uint8_t* TriggerRule_HistogramTrigger::_InternalSerialize(
304 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
305 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TriggerRule.HistogramTrigger)
306 ::uint32_t cached_has_bits = 0;
307 (void) cached_has_bits;
308
309 cached_has_bits = _impl_._has_bits_[0];
310 // optional string histogram_name = 1;
311 if (cached_has_bits & 0x00000001u) {
312 target = stream->WriteStringMaybeAliased(
313 1, this->_internal_histogram_name(), target);
314 }
315
316 // optional int64 min_value = 2;
317 if (cached_has_bits & 0x00000002u) {
318 target = stream->EnsureSpace(target);
319 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_min_value(), target);
320 }
321
322 // optional int64 max_value = 3;
323 if (cached_has_bits & 0x00000004u) {
324 target = stream->EnsureSpace(target);
325 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_max_value(), target);
326 }
327
328 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
329 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
330 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
331 }
332 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TriggerRule.HistogramTrigger)
333 return target;
334 }
335
ByteSizeLong() const336 size_t TriggerRule_HistogramTrigger::ByteSizeLong() const {
337 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TriggerRule.HistogramTrigger)
338 size_t total_size = 0;
339
340 ::uint32_t cached_has_bits = 0;
341 // Prevent compiler warnings about cached_has_bits being unused
342 (void) cached_has_bits;
343
344 cached_has_bits = _impl_._has_bits_[0];
345 if (cached_has_bits & 0x00000007u) {
346 // optional string histogram_name = 1;
347 if (cached_has_bits & 0x00000001u) {
348 total_size += 1 +
349 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
350 this->_internal_histogram_name());
351 }
352
353 // optional int64 min_value = 2;
354 if (cached_has_bits & 0x00000002u) {
355 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_min_value());
356 }
357
358 // optional int64 max_value = 3;
359 if (cached_has_bits & 0x00000004u) {
360 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_max_value());
361 }
362
363 }
364 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
365 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
366 }
367 int cached_size = ::_pbi::ToCachedSize(total_size);
368 SetCachedSize(cached_size);
369 return total_size;
370 }
371
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)372 void TriggerRule_HistogramTrigger::CheckTypeAndMergeFrom(
373 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
374 MergeFrom(*::_pbi::DownCast<const TriggerRule_HistogramTrigger*>(
375 &from));
376 }
377
MergeFrom(const TriggerRule_HistogramTrigger & from)378 void TriggerRule_HistogramTrigger::MergeFrom(const TriggerRule_HistogramTrigger& from) {
379 TriggerRule_HistogramTrigger* const _this = this;
380 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TriggerRule.HistogramTrigger)
381 GOOGLE_DCHECK_NE(&from, _this);
382 ::uint32_t cached_has_bits = 0;
383 (void) cached_has_bits;
384
385 cached_has_bits = from._impl_._has_bits_[0];
386 if (cached_has_bits & 0x00000007u) {
387 if (cached_has_bits & 0x00000001u) {
388 _this->_internal_set_histogram_name(from._internal_histogram_name());
389 }
390 if (cached_has_bits & 0x00000002u) {
391 _this->_impl_.min_value_ = from._impl_.min_value_;
392 }
393 if (cached_has_bits & 0x00000004u) {
394 _this->_impl_.max_value_ = from._impl_.max_value_;
395 }
396 _this->_impl_._has_bits_[0] |= cached_has_bits;
397 }
398 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
399 }
400
CopyFrom(const TriggerRule_HistogramTrigger & from)401 void TriggerRule_HistogramTrigger::CopyFrom(const TriggerRule_HistogramTrigger& from) {
402 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TriggerRule.HistogramTrigger)
403 if (&from == this) return;
404 Clear();
405 MergeFrom(from);
406 }
407
IsInitialized() const408 bool TriggerRule_HistogramTrigger::IsInitialized() const {
409 return true;
410 }
411
InternalSwap(TriggerRule_HistogramTrigger * other)412 void TriggerRule_HistogramTrigger::InternalSwap(TriggerRule_HistogramTrigger* other) {
413 using std::swap;
414 auto* lhs_arena = GetArenaForAllocation();
415 auto* rhs_arena = other->GetArenaForAllocation();
416 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
417 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
418 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
419 &_impl_.histogram_name_, lhs_arena,
420 &other->_impl_.histogram_name_, rhs_arena
421 );
422 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
423 PROTOBUF_FIELD_OFFSET(TriggerRule_HistogramTrigger, _impl_.max_value_)
424 + sizeof(TriggerRule_HistogramTrigger::_impl_.max_value_) // NOLINT
425 - PROTOBUF_FIELD_OFFSET(TriggerRule_HistogramTrigger, _impl_.min_value_)>(
426 reinterpret_cast<char*>(&_impl_.min_value_),
427 reinterpret_cast<char*>(&other->_impl_.min_value_));
428 }
429
GetTypeName() const430 std::string TriggerRule_HistogramTrigger::GetTypeName() const {
431 return "perfetto.protos.TriggerRule.HistogramTrigger";
432 }
433
434
435 // ===================================================================
436
437 class TriggerRule_RepeatingInterval::_Internal {
438 public:
439 using HasBits = decltype(std::declval<TriggerRule_RepeatingInterval>()._impl_._has_bits_);
set_has_period_ms(HasBits * has_bits)440 static void set_has_period_ms(HasBits* has_bits) {
441 (*has_bits)[0] |= 1u;
442 }
set_has_randomized(HasBits * has_bits)443 static void set_has_randomized(HasBits* has_bits) {
444 (*has_bits)[0] |= 2u;
445 }
446 };
447
TriggerRule_RepeatingInterval(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)448 TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval(::PROTOBUF_NAMESPACE_ID::Arena* arena,
449 bool is_message_owned)
450 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
451 SharedCtor(arena, is_message_owned);
452 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TriggerRule.RepeatingInterval)
453 }
TriggerRule_RepeatingInterval(const TriggerRule_RepeatingInterval & from)454 TriggerRule_RepeatingInterval::TriggerRule_RepeatingInterval(const TriggerRule_RepeatingInterval& from)
455 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
456 TriggerRule_RepeatingInterval* const _this = this; (void)_this;
457 new (&_impl_) Impl_{
458 decltype(_impl_._has_bits_){from._impl_._has_bits_}
459 , /*decltype(_impl_._cached_size_)*/{}
460 , decltype(_impl_.period_ms_){}
461 , decltype(_impl_.randomized_){}};
462
463 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
464 ::memcpy(&_impl_.period_ms_, &from._impl_.period_ms_,
465 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.randomized_) -
466 reinterpret_cast<char*>(&_impl_.period_ms_)) + sizeof(_impl_.randomized_));
467 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TriggerRule.RepeatingInterval)
468 }
469
SharedCtor(::_pb::Arena * arena,bool is_message_owned)470 inline void TriggerRule_RepeatingInterval::SharedCtor(
471 ::_pb::Arena* arena, bool is_message_owned) {
472 (void)arena;
473 (void)is_message_owned;
474 new (&_impl_) Impl_{
475 decltype(_impl_._has_bits_){}
476 , /*decltype(_impl_._cached_size_)*/{}
477 , decltype(_impl_.period_ms_){::uint64_t{0u}}
478 , decltype(_impl_.randomized_){false}
479 };
480 }
481
~TriggerRule_RepeatingInterval()482 TriggerRule_RepeatingInterval::~TriggerRule_RepeatingInterval() {
483 // @@protoc_insertion_point(destructor:perfetto.protos.TriggerRule.RepeatingInterval)
484 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
485 (void)arena;
486 return;
487 }
488 SharedDtor();
489 }
490
SharedDtor()491 inline void TriggerRule_RepeatingInterval::SharedDtor() {
492 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
493 }
494
SetCachedSize(int size) const495 void TriggerRule_RepeatingInterval::SetCachedSize(int size) const {
496 _impl_._cached_size_.Set(size);
497 }
498
Clear()499 void TriggerRule_RepeatingInterval::Clear() {
500 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TriggerRule.RepeatingInterval)
501 ::uint32_t cached_has_bits = 0;
502 // Prevent compiler warnings about cached_has_bits being unused
503 (void) cached_has_bits;
504
505 cached_has_bits = _impl_._has_bits_[0];
506 if (cached_has_bits & 0x00000003u) {
507 ::memset(&_impl_.period_ms_, 0, static_cast<size_t>(
508 reinterpret_cast<char*>(&_impl_.randomized_) -
509 reinterpret_cast<char*>(&_impl_.period_ms_)) + sizeof(_impl_.randomized_));
510 }
511 _impl_._has_bits_.Clear();
512 _internal_metadata_.Clear<std::string>();
513 }
514
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)515 const char* TriggerRule_RepeatingInterval::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
516 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
517 _Internal::HasBits has_bits{};
518 while (!ctx->Done(&ptr)) {
519 ::uint32_t tag;
520 ptr = ::_pbi::ReadTag(ptr, &tag);
521 switch (tag >> 3) {
522 // optional uint64 period_ms = 1;
523 case 1:
524 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
525 _Internal::set_has_period_ms(&has_bits);
526 _impl_.period_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
527 CHK_(ptr);
528 } else {
529 goto handle_unusual;
530 }
531 continue;
532 // optional bool randomized = 2;
533 case 2:
534 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
535 _Internal::set_has_randomized(&has_bits);
536 _impl_.randomized_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
537 CHK_(ptr);
538 } else {
539 goto handle_unusual;
540 }
541 continue;
542 default:
543 goto handle_unusual;
544 } // switch
545 handle_unusual:
546 if ((tag == 0) || ((tag & 7) == 4)) {
547 CHK_(ptr);
548 ctx->SetLastTag(tag);
549 goto message_done;
550 }
551 ptr = UnknownFieldParse(
552 tag,
553 _internal_metadata_.mutable_unknown_fields<std::string>(),
554 ptr, ctx);
555 CHK_(ptr != nullptr);
556 } // while
557 message_done:
558 _impl_._has_bits_.Or(has_bits);
559 return ptr;
560 failure:
561 ptr = nullptr;
562 goto message_done;
563 #undef CHK_
564 }
565
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const566 ::uint8_t* TriggerRule_RepeatingInterval::_InternalSerialize(
567 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
568 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TriggerRule.RepeatingInterval)
569 ::uint32_t cached_has_bits = 0;
570 (void) cached_has_bits;
571
572 cached_has_bits = _impl_._has_bits_[0];
573 // optional uint64 period_ms = 1;
574 if (cached_has_bits & 0x00000001u) {
575 target = stream->EnsureSpace(target);
576 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_period_ms(), target);
577 }
578
579 // optional bool randomized = 2;
580 if (cached_has_bits & 0x00000002u) {
581 target = stream->EnsureSpace(target);
582 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_randomized(), target);
583 }
584
585 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
586 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
587 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
588 }
589 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TriggerRule.RepeatingInterval)
590 return target;
591 }
592
ByteSizeLong() const593 size_t TriggerRule_RepeatingInterval::ByteSizeLong() const {
594 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TriggerRule.RepeatingInterval)
595 size_t total_size = 0;
596
597 ::uint32_t cached_has_bits = 0;
598 // Prevent compiler warnings about cached_has_bits being unused
599 (void) cached_has_bits;
600
601 cached_has_bits = _impl_._has_bits_[0];
602 if (cached_has_bits & 0x00000003u) {
603 // optional uint64 period_ms = 1;
604 if (cached_has_bits & 0x00000001u) {
605 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_period_ms());
606 }
607
608 // optional bool randomized = 2;
609 if (cached_has_bits & 0x00000002u) {
610 total_size += 1 + 1;
611 }
612
613 }
614 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
615 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
616 }
617 int cached_size = ::_pbi::ToCachedSize(total_size);
618 SetCachedSize(cached_size);
619 return total_size;
620 }
621
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)622 void TriggerRule_RepeatingInterval::CheckTypeAndMergeFrom(
623 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
624 MergeFrom(*::_pbi::DownCast<const TriggerRule_RepeatingInterval*>(
625 &from));
626 }
627
MergeFrom(const TriggerRule_RepeatingInterval & from)628 void TriggerRule_RepeatingInterval::MergeFrom(const TriggerRule_RepeatingInterval& from) {
629 TriggerRule_RepeatingInterval* const _this = this;
630 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TriggerRule.RepeatingInterval)
631 GOOGLE_DCHECK_NE(&from, _this);
632 ::uint32_t cached_has_bits = 0;
633 (void) cached_has_bits;
634
635 cached_has_bits = from._impl_._has_bits_[0];
636 if (cached_has_bits & 0x00000003u) {
637 if (cached_has_bits & 0x00000001u) {
638 _this->_impl_.period_ms_ = from._impl_.period_ms_;
639 }
640 if (cached_has_bits & 0x00000002u) {
641 _this->_impl_.randomized_ = from._impl_.randomized_;
642 }
643 _this->_impl_._has_bits_[0] |= cached_has_bits;
644 }
645 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
646 }
647
CopyFrom(const TriggerRule_RepeatingInterval & from)648 void TriggerRule_RepeatingInterval::CopyFrom(const TriggerRule_RepeatingInterval& from) {
649 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TriggerRule.RepeatingInterval)
650 if (&from == this) return;
651 Clear();
652 MergeFrom(from);
653 }
654
IsInitialized() const655 bool TriggerRule_RepeatingInterval::IsInitialized() const {
656 return true;
657 }
658
InternalSwap(TriggerRule_RepeatingInterval * other)659 void TriggerRule_RepeatingInterval::InternalSwap(TriggerRule_RepeatingInterval* other) {
660 using std::swap;
661 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
662 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
663 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
664 PROTOBUF_FIELD_OFFSET(TriggerRule_RepeatingInterval, _impl_.randomized_)
665 + sizeof(TriggerRule_RepeatingInterval::_impl_.randomized_) // NOLINT
666 - PROTOBUF_FIELD_OFFSET(TriggerRule_RepeatingInterval, _impl_.period_ms_)>(
667 reinterpret_cast<char*>(&_impl_.period_ms_),
668 reinterpret_cast<char*>(&other->_impl_.period_ms_));
669 }
670
GetTypeName() const671 std::string TriggerRule_RepeatingInterval::GetTypeName() const {
672 return "perfetto.protos.TriggerRule.RepeatingInterval";
673 }
674
675
676 // ===================================================================
677
678 class TriggerRule::_Internal {
679 public:
680 using HasBits = decltype(std::declval<TriggerRule>()._impl_._has_bits_);
set_has_name(HasBits * has_bits)681 static void set_has_name(HasBits* has_bits) {
682 (*has_bits)[0] |= 1u;
683 }
set_has_trigger_chance(HasBits * has_bits)684 static void set_has_trigger_chance(HasBits* has_bits) {
685 (*has_bits)[0] |= 8u;
686 }
set_has_delay_ms(HasBits * has_bits)687 static void set_has_delay_ms(HasBits* has_bits) {
688 (*has_bits)[0] |= 2u;
689 }
set_has_activation_delay_ms(HasBits * has_bits)690 static void set_has_activation_delay_ms(HasBits* has_bits) {
691 (*has_bits)[0] |= 4u;
692 }
693 static const ::perfetto::protos::TriggerRule_HistogramTrigger& histogram(const TriggerRule* msg);
694 static const ::perfetto::protos::TriggerRule_RepeatingInterval& repeating_interval(const TriggerRule* msg);
695 };
696
697 const ::perfetto::protos::TriggerRule_HistogramTrigger&
histogram(const TriggerRule * msg)698 TriggerRule::_Internal::histogram(const TriggerRule* msg) {
699 return *msg->_impl_.trigger_.histogram_;
700 }
701 const ::perfetto::protos::TriggerRule_RepeatingInterval&
repeating_interval(const TriggerRule * msg)702 TriggerRule::_Internal::repeating_interval(const TriggerRule* msg) {
703 return *msg->_impl_.trigger_.repeating_interval_;
704 }
set_allocated_histogram(::perfetto::protos::TriggerRule_HistogramTrigger * histogram)705 void TriggerRule::set_allocated_histogram(::perfetto::protos::TriggerRule_HistogramTrigger* histogram) {
706 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
707 clear_trigger();
708 if (histogram) {
709 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
710 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(histogram);
711 if (message_arena != submessage_arena) {
712 histogram = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
713 message_arena, histogram, submessage_arena);
714 }
715 set_has_histogram();
716 _impl_.trigger_.histogram_ = histogram;
717 }
718 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.TriggerRule.histogram)
719 }
set_allocated_repeating_interval(::perfetto::protos::TriggerRule_RepeatingInterval * repeating_interval)720 void TriggerRule::set_allocated_repeating_interval(::perfetto::protos::TriggerRule_RepeatingInterval* repeating_interval) {
721 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
722 clear_trigger();
723 if (repeating_interval) {
724 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
725 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(repeating_interval);
726 if (message_arena != submessage_arena) {
727 repeating_interval = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
728 message_arena, repeating_interval, submessage_arena);
729 }
730 set_has_repeating_interval();
731 _impl_.trigger_.repeating_interval_ = repeating_interval;
732 }
733 // @@protoc_insertion_point(field_set_allocated:perfetto.protos.TriggerRule.repeating_interval)
734 }
TriggerRule(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)735 TriggerRule::TriggerRule(::PROTOBUF_NAMESPACE_ID::Arena* arena,
736 bool is_message_owned)
737 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
738 SharedCtor(arena, is_message_owned);
739 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TriggerRule)
740 }
TriggerRule(const TriggerRule & from)741 TriggerRule::TriggerRule(const TriggerRule& from)
742 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
743 TriggerRule* const _this = this; (void)_this;
744 new (&_impl_) Impl_{
745 decltype(_impl_._has_bits_){from._impl_._has_bits_}
746 , /*decltype(_impl_._cached_size_)*/{}
747 , decltype(_impl_.name_){}
748 , decltype(_impl_.delay_ms_){}
749 , decltype(_impl_.activation_delay_ms_){}
750 , decltype(_impl_.trigger_chance_){}
751 , decltype(_impl_.trigger_){}
752 , /*decltype(_impl_._oneof_case_)*/{}};
753
754 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
755 _impl_.name_.InitDefault();
756 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
757 _impl_.name_.Set("", GetArenaForAllocation());
758 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
759 if (from._internal_has_name()) {
760 _this->_impl_.name_.Set(from._internal_name(),
761 _this->GetArenaForAllocation());
762 }
763 ::memcpy(&_impl_.delay_ms_, &from._impl_.delay_ms_,
764 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.trigger_chance_) -
765 reinterpret_cast<char*>(&_impl_.delay_ms_)) + sizeof(_impl_.trigger_chance_));
766 clear_has_trigger();
767 switch (from.trigger_case()) {
768 case kManualTriggerName: {
769 _this->_internal_set_manual_trigger_name(from._internal_manual_trigger_name());
770 break;
771 }
772 case kHistogram: {
773 _this->_internal_mutable_histogram()->::perfetto::protos::TriggerRule_HistogramTrigger::MergeFrom(
774 from._internal_histogram());
775 break;
776 }
777 case kRepeatingInterval: {
778 _this->_internal_mutable_repeating_interval()->::perfetto::protos::TriggerRule_RepeatingInterval::MergeFrom(
779 from._internal_repeating_interval());
780 break;
781 }
782 case TRIGGER_NOT_SET: {
783 break;
784 }
785 }
786 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TriggerRule)
787 }
788
SharedCtor(::_pb::Arena * arena,bool is_message_owned)789 inline void TriggerRule::SharedCtor(
790 ::_pb::Arena* arena, bool is_message_owned) {
791 (void)arena;
792 (void)is_message_owned;
793 new (&_impl_) Impl_{
794 decltype(_impl_._has_bits_){}
795 , /*decltype(_impl_._cached_size_)*/{}
796 , decltype(_impl_.name_){}
797 , decltype(_impl_.delay_ms_){::uint64_t{0u}}
798 , decltype(_impl_.activation_delay_ms_){::uint64_t{0u}}
799 , decltype(_impl_.trigger_chance_){0}
800 , decltype(_impl_.trigger_){}
801 , /*decltype(_impl_._oneof_case_)*/{}
802 };
803 _impl_.name_.InitDefault();
804 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
805 _impl_.name_.Set("", GetArenaForAllocation());
806 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
807 clear_has_trigger();
808 }
809
~TriggerRule()810 TriggerRule::~TriggerRule() {
811 // @@protoc_insertion_point(destructor:perfetto.protos.TriggerRule)
812 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
813 (void)arena;
814 return;
815 }
816 SharedDtor();
817 }
818
SharedDtor()819 inline void TriggerRule::SharedDtor() {
820 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
821 _impl_.name_.Destroy();
822 if (has_trigger()) {
823 clear_trigger();
824 }
825 }
826
SetCachedSize(int size) const827 void TriggerRule::SetCachedSize(int size) const {
828 _impl_._cached_size_.Set(size);
829 }
830
clear_trigger()831 void TriggerRule::clear_trigger() {
832 // @@protoc_insertion_point(one_of_clear_start:perfetto.protos.TriggerRule)
833 switch (trigger_case()) {
834 case kManualTriggerName: {
835 _impl_.trigger_.manual_trigger_name_.Destroy();
836 break;
837 }
838 case kHistogram: {
839 if (GetArenaForAllocation() == nullptr) {
840 delete _impl_.trigger_.histogram_;
841 }
842 break;
843 }
844 case kRepeatingInterval: {
845 if (GetArenaForAllocation() == nullptr) {
846 delete _impl_.trigger_.repeating_interval_;
847 }
848 break;
849 }
850 case TRIGGER_NOT_SET: {
851 break;
852 }
853 }
854 _impl_._oneof_case_[0] = TRIGGER_NOT_SET;
855 }
856
857
Clear()858 void TriggerRule::Clear() {
859 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TriggerRule)
860 ::uint32_t cached_has_bits = 0;
861 // Prevent compiler warnings about cached_has_bits being unused
862 (void) cached_has_bits;
863
864 cached_has_bits = _impl_._has_bits_[0];
865 if (cached_has_bits & 0x00000001u) {
866 _impl_.name_.ClearNonDefaultToEmpty();
867 }
868 if (cached_has_bits & 0x0000000eu) {
869 ::memset(&_impl_.delay_ms_, 0, static_cast<size_t>(
870 reinterpret_cast<char*>(&_impl_.trigger_chance_) -
871 reinterpret_cast<char*>(&_impl_.delay_ms_)) + sizeof(_impl_.trigger_chance_));
872 }
873 clear_trigger();
874 _impl_._has_bits_.Clear();
875 _internal_metadata_.Clear<std::string>();
876 }
877
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)878 const char* TriggerRule::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
879 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
880 _Internal::HasBits has_bits{};
881 while (!ctx->Done(&ptr)) {
882 ::uint32_t tag;
883 ptr = ::_pbi::ReadTag(ptr, &tag);
884 switch (tag >> 3) {
885 // optional string name = 1;
886 case 1:
887 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
888 auto str = _internal_mutable_name();
889 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
890 CHK_(ptr);
891 } else {
892 goto handle_unusual;
893 }
894 continue;
895 // optional float trigger_chance = 2;
896 case 2:
897 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 21)) {
898 _Internal::set_has_trigger_chance(&has_bits);
899 _impl_.trigger_chance_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
900 ptr += sizeof(float);
901 } else {
902 goto handle_unusual;
903 }
904 continue;
905 // optional uint64 delay_ms = 3;
906 case 3:
907 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
908 _Internal::set_has_delay_ms(&has_bits);
909 _impl_.delay_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
910 CHK_(ptr);
911 } else {
912 goto handle_unusual;
913 }
914 continue;
915 // string manual_trigger_name = 4;
916 case 4:
917 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
918 auto str = _internal_mutable_manual_trigger_name();
919 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
920 CHK_(ptr);
921 } else {
922 goto handle_unusual;
923 }
924 continue;
925 // .perfetto.protos.TriggerRule.HistogramTrigger histogram = 5;
926 case 5:
927 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
928 ptr = ctx->ParseMessage(_internal_mutable_histogram(), ptr);
929 CHK_(ptr);
930 } else {
931 goto handle_unusual;
932 }
933 continue;
934 // .perfetto.protos.TriggerRule.RepeatingInterval repeating_interval = 6;
935 case 6:
936 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
937 ptr = ctx->ParseMessage(_internal_mutable_repeating_interval(), ptr);
938 CHK_(ptr);
939 } else {
940 goto handle_unusual;
941 }
942 continue;
943 // optional uint64 activation_delay_ms = 8;
944 case 8:
945 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
946 _Internal::set_has_activation_delay_ms(&has_bits);
947 _impl_.activation_delay_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
948 CHK_(ptr);
949 } else {
950 goto handle_unusual;
951 }
952 continue;
953 default:
954 goto handle_unusual;
955 } // switch
956 handle_unusual:
957 if ((tag == 0) || ((tag & 7) == 4)) {
958 CHK_(ptr);
959 ctx->SetLastTag(tag);
960 goto message_done;
961 }
962 ptr = UnknownFieldParse(
963 tag,
964 _internal_metadata_.mutable_unknown_fields<std::string>(),
965 ptr, ctx);
966 CHK_(ptr != nullptr);
967 } // while
968 message_done:
969 _impl_._has_bits_.Or(has_bits);
970 return ptr;
971 failure:
972 ptr = nullptr;
973 goto message_done;
974 #undef CHK_
975 }
976
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const977 ::uint8_t* TriggerRule::_InternalSerialize(
978 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
979 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TriggerRule)
980 ::uint32_t cached_has_bits = 0;
981 (void) cached_has_bits;
982
983 cached_has_bits = _impl_._has_bits_[0];
984 // optional string name = 1;
985 if (cached_has_bits & 0x00000001u) {
986 target = stream->WriteStringMaybeAliased(
987 1, this->_internal_name(), target);
988 }
989
990 // optional float trigger_chance = 2;
991 if (cached_has_bits & 0x00000008u) {
992 target = stream->EnsureSpace(target);
993 target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_trigger_chance(), target);
994 }
995
996 // optional uint64 delay_ms = 3;
997 if (cached_has_bits & 0x00000002u) {
998 target = stream->EnsureSpace(target);
999 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_delay_ms(), target);
1000 }
1001
1002 switch (trigger_case()) {
1003 case kManualTriggerName: {
1004 target = stream->WriteStringMaybeAliased(
1005 4, this->_internal_manual_trigger_name(), target);
1006 break;
1007 }
1008 case kHistogram: {
1009 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1010 InternalWriteMessage(5, _Internal::histogram(this),
1011 _Internal::histogram(this).GetCachedSize(), target, stream);
1012 break;
1013 }
1014 case kRepeatingInterval: {
1015 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1016 InternalWriteMessage(6, _Internal::repeating_interval(this),
1017 _Internal::repeating_interval(this).GetCachedSize(), target, stream);
1018 break;
1019 }
1020 default: ;
1021 }
1022 // optional uint64 activation_delay_ms = 8;
1023 if (cached_has_bits & 0x00000004u) {
1024 target = stream->EnsureSpace(target);
1025 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_activation_delay_ms(), target);
1026 }
1027
1028 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1029 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1030 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1031 }
1032 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TriggerRule)
1033 return target;
1034 }
1035
ByteSizeLong() const1036 size_t TriggerRule::ByteSizeLong() const {
1037 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TriggerRule)
1038 size_t total_size = 0;
1039
1040 ::uint32_t cached_has_bits = 0;
1041 // Prevent compiler warnings about cached_has_bits being unused
1042 (void) cached_has_bits;
1043
1044 cached_has_bits = _impl_._has_bits_[0];
1045 if (cached_has_bits & 0x0000000fu) {
1046 // optional string name = 1;
1047 if (cached_has_bits & 0x00000001u) {
1048 total_size += 1 +
1049 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1050 this->_internal_name());
1051 }
1052
1053 // optional uint64 delay_ms = 3;
1054 if (cached_has_bits & 0x00000002u) {
1055 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_delay_ms());
1056 }
1057
1058 // optional uint64 activation_delay_ms = 8;
1059 if (cached_has_bits & 0x00000004u) {
1060 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_activation_delay_ms());
1061 }
1062
1063 // optional float trigger_chance = 2;
1064 if (cached_has_bits & 0x00000008u) {
1065 total_size += 1 + 4;
1066 }
1067
1068 }
1069 switch (trigger_case()) {
1070 // string manual_trigger_name = 4;
1071 case kManualTriggerName: {
1072 total_size += 1 +
1073 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1074 this->_internal_manual_trigger_name());
1075 break;
1076 }
1077 // .perfetto.protos.TriggerRule.HistogramTrigger histogram = 5;
1078 case kHistogram: {
1079 total_size += 1 +
1080 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1081 *_impl_.trigger_.histogram_);
1082 break;
1083 }
1084 // .perfetto.protos.TriggerRule.RepeatingInterval repeating_interval = 6;
1085 case kRepeatingInterval: {
1086 total_size += 1 +
1087 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1088 *_impl_.trigger_.repeating_interval_);
1089 break;
1090 }
1091 case TRIGGER_NOT_SET: {
1092 break;
1093 }
1094 }
1095 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1096 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1097 }
1098 int cached_size = ::_pbi::ToCachedSize(total_size);
1099 SetCachedSize(cached_size);
1100 return total_size;
1101 }
1102
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1103 void TriggerRule::CheckTypeAndMergeFrom(
1104 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1105 MergeFrom(*::_pbi::DownCast<const TriggerRule*>(
1106 &from));
1107 }
1108
MergeFrom(const TriggerRule & from)1109 void TriggerRule::MergeFrom(const TriggerRule& from) {
1110 TriggerRule* const _this = this;
1111 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TriggerRule)
1112 GOOGLE_DCHECK_NE(&from, _this);
1113 ::uint32_t cached_has_bits = 0;
1114 (void) cached_has_bits;
1115
1116 cached_has_bits = from._impl_._has_bits_[0];
1117 if (cached_has_bits & 0x0000000fu) {
1118 if (cached_has_bits & 0x00000001u) {
1119 _this->_internal_set_name(from._internal_name());
1120 }
1121 if (cached_has_bits & 0x00000002u) {
1122 _this->_impl_.delay_ms_ = from._impl_.delay_ms_;
1123 }
1124 if (cached_has_bits & 0x00000004u) {
1125 _this->_impl_.activation_delay_ms_ = from._impl_.activation_delay_ms_;
1126 }
1127 if (cached_has_bits & 0x00000008u) {
1128 _this->_impl_.trigger_chance_ = from._impl_.trigger_chance_;
1129 }
1130 _this->_impl_._has_bits_[0] |= cached_has_bits;
1131 }
1132 switch (from.trigger_case()) {
1133 case kManualTriggerName: {
1134 _this->_internal_set_manual_trigger_name(from._internal_manual_trigger_name());
1135 break;
1136 }
1137 case kHistogram: {
1138 _this->_internal_mutable_histogram()->::perfetto::protos::TriggerRule_HistogramTrigger::MergeFrom(
1139 from._internal_histogram());
1140 break;
1141 }
1142 case kRepeatingInterval: {
1143 _this->_internal_mutable_repeating_interval()->::perfetto::protos::TriggerRule_RepeatingInterval::MergeFrom(
1144 from._internal_repeating_interval());
1145 break;
1146 }
1147 case TRIGGER_NOT_SET: {
1148 break;
1149 }
1150 }
1151 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1152 }
1153
CopyFrom(const TriggerRule & from)1154 void TriggerRule::CopyFrom(const TriggerRule& from) {
1155 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TriggerRule)
1156 if (&from == this) return;
1157 Clear();
1158 MergeFrom(from);
1159 }
1160
IsInitialized() const1161 bool TriggerRule::IsInitialized() const {
1162 return true;
1163 }
1164
InternalSwap(TriggerRule * other)1165 void TriggerRule::InternalSwap(TriggerRule* other) {
1166 using std::swap;
1167 auto* lhs_arena = GetArenaForAllocation();
1168 auto* rhs_arena = other->GetArenaForAllocation();
1169 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1170 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1171 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1172 &_impl_.name_, lhs_arena,
1173 &other->_impl_.name_, rhs_arena
1174 );
1175 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1176 PROTOBUF_FIELD_OFFSET(TriggerRule, _impl_.trigger_chance_)
1177 + sizeof(TriggerRule::_impl_.trigger_chance_) // NOLINT
1178 - PROTOBUF_FIELD_OFFSET(TriggerRule, _impl_.delay_ms_)>(
1179 reinterpret_cast<char*>(&_impl_.delay_ms_),
1180 reinterpret_cast<char*>(&other->_impl_.delay_ms_));
1181 swap(_impl_.trigger_, other->_impl_.trigger_);
1182 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1183 }
1184
GetTypeName() const1185 std::string TriggerRule::GetTypeName() const {
1186 return "perfetto.protos.TriggerRule";
1187 }
1188
1189
1190 // ===================================================================
1191
1192 class NestedScenarioConfig::_Internal {
1193 public:
1194 using HasBits = decltype(std::declval<NestedScenarioConfig>()._impl_._has_bits_);
set_has_scenario_name(HasBits * has_bits)1195 static void set_has_scenario_name(HasBits* has_bits) {
1196 (*has_bits)[0] |= 1u;
1197 }
1198 };
1199
NestedScenarioConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1200 NestedScenarioConfig::NestedScenarioConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1201 bool is_message_owned)
1202 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1203 SharedCtor(arena, is_message_owned);
1204 // @@protoc_insertion_point(arena_constructor:perfetto.protos.NestedScenarioConfig)
1205 }
NestedScenarioConfig(const NestedScenarioConfig & from)1206 NestedScenarioConfig::NestedScenarioConfig(const NestedScenarioConfig& from)
1207 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1208 NestedScenarioConfig* const _this = this; (void)_this;
1209 new (&_impl_) Impl_{
1210 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1211 , /*decltype(_impl_._cached_size_)*/{}
1212 , decltype(_impl_.start_rules_){from._impl_.start_rules_}
1213 , decltype(_impl_.stop_rules_){from._impl_.stop_rules_}
1214 , decltype(_impl_.upload_rules_){from._impl_.upload_rules_}
1215 , decltype(_impl_.scenario_name_){}};
1216
1217 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1218 _impl_.scenario_name_.InitDefault();
1219 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1220 _impl_.scenario_name_.Set("", GetArenaForAllocation());
1221 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1222 if (from._internal_has_scenario_name()) {
1223 _this->_impl_.scenario_name_.Set(from._internal_scenario_name(),
1224 _this->GetArenaForAllocation());
1225 }
1226 // @@protoc_insertion_point(copy_constructor:perfetto.protos.NestedScenarioConfig)
1227 }
1228
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1229 inline void NestedScenarioConfig::SharedCtor(
1230 ::_pb::Arena* arena, bool is_message_owned) {
1231 (void)arena;
1232 (void)is_message_owned;
1233 new (&_impl_) Impl_{
1234 decltype(_impl_._has_bits_){}
1235 , /*decltype(_impl_._cached_size_)*/{}
1236 , decltype(_impl_.start_rules_){arena}
1237 , decltype(_impl_.stop_rules_){arena}
1238 , decltype(_impl_.upload_rules_){arena}
1239 , decltype(_impl_.scenario_name_){}
1240 };
1241 _impl_.scenario_name_.InitDefault();
1242 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1243 _impl_.scenario_name_.Set("", GetArenaForAllocation());
1244 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1245 }
1246
~NestedScenarioConfig()1247 NestedScenarioConfig::~NestedScenarioConfig() {
1248 // @@protoc_insertion_point(destructor:perfetto.protos.NestedScenarioConfig)
1249 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1250 (void)arena;
1251 return;
1252 }
1253 SharedDtor();
1254 }
1255
SharedDtor()1256 inline void NestedScenarioConfig::SharedDtor() {
1257 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1258 _impl_.start_rules_.~RepeatedPtrField();
1259 _impl_.stop_rules_.~RepeatedPtrField();
1260 _impl_.upload_rules_.~RepeatedPtrField();
1261 _impl_.scenario_name_.Destroy();
1262 }
1263
SetCachedSize(int size) const1264 void NestedScenarioConfig::SetCachedSize(int size) const {
1265 _impl_._cached_size_.Set(size);
1266 }
1267
Clear()1268 void NestedScenarioConfig::Clear() {
1269 // @@protoc_insertion_point(message_clear_start:perfetto.protos.NestedScenarioConfig)
1270 ::uint32_t cached_has_bits = 0;
1271 // Prevent compiler warnings about cached_has_bits being unused
1272 (void) cached_has_bits;
1273
1274 _impl_.start_rules_.Clear();
1275 _impl_.stop_rules_.Clear();
1276 _impl_.upload_rules_.Clear();
1277 cached_has_bits = _impl_._has_bits_[0];
1278 if (cached_has_bits & 0x00000001u) {
1279 _impl_.scenario_name_.ClearNonDefaultToEmpty();
1280 }
1281 _impl_._has_bits_.Clear();
1282 _internal_metadata_.Clear<std::string>();
1283 }
1284
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1285 const char* NestedScenarioConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1286 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1287 _Internal::HasBits has_bits{};
1288 while (!ctx->Done(&ptr)) {
1289 ::uint32_t tag;
1290 ptr = ::_pbi::ReadTag(ptr, &tag);
1291 switch (tag >> 3) {
1292 // optional string scenario_name = 1;
1293 case 1:
1294 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1295 auto str = _internal_mutable_scenario_name();
1296 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1297 CHK_(ptr);
1298 } else {
1299 goto handle_unusual;
1300 }
1301 continue;
1302 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1303 case 2:
1304 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1305 ptr -= 1;
1306 do {
1307 ptr += 1;
1308 ptr = ctx->ParseMessage(_internal_add_start_rules(), ptr);
1309 CHK_(ptr);
1310 if (!ctx->DataAvailable(ptr)) break;
1311 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1312 } else {
1313 goto handle_unusual;
1314 }
1315 continue;
1316 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1317 case 3:
1318 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1319 ptr -= 1;
1320 do {
1321 ptr += 1;
1322 ptr = ctx->ParseMessage(_internal_add_stop_rules(), ptr);
1323 CHK_(ptr);
1324 if (!ctx->DataAvailable(ptr)) break;
1325 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1326 } else {
1327 goto handle_unusual;
1328 }
1329 continue;
1330 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1331 case 4:
1332 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1333 ptr -= 1;
1334 do {
1335 ptr += 1;
1336 ptr = ctx->ParseMessage(_internal_add_upload_rules(), ptr);
1337 CHK_(ptr);
1338 if (!ctx->DataAvailable(ptr)) break;
1339 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1340 } else {
1341 goto handle_unusual;
1342 }
1343 continue;
1344 default:
1345 goto handle_unusual;
1346 } // switch
1347 handle_unusual:
1348 if ((tag == 0) || ((tag & 7) == 4)) {
1349 CHK_(ptr);
1350 ctx->SetLastTag(tag);
1351 goto message_done;
1352 }
1353 ptr = UnknownFieldParse(
1354 tag,
1355 _internal_metadata_.mutable_unknown_fields<std::string>(),
1356 ptr, ctx);
1357 CHK_(ptr != nullptr);
1358 } // while
1359 message_done:
1360 _impl_._has_bits_.Or(has_bits);
1361 return ptr;
1362 failure:
1363 ptr = nullptr;
1364 goto message_done;
1365 #undef CHK_
1366 }
1367
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1368 ::uint8_t* NestedScenarioConfig::_InternalSerialize(
1369 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1370 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.NestedScenarioConfig)
1371 ::uint32_t cached_has_bits = 0;
1372 (void) cached_has_bits;
1373
1374 cached_has_bits = _impl_._has_bits_[0];
1375 // optional string scenario_name = 1;
1376 if (cached_has_bits & 0x00000001u) {
1377 target = stream->WriteStringMaybeAliased(
1378 1, this->_internal_scenario_name(), target);
1379 }
1380
1381 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1382 for (unsigned i = 0,
1383 n = static_cast<unsigned>(this->_internal_start_rules_size()); i < n; i++) {
1384 const auto& repfield = this->_internal_start_rules(i);
1385 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1386 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1387 }
1388
1389 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1390 for (unsigned i = 0,
1391 n = static_cast<unsigned>(this->_internal_stop_rules_size()); i < n; i++) {
1392 const auto& repfield = this->_internal_stop_rules(i);
1393 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1394 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1395 }
1396
1397 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1398 for (unsigned i = 0,
1399 n = static_cast<unsigned>(this->_internal_upload_rules_size()); i < n; i++) {
1400 const auto& repfield = this->_internal_upload_rules(i);
1401 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1402 InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
1403 }
1404
1405 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1406 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1407 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1408 }
1409 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.NestedScenarioConfig)
1410 return target;
1411 }
1412
ByteSizeLong() const1413 size_t NestedScenarioConfig::ByteSizeLong() const {
1414 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.NestedScenarioConfig)
1415 size_t total_size = 0;
1416
1417 ::uint32_t cached_has_bits = 0;
1418 // Prevent compiler warnings about cached_has_bits being unused
1419 (void) cached_has_bits;
1420
1421 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1422 total_size += 1UL * this->_internal_start_rules_size();
1423 for (const auto& msg : this->_impl_.start_rules_) {
1424 total_size +=
1425 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1426 }
1427
1428 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1429 total_size += 1UL * this->_internal_stop_rules_size();
1430 for (const auto& msg : this->_impl_.stop_rules_) {
1431 total_size +=
1432 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1433 }
1434
1435 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1436 total_size += 1UL * this->_internal_upload_rules_size();
1437 for (const auto& msg : this->_impl_.upload_rules_) {
1438 total_size +=
1439 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1440 }
1441
1442 // optional string scenario_name = 1;
1443 cached_has_bits = _impl_._has_bits_[0];
1444 if (cached_has_bits & 0x00000001u) {
1445 total_size += 1 +
1446 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1447 this->_internal_scenario_name());
1448 }
1449
1450 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1451 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1452 }
1453 int cached_size = ::_pbi::ToCachedSize(total_size);
1454 SetCachedSize(cached_size);
1455 return total_size;
1456 }
1457
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1458 void NestedScenarioConfig::CheckTypeAndMergeFrom(
1459 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1460 MergeFrom(*::_pbi::DownCast<const NestedScenarioConfig*>(
1461 &from));
1462 }
1463
MergeFrom(const NestedScenarioConfig & from)1464 void NestedScenarioConfig::MergeFrom(const NestedScenarioConfig& from) {
1465 NestedScenarioConfig* const _this = this;
1466 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.NestedScenarioConfig)
1467 GOOGLE_DCHECK_NE(&from, _this);
1468 ::uint32_t cached_has_bits = 0;
1469 (void) cached_has_bits;
1470
1471 _this->_impl_.start_rules_.MergeFrom(from._impl_.start_rules_);
1472 _this->_impl_.stop_rules_.MergeFrom(from._impl_.stop_rules_);
1473 _this->_impl_.upload_rules_.MergeFrom(from._impl_.upload_rules_);
1474 if (from._internal_has_scenario_name()) {
1475 _this->_internal_set_scenario_name(from._internal_scenario_name());
1476 }
1477 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1478 }
1479
CopyFrom(const NestedScenarioConfig & from)1480 void NestedScenarioConfig::CopyFrom(const NestedScenarioConfig& from) {
1481 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.NestedScenarioConfig)
1482 if (&from == this) return;
1483 Clear();
1484 MergeFrom(from);
1485 }
1486
IsInitialized() const1487 bool NestedScenarioConfig::IsInitialized() const {
1488 return true;
1489 }
1490
InternalSwap(NestedScenarioConfig * other)1491 void NestedScenarioConfig::InternalSwap(NestedScenarioConfig* other) {
1492 using std::swap;
1493 auto* lhs_arena = GetArenaForAllocation();
1494 auto* rhs_arena = other->GetArenaForAllocation();
1495 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1496 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1497 _impl_.start_rules_.InternalSwap(&other->_impl_.start_rules_);
1498 _impl_.stop_rules_.InternalSwap(&other->_impl_.stop_rules_);
1499 _impl_.upload_rules_.InternalSwap(&other->_impl_.upload_rules_);
1500 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1501 &_impl_.scenario_name_, lhs_arena,
1502 &other->_impl_.scenario_name_, rhs_arena
1503 );
1504 }
1505
GetTypeName() const1506 std::string NestedScenarioConfig::GetTypeName() const {
1507 return "perfetto.protos.NestedScenarioConfig";
1508 }
1509
1510
1511 // ===================================================================
1512
1513 class ScenarioConfig::_Internal {
1514 public:
1515 using HasBits = decltype(std::declval<ScenarioConfig>()._impl_._has_bits_);
set_has_scenario_name(HasBits * has_bits)1516 static void set_has_scenario_name(HasBits* has_bits) {
1517 (*has_bits)[0] |= 1u;
1518 }
1519 static const ::perfetto::protos::TraceConfig& trace_config(const ScenarioConfig* msg);
set_has_trace_config(HasBits * has_bits)1520 static void set_has_trace_config(HasBits* has_bits) {
1521 (*has_bits)[0] |= 2u;
1522 }
1523 };
1524
1525 const ::perfetto::protos::TraceConfig&
trace_config(const ScenarioConfig * msg)1526 ScenarioConfig::_Internal::trace_config(const ScenarioConfig* msg) {
1527 return *msg->_impl_.trace_config_;
1528 }
clear_trace_config()1529 void ScenarioConfig::clear_trace_config() {
1530 if (_impl_.trace_config_ != nullptr) _impl_.trace_config_->Clear();
1531 _impl_._has_bits_[0] &= ~0x00000002u;
1532 }
ScenarioConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1533 ScenarioConfig::ScenarioConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1534 bool is_message_owned)
1535 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1536 SharedCtor(arena, is_message_owned);
1537 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ScenarioConfig)
1538 }
ScenarioConfig(const ScenarioConfig & from)1539 ScenarioConfig::ScenarioConfig(const ScenarioConfig& from)
1540 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1541 ScenarioConfig* const _this = this; (void)_this;
1542 new (&_impl_) Impl_{
1543 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1544 , /*decltype(_impl_._cached_size_)*/{}
1545 , decltype(_impl_.start_rules_){from._impl_.start_rules_}
1546 , decltype(_impl_.stop_rules_){from._impl_.stop_rules_}
1547 , decltype(_impl_.upload_rules_){from._impl_.upload_rules_}
1548 , decltype(_impl_.setup_rules_){from._impl_.setup_rules_}
1549 , decltype(_impl_.nested_scenarios_){from._impl_.nested_scenarios_}
1550 , decltype(_impl_.scenario_name_){}
1551 , decltype(_impl_.trace_config_){nullptr}};
1552
1553 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1554 _impl_.scenario_name_.InitDefault();
1555 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1556 _impl_.scenario_name_.Set("", GetArenaForAllocation());
1557 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1558 if (from._internal_has_scenario_name()) {
1559 _this->_impl_.scenario_name_.Set(from._internal_scenario_name(),
1560 _this->GetArenaForAllocation());
1561 }
1562 if (from._internal_has_trace_config()) {
1563 _this->_impl_.trace_config_ = new ::perfetto::protos::TraceConfig(*from._impl_.trace_config_);
1564 }
1565 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ScenarioConfig)
1566 }
1567
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1568 inline void ScenarioConfig::SharedCtor(
1569 ::_pb::Arena* arena, bool is_message_owned) {
1570 (void)arena;
1571 (void)is_message_owned;
1572 new (&_impl_) Impl_{
1573 decltype(_impl_._has_bits_){}
1574 , /*decltype(_impl_._cached_size_)*/{}
1575 , decltype(_impl_.start_rules_){arena}
1576 , decltype(_impl_.stop_rules_){arena}
1577 , decltype(_impl_.upload_rules_){arena}
1578 , decltype(_impl_.setup_rules_){arena}
1579 , decltype(_impl_.nested_scenarios_){arena}
1580 , decltype(_impl_.scenario_name_){}
1581 , decltype(_impl_.trace_config_){nullptr}
1582 };
1583 _impl_.scenario_name_.InitDefault();
1584 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1585 _impl_.scenario_name_.Set("", GetArenaForAllocation());
1586 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1587 }
1588
~ScenarioConfig()1589 ScenarioConfig::~ScenarioConfig() {
1590 // @@protoc_insertion_point(destructor:perfetto.protos.ScenarioConfig)
1591 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1592 (void)arena;
1593 return;
1594 }
1595 SharedDtor();
1596 }
1597
SharedDtor()1598 inline void ScenarioConfig::SharedDtor() {
1599 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1600 _impl_.start_rules_.~RepeatedPtrField();
1601 _impl_.stop_rules_.~RepeatedPtrField();
1602 _impl_.upload_rules_.~RepeatedPtrField();
1603 _impl_.setup_rules_.~RepeatedPtrField();
1604 _impl_.nested_scenarios_.~RepeatedPtrField();
1605 _impl_.scenario_name_.Destroy();
1606 if (this != internal_default_instance()) delete _impl_.trace_config_;
1607 }
1608
SetCachedSize(int size) const1609 void ScenarioConfig::SetCachedSize(int size) const {
1610 _impl_._cached_size_.Set(size);
1611 }
1612
Clear()1613 void ScenarioConfig::Clear() {
1614 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ScenarioConfig)
1615 ::uint32_t cached_has_bits = 0;
1616 // Prevent compiler warnings about cached_has_bits being unused
1617 (void) cached_has_bits;
1618
1619 _impl_.start_rules_.Clear();
1620 _impl_.stop_rules_.Clear();
1621 _impl_.upload_rules_.Clear();
1622 _impl_.setup_rules_.Clear();
1623 _impl_.nested_scenarios_.Clear();
1624 cached_has_bits = _impl_._has_bits_[0];
1625 if (cached_has_bits & 0x00000003u) {
1626 if (cached_has_bits & 0x00000001u) {
1627 _impl_.scenario_name_.ClearNonDefaultToEmpty();
1628 }
1629 if (cached_has_bits & 0x00000002u) {
1630 GOOGLE_DCHECK(_impl_.trace_config_ != nullptr);
1631 _impl_.trace_config_->Clear();
1632 }
1633 }
1634 _impl_._has_bits_.Clear();
1635 _internal_metadata_.Clear<std::string>();
1636 }
1637
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1638 const char* ScenarioConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1639 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1640 _Internal::HasBits has_bits{};
1641 while (!ctx->Done(&ptr)) {
1642 ::uint32_t tag;
1643 ptr = ::_pbi::ReadTag(ptr, &tag);
1644 switch (tag >> 3) {
1645 // optional string scenario_name = 1;
1646 case 1:
1647 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1648 auto str = _internal_mutable_scenario_name();
1649 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1650 CHK_(ptr);
1651 } else {
1652 goto handle_unusual;
1653 }
1654 continue;
1655 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1656 case 2:
1657 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1658 ptr -= 1;
1659 do {
1660 ptr += 1;
1661 ptr = ctx->ParseMessage(_internal_add_start_rules(), ptr);
1662 CHK_(ptr);
1663 if (!ctx->DataAvailable(ptr)) break;
1664 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1665 } else {
1666 goto handle_unusual;
1667 }
1668 continue;
1669 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1670 case 3:
1671 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1672 ptr -= 1;
1673 do {
1674 ptr += 1;
1675 ptr = ctx->ParseMessage(_internal_add_stop_rules(), ptr);
1676 CHK_(ptr);
1677 if (!ctx->DataAvailable(ptr)) break;
1678 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1679 } else {
1680 goto handle_unusual;
1681 }
1682 continue;
1683 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1684 case 4:
1685 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1686 ptr -= 1;
1687 do {
1688 ptr += 1;
1689 ptr = ctx->ParseMessage(_internal_add_upload_rules(), ptr);
1690 CHK_(ptr);
1691 if (!ctx->DataAvailable(ptr)) break;
1692 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1693 } else {
1694 goto handle_unusual;
1695 }
1696 continue;
1697 // repeated .perfetto.protos.TriggerRule setup_rules = 5;
1698 case 5:
1699 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1700 ptr -= 1;
1701 do {
1702 ptr += 1;
1703 ptr = ctx->ParseMessage(_internal_add_setup_rules(), ptr);
1704 CHK_(ptr);
1705 if (!ctx->DataAvailable(ptr)) break;
1706 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
1707 } else {
1708 goto handle_unusual;
1709 }
1710 continue;
1711 // optional .perfetto.protos.TraceConfig trace_config = 6;
1712 case 6:
1713 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1714 ptr = ctx->ParseMessage(_internal_mutable_trace_config(), ptr);
1715 CHK_(ptr);
1716 } else {
1717 goto handle_unusual;
1718 }
1719 continue;
1720 // repeated .perfetto.protos.NestedScenarioConfig nested_scenarios = 7;
1721 case 7:
1722 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
1723 ptr -= 1;
1724 do {
1725 ptr += 1;
1726 ptr = ctx->ParseMessage(_internal_add_nested_scenarios(), ptr);
1727 CHK_(ptr);
1728 if (!ctx->DataAvailable(ptr)) break;
1729 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
1730 } else {
1731 goto handle_unusual;
1732 }
1733 continue;
1734 default:
1735 goto handle_unusual;
1736 } // switch
1737 handle_unusual:
1738 if ((tag == 0) || ((tag & 7) == 4)) {
1739 CHK_(ptr);
1740 ctx->SetLastTag(tag);
1741 goto message_done;
1742 }
1743 ptr = UnknownFieldParse(
1744 tag,
1745 _internal_metadata_.mutable_unknown_fields<std::string>(),
1746 ptr, ctx);
1747 CHK_(ptr != nullptr);
1748 } // while
1749 message_done:
1750 _impl_._has_bits_.Or(has_bits);
1751 return ptr;
1752 failure:
1753 ptr = nullptr;
1754 goto message_done;
1755 #undef CHK_
1756 }
1757
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1758 ::uint8_t* ScenarioConfig::_InternalSerialize(
1759 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1760 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ScenarioConfig)
1761 ::uint32_t cached_has_bits = 0;
1762 (void) cached_has_bits;
1763
1764 cached_has_bits = _impl_._has_bits_[0];
1765 // optional string scenario_name = 1;
1766 if (cached_has_bits & 0x00000001u) {
1767 target = stream->WriteStringMaybeAliased(
1768 1, this->_internal_scenario_name(), target);
1769 }
1770
1771 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1772 for (unsigned i = 0,
1773 n = static_cast<unsigned>(this->_internal_start_rules_size()); i < n; i++) {
1774 const auto& repfield = this->_internal_start_rules(i);
1775 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1776 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1777 }
1778
1779 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1780 for (unsigned i = 0,
1781 n = static_cast<unsigned>(this->_internal_stop_rules_size()); i < n; i++) {
1782 const auto& repfield = this->_internal_stop_rules(i);
1783 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1784 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1785 }
1786
1787 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1788 for (unsigned i = 0,
1789 n = static_cast<unsigned>(this->_internal_upload_rules_size()); i < n; i++) {
1790 const auto& repfield = this->_internal_upload_rules(i);
1791 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1792 InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
1793 }
1794
1795 // repeated .perfetto.protos.TriggerRule setup_rules = 5;
1796 for (unsigned i = 0,
1797 n = static_cast<unsigned>(this->_internal_setup_rules_size()); i < n; i++) {
1798 const auto& repfield = this->_internal_setup_rules(i);
1799 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1800 InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
1801 }
1802
1803 // optional .perfetto.protos.TraceConfig trace_config = 6;
1804 if (cached_has_bits & 0x00000002u) {
1805 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1806 InternalWriteMessage(6, _Internal::trace_config(this),
1807 _Internal::trace_config(this).GetCachedSize(), target, stream);
1808 }
1809
1810 // repeated .perfetto.protos.NestedScenarioConfig nested_scenarios = 7;
1811 for (unsigned i = 0,
1812 n = static_cast<unsigned>(this->_internal_nested_scenarios_size()); i < n; i++) {
1813 const auto& repfield = this->_internal_nested_scenarios(i);
1814 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1815 InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
1816 }
1817
1818 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1819 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1820 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1821 }
1822 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ScenarioConfig)
1823 return target;
1824 }
1825
ByteSizeLong() const1826 size_t ScenarioConfig::ByteSizeLong() const {
1827 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ScenarioConfig)
1828 size_t total_size = 0;
1829
1830 ::uint32_t cached_has_bits = 0;
1831 // Prevent compiler warnings about cached_has_bits being unused
1832 (void) cached_has_bits;
1833
1834 // repeated .perfetto.protos.TriggerRule start_rules = 2;
1835 total_size += 1UL * this->_internal_start_rules_size();
1836 for (const auto& msg : this->_impl_.start_rules_) {
1837 total_size +=
1838 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1839 }
1840
1841 // repeated .perfetto.protos.TriggerRule stop_rules = 3;
1842 total_size += 1UL * this->_internal_stop_rules_size();
1843 for (const auto& msg : this->_impl_.stop_rules_) {
1844 total_size +=
1845 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1846 }
1847
1848 // repeated .perfetto.protos.TriggerRule upload_rules = 4;
1849 total_size += 1UL * this->_internal_upload_rules_size();
1850 for (const auto& msg : this->_impl_.upload_rules_) {
1851 total_size +=
1852 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1853 }
1854
1855 // repeated .perfetto.protos.TriggerRule setup_rules = 5;
1856 total_size += 1UL * this->_internal_setup_rules_size();
1857 for (const auto& msg : this->_impl_.setup_rules_) {
1858 total_size +=
1859 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1860 }
1861
1862 // repeated .perfetto.protos.NestedScenarioConfig nested_scenarios = 7;
1863 total_size += 1UL * this->_internal_nested_scenarios_size();
1864 for (const auto& msg : this->_impl_.nested_scenarios_) {
1865 total_size +=
1866 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1867 }
1868
1869 cached_has_bits = _impl_._has_bits_[0];
1870 if (cached_has_bits & 0x00000003u) {
1871 // optional string scenario_name = 1;
1872 if (cached_has_bits & 0x00000001u) {
1873 total_size += 1 +
1874 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1875 this->_internal_scenario_name());
1876 }
1877
1878 // optional .perfetto.protos.TraceConfig trace_config = 6;
1879 if (cached_has_bits & 0x00000002u) {
1880 total_size += 1 +
1881 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1882 *_impl_.trace_config_);
1883 }
1884
1885 }
1886 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1887 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1888 }
1889 int cached_size = ::_pbi::ToCachedSize(total_size);
1890 SetCachedSize(cached_size);
1891 return total_size;
1892 }
1893
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1894 void ScenarioConfig::CheckTypeAndMergeFrom(
1895 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1896 MergeFrom(*::_pbi::DownCast<const ScenarioConfig*>(
1897 &from));
1898 }
1899
MergeFrom(const ScenarioConfig & from)1900 void ScenarioConfig::MergeFrom(const ScenarioConfig& from) {
1901 ScenarioConfig* const _this = this;
1902 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ScenarioConfig)
1903 GOOGLE_DCHECK_NE(&from, _this);
1904 ::uint32_t cached_has_bits = 0;
1905 (void) cached_has_bits;
1906
1907 _this->_impl_.start_rules_.MergeFrom(from._impl_.start_rules_);
1908 _this->_impl_.stop_rules_.MergeFrom(from._impl_.stop_rules_);
1909 _this->_impl_.upload_rules_.MergeFrom(from._impl_.upload_rules_);
1910 _this->_impl_.setup_rules_.MergeFrom(from._impl_.setup_rules_);
1911 _this->_impl_.nested_scenarios_.MergeFrom(from._impl_.nested_scenarios_);
1912 cached_has_bits = from._impl_._has_bits_[0];
1913 if (cached_has_bits & 0x00000003u) {
1914 if (cached_has_bits & 0x00000001u) {
1915 _this->_internal_set_scenario_name(from._internal_scenario_name());
1916 }
1917 if (cached_has_bits & 0x00000002u) {
1918 _this->_internal_mutable_trace_config()->::perfetto::protos::TraceConfig::MergeFrom(
1919 from._internal_trace_config());
1920 }
1921 }
1922 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1923 }
1924
CopyFrom(const ScenarioConfig & from)1925 void ScenarioConfig::CopyFrom(const ScenarioConfig& from) {
1926 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ScenarioConfig)
1927 if (&from == this) return;
1928 Clear();
1929 MergeFrom(from);
1930 }
1931
IsInitialized() const1932 bool ScenarioConfig::IsInitialized() const {
1933 return true;
1934 }
1935
InternalSwap(ScenarioConfig * other)1936 void ScenarioConfig::InternalSwap(ScenarioConfig* other) {
1937 using std::swap;
1938 auto* lhs_arena = GetArenaForAllocation();
1939 auto* rhs_arena = other->GetArenaForAllocation();
1940 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1941 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1942 _impl_.start_rules_.InternalSwap(&other->_impl_.start_rules_);
1943 _impl_.stop_rules_.InternalSwap(&other->_impl_.stop_rules_);
1944 _impl_.upload_rules_.InternalSwap(&other->_impl_.upload_rules_);
1945 _impl_.setup_rules_.InternalSwap(&other->_impl_.setup_rules_);
1946 _impl_.nested_scenarios_.InternalSwap(&other->_impl_.nested_scenarios_);
1947 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1948 &_impl_.scenario_name_, lhs_arena,
1949 &other->_impl_.scenario_name_, rhs_arena
1950 );
1951 swap(_impl_.trace_config_, other->_impl_.trace_config_);
1952 }
1953
GetTypeName() const1954 std::string ScenarioConfig::GetTypeName() const {
1955 return "perfetto.protos.ScenarioConfig";
1956 }
1957
1958
1959 // ===================================================================
1960
1961 class ChromeFieldTracingConfig::_Internal {
1962 public:
1963 };
1964
ChromeFieldTracingConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1965 ChromeFieldTracingConfig::ChromeFieldTracingConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1966 bool is_message_owned)
1967 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1968 SharedCtor(arena, is_message_owned);
1969 // @@protoc_insertion_point(arena_constructor:perfetto.protos.ChromeFieldTracingConfig)
1970 }
ChromeFieldTracingConfig(const ChromeFieldTracingConfig & from)1971 ChromeFieldTracingConfig::ChromeFieldTracingConfig(const ChromeFieldTracingConfig& from)
1972 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1973 ChromeFieldTracingConfig* const _this = this; (void)_this;
1974 new (&_impl_) Impl_{
1975 decltype(_impl_.scenarios_){from._impl_.scenarios_}
1976 , /*decltype(_impl_._cached_size_)*/{}};
1977
1978 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1979 // @@protoc_insertion_point(copy_constructor:perfetto.protos.ChromeFieldTracingConfig)
1980 }
1981
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1982 inline void ChromeFieldTracingConfig::SharedCtor(
1983 ::_pb::Arena* arena, bool is_message_owned) {
1984 (void)arena;
1985 (void)is_message_owned;
1986 new (&_impl_) Impl_{
1987 decltype(_impl_.scenarios_){arena}
1988 , /*decltype(_impl_._cached_size_)*/{}
1989 };
1990 }
1991
~ChromeFieldTracingConfig()1992 ChromeFieldTracingConfig::~ChromeFieldTracingConfig() {
1993 // @@protoc_insertion_point(destructor:perfetto.protos.ChromeFieldTracingConfig)
1994 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1995 (void)arena;
1996 return;
1997 }
1998 SharedDtor();
1999 }
2000
SharedDtor()2001 inline void ChromeFieldTracingConfig::SharedDtor() {
2002 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2003 _impl_.scenarios_.~RepeatedPtrField();
2004 }
2005
SetCachedSize(int size) const2006 void ChromeFieldTracingConfig::SetCachedSize(int size) const {
2007 _impl_._cached_size_.Set(size);
2008 }
2009
Clear()2010 void ChromeFieldTracingConfig::Clear() {
2011 // @@protoc_insertion_point(message_clear_start:perfetto.protos.ChromeFieldTracingConfig)
2012 ::uint32_t cached_has_bits = 0;
2013 // Prevent compiler warnings about cached_has_bits being unused
2014 (void) cached_has_bits;
2015
2016 _impl_.scenarios_.Clear();
2017 _internal_metadata_.Clear<std::string>();
2018 }
2019
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2020 const char* ChromeFieldTracingConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2021 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2022 while (!ctx->Done(&ptr)) {
2023 ::uint32_t tag;
2024 ptr = ::_pbi::ReadTag(ptr, &tag);
2025 switch (tag >> 3) {
2026 // repeated .perfetto.protos.ScenarioConfig scenarios = 1;
2027 case 1:
2028 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2029 ptr -= 1;
2030 do {
2031 ptr += 1;
2032 ptr = ctx->ParseMessage(_internal_add_scenarios(), ptr);
2033 CHK_(ptr);
2034 if (!ctx->DataAvailable(ptr)) break;
2035 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2036 } else {
2037 goto handle_unusual;
2038 }
2039 continue;
2040 default:
2041 goto handle_unusual;
2042 } // switch
2043 handle_unusual:
2044 if ((tag == 0) || ((tag & 7) == 4)) {
2045 CHK_(ptr);
2046 ctx->SetLastTag(tag);
2047 goto message_done;
2048 }
2049 ptr = UnknownFieldParse(
2050 tag,
2051 _internal_metadata_.mutable_unknown_fields<std::string>(),
2052 ptr, ctx);
2053 CHK_(ptr != nullptr);
2054 } // while
2055 message_done:
2056 return ptr;
2057 failure:
2058 ptr = nullptr;
2059 goto message_done;
2060 #undef CHK_
2061 }
2062
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2063 ::uint8_t* ChromeFieldTracingConfig::_InternalSerialize(
2064 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2065 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.ChromeFieldTracingConfig)
2066 ::uint32_t cached_has_bits = 0;
2067 (void) cached_has_bits;
2068
2069 // repeated .perfetto.protos.ScenarioConfig scenarios = 1;
2070 for (unsigned i = 0,
2071 n = static_cast<unsigned>(this->_internal_scenarios_size()); i < n; i++) {
2072 const auto& repfield = this->_internal_scenarios(i);
2073 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2074 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2075 }
2076
2077 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2078 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2079 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2080 }
2081 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.ChromeFieldTracingConfig)
2082 return target;
2083 }
2084
ByteSizeLong() const2085 size_t ChromeFieldTracingConfig::ByteSizeLong() const {
2086 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.ChromeFieldTracingConfig)
2087 size_t total_size = 0;
2088
2089 ::uint32_t cached_has_bits = 0;
2090 // Prevent compiler warnings about cached_has_bits being unused
2091 (void) cached_has_bits;
2092
2093 // repeated .perfetto.protos.ScenarioConfig scenarios = 1;
2094 total_size += 1UL * this->_internal_scenarios_size();
2095 for (const auto& msg : this->_impl_.scenarios_) {
2096 total_size +=
2097 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2098 }
2099
2100 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2101 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2102 }
2103 int cached_size = ::_pbi::ToCachedSize(total_size);
2104 SetCachedSize(cached_size);
2105 return total_size;
2106 }
2107
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2108 void ChromeFieldTracingConfig::CheckTypeAndMergeFrom(
2109 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2110 MergeFrom(*::_pbi::DownCast<const ChromeFieldTracingConfig*>(
2111 &from));
2112 }
2113
MergeFrom(const ChromeFieldTracingConfig & from)2114 void ChromeFieldTracingConfig::MergeFrom(const ChromeFieldTracingConfig& from) {
2115 ChromeFieldTracingConfig* const _this = this;
2116 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.ChromeFieldTracingConfig)
2117 GOOGLE_DCHECK_NE(&from, _this);
2118 ::uint32_t cached_has_bits = 0;
2119 (void) cached_has_bits;
2120
2121 _this->_impl_.scenarios_.MergeFrom(from._impl_.scenarios_);
2122 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2123 }
2124
CopyFrom(const ChromeFieldTracingConfig & from)2125 void ChromeFieldTracingConfig::CopyFrom(const ChromeFieldTracingConfig& from) {
2126 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.ChromeFieldTracingConfig)
2127 if (&from == this) return;
2128 Clear();
2129 MergeFrom(from);
2130 }
2131
IsInitialized() const2132 bool ChromeFieldTracingConfig::IsInitialized() const {
2133 return true;
2134 }
2135
InternalSwap(ChromeFieldTracingConfig * other)2136 void ChromeFieldTracingConfig::InternalSwap(ChromeFieldTracingConfig* other) {
2137 using std::swap;
2138 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2139 _impl_.scenarios_.InternalSwap(&other->_impl_.scenarios_);
2140 }
2141
GetTypeName() const2142 std::string ChromeFieldTracingConfig::GetTypeName() const {
2143 return "perfetto.protos.ChromeFieldTracingConfig";
2144 }
2145
2146
2147 // ===================================================================
2148
2149 class TracingTriggerRulesConfig::_Internal {
2150 public:
2151 };
2152
TracingTriggerRulesConfig(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2153 TracingTriggerRulesConfig::TracingTriggerRulesConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2154 bool is_message_owned)
2155 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2156 SharedCtor(arena, is_message_owned);
2157 // @@protoc_insertion_point(arena_constructor:perfetto.protos.TracingTriggerRulesConfig)
2158 }
TracingTriggerRulesConfig(const TracingTriggerRulesConfig & from)2159 TracingTriggerRulesConfig::TracingTriggerRulesConfig(const TracingTriggerRulesConfig& from)
2160 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2161 TracingTriggerRulesConfig* const _this = this; (void)_this;
2162 new (&_impl_) Impl_{
2163 decltype(_impl_.rules_){from._impl_.rules_}
2164 , /*decltype(_impl_._cached_size_)*/{}};
2165
2166 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2167 // @@protoc_insertion_point(copy_constructor:perfetto.protos.TracingTriggerRulesConfig)
2168 }
2169
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2170 inline void TracingTriggerRulesConfig::SharedCtor(
2171 ::_pb::Arena* arena, bool is_message_owned) {
2172 (void)arena;
2173 (void)is_message_owned;
2174 new (&_impl_) Impl_{
2175 decltype(_impl_.rules_){arena}
2176 , /*decltype(_impl_._cached_size_)*/{}
2177 };
2178 }
2179
~TracingTriggerRulesConfig()2180 TracingTriggerRulesConfig::~TracingTriggerRulesConfig() {
2181 // @@protoc_insertion_point(destructor:perfetto.protos.TracingTriggerRulesConfig)
2182 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2183 (void)arena;
2184 return;
2185 }
2186 SharedDtor();
2187 }
2188
SharedDtor()2189 inline void TracingTriggerRulesConfig::SharedDtor() {
2190 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2191 _impl_.rules_.~RepeatedPtrField();
2192 }
2193
SetCachedSize(int size) const2194 void TracingTriggerRulesConfig::SetCachedSize(int size) const {
2195 _impl_._cached_size_.Set(size);
2196 }
2197
Clear()2198 void TracingTriggerRulesConfig::Clear() {
2199 // @@protoc_insertion_point(message_clear_start:perfetto.protos.TracingTriggerRulesConfig)
2200 ::uint32_t cached_has_bits = 0;
2201 // Prevent compiler warnings about cached_has_bits being unused
2202 (void) cached_has_bits;
2203
2204 _impl_.rules_.Clear();
2205 _internal_metadata_.Clear<std::string>();
2206 }
2207
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2208 const char* TracingTriggerRulesConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2209 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2210 while (!ctx->Done(&ptr)) {
2211 ::uint32_t tag;
2212 ptr = ::_pbi::ReadTag(ptr, &tag);
2213 switch (tag >> 3) {
2214 // repeated .perfetto.protos.TriggerRule rules = 1;
2215 case 1:
2216 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2217 ptr -= 1;
2218 do {
2219 ptr += 1;
2220 ptr = ctx->ParseMessage(_internal_add_rules(), ptr);
2221 CHK_(ptr);
2222 if (!ctx->DataAvailable(ptr)) break;
2223 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2224 } else {
2225 goto handle_unusual;
2226 }
2227 continue;
2228 default:
2229 goto handle_unusual;
2230 } // switch
2231 handle_unusual:
2232 if ((tag == 0) || ((tag & 7) == 4)) {
2233 CHK_(ptr);
2234 ctx->SetLastTag(tag);
2235 goto message_done;
2236 }
2237 ptr = UnknownFieldParse(
2238 tag,
2239 _internal_metadata_.mutable_unknown_fields<std::string>(),
2240 ptr, ctx);
2241 CHK_(ptr != nullptr);
2242 } // while
2243 message_done:
2244 return ptr;
2245 failure:
2246 ptr = nullptr;
2247 goto message_done;
2248 #undef CHK_
2249 }
2250
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2251 ::uint8_t* TracingTriggerRulesConfig::_InternalSerialize(
2252 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2253 // @@protoc_insertion_point(serialize_to_array_start:perfetto.protos.TracingTriggerRulesConfig)
2254 ::uint32_t cached_has_bits = 0;
2255 (void) cached_has_bits;
2256
2257 // repeated .perfetto.protos.TriggerRule rules = 1;
2258 for (unsigned i = 0,
2259 n = static_cast<unsigned>(this->_internal_rules_size()); i < n; i++) {
2260 const auto& repfield = this->_internal_rules(i);
2261 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2262 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2263 }
2264
2265 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2266 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2267 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2268 }
2269 // @@protoc_insertion_point(serialize_to_array_end:perfetto.protos.TracingTriggerRulesConfig)
2270 return target;
2271 }
2272
ByteSizeLong() const2273 size_t TracingTriggerRulesConfig::ByteSizeLong() const {
2274 // @@protoc_insertion_point(message_byte_size_start:perfetto.protos.TracingTriggerRulesConfig)
2275 size_t total_size = 0;
2276
2277 ::uint32_t cached_has_bits = 0;
2278 // Prevent compiler warnings about cached_has_bits being unused
2279 (void) cached_has_bits;
2280
2281 // repeated .perfetto.protos.TriggerRule rules = 1;
2282 total_size += 1UL * this->_internal_rules_size();
2283 for (const auto& msg : this->_impl_.rules_) {
2284 total_size +=
2285 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2286 }
2287
2288 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2289 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2290 }
2291 int cached_size = ::_pbi::ToCachedSize(total_size);
2292 SetCachedSize(cached_size);
2293 return total_size;
2294 }
2295
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2296 void TracingTriggerRulesConfig::CheckTypeAndMergeFrom(
2297 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2298 MergeFrom(*::_pbi::DownCast<const TracingTriggerRulesConfig*>(
2299 &from));
2300 }
2301
MergeFrom(const TracingTriggerRulesConfig & from)2302 void TracingTriggerRulesConfig::MergeFrom(const TracingTriggerRulesConfig& from) {
2303 TracingTriggerRulesConfig* const _this = this;
2304 // @@protoc_insertion_point(class_specific_merge_from_start:perfetto.protos.TracingTriggerRulesConfig)
2305 GOOGLE_DCHECK_NE(&from, _this);
2306 ::uint32_t cached_has_bits = 0;
2307 (void) cached_has_bits;
2308
2309 _this->_impl_.rules_.MergeFrom(from._impl_.rules_);
2310 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2311 }
2312
CopyFrom(const TracingTriggerRulesConfig & from)2313 void TracingTriggerRulesConfig::CopyFrom(const TracingTriggerRulesConfig& from) {
2314 // @@protoc_insertion_point(class_specific_copy_from_start:perfetto.protos.TracingTriggerRulesConfig)
2315 if (&from == this) return;
2316 Clear();
2317 MergeFrom(from);
2318 }
2319
IsInitialized() const2320 bool TracingTriggerRulesConfig::IsInitialized() const {
2321 return true;
2322 }
2323
InternalSwap(TracingTriggerRulesConfig * other)2324 void TracingTriggerRulesConfig::InternalSwap(TracingTriggerRulesConfig* other) {
2325 using std::swap;
2326 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2327 _impl_.rules_.InternalSwap(&other->_impl_.rules_);
2328 }
2329
GetTypeName() const2330 std::string TracingTriggerRulesConfig::GetTypeName() const {
2331 return "perfetto.protos.TracingTriggerRulesConfig";
2332 }
2333
2334
2335 // @@protoc_insertion_point(namespace_scope)
2336 } // namespace protos
2337 } // namespace perfetto
2338 PROTOBUF_NAMESPACE_OPEN
2339 template<> PROTOBUF_NOINLINE ::perfetto::protos::TriggerRule_HistogramTrigger*
CreateMaybeMessage(Arena * arena)2340 Arena::CreateMaybeMessage< ::perfetto::protos::TriggerRule_HistogramTrigger >(Arena* arena) {
2341 return Arena::CreateMessageInternal< ::perfetto::protos::TriggerRule_HistogramTrigger >(arena);
2342 }
2343 template<> PROTOBUF_NOINLINE ::perfetto::protos::TriggerRule_RepeatingInterval*
CreateMaybeMessage(Arena * arena)2344 Arena::CreateMaybeMessage< ::perfetto::protos::TriggerRule_RepeatingInterval >(Arena* arena) {
2345 return Arena::CreateMessageInternal< ::perfetto::protos::TriggerRule_RepeatingInterval >(arena);
2346 }
2347 template<> PROTOBUF_NOINLINE ::perfetto::protos::TriggerRule*
CreateMaybeMessage(Arena * arena)2348 Arena::CreateMaybeMessage< ::perfetto::protos::TriggerRule >(Arena* arena) {
2349 return Arena::CreateMessageInternal< ::perfetto::protos::TriggerRule >(arena);
2350 }
2351 template<> PROTOBUF_NOINLINE ::perfetto::protos::NestedScenarioConfig*
CreateMaybeMessage(Arena * arena)2352 Arena::CreateMaybeMessage< ::perfetto::protos::NestedScenarioConfig >(Arena* arena) {
2353 return Arena::CreateMessageInternal< ::perfetto::protos::NestedScenarioConfig >(arena);
2354 }
2355 template<> PROTOBUF_NOINLINE ::perfetto::protos::ScenarioConfig*
CreateMaybeMessage(Arena * arena)2356 Arena::CreateMaybeMessage< ::perfetto::protos::ScenarioConfig >(Arena* arena) {
2357 return Arena::CreateMessageInternal< ::perfetto::protos::ScenarioConfig >(arena);
2358 }
2359 template<> PROTOBUF_NOINLINE ::perfetto::protos::ChromeFieldTracingConfig*
CreateMaybeMessage(Arena * arena)2360 Arena::CreateMaybeMessage< ::perfetto::protos::ChromeFieldTracingConfig >(Arena* arena) {
2361 return Arena::CreateMessageInternal< ::perfetto::protos::ChromeFieldTracingConfig >(arena);
2362 }
2363 template<> PROTOBUF_NOINLINE ::perfetto::protos::TracingTriggerRulesConfig*
CreateMaybeMessage(Arena * arena)2364 Arena::CreateMaybeMessage< ::perfetto::protos::TracingTriggerRulesConfig >(Arena* arena) {
2365 return Arena::CreateMessageInternal< ::perfetto::protos::TracingTriggerRulesConfig >(arena);
2366 }
2367 PROTOBUF_NAMESPACE_CLOSE
2368
2369 // @@protoc_insertion_point(global_scope)
2370 #include <google/protobuf/port_undef.inc>
2371