10ec8b83dSEd Tanous #pragma once 20ec8b83dSEd Tanous #include <nlohmann/json.hpp> 30ec8b83dSEd Tanous 40ec8b83dSEd Tanous namespace event 50ec8b83dSEd Tanous { 60ec8b83dSEd Tanous // clang-format off 70ec8b83dSEd Tanous 80ec8b83dSEd Tanous enum class EventType{ 90ec8b83dSEd Tanous Invalid, 100ec8b83dSEd Tanous StatusChange, 110ec8b83dSEd Tanous ResourceUpdated, 120ec8b83dSEd Tanous ResourceAdded, 130ec8b83dSEd Tanous ResourceRemoved, 140ec8b83dSEd Tanous Alert, 150ec8b83dSEd Tanous MetricReport, 160ec8b83dSEd Tanous Other, 170ec8b83dSEd Tanous }; 180ec8b83dSEd Tanous 19*f263e09cSEd Tanous enum class DiagnosticDataTypes{ 20*f263e09cSEd Tanous Invalid, 21*f263e09cSEd Tanous Manager, 22*f263e09cSEd Tanous PreOS, 23*f263e09cSEd Tanous OS, 24*f263e09cSEd Tanous OEM, 25*f263e09cSEd Tanous CPER, 26*f263e09cSEd Tanous CPERSection, 27*f263e09cSEd Tanous }; 28*f263e09cSEd Tanous 290ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventType, { 300ec8b83dSEd Tanous {EventType::Invalid, "Invalid"}, 310ec8b83dSEd Tanous {EventType::StatusChange, "StatusChange"}, 320ec8b83dSEd Tanous {EventType::ResourceUpdated, "ResourceUpdated"}, 330ec8b83dSEd Tanous {EventType::ResourceAdded, "ResourceAdded"}, 340ec8b83dSEd Tanous {EventType::ResourceRemoved, "ResourceRemoved"}, 350ec8b83dSEd Tanous {EventType::Alert, "Alert"}, 360ec8b83dSEd Tanous {EventType::MetricReport, "MetricReport"}, 370ec8b83dSEd Tanous {EventType::Other, "Other"}, 380ec8b83dSEd Tanous }); 390ec8b83dSEd Tanous 40*f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DiagnosticDataTypes, { 41*f263e09cSEd Tanous {DiagnosticDataTypes::Invalid, "Invalid"}, 42*f263e09cSEd Tanous {DiagnosticDataTypes::Manager, "Manager"}, 43*f263e09cSEd Tanous {DiagnosticDataTypes::PreOS, "PreOS"}, 44*f263e09cSEd Tanous {DiagnosticDataTypes::OS, "OS"}, 45*f263e09cSEd Tanous {DiagnosticDataTypes::OEM, "OEM"}, 46*f263e09cSEd Tanous {DiagnosticDataTypes::CPER, "CPER"}, 47*f263e09cSEd Tanous {DiagnosticDataTypes::CPERSection, "CPERSection"}, 48*f263e09cSEd Tanous }); 49*f263e09cSEd Tanous 500ec8b83dSEd Tanous } 510ec8b83dSEd Tanous // clang-format on 52