| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: storage.proto |
| |
| #include "storage.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_storage_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_KeyDataProto_KeysEntry_DoNotUse_storage_2eproto; |
| extern PROTOBUF_INTERNAL_EXPORT_storage_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyProto_storage_2eproto; |
| namespace metrics { |
| namespace structured { |
| class KeyProtoDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<KeyProto> _instance; |
| } _KeyProto_default_instance_; |
| class KeyDataProto_KeysEntry_DoNotUseDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<KeyDataProto_KeysEntry_DoNotUse> _instance; |
| } _KeyDataProto_KeysEntry_DoNotUse_default_instance_; |
| class KeyDataProtoDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<KeyDataProto> _instance; |
| } _KeyDataProto_default_instance_; |
| class EventsProtoDefaultTypeInternal { |
| public: |
| ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<EventsProto> _instance; |
| } _EventsProto_default_instance_; |
| } // namespace structured |
| } // namespace metrics |
| static void InitDefaultsscc_info_EventsProto_storage_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::structured::_EventsProto_default_instance_; |
| new (ptr) ::metrics::structured::EventsProto(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::structured::EventsProto::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_EventsProto_storage_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_EventsProto_storage_2eproto}, { |
| &scc_info_StructuredEventProto_structured_5fdata_2eproto.base,}}; |
| |
| static void InitDefaultsscc_info_KeyDataProto_storage_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::structured::_KeyDataProto_default_instance_; |
| new (ptr) ::metrics::structured::KeyDataProto(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::structured::KeyDataProto::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_KeyDataProto_storage_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_KeyDataProto_storage_2eproto}, { |
| &scc_info_KeyDataProto_KeysEntry_DoNotUse_storage_2eproto.base,}}; |
| |
| static void InitDefaultsscc_info_KeyDataProto_KeysEntry_DoNotUse_storage_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::structured::_KeyDataProto_KeysEntry_DoNotUse_default_instance_; |
| new (ptr) ::metrics::structured::KeyDataProto_KeysEntry_DoNotUse(); |
| } |
| ::metrics::structured::KeyDataProto_KeysEntry_DoNotUse::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_KeyDataProto_KeysEntry_DoNotUse_storage_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_KeyDataProto_KeysEntry_DoNotUse_storage_2eproto}, { |
| &scc_info_KeyProto_storage_2eproto.base,}}; |
| |
| static void InitDefaultsscc_info_KeyProto_storage_2eproto() { |
| GOOGLE_PROTOBUF_VERIFY_VERSION; |
| |
| { |
| void* ptr = &::metrics::structured::_KeyProto_default_instance_; |
| new (ptr) ::metrics::structured::KeyProto(); |
| ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
| } |
| ::metrics::structured::KeyProto::InitAsDefaultInstance(); |
| } |
| |
| ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_KeyProto_storage_2eproto = |
| {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_KeyProto_storage_2eproto}, {}}; |
| |
| namespace metrics { |
| namespace structured { |
| |
| // =================================================================== |
| |
| void KeyProto::InitAsDefaultInstance() { |
| } |
| class KeyProto::_Internal { |
| public: |
| using HasBits = decltype(std::declval<KeyProto>()._has_bits_); |
| static void set_has_key(HasBits* has_bits) { |
| (*has_bits)[0] |= 1u; |
| } |
| static void set_has_last_rotation(HasBits* has_bits) { |
| (*has_bits)[0] |= 2u; |
| } |
| static void set_has_rotation_period(HasBits* has_bits) { |
| (*has_bits)[0] |= 4u; |
| } |
| }; |
| |
| KeyProto::KeyProto() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.structured.KeyProto) |
| } |
| KeyProto::KeyProto(const KeyProto& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| if (from._internal_has_key()) { |
| key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); |
| } |
| ::memcpy(&last_rotation_, &from.last_rotation_, |
| static_cast<size_t>(reinterpret_cast<char*>(&rotation_period_) - |
| reinterpret_cast<char*>(&last_rotation_)) + sizeof(rotation_period_)); |
| // @@protoc_insertion_point(copy_constructor:metrics.structured.KeyProto) |
| } |
| |
| void KeyProto::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_KeyProto_storage_2eproto.base); |
| key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| ::memset(&last_rotation_, 0, static_cast<size_t>( |
| reinterpret_cast<char*>(&rotation_period_) - |
| reinterpret_cast<char*>(&last_rotation_)) + sizeof(rotation_period_)); |
| } |
| |
| KeyProto::~KeyProto() { |
| // @@protoc_insertion_point(destructor:metrics.structured.KeyProto) |
| SharedDtor(); |
| } |
| |
| void KeyProto::SharedDtor() { |
| key_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
| } |
| |
| void KeyProto::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const KeyProto& KeyProto::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_KeyProto_storage_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void KeyProto::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.structured.KeyProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| cached_has_bits = _has_bits_[0]; |
| if (cached_has_bits & 0x00000001u) { |
| key_.ClearNonDefaultToEmptyNoArena(); |
| } |
| if (cached_has_bits & 0x00000006u) { |
| ::memset(&last_rotation_, 0, static_cast<size_t>( |
| reinterpret_cast<char*>(&rotation_period_) - |
| reinterpret_cast<char*>(&last_rotation_)) + sizeof(rotation_period_)); |
| } |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* KeyProto::_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 string key = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| auto str = _internal_mutable_key(); |
| ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // optional int64 last_rotation = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
| _Internal::set_has_last_rotation(&has_bits); |
| last_rotation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
| CHK_(ptr); |
| } else goto handle_unusual; |
| continue; |
| // optional int64 rotation_period = 3; |
| case 3: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
| _Internal::set_has_rotation_period(&has_bits); |
| rotation_period_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
| 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* KeyProto::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.structured.KeyProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| cached_has_bits = _has_bits_[0]; |
| // optional string key = 1; |
| if (cached_has_bits & 0x00000001u) { |
| target = stream->WriteStringMaybeAliased( |
| 1, this->_internal_key(), target); |
| } |
| |
| // optional int64 last_rotation = 2; |
| if (cached_has_bits & 0x00000002u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_last_rotation(), target); |
| } |
| |
| // optional int64 rotation_period = 3; |
| if (cached_has_bits & 0x00000004u) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_rotation_period(), 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.structured.KeyProto) |
| return target; |
| } |
| |
| size_t KeyProto::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.structured.KeyProto) |
| 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; |
| |
| cached_has_bits = _has_bits_[0]; |
| if (cached_has_bits & 0x00000007u) { |
| // optional string key = 1; |
| if (cached_has_bits & 0x00000001u) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
| this->_internal_key()); |
| } |
| |
| // optional int64 last_rotation = 2; |
| if (cached_has_bits & 0x00000002u) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
| this->_internal_last_rotation()); |
| } |
| |
| // optional int64 rotation_period = 3; |
| if (cached_has_bits & 0x00000004u) { |
| total_size += 1 + |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
| this->_internal_rotation_period()); |
| } |
| |
| } |
| 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 KeyProto::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const KeyProto*>( |
| &from)); |
| } |
| |
| void KeyProto::MergeFrom(const KeyProto& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.structured.KeyProto) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| cached_has_bits = from._has_bits_[0]; |
| if (cached_has_bits & 0x00000007u) { |
| if (cached_has_bits & 0x00000001u) { |
| _has_bits_[0] |= 0x00000001u; |
| key_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.key_); |
| } |
| if (cached_has_bits & 0x00000002u) { |
| last_rotation_ = from.last_rotation_; |
| } |
| if (cached_has_bits & 0x00000004u) { |
| rotation_period_ = from.rotation_period_; |
| } |
| _has_bits_[0] |= cached_has_bits; |
| } |
| } |
| |
| void KeyProto::CopyFrom(const KeyProto& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.structured.KeyProto) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool KeyProto::IsInitialized() const { |
| return true; |
| } |
| |
| void KeyProto::InternalSwap(KeyProto* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| key_.Swap(&other->key_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
| GetArenaNoVirtual()); |
| swap(last_rotation_, other->last_rotation_); |
| swap(rotation_period_, other->rotation_period_); |
| } |
| |
| std::string KeyProto::GetTypeName() const { |
| return "metrics.structured.KeyProto"; |
| } |
| |
| |
| // =================================================================== |
| |
| KeyDataProto_KeysEntry_DoNotUse::KeyDataProto_KeysEntry_DoNotUse() {} |
| KeyDataProto_KeysEntry_DoNotUse::KeyDataProto_KeysEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
| : SuperType(arena) {} |
| void KeyDataProto_KeysEntry_DoNotUse::MergeFrom(const KeyDataProto_KeysEntry_DoNotUse& other) { |
| MergeFromInternal(other); |
| } |
| |
| // =================================================================== |
| |
| void KeyDataProto::InitAsDefaultInstance() { |
| } |
| class KeyDataProto::_Internal { |
| public: |
| using HasBits = decltype(std::declval<KeyDataProto>()._has_bits_); |
| }; |
| |
| KeyDataProto::KeyDataProto() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.structured.KeyDataProto) |
| } |
| KeyDataProto::KeyDataProto(const KeyDataProto& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| keys_.MergeFrom(from.keys_); |
| // @@protoc_insertion_point(copy_constructor:metrics.structured.KeyDataProto) |
| } |
| |
| void KeyDataProto::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_KeyDataProto_storage_2eproto.base); |
| } |
| |
| KeyDataProto::~KeyDataProto() { |
| // @@protoc_insertion_point(destructor:metrics.structured.KeyDataProto) |
| SharedDtor(); |
| } |
| |
| void KeyDataProto::SharedDtor() { |
| } |
| |
| void KeyDataProto::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const KeyDataProto& KeyDataProto::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_KeyDataProto_storage_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void KeyDataProto::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.structured.KeyDataProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| keys_.Clear(); |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* KeyDataProto::_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) { |
| // map<fixed64, .metrics.structured.KeyProto> keys = 1; |
| case 1: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(&keys_, 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* KeyDataProto::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.structured.KeyDataProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // map<fixed64, .metrics.structured.KeyProto> keys = 1; |
| if (!this->_internal_keys().empty()) { |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::uint64, ::metrics::structured::KeyProto >::const_pointer |
| ConstPtr; |
| typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::uint64, ConstPtr > SortItem; |
| typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
| |
| if (stream->IsSerializationDeterministic() && |
| this->_internal_keys().size() > 1) { |
| ::std::unique_ptr<SortItem[]> items( |
| new SortItem[this->_internal_keys().size()]); |
| typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::uint64, ::metrics::structured::KeyProto >::size_type size_type; |
| size_type n = 0; |
| for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::uint64, ::metrics::structured::KeyProto >::const_iterator |
| it = this->_internal_keys().begin(); |
| it != this->_internal_keys().end(); ++it, ++n) { |
| items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
| } |
| ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
| for (size_type i = 0; i < n; i++) { |
| target = KeyDataProto_KeysEntry_DoNotUse::Funcs::InternalSerialize(1, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target, stream); |
| } |
| } else { |
| for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::uint64, ::metrics::structured::KeyProto >::const_iterator |
| it = this->_internal_keys().begin(); |
| it != this->_internal_keys().end(); ++it) { |
| target = KeyDataProto_KeysEntry_DoNotUse::Funcs::InternalSerialize(1, it->first, it->second, 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.structured.KeyDataProto) |
| return target; |
| } |
| |
| size_t KeyDataProto::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.structured.KeyDataProto) |
| 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; |
| |
| // map<fixed64, .metrics.structured.KeyProto> keys = 1; |
| total_size += 1 * |
| ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_keys_size()); |
| for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::uint64, ::metrics::structured::KeyProto >::const_iterator |
| it = this->_internal_keys().begin(); |
| it != this->_internal_keys().end(); ++it) { |
| total_size += KeyDataProto_KeysEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
| } |
| |
| 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 KeyDataProto::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const KeyDataProto*>( |
| &from)); |
| } |
| |
| void KeyDataProto::MergeFrom(const KeyDataProto& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.structured.KeyDataProto) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| keys_.MergeFrom(from.keys_); |
| } |
| |
| void KeyDataProto::CopyFrom(const KeyDataProto& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.structured.KeyDataProto) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool KeyDataProto::IsInitialized() const { |
| return true; |
| } |
| |
| void KeyDataProto::InternalSwap(KeyDataProto* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| keys_.Swap(&other->keys_); |
| } |
| |
| std::string KeyDataProto::GetTypeName() const { |
| return "metrics.structured.KeyDataProto"; |
| } |
| |
| |
| // =================================================================== |
| |
| void EventsProto::InitAsDefaultInstance() { |
| } |
| class EventsProto::_Internal { |
| public: |
| using HasBits = decltype(std::declval<EventsProto>()._has_bits_); |
| }; |
| |
| void EventsProto::clear_non_uma_events() { |
| non_uma_events_.Clear(); |
| } |
| void EventsProto::clear_uma_events() { |
| uma_events_.Clear(); |
| } |
| EventsProto::EventsProto() |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) { |
| SharedCtor(); |
| // @@protoc_insertion_point(constructor:metrics.structured.EventsProto) |
| } |
| EventsProto::EventsProto(const EventsProto& from) |
| : ::PROTOBUF_NAMESPACE_ID::MessageLite(), |
| _internal_metadata_(nullptr), |
| _has_bits_(from._has_bits_), |
| non_uma_events_(from.non_uma_events_), |
| uma_events_(from.uma_events_) { |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| // @@protoc_insertion_point(copy_constructor:metrics.structured.EventsProto) |
| } |
| |
| void EventsProto::SharedCtor() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_EventsProto_storage_2eproto.base); |
| } |
| |
| EventsProto::~EventsProto() { |
| // @@protoc_insertion_point(destructor:metrics.structured.EventsProto) |
| SharedDtor(); |
| } |
| |
| void EventsProto::SharedDtor() { |
| } |
| |
| void EventsProto::SetCachedSize(int size) const { |
| _cached_size_.Set(size); |
| } |
| const EventsProto& EventsProto::default_instance() { |
| ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_EventsProto_storage_2eproto.base); |
| return *internal_default_instance(); |
| } |
| |
| |
| void EventsProto::Clear() { |
| // @@protoc_insertion_point(message_clear_start:metrics.structured.EventsProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| // Prevent compiler warnings about cached_has_bits being unused |
| (void) cached_has_bits; |
| |
| non_uma_events_.Clear(); |
| uma_events_.Clear(); |
| _has_bits_.Clear(); |
| _internal_metadata_.Clear(); |
| } |
| |
| const char* EventsProto::_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 non_uma_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_non_uma_events(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); |
| } else goto handle_unusual; |
| continue; |
| // repeated .metrics.StructuredEventProto uma_events = 2; |
| case 2: |
| if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
| ptr -= 1; |
| do { |
| ptr += 1; |
| ptr = ctx->ParseMessage(_internal_add_uma_events(), ptr); |
| CHK_(ptr); |
| if (!ctx->DataAvailable(ptr)) break; |
| } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(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* EventsProto::_InternalSerialize( |
| ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| // @@protoc_insertion_point(serialize_to_array_start:metrics.structured.EventsProto) |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| // repeated .metrics.StructuredEventProto non_uma_events = 1; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_non_uma_events_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(1, this->_internal_non_uma_events(i), target, stream); |
| } |
| |
| // repeated .metrics.StructuredEventProto uma_events = 2; |
| for (unsigned int i = 0, |
| n = static_cast<unsigned int>(this->_internal_uma_events_size()); i < n; i++) { |
| target = stream->EnsureSpace(target); |
| target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
| InternalWriteMessage(2, this->_internal_uma_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.structured.EventsProto) |
| return target; |
| } |
| |
| size_t EventsProto::ByteSizeLong() const { |
| // @@protoc_insertion_point(message_byte_size_start:metrics.structured.EventsProto) |
| 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 non_uma_events = 1; |
| total_size += 1UL * this->_internal_non_uma_events_size(); |
| for (const auto& msg : this->non_uma_events_) { |
| total_size += |
| ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
| } |
| |
| // repeated .metrics.StructuredEventProto uma_events = 2; |
| total_size += 1UL * this->_internal_uma_events_size(); |
| for (const auto& msg : this->uma_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 EventsProto::CheckTypeAndMergeFrom( |
| const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { |
| MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const EventsProto*>( |
| &from)); |
| } |
| |
| void EventsProto::MergeFrom(const EventsProto& from) { |
| // @@protoc_insertion_point(class_specific_merge_from_start:metrics.structured.EventsProto) |
| GOOGLE_DCHECK_NE(&from, this); |
| _internal_metadata_.MergeFrom(from._internal_metadata_); |
| ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
| (void) cached_has_bits; |
| |
| non_uma_events_.MergeFrom(from.non_uma_events_); |
| uma_events_.MergeFrom(from.uma_events_); |
| } |
| |
| void EventsProto::CopyFrom(const EventsProto& from) { |
| // @@protoc_insertion_point(class_specific_copy_from_start:metrics.structured.EventsProto) |
| if (&from == this) return; |
| Clear(); |
| MergeFrom(from); |
| } |
| |
| bool EventsProto::IsInitialized() const { |
| return true; |
| } |
| |
| void EventsProto::InternalSwap(EventsProto* other) { |
| using std::swap; |
| _internal_metadata_.Swap(&other->_internal_metadata_); |
| swap(_has_bits_[0], other->_has_bits_[0]); |
| non_uma_events_.InternalSwap(&other->non_uma_events_); |
| uma_events_.InternalSwap(&other->uma_events_); |
| } |
| |
| std::string EventsProto::GetTypeName() const { |
| return "metrics.structured.EventsProto"; |
| } |
| |
| |
| // @@protoc_insertion_point(namespace_scope) |
| } // namespace structured |
| } // namespace metrics |
| PROTOBUF_NAMESPACE_OPEN |
| template<> PROTOBUF_NOINLINE ::metrics::structured::KeyProto* Arena::CreateMaybeMessage< ::metrics::structured::KeyProto >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::structured::KeyProto >(arena); |
| } |
| template<> PROTOBUF_NOINLINE ::metrics::structured::KeyDataProto_KeysEntry_DoNotUse* Arena::CreateMaybeMessage< ::metrics::structured::KeyDataProto_KeysEntry_DoNotUse >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::structured::KeyDataProto_KeysEntry_DoNotUse >(arena); |
| } |
| template<> PROTOBUF_NOINLINE ::metrics::structured::KeyDataProto* Arena::CreateMaybeMessage< ::metrics::structured::KeyDataProto >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::structured::KeyDataProto >(arena); |
| } |
| template<> PROTOBUF_NOINLINE ::metrics::structured::EventsProto* Arena::CreateMaybeMessage< ::metrics::structured::EventsProto >(Arena* arena) { |
| return Arena::CreateInternal< ::metrics::structured::EventsProto >(arena); |
| } |
| PROTOBUF_NAMESPACE_CLOSE |
| |
| // @@protoc_insertion_point(global_scope) |
| #include <google/protobuf/port_undef.inc> |