| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: structured_data.proto |
| |
| #include "structured_data.pb.h" |
| |
| #include <algorithm> |
| |
| #include <google/protobuf/io/coded_stream.h> |
| #include <google/protobuf/extension_set.h> |
| #include <google/protobuf/wire_format_lite.h> |
| #include <google/protobuf/io/zero_copy_stream_impl_lite.h> |
| // @@protoc_insertion_point(includes) |
| #include <google/protobuf/port_def.inc> |
| extern PROTOBUF_INTERNAL_EXPORT_structured_5fdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredEventProto_structured_5fdata_2eproto; |
| extern PROTOBUF_INTERNAL_EXPORT_structured_5fdata_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredEventProto_Metric_structured_5fdata_2eproto; |
| namespace metrics { |
| class StructuredEventProto_MetricDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredEventProto_Metric> _instance; |
| ::PROTOBUF_NAMESPACE_ID::uint64 value_hmac_; |
| ::PROTOBUF_NAMESPACE_ID::int64 value_int64_; |
| ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_string_; |
| } _StructuredEventProto_Metric_default_instance_; |
| class StructuredEventProtoDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredEventProto> _instance; |
| } _StructuredEventProto_default_instance_; |
| class StructuredDataProtoDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredDataProto> _instance; |
| } _StructuredDataProto_default_instance_; |
| } // namespace metrics |
| static void InitDefaultsscc_info_StructuredDataProto_structured_5fdata_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::_StructuredDataProto_default_instance_; |
| new (ptr) ::metrics::StructuredDataProto(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::StructuredDataProto::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredDataProto_structured_5fdata_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_StructuredDataProto_structured_5fdata_2eproto}, { |
| &scc_info_StructuredEventProto_structured_5fdata_2eproto.base,}}; |
| |
| static void InitDefaultsscc_info_StructuredEventProto_structured_5fdata_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::_StructuredEventProto_default_instance_; |
| new (ptr) ::metrics::StructuredEventProto(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::StructuredEventProto::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredEventProto_structured_5fdata_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_StructuredEventProto_structured_5fdata_2eproto}, { |
| &scc_info_StructuredEventProto_Metric_structured_5fdata_2eproto.base,}}; |
| |
| static void InitDefaultsscc_info_StructuredEventProto_Metric_structured_5fdata_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::_StructuredEventProto_Metric_default_instance_; |
| new (ptr) ::metrics::StructuredEventProto_Metric(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::StructuredEventProto_Metric::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredEventProto_Metric_structured_5fdata_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_StructuredEventProto_Metric_structured_5fdata_2eproto}, {}}; |
| |
| namespace metrics { |
| bool StructuredEventProto_EventType_IsValid(int value) { |
| switch (value) { |
| case 0: |
| case 1: |
| case 2: |
| return true; |
| default: |
| return false; |
| } |
| } |
| |
| static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> StructuredEventProto_EventType_strings[3] = {}; |
| |
| static const char StructuredEventProto_EventType_names[] = |
| "RAW_STRING" |
| "REGULAR" |
| "UNKNOWN"; |
| |
| static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry StructuredEventProto_EventType_entries[] = { |
| { {StructuredEventProto_EventType_names + 0, 10}, 2 }, |
| { {StructuredEventProto_EventType_names + 10, 7}, 1 }, |
| { {StructuredEventProto_EventType_names + 17, 7}, 0 }, |
| }; |
| |
| static const int StructuredEventProto_EventType_entries_by_number[] = { |
| 2, // 0 -> UNKNOWN |
| 1, // 1 -> REGULAR |
| 0, // 2 -> RAW_STRING |
| }; |
| |
| const std::string& StructuredEventProto_EventType_Name( |
| StructuredEventProto_EventType value) { |
| static const bool dummy = |
| ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( |
| StructuredEventProto_EventType_entries, |
| StructuredEventProto_EventType_entries_by_number, |
| 3, StructuredEventProto_EventType_strings); |
| (void) dummy; |
| int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( |
| StructuredEventProto_EventType_entries, |
| StructuredEventProto_EventType_entries_by_number, |
| 3, value); |
| return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : |
| StructuredEventProto_EventType_strings[idx].get(); |
| } |
| bool StructuredEventProto_EventType_Parse( |
| const std::string& name, StructuredEventProto_EventType* value) { |
| int int_value; |
| bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( |
| StructuredEventProto_EventType_entries, 3, name, &int_value); |
| if (success) { |
| *value = static_cast<StructuredEventProto_EventType>(int_value); |
| } |
| return success; |
| } |
| #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
| constexpr StructuredEventProto_EventType StructuredEventProto::UNKNOWN; |
| constexpr StructuredEventProto_EventType StructuredEventProto::REGULAR; |
| constexpr StructuredEventProto_EventType StructuredEventProto::RAW_STRING; |
| constexpr StructuredEventProto_EventType StructuredEventProto::EventType_MIN; |
| constexpr StructuredEventProto_EventType StructuredEventProto::EventType_MAX; |
| constexpr int StructuredEventProto::EventType_ARRAYSIZE; |
| #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
| |
| // =================================================================== |
| |
| void StructuredEventProto_Metric::InitAsDefaultInstance() { |
| } |
| class StructuredEventProto_Metric::_Internal { |
| public: |
| using HasBits = decltype(std::declval<StructuredEventProto_Metric>()._has_bits_); |
| static void set_has_name_hash(HasBits* has_bits) { |
| (*has_bits)[0] |= 1u; |
| } |
| }; |
| |
| StructuredEventProto_Metric::StructuredEventProto_Metric() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.StructuredEventProto.Metric) |
| } |
| StructuredEventProto_Metric::StructuredEventProto_Metric(const StructuredEventProto_Metric& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| name_hash_ = from.name_hash_; |
| clear_has_value(); |
| switch (from.value_case()) { |
| case kValueHmac: { |
| _internal_set_value_hmac(from._internal_value_hmac()); |
| break; |
| } |
| case kValueInt64: { |
| _internal_set_value_int64(from._internal_value_int64()); |
| break; |
| } |
| case kValueString: { |
| _internal_set_value_string(from._internal_value_string()); |
| break; |
| } |
| case VALUE_NOT_SET: { |
| break; |
| } |
| } |
| // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto.Metric) |
| } |
| |
| void StructuredEventProto_Metric::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredEventProto_Metric_structured_5fdata_2eproto.base); |
| name_hash_ = PROTOBUF_ULONGLONG(0); |
| clear_has_value(); |
| } |
| |
| StructuredEventProto_Metric::~StructuredEventProto_Metric() { |
| // @@protoc_insertion_point(destructor:metrics.StructuredEventProto.Metric) |
| SharedDtor(); |
| } |
| |
| void StructuredEventProto_Metric::SharedDtor() { |
| if (has_value()) { |
| clear_value(); |
| } |
| } |
| |
| void StructuredEventProto_Metric::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const StructuredEventProto_Metric& StructuredEventProto_Metric::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredEventProto_Metric_structured_5fdata_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void StructuredEventProto_Metric::clear_value() { |
| // @@protoc_insertion_point(one_of_clear_start:metrics.StructuredEventProto.Metric) |
| switch (value_case()) { |
| case kValueHmac: { |
| // No need to clear |
| break; |
| } |
| case kValueInt64: { |
| // No need to clear |
| break; |
| } |
| case kValueString: { |
| value_.value_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| break; |
| } |
| case VALUE_NOT_SET: { |
| break; |
| } |
| } |
| _oneof_case_[0] = VALUE_NOT_SET; |
| } |
| |
| |
| void StructuredEventProto_Metric::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto.Metric) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| name_hash_ = PROTOBUF_ULONGLONG(0); |
| clear_value(); |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* StructuredEventProto_Metric::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| _Internal::HasBits has_bits{}; |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // optional fixed64 name_hash = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) { |
| _Internal::set_has_name_hash(&has_bits); |
| name_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr); |
| ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint64); |
| } else goto handle_unusual; |
| continue; |
| // optional fixed64 value_hmac = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) { |
| _internal_set_value_hmac(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr)); |
| ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint64); |
| } else goto handle_unusual; |
| continue; |
| // optional int64 value_int64 = 3; |
| case 3: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
| _internal_set_value_int64(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // optional string value_string = 4; |
| case 4: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
| auto str = _internal_mutable_value_string(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| _has_bits_.Or(has_bits); |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* StructuredEventProto_Metric::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto.Metric) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| cached_has_bits = _has_bits_[0]; |
| // optional fixed64 name_hash = 1; |
| if (cached_has_bits & 0x00000001u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(1, this->_internal_name_hash(), target); |
| } |
| |
| switch (value_case()) { |
| case kValueHmac: { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(2, this->_internal_value_hmac(), target); |
| break; |
| } |
| case kValueInt64: { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_value_int64(), target); |
| break; |
| } |
| case kValueString: { |
| target = stream->WriteStringMaybeAliased( |
| 4, this->_internal_value_string(), target); |
| break; |
| } |
| default: ; |
| } |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = stream->WriteRaw(_internal_metadata_.unknown_fields().data(), |
| static_cast<int>(_internal_metadata_.unknown_fields().size()), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto.Metric) |
| return target; |
| } |
| |
| size_t StructuredEventProto_Metric::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto.Metric) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // optional fixed64 name_hash = 1; |
| cached_has_bits = _has_bits_[0]; |
| if (cached_has_bits & 0x00000001u) { |
| total_size += 1 + 8; |
| } |
| |
| switch (value_case()) { |
| // optional fixed64 value_hmac = 2; |
| case kValueHmac: { |
| total_size += 1 + 8; |
| break; |
| } |
| // optional int64 value_int64 = 3; |
| case kValueInt64: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
| this->_internal_value_int64()); |
| break; |
| } |
| // optional string value_string = 4; |
| case kValueString: { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_value_string()); |
| break; |
| } |
| case VALUE_NOT_SET: { |
| break; |
| } |
| } |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| total_size += _internal_metadata_.unknown_fields().size(); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void StructuredEventProto_Metric::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const StructuredEventProto_Metric*>( |
| &from)); |
| } |
| |
| void StructuredEventProto_Metric::MergeFrom(const StructuredEventProto_Metric& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto.Metric) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| if (from._internal_has_name_hash()) { |
| _internal_set_name_hash(from._internal_name_hash()); |
| } |
| switch (from.value_case()) { |
| case kValueHmac: { |
| _internal_set_value_hmac(from._internal_value_hmac()); |
| break; |
| } |
| case kValueInt64: { |
| _internal_set_value_int64(from._internal_value_int64()); |
| break; |
| } |
| case kValueString: { |
| _internal_set_value_string(from._internal_value_string()); |
| break; |
| } |
| case VALUE_NOT_SET: { |
| break; |
| } |
| } |
| } |
| |
| void StructuredEventProto_Metric::CopyFrom(const StructuredEventProto_Metric& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto.Metric) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool StructuredEventProto_Metric::IsInitialized() const { |
| return true; |
| } |
| |
| void StructuredEventProto_Metric::InternalSwap(StructuredEventProto_Metric* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| swap(name_hash_, other->name_hash_); |
| swap(value_, other->value_); |
| swap(_oneof_case_[0], other->_oneof_case_[0]); |
| } |
| |
| std::string StructuredEventProto_Metric::GetTypeName() const { |
| return "metrics.StructuredEventProto.Metric"; |
| } |
| |
| |
| // =================================================================== |
| |
| void StructuredEventProto::InitAsDefaultInstance() { |
| } |
| class StructuredEventProto::_Internal { |
| public: |
| using HasBits = decltype(std::declval<StructuredEventProto>()._has_bits_); |
| static void set_has_profile_event_id(HasBits* has_bits) { |
| (*has_bits)[0] |= 1u; |
| } |
| static void set_has_event_name_hash(HasBits* has_bits) { |
| (*has_bits)[0] |= 2u; |
| } |
| static void set_has_event_type(HasBits* has_bits) { |
| (*has_bits)[0] |= 4u; |
| } |
| }; |
| |
| StructuredEventProto::StructuredEventProto() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.StructuredEventProto) |
| } |
| StructuredEventProto::StructuredEventProto(const StructuredEventProto& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_), |
| metrics_(from.metrics_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::memcpy(&profile_event_id_, &from.profile_event_id_, |
| static_cast<size_t>(reinterpret_cast<char*>(&event_type_) - |
| reinterpret_cast<char*>(&profile_event_id_)) + sizeof(event_type_)); |
| // @@protoc_insertion_point(copy_constructor:metrics.StructuredEventProto) |
| } |
| |
| void StructuredEventProto::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredEventProto_structured_5fdata_2eproto.base); |
| ::memset(&profile_event_id_, 0, static_cast<size_t>( |
| reinterpret_cast<char*>(&event_type_) - |
| reinterpret_cast<char*>(&profile_event_id_)) + sizeof(event_type_)); |
| } |
| |
| StructuredEventProto::~StructuredEventProto() { |
| // @@protoc_insertion_point(destructor:metrics.StructuredEventProto) |
| SharedDtor(); |
| } |
| |
| void StructuredEventProto::SharedDtor() { |
| } |
| |
| void StructuredEventProto::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const StructuredEventProto& StructuredEventProto::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredEventProto_structured_5fdata_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void StructuredEventProto::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.StructuredEventProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| metrics_.Clear(); |
| cached_has_bits = _has_bits_[0]; |
| if (cached_has_bits & 0x00000007u) { |
| ::memset(&profile_event_id_, 0, static_cast<size_t>( |
| reinterpret_cast<char*>(&event_type_) - |
| reinterpret_cast<char*>(&profile_event_id_)) + sizeof(event_type_)); |
| } |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* StructuredEventProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| _Internal::HasBits has_bits{}; |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // optional fixed64 profile_event_id = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) { |
| _Internal::set_has_profile_event_id(&has_bits); |
| profile_event_id_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr); |
| ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint64); |
| } else goto handle_unusual; |
| continue; |
| // optional fixed64 event_name_hash = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) { |
| _Internal::set_has_event_name_hash(&has_bits); |
| event_name_hash_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint64>(ptr); |
| ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint64); |
| } else goto handle_unusual; |
| continue; |
| // repeated .metrics.StructuredEventProto.Metric metrics = 3; |
| case 3: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_metrics(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // optional .metrics.StructuredEventProto.EventType event_type = 4; |
| case 4: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
| ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
| CHK_(ptr); |
| if (PROTOBUF_PREDICT_TRUE(::metrics::StructuredEventProto_EventType_IsValid(val))) { |
| _internal_set_event_type(static_cast<::metrics::StructuredEventProto_EventType>(val)); |
| } else { |
| ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); |
| } |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| _has_bits_.Or(has_bits); |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* StructuredEventProto::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredEventProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| cached_has_bits = _has_bits_[0]; |
| // optional fixed64 profile_event_id = 1; |
| if (cached_has_bits & 0x00000001u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(1, this->_internal_profile_event_id(), target); |
| } |
| |
| // optional fixed64 event_name_hash = 2; |
| if (cached_has_bits & 0x00000002u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed64ToArray(2, this->_internal_event_name_hash(), target); |
| } |
| |
| // repeated .metrics.StructuredEventProto.Metric metrics = 3; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_metrics_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(3, this->_internal_metrics(i), target, stream); |
| } |
| |
| // optional .metrics.StructuredEventProto.EventType event_type = 4; |
| if (cached_has_bits & 0x00000004u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
| 4, this->_internal_event_type(), target); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = stream->WriteRaw(_internal_metadata_.unknown_fields().data(), |
| static_cast<int>(_internal_metadata_.unknown_fields().size()), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredEventProto) |
| return target; |
| } |
| |
| size_t StructuredEventProto::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredEventProto) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // repeated .metrics.StructuredEventProto.Metric metrics = 3; |
| total_size += 1UL * this->_internal_metrics_size(); |
| for (const auto& msg : this->metrics_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| cached_has_bits = _has_bits_[0]; |
| if (cached_has_bits & 0x00000007u) { |
| // optional fixed64 profile_event_id = 1; |
| if (cached_has_bits & 0x00000001u) { |
| total_size += 1 + 8; |
| } |
| |
| // optional fixed64 event_name_hash = 2; |
| if (cached_has_bits & 0x00000002u) { |
| total_size += 1 + 8; |
| } |
| |
| // optional .metrics.StructuredEventProto.EventType event_type = 4; |
| if (cached_has_bits & 0x00000004u) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event_type()); |
| } |
| |
| } |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| total_size += _internal_metadata_.unknown_fields().size(); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void StructuredEventProto::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const StructuredEventProto*>( |
| &from)); |
| } |
| |
| void StructuredEventProto::MergeFrom(const StructuredEventProto& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredEventProto) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| metrics_.MergeFrom(from.metrics_); |
| cached_has_bits = from._has_bits_[0]; |
| if (cached_has_bits & 0x00000007u) { |
| if (cached_has_bits & 0x00000001u) { |
| profile_event_id_ = from.profile_event_id_; |
| } |
| if (cached_has_bits & 0x00000002u) { |
| event_name_hash_ = from.event_name_hash_; |
| } |
| if (cached_has_bits & 0x00000004u) { |
| event_type_ = from.event_type_; |
| } |
| _has_bits_[0] |= cached_has_bits; |
| } |
| } |
| |
| void StructuredEventProto::CopyFrom(const StructuredEventProto& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredEventProto) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool StructuredEventProto::IsInitialized() const { |
| return true; |
| } |
| |
| void StructuredEventProto::InternalSwap(StructuredEventProto* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| metrics_.InternalSwap(&other->metrics_); |
| swap(profile_event_id_, other->profile_event_id_); |
| swap(event_name_hash_, other->event_name_hash_); |
| swap(event_type_, other->event_type_); |
| } |
| |
| std::string StructuredEventProto::GetTypeName() const { |
| return "metrics.StructuredEventProto"; |
| } |
| |
| |
| // =================================================================== |
| |
| void StructuredDataProto::InitAsDefaultInstance() { |
| } |
| class StructuredDataProto::_Internal { |
| public: |
| using HasBits = decltype(std::declval<StructuredDataProto>()._has_bits_); |
| }; |
| |
| StructuredDataProto::StructuredDataProto() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.StructuredDataProto) |
| } |
| StructuredDataProto::StructuredDataProto(const StructuredDataProto& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_), |
| events_(from.events_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| // @@protoc_insertion_point(copy_constructor:metrics.StructuredDataProto) |
| } |
| |
| void StructuredDataProto::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredDataProto_structured_5fdata_2eproto.base); |
| } |
| |
| StructuredDataProto::~StructuredDataProto() { |
| // @@protoc_insertion_point(destructor:metrics.StructuredDataProto) |
| SharedDtor(); |
| } |
| |
| void StructuredDataProto::SharedDtor() { |
| } |
| |
| void StructuredDataProto::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const StructuredDataProto& StructuredDataProto::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredDataProto_structured_5fdata_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void StructuredDataProto::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.StructuredDataProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| events_.Clear(); |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* StructuredDataProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
| #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| while (!ctx->Done(&ptr)) { |
| ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
| CHK_(ptr); |
| switch (tag >> 3) { |
| // repeated .metrics.StructuredEventProto events = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_events(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| default: { |
| handle_unusual: |
| if ((tag & 7) == 4 || tag == 0) { |
| ctx->SetLastTag(tag); |
| goto success; |
| } |
| ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
| CHK_(ptr != nullptr); |
| continue; |
| } |
| } // switch |
| } // while |
| success: |
| return ptr; |
| failure: |
| ptr = nullptr; |
| goto success; |
| #undef CHK_ |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::uint8* StructuredDataProto::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.StructuredDataProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // repeated .metrics.StructuredEventProto events = 1; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_events_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(1, this->_internal_events(i), target, stream); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| target = stream->WriteRaw(_internal_metadata_.unknown_fields().data(), |
| static_cast<int>(_internal_metadata_.unknown_fields().size()), target); |
| } |
| // @@protoc_insertion_point(serialize_to_array_end:metrics.StructuredDataProto) |
| return target; |
| } |
| |
| size_t StructuredDataProto::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.StructuredDataProto) |
| size_t total_size = 0; |
| |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| // repeated .metrics.StructuredEventProto events = 1; |
| total_size += 1UL * this->_internal_events_size(); |
| for (const auto& msg : this->events_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| total_size += _internal_metadata_.unknown_fields().size(); |
| } |
| int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
| SetCachedSize(cached_size); |
| return total_size; |
| } |
| |
| void StructuredDataProto::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const StructuredDataProto*>( |
| &from)); |
| } |
| |
| void StructuredDataProto::MergeFrom(const StructuredDataProto& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.StructuredDataProto) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| events_.MergeFrom(from.events_); |
| } |
| |
| void StructuredDataProto::CopyFrom(const StructuredDataProto& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.StructuredDataProto) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool StructuredDataProto::IsInitialized() const { |
| return true; |
| } |
| |
| void StructuredDataProto::InternalSwap(StructuredDataProto* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| events_.InternalSwap(&other->events_); |
| } |
| |
| std::string StructuredDataProto::GetTypeName() const { |
| return "metrics.StructuredDataProto"; |
| } |
| |
| |
| // @@protoc_insertion_point(namespace_scope) |
| } // namespace metrics |
| PROTOBUF_NAMESPACE_OPEN |
| template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto_Metric* Arena::CreateMaybeMessage< ::metrics::StructuredEventProto_Metric >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::StructuredEventProto_Metric >(arena); |
| } |
| template<> PROTOBUF_NOINLINE ::metrics::StructuredEventProto* Arena::CreateMaybeMessage< ::metrics::StructuredEventProto >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::StructuredEventProto >(arena); |
| } |
| template<> PROTOBUF_NOINLINE ::metrics::StructuredDataProto* Arena::CreateMaybeMessage< ::metrics::StructuredDataProto >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::StructuredDataProto >(arena); |
| } |
| PROTOBUF_NAMESPACE_CLOSE |
| |
| // @@protoc_insertion_point(global_scope) |
| #include <google/protobuf/port_undef.inc> |