1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: structured_data.proto
3 
4 #include "structured_data.pb.h"
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14 
15 PROTOBUF_PRAGMA_INIT_SEG
16 
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19 
20 namespace metrics {
StructuredEventProto_Metric_RepeatedInt64(::_pbi::ConstantInitialized)21 PROTOBUF_CONSTEXPR StructuredEventProto_Metric_RepeatedInt64::StructuredEventProto_Metric_RepeatedInt64(
22     ::_pbi::ConstantInitialized): _impl_{
23     /*decltype(_impl_.values_)*/{}
24   , /*decltype(_impl_._values_cached_byte_size_)*/{0}
25   , /*decltype(_impl_._cached_size_)*/{}} {}
26 struct StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal {
StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternalmetrics::StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal27   PROTOBUF_CONSTEXPR StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal()
28       : _instance(::_pbi::ConstantInitialized{}) {}
~StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternalmetrics::StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal29   ~StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal() {}
30   union {
31     StructuredEventProto_Metric_RepeatedInt64 _instance;
32   };
33 };
34 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructuredEventProto_Metric_RepeatedInt64DefaultTypeInternal _StructuredEventProto_Metric_RepeatedInt64_default_instance_;
StructuredEventProto_Metric(::_pbi::ConstantInitialized)35 PROTOBUF_CONSTEXPR StructuredEventProto_Metric::StructuredEventProto_Metric(
36     ::_pbi::ConstantInitialized): _impl_{
37     /*decltype(_impl_._has_bits_)*/{}
38   , /*decltype(_impl_._cached_size_)*/{}
39   , /*decltype(_impl_.name_hash_)*/uint64_t{0u}
40   , /*decltype(_impl_.value_)*/{}
41   , /*decltype(_impl_._oneof_case_)*/{}} {}
42 struct StructuredEventProto_MetricDefaultTypeInternal {
StructuredEventProto_MetricDefaultTypeInternalmetrics::StructuredEventProto_MetricDefaultTypeInternal43   PROTOBUF_CONSTEXPR StructuredEventProto_MetricDefaultTypeInternal()
44       : _instance(::_pbi::ConstantInitialized{}) {}
~StructuredEventProto_MetricDefaultTypeInternalmetrics::StructuredEventProto_MetricDefaultTypeInternal45   ~StructuredEventProto_MetricDefaultTypeInternal() {}
46   union {
47     StructuredEventProto_Metric _instance;
48   };
49 };
50 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructuredEventProto_MetricDefaultTypeInternal _StructuredEventProto_Metric_default_instance_;
StructuredEventProto_EventSequenceMetadata(::_pbi::ConstantInitialized)51 PROTOBUF_CONSTEXPR StructuredEventProto_EventSequenceMetadata::StructuredEventProto_EventSequenceMetadata(
52     ::_pbi::ConstantInitialized): _impl_{
53     /*decltype(_impl_._has_bits_)*/{}
54   , /*decltype(_impl_._cached_size_)*/{}
55   , /*decltype(_impl_.event_unique_id_)*/uint64_t{0u}
56   , /*decltype(_impl_.system_uptime_)*/int64_t{0}
57   , /*decltype(_impl_.reset_counter_)*/int64_t{0}
58   , /*decltype(_impl_.client_id_rotation_weeks_)*/0u
59   , /*decltype(_impl_.primary_user_segment_)*/0} {}
60 struct StructuredEventProto_EventSequenceMetadataDefaultTypeInternal {
StructuredEventProto_EventSequenceMetadataDefaultTypeInternalmetrics::StructuredEventProto_EventSequenceMetadataDefaultTypeInternal61   PROTOBUF_CONSTEXPR StructuredEventProto_EventSequenceMetadataDefaultTypeInternal()
62       : _instance(::_pbi::ConstantInitialized{}) {}
~StructuredEventProto_EventSequenceMetadataDefaultTypeInternalmetrics::StructuredEventProto_EventSequenceMetadataDefaultTypeInternal63   ~StructuredEventProto_EventSequenceMetadataDefaultTypeInternal() {}
64   union {
65     StructuredEventProto_EventSequenceMetadata _instance;
66   };
67 };
68 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructuredEventProto_EventSequenceMetadataDefaultTypeInternal _StructuredEventProto_EventSequenceMetadata_default_instance_;
StructuredEventProto(::_pbi::ConstantInitialized)69 PROTOBUF_CONSTEXPR StructuredEventProto::StructuredEventProto(
70     ::_pbi::ConstantInitialized): _impl_{
71     /*decltype(_impl_._has_bits_)*/{}
72   , /*decltype(_impl_._cached_size_)*/{}
73   , /*decltype(_impl_.metrics_)*/{}
74   , /*decltype(_impl_.event_sequence_metadata_)*/nullptr
75   , /*decltype(_impl_.profile_event_id_)*/uint64_t{0u}
76   , /*decltype(_impl_.event_name_hash_)*/uint64_t{0u}
77   , /*decltype(_impl_.project_name_hash_)*/uint64_t{0u}
78   , /*decltype(_impl_.user_project_id_)*/uint64_t{0u}
79   , /*decltype(_impl_.device_project_id_)*/uint64_t{0u}
80   , /*decltype(_impl_.event_type_)*/0} {}
81 struct StructuredEventProtoDefaultTypeInternal {
StructuredEventProtoDefaultTypeInternalmetrics::StructuredEventProtoDefaultTypeInternal82   PROTOBUF_CONSTEXPR StructuredEventProtoDefaultTypeInternal()
83       : _instance(::_pbi::ConstantInitialized{}) {}
~StructuredEventProtoDefaultTypeInternalmetrics::StructuredEventProtoDefaultTypeInternal84   ~StructuredEventProtoDefaultTypeInternal() {}
85   union {
86     StructuredEventProto _instance;
87   };
88 };
89 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructuredEventProtoDefaultTypeInternal _StructuredEventProto_default_instance_;
StructuredDataProto(::_pbi::ConstantInitialized)90 PROTOBUF_CONSTEXPR StructuredDataProto::StructuredDataProto(
91     ::_pbi::ConstantInitialized): _impl_{
92     /*decltype(_impl_._has_bits_)*/{}
93   , /*decltype(_impl_._cached_size_)*/{}
94   , /*decltype(_impl_.events_)*/{}
95   , /*decltype(_impl_.is_device_enrolled_)*/false
96   , /*decltype(_impl_.device_segment_)*/0} {}
97 struct StructuredDataProtoDefaultTypeInternal {
StructuredDataProtoDefaultTypeInternalmetrics::StructuredDataProtoDefaultTypeInternal98   PROTOBUF_CONSTEXPR StructuredDataProtoDefaultTypeInternal()
99       : _instance(::_pbi::ConstantInitialized{}) {}
~StructuredDataProtoDefaultTypeInternalmetrics::StructuredDataProtoDefaultTypeInternal100   ~StructuredDataProtoDefaultTypeInternal() {}
101   union {
102     StructuredDataProto _instance;
103   };
104 };
105 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructuredDataProtoDefaultTypeInternal _StructuredDataProto_default_instance_;
106 }  // namespace metrics
107 namespace metrics {
StructuredEventProto_EventType_IsValid(int value)108 bool StructuredEventProto_EventType_IsValid(int value) {
109   switch (value) {
110     case 0:
111     case 1:
112     case 2:
113     case 3:
114       return true;
115     default:
116       return false;
117   }
118 }
119 
120 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> StructuredEventProto_EventType_strings[4] = {};
121 
122 static const char StructuredEventProto_EventType_names[] =
123   "RAW_STRING"
124   "REGULAR"
125   "SEQUENCE"
126   "UNKNOWN";
127 
128 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StructuredEventProto_EventType_entries[] = {
129   { {StructuredEventProto_EventType_names + 0, 10}, 2 },
130   { {StructuredEventProto_EventType_names + 10, 7}, 1 },
131   { {StructuredEventProto_EventType_names + 17, 8}, 3 },
132   { {StructuredEventProto_EventType_names + 25, 7}, 0 },
133 };
134 
135 static const int StructuredEventProto_EventType_entries_by_number[] = {
136   3, // 0 -> UNKNOWN
137   1, // 1 -> REGULAR
138   0, // 2 -> RAW_STRING
139   2, // 3 -> SEQUENCE
140 };
141 
StructuredEventProto_EventType_Name(StructuredEventProto_EventType value)142 const std::string& StructuredEventProto_EventType_Name(
143     StructuredEventProto_EventType value) {
144   static const bool dummy =
145       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
146           StructuredEventProto_EventType_entries,
147           StructuredEventProto_EventType_entries_by_number,
148           4, StructuredEventProto_EventType_strings);
149   (void) dummy;
150   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
151       StructuredEventProto_EventType_entries,
152       StructuredEventProto_EventType_entries_by_number,
153       4, value);
154   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
155                      StructuredEventProto_EventType_strings[idx].get();
156 }
StructuredEventProto_EventType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,StructuredEventProto_EventType * value)157 bool StructuredEventProto_EventType_Parse(
158     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StructuredEventProto_EventType* value) {
159   int int_value;
160   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
161       StructuredEventProto_EventType_entries, 4, name, &int_value);
162   if (success) {
163     *value = static_cast<StructuredEventProto_EventType>(int_value);
164   }
165   return success;
166 }
167 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
168 constexpr StructuredEventProto_EventType StructuredEventProto::UNKNOWN;
169 constexpr StructuredEventProto_EventType StructuredEventProto::REGULAR;
170 constexpr StructuredEventProto_EventType StructuredEventProto::RAW_STRING;
171 constexpr StructuredEventProto_EventType StructuredEventProto::SEQUENCE;
172 constexpr StructuredEventProto_EventType StructuredEventProto::EventType_MIN;
173 constexpr StructuredEventProto_EventType StructuredEventProto::EventType_MAX;
174 constexpr int StructuredEventProto::EventType_ARRAYSIZE;
175 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
StructuredEventProto_PrimaryUserSegment_IsValid(int value)176 bool StructuredEventProto_PrimaryUserSegment_IsValid(int value) {
177   switch (value) {
178     case 0:
179     case 1:
180     case 2:
181     case 3:
182     case 4:
183     case 5:
184     case 6:
185     case 7:
186     case 8:
187       return true;
188     default:
189       return false;
190   }
191 }
192 
193 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> StructuredEventProto_PrimaryUserSegment_strings[9] = {};
194 
195 static const char StructuredEventProto_PrimaryUserSegment_names[] =
196   "DEMO_MODE"
197   "ENTERPRISE_ORGANIZATION"
198   "K12"
199   "KIOS_APP"
200   "MANAGED_GUEST_SESSION"
201   "NON_PROFIT"
202   "UNIVERSITY"
203   "UNKNOWN_PRIMARY_USER_TYPE"
204   "UNMANAGED";
205 
206 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StructuredEventProto_PrimaryUserSegment_entries[] = {
207   { {StructuredEventProto_PrimaryUserSegment_names + 0, 9}, 8 },
208   { {StructuredEventProto_PrimaryUserSegment_names + 9, 23}, 5 },
209   { {StructuredEventProto_PrimaryUserSegment_names + 32, 3}, 2 },
210   { {StructuredEventProto_PrimaryUserSegment_names + 35, 8}, 6 },
211   { {StructuredEventProto_PrimaryUserSegment_names + 43, 21}, 7 },
212   { {StructuredEventProto_PrimaryUserSegment_names + 64, 10}, 4 },
213   { {StructuredEventProto_PrimaryUserSegment_names + 74, 10}, 3 },
214   { {StructuredEventProto_PrimaryUserSegment_names + 84, 25}, 0 },
215   { {StructuredEventProto_PrimaryUserSegment_names + 109, 9}, 1 },
216 };
217 
218 static const int StructuredEventProto_PrimaryUserSegment_entries_by_number[] = {
219   7, // 0 -> UNKNOWN_PRIMARY_USER_TYPE
220   8, // 1 -> UNMANAGED
221   2, // 2 -> K12
222   6, // 3 -> UNIVERSITY
223   5, // 4 -> NON_PROFIT
224   1, // 5 -> ENTERPRISE_ORGANIZATION
225   3, // 6 -> KIOS_APP
226   4, // 7 -> MANAGED_GUEST_SESSION
227   0, // 8 -> DEMO_MODE
228 };
229 
StructuredEventProto_PrimaryUserSegment_Name(StructuredEventProto_PrimaryUserSegment value)230 const std::string& StructuredEventProto_PrimaryUserSegment_Name(
231     StructuredEventProto_PrimaryUserSegment value) {
232   static const bool dummy =
233       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
234           StructuredEventProto_PrimaryUserSegment_entries,
235           StructuredEventProto_PrimaryUserSegment_entries_by_number,
236           9, StructuredEventProto_PrimaryUserSegment_strings);
237   (void) dummy;
238   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
239       StructuredEventProto_PrimaryUserSegment_entries,
240       StructuredEventProto_PrimaryUserSegment_entries_by_number,
241       9, value);
242   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
243                      StructuredEventProto_PrimaryUserSegment_strings[idx].get();
244 }
StructuredEventProto_PrimaryUserSegment_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,StructuredEventProto_PrimaryUserSegment * value)245 bool StructuredEventProto_PrimaryUserSegment_Parse(
246     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StructuredEventProto_PrimaryUserSegment* value) {
247   int int_value;
248   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
249       StructuredEventProto_PrimaryUserSegment_entries, 9, name, &int_value);
250   if (success) {
251     *value = static_cast<StructuredEventProto_PrimaryUserSegment>(int_value);
252   }
253   return success;
254 }
255 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
256 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::UNKNOWN_PRIMARY_USER_TYPE;
257 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::UNMANAGED;
258 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::K12;
259 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::UNIVERSITY;
260 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::NON_PROFIT;
261 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::ENTERPRISE_ORGANIZATION;
262 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::KIOS_APP;
263 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::MANAGED_GUEST_SESSION;
264 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::DEMO_MODE;
265 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::PrimaryUserSegment_MIN;
266 constexpr StructuredEventProto_PrimaryUserSegment StructuredEventProto::PrimaryUserSegment_MAX;
267 constexpr int StructuredEventProto::PrimaryUserSegment_ARRAYSIZE;
268 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
StructuredDataProto_DeviceSegment_IsValid(int value)269 bool StructuredDataProto_DeviceSegment_IsValid(int value) {
270   switch (value) {
271     case 0:
272     case 1:
273     case 2:
274     case 3:
275       return true;
276     default:
277       return false;
278   }
279 }
280 
281 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> StructuredDataProto_DeviceSegment_strings[4] = {};
282 
283 static const char StructuredDataProto_DeviceSegment_names[] =
284   "CONSUMER"
285   "EDUCATION"
286   "ENTERPRISE"
287   "UNKNOWN";
288 
289 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StructuredDataProto_DeviceSegment_entries[] = {
290   { {StructuredDataProto_DeviceSegment_names + 0, 8}, 1 },
291   { {StructuredDataProto_DeviceSegment_names + 8, 9}, 2 },
292   { {StructuredDataProto_DeviceSegment_names + 17, 10}, 3 },
293   { {StructuredDataProto_DeviceSegment_names + 27, 7}, 0 },
294 };
295 
296 static const int StructuredDataProto_DeviceSegment_entries_by_number[] = {
297   3, // 0 -> UNKNOWN
298   0, // 1 -> CONSUMER
299   1, // 2 -> EDUCATION
300   2, // 3 -> ENTERPRISE
301 };
302 
StructuredDataProto_DeviceSegment_Name(StructuredDataProto_DeviceSegment value)303 const std::string& StructuredDataProto_DeviceSegment_Name(
304     StructuredDataProto_DeviceSegment value) {
305   static const bool dummy =
306       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
307           StructuredDataProto_DeviceSegment_entries,
308           StructuredDataProto_DeviceSegment_entries_by_number,
309           4, StructuredDataProto_DeviceSegment_strings);
310   (void) dummy;
311   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
312       StructuredDataProto_DeviceSegment_entries,
313       StructuredDataProto_DeviceSegment_entries_by_number,
314       4, value);
315   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
316                      StructuredDataProto_DeviceSegment_strings[idx].get();
317 }
StructuredDataProto_DeviceSegment_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,StructuredDataProto_DeviceSegment * value)318 bool StructuredDataProto_DeviceSegment_Parse(
319     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, StructuredDataProto_DeviceSegment* value) {
320   int int_value;
321   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
322       StructuredDataProto_DeviceSegment_entries, 4, name, &int_value);
323   if (success) {
324     *value = static_cast<StructuredDataProto_DeviceSegment>(int_value);
325   }
326   return success;
327 }
328 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
329 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::UNKNOWN;
330 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::CONSUMER;
331 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::EDUCATION;
332 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::ENTERPRISE;
333 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::DeviceSegment_MIN;
334 constexpr StructuredDataProto_DeviceSegment StructuredDataProto::DeviceSegment_MAX;
335 constexpr int StructuredDataProto::DeviceSegment_ARRAYSIZE;
336 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
337 
338 // ===================================================================
339 
340 class StructuredEventProto_Metric_RepeatedInt64::_Internal {
341  public:
342 };
343 
StructuredEventProto_Metric_RepeatedInt64(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)344 StructuredEventProto_Metric_RepeatedInt64::StructuredEventProto_Metric_RepeatedInt64(::PROTOBUF_NAMESPACE_ID::Arena* arena,
345                          bool is_message_owned)
346   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
347   SharedCtor(arena, is_message_owned);
348   // @@protoc_insertion_point(arena_constructor:metrics.StructuredEventProto.Metric.RepeatedInt64)
349 }
StructuredEventProto_Metric_RepeatedInt64(const StructuredEventProto_Metric_RepeatedInt64 & from)350 StructuredEventProto_Metric_RepeatedInt64::StructuredEventProto_Metric_RepeatedInt64(const StructuredEventProto_Metric_RepeatedInt64& from)
351   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
352   StructuredEventProto_Metric_RepeatedInt64* const _this = this; (void)_this;
353   new (&_impl_) Impl_{
354       decltype(_impl_.values_){from._impl_.values_}
355     , /*decltype(_impl_._values_cached_byte_size_)*/{0}
356     , /*decltype(_impl_._cached_size_)*/{}};
357 
358   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
359   // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto.Metric.RepeatedInt64)
360 }
361 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)362 inline void StructuredEventProto_Metric_RepeatedInt64::SharedCtor(
363     ::_pb::Arena* arena, bool is_message_owned) {
364   (void)arena;
365   (void)is_message_owned;
366   new (&_impl_) Impl_{
367       decltype(_impl_.values_){arena}
368     , /*decltype(_impl_._values_cached_byte_size_)*/{0}
369     , /*decltype(_impl_._cached_size_)*/{}
370   };
371 }
372 
~StructuredEventProto_Metric_RepeatedInt64()373 StructuredEventProto_Metric_RepeatedInt64::~StructuredEventProto_Metric_RepeatedInt64() {
374   // @@protoc_insertion_point(destructor:metrics.StructuredEventProto.Metric.RepeatedInt64)
375   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
376   (void)arena;
377     return;
378   }
379   SharedDtor();
380 }
381 
SharedDtor()382 inline void StructuredEventProto_Metric_RepeatedInt64::SharedDtor() {
383   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
384   _impl_.values_.~RepeatedField();
385 }
386 
SetCachedSize(int size) const387 void StructuredEventProto_Metric_RepeatedInt64::SetCachedSize(int size) const {
388   _impl_._cached_size_.Set(size);
389 }
390 
Clear()391 void StructuredEventProto_Metric_RepeatedInt64::Clear() {
392 // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto.Metric.RepeatedInt64)
393   uint32_t cached_has_bits = 0;
394   // Prevent compiler warnings about cached_has_bits being unused
395   (void) cached_has_bits;
396 
397   _impl_.values_.Clear();
398   _internal_metadata_.Clear<std::string>();
399 }
400 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)401 const char* StructuredEventProto_Metric_RepeatedInt64::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
402 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
403   while (!ctx->Done(&ptr)) {
404     uint32_t tag;
405     ptr = ::_pbi::ReadTag(ptr, &tag);
406     switch (tag >> 3) {
407       // repeated int64 values = 1 [packed = true];
408       case 1:
409         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
410           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_values(), ptr, ctx);
411           CHK_(ptr);
412         } else if (static_cast<uint8_t>(tag) == 8) {
413           _internal_add_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
414           CHK_(ptr);
415         } else
416           goto handle_unusual;
417         continue;
418       default:
419         goto handle_unusual;
420     }  // switch
421   handle_unusual:
422     if ((tag == 0) || ((tag & 7) == 4)) {
423       CHK_(ptr);
424       ctx->SetLastTag(tag);
425       goto message_done;
426     }
427     ptr = UnknownFieldParse(
428         tag,
429         _internal_metadata_.mutable_unknown_fields<std::string>(),
430         ptr, ctx);
431     CHK_(ptr != nullptr);
432   }  // while
433 message_done:
434   return ptr;
435 failure:
436   ptr = nullptr;
437   goto message_done;
438 #undef CHK_
439 }
440 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const441 uint8_t* StructuredEventProto_Metric_RepeatedInt64::_InternalSerialize(
442     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
443   // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto.Metric.RepeatedInt64)
444   uint32_t cached_has_bits = 0;
445   (void) cached_has_bits;
446 
447   // repeated int64 values = 1 [packed = true];
448   {
449     int byte_size = _impl_._values_cached_byte_size_.load(std::memory_order_relaxed);
450     if (byte_size > 0) {
451       target = stream->WriteInt64Packed(
452           1, _internal_values(), byte_size, target);
453     }
454   }
455 
456   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
457     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
458         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
459   }
460   // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto.Metric.RepeatedInt64)
461   return target;
462 }
463 
ByteSizeLong() const464 size_t StructuredEventProto_Metric_RepeatedInt64::ByteSizeLong() const {
465 // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto.Metric.RepeatedInt64)
466   size_t total_size = 0;
467 
468   uint32_t cached_has_bits = 0;
469   // Prevent compiler warnings about cached_has_bits being unused
470   (void) cached_has_bits;
471 
472   // repeated int64 values = 1 [packed = true];
473   {
474     size_t data_size = ::_pbi::WireFormatLite::
475       Int64Size(this->_impl_.values_);
476     if (data_size > 0) {
477       total_size += 1 +
478         ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
479     }
480     int cached_size = ::_pbi::ToCachedSize(data_size);
481     _impl_._values_cached_byte_size_.store(cached_size,
482                                     std::memory_order_relaxed);
483     total_size += data_size;
484   }
485 
486   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
487     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
488   }
489   int cached_size = ::_pbi::ToCachedSize(total_size);
490   SetCachedSize(cached_size);
491   return total_size;
492 }
493 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)494 void StructuredEventProto_Metric_RepeatedInt64::CheckTypeAndMergeFrom(
495     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
496   MergeFrom(*::_pbi::DownCast<const StructuredEventProto_Metric_RepeatedInt64*>(
497       &from));
498 }
499 
MergeFrom(const StructuredEventProto_Metric_RepeatedInt64 & from)500 void StructuredEventProto_Metric_RepeatedInt64::MergeFrom(const StructuredEventProto_Metric_RepeatedInt64& from) {
501   StructuredEventProto_Metric_RepeatedInt64* const _this = this;
502   // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto.Metric.RepeatedInt64)
503   GOOGLE_DCHECK_NE(&from, _this);
504   uint32_t cached_has_bits = 0;
505   (void) cached_has_bits;
506 
507   _this->_impl_.values_.MergeFrom(from._impl_.values_);
508   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
509 }
510 
CopyFrom(const StructuredEventProto_Metric_RepeatedInt64 & from)511 void StructuredEventProto_Metric_RepeatedInt64::CopyFrom(const StructuredEventProto_Metric_RepeatedInt64& from) {
512 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto.Metric.RepeatedInt64)
513   if (&from == this) return;
514   Clear();
515   MergeFrom(from);
516 }
517 
IsInitialized() const518 bool StructuredEventProto_Metric_RepeatedInt64::IsInitialized() const {
519   return true;
520 }
521 
InternalSwap(StructuredEventProto_Metric_RepeatedInt64 * other)522 void StructuredEventProto_Metric_RepeatedInt64::InternalSwap(StructuredEventProto_Metric_RepeatedInt64* other) {
523   using std::swap;
524   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
525   _impl_.values_.InternalSwap(&other->_impl_.values_);
526 }
527 
GetTypeName() const528 std::string StructuredEventProto_Metric_RepeatedInt64::GetTypeName() const {
529   return "metrics.StructuredEventProto.Metric.RepeatedInt64";
530 }
531 
532 
533 // ===================================================================
534 
535 class StructuredEventProto_Metric::_Internal {
536  public:
537   using HasBits = decltype(std::declval<StructuredEventProto_Metric>()._impl_._has_bits_);
set_has_name_hash(HasBits * has_bits)538   static void set_has_name_hash(HasBits* has_bits) {
539     (*has_bits)[0] |= 1u;
540   }
541   static const ::metrics::StructuredEventProto_Metric_RepeatedInt64& value_repeated_int64(const StructuredEventProto_Metric* msg);
542 };
543 
544 const ::metrics::StructuredEventProto_Metric_RepeatedInt64&
value_repeated_int64(const StructuredEventProto_Metric * msg)545 StructuredEventProto_Metric::_Internal::value_repeated_int64(const StructuredEventProto_Metric* msg) {
546   return *msg->_impl_.value_.value_repeated_int64_;
547 }
set_allocated_value_repeated_int64(::metrics::StructuredEventProto_Metric_RepeatedInt64 * value_repeated_int64)548 void StructuredEventProto_Metric::set_allocated_value_repeated_int64(::metrics::StructuredEventProto_Metric_RepeatedInt64* value_repeated_int64) {
549   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
550   clear_value();
551   if (value_repeated_int64) {
552     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
553       ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(value_repeated_int64);
554     if (message_arena != submessage_arena) {
555       value_repeated_int64 = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
556           message_arena, value_repeated_int64, submessage_arena);
557     }
558     set_has_value_repeated_int64();
559     _impl_.value_.value_repeated_int64_ = value_repeated_int64;
560   }
561   // @@protoc_insertion_point(field_set_allocated:metrics.StructuredEventProto.Metric.value_repeated_int64)
562 }
StructuredEventProto_Metric(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)563 StructuredEventProto_Metric::StructuredEventProto_Metric(::PROTOBUF_NAMESPACE_ID::Arena* arena,
564                          bool is_message_owned)
565   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
566   SharedCtor(arena, is_message_owned);
567   // @@protoc_insertion_point(arena_constructor:metrics.StructuredEventProto.Metric)
568 }
StructuredEventProto_Metric(const StructuredEventProto_Metric & from)569 StructuredEventProto_Metric::StructuredEventProto_Metric(const StructuredEventProto_Metric& from)
570   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
571   StructuredEventProto_Metric* const _this = this; (void)_this;
572   new (&_impl_) Impl_{
573       decltype(_impl_._has_bits_){from._impl_._has_bits_}
574     , /*decltype(_impl_._cached_size_)*/{}
575     , decltype(_impl_.name_hash_){}
576     , decltype(_impl_.value_){}
577     , /*decltype(_impl_._oneof_case_)*/{}};
578 
579   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
580   _this->_impl_.name_hash_ = from._impl_.name_hash_;
581   clear_has_value();
582   switch (from.value_case()) {
583     case kValueHmac: {
584       _this->_internal_set_value_hmac(from._internal_value_hmac());
585       break;
586     }
587     case kValueInt64: {
588       _this->_internal_set_value_int64(from._internal_value_int64());
589       break;
590     }
591     case kValueString: {
592       _this->_internal_set_value_string(from._internal_value_string());
593       break;
594     }
595     case kValueDouble: {
596       _this->_internal_set_value_double(from._internal_value_double());
597       break;
598     }
599     case kValueRepeatedInt64: {
600       _this->_internal_mutable_value_repeated_int64()->::metrics::StructuredEventProto_Metric_RepeatedInt64::MergeFrom(
601           from._internal_value_repeated_int64());
602       break;
603     }
604     case VALUE_NOT_SET: {
605       break;
606     }
607   }
608   // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto.Metric)
609 }
610 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)611 inline void StructuredEventProto_Metric::SharedCtor(
612     ::_pb::Arena* arena, bool is_message_owned) {
613   (void)arena;
614   (void)is_message_owned;
615   new (&_impl_) Impl_{
616       decltype(_impl_._has_bits_){}
617     , /*decltype(_impl_._cached_size_)*/{}
618     , decltype(_impl_.name_hash_){uint64_t{0u}}
619     , decltype(_impl_.value_){}
620     , /*decltype(_impl_._oneof_case_)*/{}
621   };
622   clear_has_value();
623 }
624 
~StructuredEventProto_Metric()625 StructuredEventProto_Metric::~StructuredEventProto_Metric() {
626   // @@protoc_insertion_point(destructor:metrics.StructuredEventProto.Metric)
627   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
628   (void)arena;
629     return;
630   }
631   SharedDtor();
632 }
633 
SharedDtor()634 inline void StructuredEventProto_Metric::SharedDtor() {
635   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
636   if (has_value()) {
637     clear_value();
638   }
639 }
640 
SetCachedSize(int size) const641 void StructuredEventProto_Metric::SetCachedSize(int size) const {
642   _impl_._cached_size_.Set(size);
643 }
644 
clear_value()645 void StructuredEventProto_Metric::clear_value() {
646 // @@protoc_insertion_point(one_of_clear_start:metrics.StructuredEventProto.Metric)
647   switch (value_case()) {
648     case kValueHmac: {
649       // No need to clear
650       break;
651     }
652     case kValueInt64: {
653       // No need to clear
654       break;
655     }
656     case kValueString: {
657       _impl_.value_.value_string_.Destroy();
658       break;
659     }
660     case kValueDouble: {
661       // No need to clear
662       break;
663     }
664     case kValueRepeatedInt64: {
665       if (GetArenaForAllocation() == nullptr) {
666         delete _impl_.value_.value_repeated_int64_;
667       }
668       break;
669     }
670     case VALUE_NOT_SET: {
671       break;
672     }
673   }
674   _impl_._oneof_case_[0] = VALUE_NOT_SET;
675 }
676 
677 
Clear()678 void StructuredEventProto_Metric::Clear() {
679 // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto.Metric)
680   uint32_t cached_has_bits = 0;
681   // Prevent compiler warnings about cached_has_bits being unused
682   (void) cached_has_bits;
683 
684   _impl_.name_hash_ = uint64_t{0u};
685   clear_value();
686   _impl_._has_bits_.Clear();
687   _internal_metadata_.Clear<std::string>();
688 }
689 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)690 const char* StructuredEventProto_Metric::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
691 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
692   _Internal::HasBits has_bits{};
693   while (!ctx->Done(&ptr)) {
694     uint32_t tag;
695     ptr = ::_pbi::ReadTag(ptr, &tag);
696     switch (tag >> 3) {
697       // optional fixed64 name_hash = 1;
698       case 1:
699         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
700           _Internal::set_has_name_hash(&has_bits);
701           _impl_.name_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
702           ptr += sizeof(uint64_t);
703         } else
704           goto handle_unusual;
705         continue;
706       // fixed64 value_hmac = 2;
707       case 2:
708         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
709           _internal_set_value_hmac(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr));
710           ptr += sizeof(uint64_t);
711         } else
712           goto handle_unusual;
713         continue;
714       // int64 value_int64 = 3;
715       case 3:
716         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
717           _internal_set_value_int64(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
718           CHK_(ptr);
719         } else
720           goto handle_unusual;
721         continue;
722       // string value_string = 4;
723       case 4:
724         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
725           auto str = _internal_mutable_value_string();
726           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
727           CHK_(ptr);
728         } else
729           goto handle_unusual;
730         continue;
731       // double value_double = 5;
732       case 5:
733         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 41)) {
734           _internal_set_value_double(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
735           ptr += sizeof(double);
736         } else
737           goto handle_unusual;
738         continue;
739       // .metrics.StructuredEventProto.Metric.RepeatedInt64 value_repeated_int64 = 6;
740       case 6:
741         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
742           ptr = ctx->ParseMessage(_internal_mutable_value_repeated_int64(), ptr);
743           CHK_(ptr);
744         } else
745           goto handle_unusual;
746         continue;
747       default:
748         goto handle_unusual;
749     }  // switch
750   handle_unusual:
751     if ((tag == 0) || ((tag & 7) == 4)) {
752       CHK_(ptr);
753       ctx->SetLastTag(tag);
754       goto message_done;
755     }
756     ptr = UnknownFieldParse(
757         tag,
758         _internal_metadata_.mutable_unknown_fields<std::string>(),
759         ptr, ctx);
760     CHK_(ptr != nullptr);
761   }  // while
762 message_done:
763   _impl_._has_bits_.Or(has_bits);
764   return ptr;
765 failure:
766   ptr = nullptr;
767   goto message_done;
768 #undef CHK_
769 }
770 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const771 uint8_t* StructuredEventProto_Metric::_InternalSerialize(
772     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
773   // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto.Metric)
774   uint32_t cached_has_bits = 0;
775   (void) cached_has_bits;
776 
777   cached_has_bits = _impl_._has_bits_[0];
778   // optional fixed64 name_hash = 1;
779   if (cached_has_bits & 0x00000001u) {
780     target = stream->EnsureSpace(target);
781     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(1, this->_internal_name_hash(), target);
782   }
783 
784   switch (value_case()) {
785     case kValueHmac: {
786       target = stream->EnsureSpace(target);
787       target = ::_pbi::WireFormatLite::WriteFixed64ToArray(2, this->_internal_value_hmac(), target);
788       break;
789     }
790     case kValueInt64: {
791       target = stream->EnsureSpace(target);
792       target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_value_int64(), target);
793       break;
794     }
795     case kValueString: {
796       target = stream->WriteStringMaybeAliased(
797           4, this->_internal_value_string(), target);
798       break;
799     }
800     case kValueDouble: {
801       target = stream->EnsureSpace(target);
802       target = ::_pbi::WireFormatLite::WriteDoubleToArray(5, this->_internal_value_double(), target);
803       break;
804     }
805     case kValueRepeatedInt64: {
806       target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
807         InternalWriteMessage(6, _Internal::value_repeated_int64(this),
808           _Internal::value_repeated_int64(this).GetCachedSize(), target, stream);
809       break;
810     }
811     default: ;
812   }
813   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
814     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
815         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
816   }
817   // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto.Metric)
818   return target;
819 }
820 
ByteSizeLong() const821 size_t StructuredEventProto_Metric::ByteSizeLong() const {
822 // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto.Metric)
823   size_t total_size = 0;
824 
825   uint32_t cached_has_bits = 0;
826   // Prevent compiler warnings about cached_has_bits being unused
827   (void) cached_has_bits;
828 
829   // optional fixed64 name_hash = 1;
830   cached_has_bits = _impl_._has_bits_[0];
831   if (cached_has_bits & 0x00000001u) {
832     total_size += 1 + 8;
833   }
834 
835   switch (value_case()) {
836     // fixed64 value_hmac = 2;
837     case kValueHmac: {
838       total_size += 1 + 8;
839       break;
840     }
841     // int64 value_int64 = 3;
842     case kValueInt64: {
843       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_value_int64());
844       break;
845     }
846     // string value_string = 4;
847     case kValueString: {
848       total_size += 1 +
849         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
850           this->_internal_value_string());
851       break;
852     }
853     // double value_double = 5;
854     case kValueDouble: {
855       total_size += 1 + 8;
856       break;
857     }
858     // .metrics.StructuredEventProto.Metric.RepeatedInt64 value_repeated_int64 = 6;
859     case kValueRepeatedInt64: {
860       total_size += 1 +
861         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
862           *_impl_.value_.value_repeated_int64_);
863       break;
864     }
865     case VALUE_NOT_SET: {
866       break;
867     }
868   }
869   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
870     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
871   }
872   int cached_size = ::_pbi::ToCachedSize(total_size);
873   SetCachedSize(cached_size);
874   return total_size;
875 }
876 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)877 void StructuredEventProto_Metric::CheckTypeAndMergeFrom(
878     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
879   MergeFrom(*::_pbi::DownCast<const StructuredEventProto_Metric*>(
880       &from));
881 }
882 
MergeFrom(const StructuredEventProto_Metric & from)883 void StructuredEventProto_Metric::MergeFrom(const StructuredEventProto_Metric& from) {
884   StructuredEventProto_Metric* const _this = this;
885   // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto.Metric)
886   GOOGLE_DCHECK_NE(&from, _this);
887   uint32_t cached_has_bits = 0;
888   (void) cached_has_bits;
889 
890   if (from._internal_has_name_hash()) {
891     _this->_internal_set_name_hash(from._internal_name_hash());
892   }
893   switch (from.value_case()) {
894     case kValueHmac: {
895       _this->_internal_set_value_hmac(from._internal_value_hmac());
896       break;
897     }
898     case kValueInt64: {
899       _this->_internal_set_value_int64(from._internal_value_int64());
900       break;
901     }
902     case kValueString: {
903       _this->_internal_set_value_string(from._internal_value_string());
904       break;
905     }
906     case kValueDouble: {
907       _this->_internal_set_value_double(from._internal_value_double());
908       break;
909     }
910     case kValueRepeatedInt64: {
911       _this->_internal_mutable_value_repeated_int64()->::metrics::StructuredEventProto_Metric_RepeatedInt64::MergeFrom(
912           from._internal_value_repeated_int64());
913       break;
914     }
915     case VALUE_NOT_SET: {
916       break;
917     }
918   }
919   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
920 }
921 
CopyFrom(const StructuredEventProto_Metric & from)922 void StructuredEventProto_Metric::CopyFrom(const StructuredEventProto_Metric& from) {
923 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto.Metric)
924   if (&from == this) return;
925   Clear();
926   MergeFrom(from);
927 }
928 
IsInitialized() const929 bool StructuredEventProto_Metric::IsInitialized() const {
930   return true;
931 }
932 
InternalSwap(StructuredEventProto_Metric * other)933 void StructuredEventProto_Metric::InternalSwap(StructuredEventProto_Metric* other) {
934   using std::swap;
935   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
936   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
937   swap(_impl_.name_hash_, other->_impl_.name_hash_);
938   swap(_impl_.value_, other->_impl_.value_);
939   swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
940 }
941 
GetTypeName() const942 std::string StructuredEventProto_Metric::GetTypeName() const {
943   return "metrics.StructuredEventProto.Metric";
944 }
945 
946 
947 // ===================================================================
948 
949 class StructuredEventProto_EventSequenceMetadata::_Internal {
950  public:
951   using HasBits = decltype(std::declval<StructuredEventProto_EventSequenceMetadata>()._impl_._has_bits_);
set_has_event_unique_id(HasBits * has_bits)952   static void set_has_event_unique_id(HasBits* has_bits) {
953     (*has_bits)[0] |= 1u;
954   }
set_has_system_uptime(HasBits * has_bits)955   static void set_has_system_uptime(HasBits* has_bits) {
956     (*has_bits)[0] |= 2u;
957   }
set_has_reset_counter(HasBits * has_bits)958   static void set_has_reset_counter(HasBits* has_bits) {
959     (*has_bits)[0] |= 4u;
960   }
set_has_client_id_rotation_weeks(HasBits * has_bits)961   static void set_has_client_id_rotation_weeks(HasBits* has_bits) {
962     (*has_bits)[0] |= 8u;
963   }
set_has_primary_user_segment(HasBits * has_bits)964   static void set_has_primary_user_segment(HasBits* has_bits) {
965     (*has_bits)[0] |= 16u;
966   }
967 };
968 
StructuredEventProto_EventSequenceMetadata(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)969 StructuredEventProto_EventSequenceMetadata::StructuredEventProto_EventSequenceMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
970                          bool is_message_owned)
971   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
972   SharedCtor(arena, is_message_owned);
973   // @@protoc_insertion_point(arena_constructor:metrics.StructuredEventProto.EventSequenceMetadata)
974 }
StructuredEventProto_EventSequenceMetadata(const StructuredEventProto_EventSequenceMetadata & from)975 StructuredEventProto_EventSequenceMetadata::StructuredEventProto_EventSequenceMetadata(const StructuredEventProto_EventSequenceMetadata& from)
976   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
977   StructuredEventProto_EventSequenceMetadata* const _this = this; (void)_this;
978   new (&_impl_) Impl_{
979       decltype(_impl_._has_bits_){from._impl_._has_bits_}
980     , /*decltype(_impl_._cached_size_)*/{}
981     , decltype(_impl_.event_unique_id_){}
982     , decltype(_impl_.system_uptime_){}
983     , decltype(_impl_.reset_counter_){}
984     , decltype(_impl_.client_id_rotation_weeks_){}
985     , decltype(_impl_.primary_user_segment_){}};
986 
987   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
988   ::memcpy(&_impl_.event_unique_id_, &from._impl_.event_unique_id_,
989     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.primary_user_segment_) -
990     reinterpret_cast<char*>(&_impl_.event_unique_id_)) + sizeof(_impl_.primary_user_segment_));
991   // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto.EventSequenceMetadata)
992 }
993 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)994 inline void StructuredEventProto_EventSequenceMetadata::SharedCtor(
995     ::_pb::Arena* arena, bool is_message_owned) {
996   (void)arena;
997   (void)is_message_owned;
998   new (&_impl_) Impl_{
999       decltype(_impl_._has_bits_){}
1000     , /*decltype(_impl_._cached_size_)*/{}
1001     , decltype(_impl_.event_unique_id_){uint64_t{0u}}
1002     , decltype(_impl_.system_uptime_){int64_t{0}}
1003     , decltype(_impl_.reset_counter_){int64_t{0}}
1004     , decltype(_impl_.client_id_rotation_weeks_){0u}
1005     , decltype(_impl_.primary_user_segment_){0}
1006   };
1007 }
1008 
~StructuredEventProto_EventSequenceMetadata()1009 StructuredEventProto_EventSequenceMetadata::~StructuredEventProto_EventSequenceMetadata() {
1010   // @@protoc_insertion_point(destructor:metrics.StructuredEventProto.EventSequenceMetadata)
1011   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1012   (void)arena;
1013     return;
1014   }
1015   SharedDtor();
1016 }
1017 
SharedDtor()1018 inline void StructuredEventProto_EventSequenceMetadata::SharedDtor() {
1019   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1020 }
1021 
SetCachedSize(int size) const1022 void StructuredEventProto_EventSequenceMetadata::SetCachedSize(int size) const {
1023   _impl_._cached_size_.Set(size);
1024 }
1025 
Clear()1026 void StructuredEventProto_EventSequenceMetadata::Clear() {
1027 // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto.EventSequenceMetadata)
1028   uint32_t cached_has_bits = 0;
1029   // Prevent compiler warnings about cached_has_bits being unused
1030   (void) cached_has_bits;
1031 
1032   cached_has_bits = _impl_._has_bits_[0];
1033   if (cached_has_bits & 0x0000001fu) {
1034     ::memset(&_impl_.event_unique_id_, 0, static_cast<size_t>(
1035         reinterpret_cast<char*>(&_impl_.primary_user_segment_) -
1036         reinterpret_cast<char*>(&_impl_.event_unique_id_)) + sizeof(_impl_.primary_user_segment_));
1037   }
1038   _impl_._has_bits_.Clear();
1039   _internal_metadata_.Clear<std::string>();
1040 }
1041 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1042 const char* StructuredEventProto_EventSequenceMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1043 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1044   _Internal::HasBits has_bits{};
1045   while (!ctx->Done(&ptr)) {
1046     uint32_t tag;
1047     ptr = ::_pbi::ReadTag(ptr, &tag);
1048     switch (tag >> 3) {
1049       // optional fixed64 event_unique_id = 1;
1050       case 1:
1051         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
1052           _Internal::set_has_event_unique_id(&has_bits);
1053           _impl_.event_unique_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1054           ptr += sizeof(uint64_t);
1055         } else
1056           goto handle_unusual;
1057         continue;
1058       // optional int64 system_uptime = 2;
1059       case 2:
1060         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1061           _Internal::set_has_system_uptime(&has_bits);
1062           _impl_.system_uptime_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1063           CHK_(ptr);
1064         } else
1065           goto handle_unusual;
1066         continue;
1067       // optional int64 reset_counter = 3;
1068       case 3:
1069         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
1070           _Internal::set_has_reset_counter(&has_bits);
1071           _impl_.reset_counter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1072           CHK_(ptr);
1073         } else
1074           goto handle_unusual;
1075         continue;
1076       // optional uint32 client_id_rotation_weeks = 4;
1077       case 4:
1078         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
1079           _Internal::set_has_client_id_rotation_weeks(&has_bits);
1080           _impl_.client_id_rotation_weeks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1081           CHK_(ptr);
1082         } else
1083           goto handle_unusual;
1084         continue;
1085       // optional .metrics.StructuredEventProto.PrimaryUserSegment primary_user_segment = 5;
1086       case 5:
1087         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
1088           uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1089           CHK_(ptr);
1090           if (PROTOBUF_PREDICT_TRUE(::metrics::StructuredEventProto_PrimaryUserSegment_IsValid(val))) {
1091             _internal_set_primary_user_segment(static_cast<::metrics::StructuredEventProto_PrimaryUserSegment>(val));
1092           } else {
1093             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
1094           }
1095         } else
1096           goto handle_unusual;
1097         continue;
1098       default:
1099         goto handle_unusual;
1100     }  // switch
1101   handle_unusual:
1102     if ((tag == 0) || ((tag & 7) == 4)) {
1103       CHK_(ptr);
1104       ctx->SetLastTag(tag);
1105       goto message_done;
1106     }
1107     ptr = UnknownFieldParse(
1108         tag,
1109         _internal_metadata_.mutable_unknown_fields<std::string>(),
1110         ptr, ctx);
1111     CHK_(ptr != nullptr);
1112   }  // while
1113 message_done:
1114   _impl_._has_bits_.Or(has_bits);
1115   return ptr;
1116 failure:
1117   ptr = nullptr;
1118   goto message_done;
1119 #undef CHK_
1120 }
1121 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1122 uint8_t* StructuredEventProto_EventSequenceMetadata::_InternalSerialize(
1123     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1124   // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto.EventSequenceMetadata)
1125   uint32_t cached_has_bits = 0;
1126   (void) cached_has_bits;
1127 
1128   cached_has_bits = _impl_._has_bits_[0];
1129   // optional fixed64 event_unique_id = 1;
1130   if (cached_has_bits & 0x00000001u) {
1131     target = stream->EnsureSpace(target);
1132     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(1, this->_internal_event_unique_id(), target);
1133   }
1134 
1135   // optional int64 system_uptime = 2;
1136   if (cached_has_bits & 0x00000002u) {
1137     target = stream->EnsureSpace(target);
1138     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_system_uptime(), target);
1139   }
1140 
1141   // optional int64 reset_counter = 3;
1142   if (cached_has_bits & 0x00000004u) {
1143     target = stream->EnsureSpace(target);
1144     target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_reset_counter(), target);
1145   }
1146 
1147   // optional uint32 client_id_rotation_weeks = 4;
1148   if (cached_has_bits & 0x00000008u) {
1149     target = stream->EnsureSpace(target);
1150     target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_client_id_rotation_weeks(), target);
1151   }
1152 
1153   // optional .metrics.StructuredEventProto.PrimaryUserSegment primary_user_segment = 5;
1154   if (cached_has_bits & 0x00000010u) {
1155     target = stream->EnsureSpace(target);
1156     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1157       5, this->_internal_primary_user_segment(), target);
1158   }
1159 
1160   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1161     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1162         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1163   }
1164   // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto.EventSequenceMetadata)
1165   return target;
1166 }
1167 
ByteSizeLong() const1168 size_t StructuredEventProto_EventSequenceMetadata::ByteSizeLong() const {
1169 // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto.EventSequenceMetadata)
1170   size_t total_size = 0;
1171 
1172   uint32_t cached_has_bits = 0;
1173   // Prevent compiler warnings about cached_has_bits being unused
1174   (void) cached_has_bits;
1175 
1176   cached_has_bits = _impl_._has_bits_[0];
1177   if (cached_has_bits & 0x0000001fu) {
1178     // optional fixed64 event_unique_id = 1;
1179     if (cached_has_bits & 0x00000001u) {
1180       total_size += 1 + 8;
1181     }
1182 
1183     // optional int64 system_uptime = 2;
1184     if (cached_has_bits & 0x00000002u) {
1185       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_system_uptime());
1186     }
1187 
1188     // optional int64 reset_counter = 3;
1189     if (cached_has_bits & 0x00000004u) {
1190       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_reset_counter());
1191     }
1192 
1193     // optional uint32 client_id_rotation_weeks = 4;
1194     if (cached_has_bits & 0x00000008u) {
1195       total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_client_id_rotation_weeks());
1196     }
1197 
1198     // optional .metrics.StructuredEventProto.PrimaryUserSegment primary_user_segment = 5;
1199     if (cached_has_bits & 0x00000010u) {
1200       total_size += 1 +
1201         ::_pbi::WireFormatLite::EnumSize(this->_internal_primary_user_segment());
1202     }
1203 
1204   }
1205   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1206     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1207   }
1208   int cached_size = ::_pbi::ToCachedSize(total_size);
1209   SetCachedSize(cached_size);
1210   return total_size;
1211 }
1212 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1213 void StructuredEventProto_EventSequenceMetadata::CheckTypeAndMergeFrom(
1214     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1215   MergeFrom(*::_pbi::DownCast<const StructuredEventProto_EventSequenceMetadata*>(
1216       &from));
1217 }
1218 
MergeFrom(const StructuredEventProto_EventSequenceMetadata & from)1219 void StructuredEventProto_EventSequenceMetadata::MergeFrom(const StructuredEventProto_EventSequenceMetadata& from) {
1220   StructuredEventProto_EventSequenceMetadata* const _this = this;
1221   // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto.EventSequenceMetadata)
1222   GOOGLE_DCHECK_NE(&from, _this);
1223   uint32_t cached_has_bits = 0;
1224   (void) cached_has_bits;
1225 
1226   cached_has_bits = from._impl_._has_bits_[0];
1227   if (cached_has_bits & 0x0000001fu) {
1228     if (cached_has_bits & 0x00000001u) {
1229       _this->_impl_.event_unique_id_ = from._impl_.event_unique_id_;
1230     }
1231     if (cached_has_bits & 0x00000002u) {
1232       _this->_impl_.system_uptime_ = from._impl_.system_uptime_;
1233     }
1234     if (cached_has_bits & 0x00000004u) {
1235       _this->_impl_.reset_counter_ = from._impl_.reset_counter_;
1236     }
1237     if (cached_has_bits & 0x00000008u) {
1238       _this->_impl_.client_id_rotation_weeks_ = from._impl_.client_id_rotation_weeks_;
1239     }
1240     if (cached_has_bits & 0x00000010u) {
1241       _this->_impl_.primary_user_segment_ = from._impl_.primary_user_segment_;
1242     }
1243     _this->_impl_._has_bits_[0] |= cached_has_bits;
1244   }
1245   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1246 }
1247 
CopyFrom(const StructuredEventProto_EventSequenceMetadata & from)1248 void StructuredEventProto_EventSequenceMetadata::CopyFrom(const StructuredEventProto_EventSequenceMetadata& from) {
1249 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto.EventSequenceMetadata)
1250   if (&from == this) return;
1251   Clear();
1252   MergeFrom(from);
1253 }
1254 
IsInitialized() const1255 bool StructuredEventProto_EventSequenceMetadata::IsInitialized() const {
1256   return true;
1257 }
1258 
InternalSwap(StructuredEventProto_EventSequenceMetadata * other)1259 void StructuredEventProto_EventSequenceMetadata::InternalSwap(StructuredEventProto_EventSequenceMetadata* other) {
1260   using std::swap;
1261   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1262   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1263   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1264       PROTOBUF_FIELD_OFFSET(StructuredEventProto_EventSequenceMetadata, _impl_.primary_user_segment_)
1265       + sizeof(StructuredEventProto_EventSequenceMetadata::_impl_.primary_user_segment_)
1266       - PROTOBUF_FIELD_OFFSET(StructuredEventProto_EventSequenceMetadata, _impl_.event_unique_id_)>(
1267           reinterpret_cast<char*>(&_impl_.event_unique_id_),
1268           reinterpret_cast<char*>(&other->_impl_.event_unique_id_));
1269 }
1270 
GetTypeName() const1271 std::string StructuredEventProto_EventSequenceMetadata::GetTypeName() const {
1272   return "metrics.StructuredEventProto.EventSequenceMetadata";
1273 }
1274 
1275 
1276 // ===================================================================
1277 
1278 class StructuredEventProto::_Internal {
1279  public:
1280   using HasBits = decltype(std::declval<StructuredEventProto>()._impl_._has_bits_);
set_has_profile_event_id(HasBits * has_bits)1281   static void set_has_profile_event_id(HasBits* has_bits) {
1282     (*has_bits)[0] |= 2u;
1283   }
set_has_user_project_id(HasBits * has_bits)1284   static void set_has_user_project_id(HasBits* has_bits) {
1285     (*has_bits)[0] |= 16u;
1286   }
set_has_device_project_id(HasBits * has_bits)1287   static void set_has_device_project_id(HasBits* has_bits) {
1288     (*has_bits)[0] |= 32u;
1289   }
set_has_event_name_hash(HasBits * has_bits)1290   static void set_has_event_name_hash(HasBits* has_bits) {
1291     (*has_bits)[0] |= 4u;
1292   }
set_has_event_type(HasBits * has_bits)1293   static void set_has_event_type(HasBits* has_bits) {
1294     (*has_bits)[0] |= 64u;
1295   }
set_has_project_name_hash(HasBits * has_bits)1296   static void set_has_project_name_hash(HasBits* has_bits) {
1297     (*has_bits)[0] |= 8u;
1298   }
1299   static const ::metrics::StructuredEventProto_EventSequenceMetadata& event_sequence_metadata(const StructuredEventProto* msg);
set_has_event_sequence_metadata(HasBits * has_bits)1300   static void set_has_event_sequence_metadata(HasBits* has_bits) {
1301     (*has_bits)[0] |= 1u;
1302   }
1303 };
1304 
1305 const ::metrics::StructuredEventProto_EventSequenceMetadata&
event_sequence_metadata(const StructuredEventProto * msg)1306 StructuredEventProto::_Internal::event_sequence_metadata(const StructuredEventProto* msg) {
1307   return *msg->_impl_.event_sequence_metadata_;
1308 }
StructuredEventProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1309 StructuredEventProto::StructuredEventProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1310                          bool is_message_owned)
1311   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1312   SharedCtor(arena, is_message_owned);
1313   // @@protoc_insertion_point(arena_constructor:metrics.StructuredEventProto)
1314 }
StructuredEventProto(const StructuredEventProto & from)1315 StructuredEventProto::StructuredEventProto(const StructuredEventProto& from)
1316   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1317   StructuredEventProto* const _this = this; (void)_this;
1318   new (&_impl_) Impl_{
1319       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1320     , /*decltype(_impl_._cached_size_)*/{}
1321     , decltype(_impl_.metrics_){from._impl_.metrics_}
1322     , decltype(_impl_.event_sequence_metadata_){nullptr}
1323     , decltype(_impl_.profile_event_id_){}
1324     , decltype(_impl_.event_name_hash_){}
1325     , decltype(_impl_.project_name_hash_){}
1326     , decltype(_impl_.user_project_id_){}
1327     , decltype(_impl_.device_project_id_){}
1328     , decltype(_impl_.event_type_){}};
1329 
1330   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1331   if (from._internal_has_event_sequence_metadata()) {
1332     _this->_impl_.event_sequence_metadata_ = new ::metrics::StructuredEventProto_EventSequenceMetadata(*from._impl_.event_sequence_metadata_);
1333   }
1334   ::memcpy(&_impl_.profile_event_id_, &from._impl_.profile_event_id_,
1335     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.event_type_) -
1336     reinterpret_cast<char*>(&_impl_.profile_event_id_)) + sizeof(_impl_.event_type_));
1337   // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto)
1338 }
1339 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1340 inline void StructuredEventProto::SharedCtor(
1341     ::_pb::Arena* arena, bool is_message_owned) {
1342   (void)arena;
1343   (void)is_message_owned;
1344   new (&_impl_) Impl_{
1345       decltype(_impl_._has_bits_){}
1346     , /*decltype(_impl_._cached_size_)*/{}
1347     , decltype(_impl_.metrics_){arena}
1348     , decltype(_impl_.event_sequence_metadata_){nullptr}
1349     , decltype(_impl_.profile_event_id_){uint64_t{0u}}
1350     , decltype(_impl_.event_name_hash_){uint64_t{0u}}
1351     , decltype(_impl_.project_name_hash_){uint64_t{0u}}
1352     , decltype(_impl_.user_project_id_){uint64_t{0u}}
1353     , decltype(_impl_.device_project_id_){uint64_t{0u}}
1354     , decltype(_impl_.event_type_){0}
1355   };
1356 }
1357 
~StructuredEventProto()1358 StructuredEventProto::~StructuredEventProto() {
1359   // @@protoc_insertion_point(destructor:metrics.StructuredEventProto)
1360   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1361   (void)arena;
1362     return;
1363   }
1364   SharedDtor();
1365 }
1366 
SharedDtor()1367 inline void StructuredEventProto::SharedDtor() {
1368   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1369   _impl_.metrics_.~RepeatedPtrField();
1370   if (this != internal_default_instance()) delete _impl_.event_sequence_metadata_;
1371 }
1372 
SetCachedSize(int size) const1373 void StructuredEventProto::SetCachedSize(int size) const {
1374   _impl_._cached_size_.Set(size);
1375 }
1376 
Clear()1377 void StructuredEventProto::Clear() {
1378 // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto)
1379   uint32_t cached_has_bits = 0;
1380   // Prevent compiler warnings about cached_has_bits being unused
1381   (void) cached_has_bits;
1382 
1383   _impl_.metrics_.Clear();
1384   cached_has_bits = _impl_._has_bits_[0];
1385   if (cached_has_bits & 0x00000001u) {
1386     GOOGLE_DCHECK(_impl_.event_sequence_metadata_ != nullptr);
1387     _impl_.event_sequence_metadata_->Clear();
1388   }
1389   if (cached_has_bits & 0x0000007eu) {
1390     ::memset(&_impl_.profile_event_id_, 0, static_cast<size_t>(
1391         reinterpret_cast<char*>(&_impl_.event_type_) -
1392         reinterpret_cast<char*>(&_impl_.profile_event_id_)) + sizeof(_impl_.event_type_));
1393   }
1394   _impl_._has_bits_.Clear();
1395   _internal_metadata_.Clear<std::string>();
1396 }
1397 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1398 const char* StructuredEventProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1399 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1400   _Internal::HasBits has_bits{};
1401   while (!ctx->Done(&ptr)) {
1402     uint32_t tag;
1403     ptr = ::_pbi::ReadTag(ptr, &tag);
1404     switch (tag >> 3) {
1405       // optional fixed64 profile_event_id = 1;
1406       case 1:
1407         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 9)) {
1408           _Internal::set_has_profile_event_id(&has_bits);
1409           _impl_.profile_event_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1410           ptr += sizeof(uint64_t);
1411         } else
1412           goto handle_unusual;
1413         continue;
1414       // optional fixed64 event_name_hash = 2;
1415       case 2:
1416         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
1417           _Internal::set_has_event_name_hash(&has_bits);
1418           _impl_.event_name_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1419           ptr += sizeof(uint64_t);
1420         } else
1421           goto handle_unusual;
1422         continue;
1423       // repeated .metrics.StructuredEventProto.Metric metrics = 3;
1424       case 3:
1425         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
1426           ptr -= 1;
1427           do {
1428             ptr += 1;
1429             ptr = ctx->ParseMessage(_internal_add_metrics(), ptr);
1430             CHK_(ptr);
1431             if (!ctx->DataAvailable(ptr)) break;
1432           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1433         } else
1434           goto handle_unusual;
1435         continue;
1436       // optional .metrics.StructuredEventProto.EventType event_type = 4;
1437       case 4:
1438         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
1439           uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1440           CHK_(ptr);
1441           if (PROTOBUF_PREDICT_TRUE(::metrics::StructuredEventProto_EventType_IsValid(val))) {
1442             _internal_set_event_type(static_cast<::metrics::StructuredEventProto_EventType>(val));
1443           } else {
1444             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
1445           }
1446         } else
1447           goto handle_unusual;
1448         continue;
1449       // optional fixed64 project_name_hash = 5;
1450       case 5:
1451         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 41)) {
1452           _Internal::set_has_project_name_hash(&has_bits);
1453           _impl_.project_name_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1454           ptr += sizeof(uint64_t);
1455         } else
1456           goto handle_unusual;
1457         continue;
1458       // optional .metrics.StructuredEventProto.EventSequenceMetadata event_sequence_metadata = 6;
1459       case 6:
1460         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
1461           ptr = ctx->ParseMessage(_internal_mutable_event_sequence_metadata(), ptr);
1462           CHK_(ptr);
1463         } else
1464           goto handle_unusual;
1465         continue;
1466       // optional fixed64 user_project_id = 7;
1467       case 7:
1468         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 57)) {
1469           _Internal::set_has_user_project_id(&has_bits);
1470           _impl_.user_project_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1471           ptr += sizeof(uint64_t);
1472         } else
1473           goto handle_unusual;
1474         continue;
1475       // optional fixed64 device_project_id = 8;
1476       case 8:
1477         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 65)) {
1478           _Internal::set_has_device_project_id(&has_bits);
1479           _impl_.device_project_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint64_t>(ptr);
1480           ptr += sizeof(uint64_t);
1481         } else
1482           goto handle_unusual;
1483         continue;
1484       default:
1485         goto handle_unusual;
1486     }  // switch
1487   handle_unusual:
1488     if ((tag == 0) || ((tag & 7) == 4)) {
1489       CHK_(ptr);
1490       ctx->SetLastTag(tag);
1491       goto message_done;
1492     }
1493     ptr = UnknownFieldParse(
1494         tag,
1495         _internal_metadata_.mutable_unknown_fields<std::string>(),
1496         ptr, ctx);
1497     CHK_(ptr != nullptr);
1498   }  // while
1499 message_done:
1500   _impl_._has_bits_.Or(has_bits);
1501   return ptr;
1502 failure:
1503   ptr = nullptr;
1504   goto message_done;
1505 #undef CHK_
1506 }
1507 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1508 uint8_t* StructuredEventProto::_InternalSerialize(
1509     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1510   // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto)
1511   uint32_t cached_has_bits = 0;
1512   (void) cached_has_bits;
1513 
1514   cached_has_bits = _impl_._has_bits_[0];
1515   // optional fixed64 profile_event_id = 1;
1516   if (cached_has_bits & 0x00000002u) {
1517     target = stream->EnsureSpace(target);
1518     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(1, this->_internal_profile_event_id(), target);
1519   }
1520 
1521   // optional fixed64 event_name_hash = 2;
1522   if (cached_has_bits & 0x00000004u) {
1523     target = stream->EnsureSpace(target);
1524     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(2, this->_internal_event_name_hash(), target);
1525   }
1526 
1527   // repeated .metrics.StructuredEventProto.Metric metrics = 3;
1528   for (unsigned i = 0,
1529       n = static_cast<unsigned>(this->_internal_metrics_size()); i < n; i++) {
1530     const auto& repfield = this->_internal_metrics(i);
1531     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1532         InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1533   }
1534 
1535   // optional .metrics.StructuredEventProto.EventType event_type = 4;
1536   if (cached_has_bits & 0x00000040u) {
1537     target = stream->EnsureSpace(target);
1538     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1539       4, this->_internal_event_type(), target);
1540   }
1541 
1542   // optional fixed64 project_name_hash = 5;
1543   if (cached_has_bits & 0x00000008u) {
1544     target = stream->EnsureSpace(target);
1545     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(5, this->_internal_project_name_hash(), target);
1546   }
1547 
1548   // optional .metrics.StructuredEventProto.EventSequenceMetadata event_sequence_metadata = 6;
1549   if (cached_has_bits & 0x00000001u) {
1550     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1551       InternalWriteMessage(6, _Internal::event_sequence_metadata(this),
1552         _Internal::event_sequence_metadata(this).GetCachedSize(), target, stream);
1553   }
1554 
1555   // optional fixed64 user_project_id = 7;
1556   if (cached_has_bits & 0x00000010u) {
1557     target = stream->EnsureSpace(target);
1558     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(7, this->_internal_user_project_id(), target);
1559   }
1560 
1561   // optional fixed64 device_project_id = 8;
1562   if (cached_has_bits & 0x00000020u) {
1563     target = stream->EnsureSpace(target);
1564     target = ::_pbi::WireFormatLite::WriteFixed64ToArray(8, this->_internal_device_project_id(), target);
1565   }
1566 
1567   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1568     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1569         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1570   }
1571   // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto)
1572   return target;
1573 }
1574 
ByteSizeLong() const1575 size_t StructuredEventProto::ByteSizeLong() const {
1576 // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto)
1577   size_t total_size = 0;
1578 
1579   uint32_t cached_has_bits = 0;
1580   // Prevent compiler warnings about cached_has_bits being unused
1581   (void) cached_has_bits;
1582 
1583   // repeated .metrics.StructuredEventProto.Metric metrics = 3;
1584   total_size += 1UL * this->_internal_metrics_size();
1585   for (const auto& msg : this->_impl_.metrics_) {
1586     total_size +=
1587       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1588   }
1589 
1590   cached_has_bits = _impl_._has_bits_[0];
1591   if (cached_has_bits & 0x0000007fu) {
1592     // optional .metrics.StructuredEventProto.EventSequenceMetadata event_sequence_metadata = 6;
1593     if (cached_has_bits & 0x00000001u) {
1594       total_size += 1 +
1595         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1596           *_impl_.event_sequence_metadata_);
1597     }
1598 
1599     // optional fixed64 profile_event_id = 1;
1600     if (cached_has_bits & 0x00000002u) {
1601       total_size += 1 + 8;
1602     }
1603 
1604     // optional fixed64 event_name_hash = 2;
1605     if (cached_has_bits & 0x00000004u) {
1606       total_size += 1 + 8;
1607     }
1608 
1609     // optional fixed64 project_name_hash = 5;
1610     if (cached_has_bits & 0x00000008u) {
1611       total_size += 1 + 8;
1612     }
1613 
1614     // optional fixed64 user_project_id = 7;
1615     if (cached_has_bits & 0x00000010u) {
1616       total_size += 1 + 8;
1617     }
1618 
1619     // optional fixed64 device_project_id = 8;
1620     if (cached_has_bits & 0x00000020u) {
1621       total_size += 1 + 8;
1622     }
1623 
1624     // optional .metrics.StructuredEventProto.EventType event_type = 4;
1625     if (cached_has_bits & 0x00000040u) {
1626       total_size += 1 +
1627         ::_pbi::WireFormatLite::EnumSize(this->_internal_event_type());
1628     }
1629 
1630   }
1631   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1632     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1633   }
1634   int cached_size = ::_pbi::ToCachedSize(total_size);
1635   SetCachedSize(cached_size);
1636   return total_size;
1637 }
1638 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1639 void StructuredEventProto::CheckTypeAndMergeFrom(
1640     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1641   MergeFrom(*::_pbi::DownCast<const StructuredEventProto*>(
1642       &from));
1643 }
1644 
MergeFrom(const StructuredEventProto & from)1645 void StructuredEventProto::MergeFrom(const StructuredEventProto& from) {
1646   StructuredEventProto* const _this = this;
1647   // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto)
1648   GOOGLE_DCHECK_NE(&from, _this);
1649   uint32_t cached_has_bits = 0;
1650   (void) cached_has_bits;
1651 
1652   _this->_impl_.metrics_.MergeFrom(from._impl_.metrics_);
1653   cached_has_bits = from._impl_._has_bits_[0];
1654   if (cached_has_bits & 0x0000007fu) {
1655     if (cached_has_bits & 0x00000001u) {
1656       _this->_internal_mutable_event_sequence_metadata()->::metrics::StructuredEventProto_EventSequenceMetadata::MergeFrom(
1657           from._internal_event_sequence_metadata());
1658     }
1659     if (cached_has_bits & 0x00000002u) {
1660       _this->_impl_.profile_event_id_ = from._impl_.profile_event_id_;
1661     }
1662     if (cached_has_bits & 0x00000004u) {
1663       _this->_impl_.event_name_hash_ = from._impl_.event_name_hash_;
1664     }
1665     if (cached_has_bits & 0x00000008u) {
1666       _this->_impl_.project_name_hash_ = from._impl_.project_name_hash_;
1667     }
1668     if (cached_has_bits & 0x00000010u) {
1669       _this->_impl_.user_project_id_ = from._impl_.user_project_id_;
1670     }
1671     if (cached_has_bits & 0x00000020u) {
1672       _this->_impl_.device_project_id_ = from._impl_.device_project_id_;
1673     }
1674     if (cached_has_bits & 0x00000040u) {
1675       _this->_impl_.event_type_ = from._impl_.event_type_;
1676     }
1677     _this->_impl_._has_bits_[0] |= cached_has_bits;
1678   }
1679   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1680 }
1681 
CopyFrom(const StructuredEventProto & from)1682 void StructuredEventProto::CopyFrom(const StructuredEventProto& from) {
1683 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto)
1684   if (&from == this) return;
1685   Clear();
1686   MergeFrom(from);
1687 }
1688 
IsInitialized() const1689 bool StructuredEventProto::IsInitialized() const {
1690   return true;
1691 }
1692 
InternalSwap(StructuredEventProto * other)1693 void StructuredEventProto::InternalSwap(StructuredEventProto* other) {
1694   using std::swap;
1695   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1696   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1697   _impl_.metrics_.InternalSwap(&other->_impl_.metrics_);
1698   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1699       PROTOBUF_FIELD_OFFSET(StructuredEventProto, _impl_.event_type_)
1700       + sizeof(StructuredEventProto::_impl_.event_type_)
1701       - PROTOBUF_FIELD_OFFSET(StructuredEventProto, _impl_.event_sequence_metadata_)>(
1702           reinterpret_cast<char*>(&_impl_.event_sequence_metadata_),
1703           reinterpret_cast<char*>(&other->_impl_.event_sequence_metadata_));
1704 }
1705 
GetTypeName() const1706 std::string StructuredEventProto::GetTypeName() const {
1707   return "metrics.StructuredEventProto";
1708 }
1709 
1710 
1711 // ===================================================================
1712 
1713 class StructuredDataProto::_Internal {
1714  public:
1715   using HasBits = decltype(std::declval<StructuredDataProto>()._impl_._has_bits_);
set_has_is_device_enrolled(HasBits * has_bits)1716   static void set_has_is_device_enrolled(HasBits* has_bits) {
1717     (*has_bits)[0] |= 1u;
1718   }
set_has_device_segment(HasBits * has_bits)1719   static void set_has_device_segment(HasBits* has_bits) {
1720     (*has_bits)[0] |= 2u;
1721   }
1722 };
1723 
StructuredDataProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1724 StructuredDataProto::StructuredDataProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1725                          bool is_message_owned)
1726   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1727   SharedCtor(arena, is_message_owned);
1728   // @@protoc_insertion_point(arena_constructor:metrics.StructuredDataProto)
1729 }
StructuredDataProto(const StructuredDataProto & from)1730 StructuredDataProto::StructuredDataProto(const StructuredDataProto& from)
1731   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1732   StructuredDataProto* const _this = this; (void)_this;
1733   new (&_impl_) Impl_{
1734       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1735     , /*decltype(_impl_._cached_size_)*/{}
1736     , decltype(_impl_.events_){from._impl_.events_}
1737     , decltype(_impl_.is_device_enrolled_){}
1738     , decltype(_impl_.device_segment_){}};
1739 
1740   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1741   ::memcpy(&_impl_.is_device_enrolled_, &from._impl_.is_device_enrolled_,
1742     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.device_segment_) -
1743     reinterpret_cast<char*>(&_impl_.is_device_enrolled_)) + sizeof(_impl_.device_segment_));
1744   // @@protoc_insertion_point(copy_constructor:metrics.StructuredDataProto)
1745 }
1746 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1747 inline void StructuredDataProto::SharedCtor(
1748     ::_pb::Arena* arena, bool is_message_owned) {
1749   (void)arena;
1750   (void)is_message_owned;
1751   new (&_impl_) Impl_{
1752       decltype(_impl_._has_bits_){}
1753     , /*decltype(_impl_._cached_size_)*/{}
1754     , decltype(_impl_.events_){arena}
1755     , decltype(_impl_.is_device_enrolled_){false}
1756     , decltype(_impl_.device_segment_){0}
1757   };
1758 }
1759 
~StructuredDataProto()1760 StructuredDataProto::~StructuredDataProto() {
1761   // @@protoc_insertion_point(destructor:metrics.StructuredDataProto)
1762   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1763   (void)arena;
1764     return;
1765   }
1766   SharedDtor();
1767 }
1768 
SharedDtor()1769 inline void StructuredDataProto::SharedDtor() {
1770   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1771   _impl_.events_.~RepeatedPtrField();
1772 }
1773 
SetCachedSize(int size) const1774 void StructuredDataProto::SetCachedSize(int size) const {
1775   _impl_._cached_size_.Set(size);
1776 }
1777 
Clear()1778 void StructuredDataProto::Clear() {
1779 // @@protoc_insertion_point(message_clear_start:metrics.StructuredDataProto)
1780   uint32_t cached_has_bits = 0;
1781   // Prevent compiler warnings about cached_has_bits being unused
1782   (void) cached_has_bits;
1783 
1784   _impl_.events_.Clear();
1785   cached_has_bits = _impl_._has_bits_[0];
1786   if (cached_has_bits & 0x00000003u) {
1787     ::memset(&_impl_.is_device_enrolled_, 0, static_cast<size_t>(
1788         reinterpret_cast<char*>(&_impl_.device_segment_) -
1789         reinterpret_cast<char*>(&_impl_.is_device_enrolled_)) + sizeof(_impl_.device_segment_));
1790   }
1791   _impl_._has_bits_.Clear();
1792   _internal_metadata_.Clear<std::string>();
1793 }
1794 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1795 const char* StructuredDataProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1796 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1797   _Internal::HasBits has_bits{};
1798   while (!ctx->Done(&ptr)) {
1799     uint32_t tag;
1800     ptr = ::_pbi::ReadTag(ptr, &tag);
1801     switch (tag >> 3) {
1802       // repeated .metrics.StructuredEventProto events = 1;
1803       case 1:
1804         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
1805           ptr -= 1;
1806           do {
1807             ptr += 1;
1808             ptr = ctx->ParseMessage(_internal_add_events(), ptr);
1809             CHK_(ptr);
1810             if (!ctx->DataAvailable(ptr)) break;
1811           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1812         } else
1813           goto handle_unusual;
1814         continue;
1815       // optional bool is_device_enrolled = 2 [deprecated = true];
1816       case 2:
1817         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1818           _Internal::set_has_is_device_enrolled(&has_bits);
1819           _impl_.is_device_enrolled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1820           CHK_(ptr);
1821         } else
1822           goto handle_unusual;
1823         continue;
1824       // optional .metrics.StructuredDataProto.DeviceSegment device_segment = 3;
1825       case 3:
1826         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
1827           uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1828           CHK_(ptr);
1829           if (PROTOBUF_PREDICT_TRUE(::metrics::StructuredDataProto_DeviceSegment_IsValid(val))) {
1830             _internal_set_device_segment(static_cast<::metrics::StructuredDataProto_DeviceSegment>(val));
1831           } else {
1832             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
1833           }
1834         } else
1835           goto handle_unusual;
1836         continue;
1837       default:
1838         goto handle_unusual;
1839     }  // switch
1840   handle_unusual:
1841     if ((tag == 0) || ((tag & 7) == 4)) {
1842       CHK_(ptr);
1843       ctx->SetLastTag(tag);
1844       goto message_done;
1845     }
1846     ptr = UnknownFieldParse(
1847         tag,
1848         _internal_metadata_.mutable_unknown_fields<std::string>(),
1849         ptr, ctx);
1850     CHK_(ptr != nullptr);
1851   }  // while
1852 message_done:
1853   _impl_._has_bits_.Or(has_bits);
1854   return ptr;
1855 failure:
1856   ptr = nullptr;
1857   goto message_done;
1858 #undef CHK_
1859 }
1860 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1861 uint8_t* StructuredDataProto::_InternalSerialize(
1862     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1863   // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredDataProto)
1864   uint32_t cached_has_bits = 0;
1865   (void) cached_has_bits;
1866 
1867   // repeated .metrics.StructuredEventProto events = 1;
1868   for (unsigned i = 0,
1869       n = static_cast<unsigned>(this->_internal_events_size()); i < n; i++) {
1870     const auto& repfield = this->_internal_events(i);
1871     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1872         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1873   }
1874 
1875   cached_has_bits = _impl_._has_bits_[0];
1876   // optional bool is_device_enrolled = 2 [deprecated = true];
1877   if (cached_has_bits & 0x00000001u) {
1878     target = stream->EnsureSpace(target);
1879     target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_is_device_enrolled(), target);
1880   }
1881 
1882   // optional .metrics.StructuredDataProto.DeviceSegment device_segment = 3;
1883   if (cached_has_bits & 0x00000002u) {
1884     target = stream->EnsureSpace(target);
1885     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1886       3, this->_internal_device_segment(), target);
1887   }
1888 
1889   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1890     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1891         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1892   }
1893   // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredDataProto)
1894   return target;
1895 }
1896 
ByteSizeLong() const1897 size_t StructuredDataProto::ByteSizeLong() const {
1898 // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredDataProto)
1899   size_t total_size = 0;
1900 
1901   uint32_t cached_has_bits = 0;
1902   // Prevent compiler warnings about cached_has_bits being unused
1903   (void) cached_has_bits;
1904 
1905   // repeated .metrics.StructuredEventProto events = 1;
1906   total_size += 1UL * this->_internal_events_size();
1907   for (const auto& msg : this->_impl_.events_) {
1908     total_size +=
1909       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1910   }
1911 
1912   cached_has_bits = _impl_._has_bits_[0];
1913   if (cached_has_bits & 0x00000003u) {
1914     // optional bool is_device_enrolled = 2 [deprecated = true];
1915     if (cached_has_bits & 0x00000001u) {
1916       total_size += 1 + 1;
1917     }
1918 
1919     // optional .metrics.StructuredDataProto.DeviceSegment device_segment = 3;
1920     if (cached_has_bits & 0x00000002u) {
1921       total_size += 1 +
1922         ::_pbi::WireFormatLite::EnumSize(this->_internal_device_segment());
1923     }
1924 
1925   }
1926   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1927     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1928   }
1929   int cached_size = ::_pbi::ToCachedSize(total_size);
1930   SetCachedSize(cached_size);
1931   return total_size;
1932 }
1933 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1934 void StructuredDataProto::CheckTypeAndMergeFrom(
1935     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1936   MergeFrom(*::_pbi::DownCast<const StructuredDataProto*>(
1937       &from));
1938 }
1939 
MergeFrom(const StructuredDataProto & from)1940 void StructuredDataProto::MergeFrom(const StructuredDataProto& from) {
1941   StructuredDataProto* const _this = this;
1942   // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredDataProto)
1943   GOOGLE_DCHECK_NE(&from, _this);
1944   uint32_t cached_has_bits = 0;
1945   (void) cached_has_bits;
1946 
1947   _this->_impl_.events_.MergeFrom(from._impl_.events_);
1948   cached_has_bits = from._impl_._has_bits_[0];
1949   if (cached_has_bits & 0x00000003u) {
1950     if (cached_has_bits & 0x00000001u) {
1951       _this->_impl_.is_device_enrolled_ = from._impl_.is_device_enrolled_;
1952     }
1953     if (cached_has_bits & 0x00000002u) {
1954       _this->_impl_.device_segment_ = from._impl_.device_segment_;
1955     }
1956     _this->_impl_._has_bits_[0] |= cached_has_bits;
1957   }
1958   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1959 }
1960 
CopyFrom(const StructuredDataProto & from)1961 void StructuredDataProto::CopyFrom(const StructuredDataProto& from) {
1962 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredDataProto)
1963   if (&from == this) return;
1964   Clear();
1965   MergeFrom(from);
1966 }
1967 
IsInitialized() const1968 bool StructuredDataProto::IsInitialized() const {
1969   return true;
1970 }
1971 
InternalSwap(StructuredDataProto * other)1972 void StructuredDataProto::InternalSwap(StructuredDataProto* other) {
1973   using std::swap;
1974   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1975   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1976   _impl_.events_.InternalSwap(&other->_impl_.events_);
1977   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1978       PROTOBUF_FIELD_OFFSET(StructuredDataProto, _impl_.device_segment_)
1979       + sizeof(StructuredDataProto::_impl_.device_segment_)
1980       - PROTOBUF_FIELD_OFFSET(StructuredDataProto, _impl_.is_device_enrolled_)>(
1981           reinterpret_cast<char*>(&_impl_.is_device_enrolled_),
1982           reinterpret_cast<char*>(&other->_impl_.is_device_enrolled_));
1983 }
1984 
GetTypeName() const1985 std::string StructuredDataProto::GetTypeName() const {
1986   return "metrics.StructuredDataProto";
1987 }
1988 
1989 
1990 // @@protoc_insertion_point(namespace_scope)
1991 }  // namespace metrics
1992 PROTOBUF_NAMESPACE_OPEN
1993 template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto_Metric_RepeatedInt64*
CreateMaybeMessage(Arena * arena)1994 Arena::CreateMaybeMessage< ::metrics::StructuredEventProto_Metric_RepeatedInt64 >(Arena* arena) {
1995   return Arena::CreateMessageInternal< ::metrics::StructuredEventProto_Metric_RepeatedInt64 >(arena);
1996 }
1997 template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto_Metric*
CreateMaybeMessage(Arena * arena)1998 Arena::CreateMaybeMessage< ::metrics::StructuredEventProto_Metric >(Arena* arena) {
1999   return Arena::CreateMessageInternal< ::metrics::StructuredEventProto_Metric >(arena);
2000 }
2001 template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto_EventSequenceMetadata*
CreateMaybeMessage(Arena * arena)2002 Arena::CreateMaybeMessage< ::metrics::StructuredEventProto_EventSequenceMetadata >(Arena* arena) {
2003   return Arena::CreateMessageInternal< ::metrics::StructuredEventProto_EventSequenceMetadata >(arena);
2004 }
2005 template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto*
CreateMaybeMessage(Arena * arena)2006 Arena::CreateMaybeMessage< ::metrics::StructuredEventProto >(Arena* arena) {
2007   return Arena::CreateMessageInternal< ::metrics::StructuredEventProto >(arena);
2008 }
2009 template<> PROTOBUF_NOINLINE ::metrics::StructuredDataProto*
CreateMaybeMessage(Arena * arena)2010 Arena::CreateMaybeMessage< ::metrics::StructuredDataProto >(Arena* arena) {
2011   return Arena::CreateMessageInternal< ::metrics::StructuredDataProto >(arena);
2012 }
2013 PROTOBUF_NAMESPACE_CLOSE
2014 
2015 // @@protoc_insertion_point(global_scope)
2016 #include <google/protobuf/port_undef.inc>
2017