10ec8b83dSEd Tanous #pragma once 20ec8b83dSEd Tanous #include <nlohmann/json.hpp> 30ec8b83dSEd Tanous 40ec8b83dSEd Tanous namespace log_service 50ec8b83dSEd Tanous { 60ec8b83dSEd Tanous // clang-format off 70ec8b83dSEd Tanous 80ec8b83dSEd Tanous enum class OverWritePolicy{ 90ec8b83dSEd Tanous Invalid, 100ec8b83dSEd Tanous Unknown, 110ec8b83dSEd Tanous WrapsWhenFull, 120ec8b83dSEd Tanous NeverOverWrites, 130ec8b83dSEd Tanous }; 140ec8b83dSEd Tanous 150ec8b83dSEd Tanous enum class LogEntryTypes{ 160ec8b83dSEd Tanous Invalid, 170ec8b83dSEd Tanous Event, 180ec8b83dSEd Tanous SEL, 190ec8b83dSEd Tanous Multiple, 200ec8b83dSEd Tanous OEM, 21e9cc1bc9SEd Tanous CXL, 220ec8b83dSEd Tanous }; 230ec8b83dSEd Tanous 240ec8b83dSEd Tanous enum class SyslogSeverity{ 250ec8b83dSEd Tanous Invalid, 260ec8b83dSEd Tanous Emergency, 270ec8b83dSEd Tanous Alert, 280ec8b83dSEd Tanous Critical, 290ec8b83dSEd Tanous Error, 300ec8b83dSEd Tanous Warning, 310ec8b83dSEd Tanous Notice, 320ec8b83dSEd Tanous Informational, 330ec8b83dSEd Tanous Debug, 340ec8b83dSEd Tanous All, 350ec8b83dSEd Tanous }; 360ec8b83dSEd Tanous 370ec8b83dSEd Tanous enum class SyslogFacility{ 380ec8b83dSEd Tanous Invalid, 390ec8b83dSEd Tanous Kern, 400ec8b83dSEd Tanous User, 410ec8b83dSEd Tanous Mail, 420ec8b83dSEd Tanous Daemon, 430ec8b83dSEd Tanous Auth, 440ec8b83dSEd Tanous Syslog, 450ec8b83dSEd Tanous LPR, 460ec8b83dSEd Tanous News, 470ec8b83dSEd Tanous UUCP, 480ec8b83dSEd Tanous Cron, 490ec8b83dSEd Tanous Authpriv, 500ec8b83dSEd Tanous FTP, 510ec8b83dSEd Tanous NTP, 520ec8b83dSEd Tanous Security, 530ec8b83dSEd Tanous Console, 540ec8b83dSEd Tanous SolarisCron, 550ec8b83dSEd Tanous Local0, 560ec8b83dSEd Tanous Local1, 570ec8b83dSEd Tanous Local2, 580ec8b83dSEd Tanous Local3, 590ec8b83dSEd Tanous Local4, 600ec8b83dSEd Tanous Local5, 610ec8b83dSEd Tanous Local6, 620ec8b83dSEd Tanous Local7, 630ec8b83dSEd Tanous }; 640ec8b83dSEd Tanous 650ec8b83dSEd Tanous enum class LogDiagnosticDataTypes{ 660ec8b83dSEd Tanous Invalid, 670ec8b83dSEd Tanous Manager, 680ec8b83dSEd Tanous PreOS, 690ec8b83dSEd Tanous OS, 700ec8b83dSEd Tanous OEM, 710ec8b83dSEd Tanous }; 720ec8b83dSEd Tanous 73a8d8f9d8SEd Tanous enum class LogPurpose{ 74a8d8f9d8SEd Tanous Invalid, 75a8d8f9d8SEd Tanous Diagnostic, 76a8d8f9d8SEd Tanous Operations, 77a8d8f9d8SEd Tanous Security, 78a8d8f9d8SEd Tanous Telemetry, 79a8d8f9d8SEd Tanous ExternalEntity, 80a8d8f9d8SEd Tanous OEM, 81a8d8f9d8SEd Tanous }; 82a8d8f9d8SEd Tanous 832ae81db9SGunnar Mills enum class TransferProtocolType{ 842ae81db9SGunnar Mills Invalid, 852ae81db9SGunnar Mills CIFS, 862ae81db9SGunnar Mills FTP, 872ae81db9SGunnar Mills SFTP, 882ae81db9SGunnar Mills HTTP, 892ae81db9SGunnar Mills HTTPS, 902ae81db9SGunnar Mills NFS, 912ae81db9SGunnar Mills SCP, 922ae81db9SGunnar Mills TFTP, 932ae81db9SGunnar Mills OEM, 942ae81db9SGunnar Mills }; 952ae81db9SGunnar Mills 96*f2a8e57eSGunnar Mills enum class AutoClearResolvedEntries{ 97*f2a8e57eSGunnar Mills Invalid, 98*f2a8e57eSGunnar Mills ClearEventGroup, 99*f2a8e57eSGunnar Mills RetainCauseResolutionEntries, 100*f2a8e57eSGunnar Mills UpdateCauseEntry, 101*f2a8e57eSGunnar Mills None, 102*f2a8e57eSGunnar Mills }; 103*f2a8e57eSGunnar Mills 1040ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(OverWritePolicy, { 1050ec8b83dSEd Tanous {OverWritePolicy::Invalid, "Invalid"}, 1060ec8b83dSEd Tanous {OverWritePolicy::Unknown, "Unknown"}, 1070ec8b83dSEd Tanous {OverWritePolicy::WrapsWhenFull, "WrapsWhenFull"}, 1080ec8b83dSEd Tanous {OverWritePolicy::NeverOverWrites, "NeverOverWrites"}, 1090ec8b83dSEd Tanous }); 1100ec8b83dSEd Tanous 1110ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryTypes, { 1120ec8b83dSEd Tanous {LogEntryTypes::Invalid, "Invalid"}, 1130ec8b83dSEd Tanous {LogEntryTypes::Event, "Event"}, 1140ec8b83dSEd Tanous {LogEntryTypes::SEL, "SEL"}, 1150ec8b83dSEd Tanous {LogEntryTypes::Multiple, "Multiple"}, 1160ec8b83dSEd Tanous {LogEntryTypes::OEM, "OEM"}, 117e9cc1bc9SEd Tanous {LogEntryTypes::CXL, "CXL"}, 1180ec8b83dSEd Tanous }); 1190ec8b83dSEd Tanous 1200ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, { 1210ec8b83dSEd Tanous {SyslogSeverity::Invalid, "Invalid"}, 1220ec8b83dSEd Tanous {SyslogSeverity::Emergency, "Emergency"}, 1230ec8b83dSEd Tanous {SyslogSeverity::Alert, "Alert"}, 1240ec8b83dSEd Tanous {SyslogSeverity::Critical, "Critical"}, 1250ec8b83dSEd Tanous {SyslogSeverity::Error, "Error"}, 1260ec8b83dSEd Tanous {SyslogSeverity::Warning, "Warning"}, 1270ec8b83dSEd Tanous {SyslogSeverity::Notice, "Notice"}, 1280ec8b83dSEd Tanous {SyslogSeverity::Informational, "Informational"}, 1290ec8b83dSEd Tanous {SyslogSeverity::Debug, "Debug"}, 1300ec8b83dSEd Tanous {SyslogSeverity::All, "All"}, 1310ec8b83dSEd Tanous }); 1320ec8b83dSEd Tanous 1330ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, { 1340ec8b83dSEd Tanous {SyslogFacility::Invalid, "Invalid"}, 1350ec8b83dSEd Tanous {SyslogFacility::Kern, "Kern"}, 1360ec8b83dSEd Tanous {SyslogFacility::User, "User"}, 1370ec8b83dSEd Tanous {SyslogFacility::Mail, "Mail"}, 1380ec8b83dSEd Tanous {SyslogFacility::Daemon, "Daemon"}, 1390ec8b83dSEd Tanous {SyslogFacility::Auth, "Auth"}, 1400ec8b83dSEd Tanous {SyslogFacility::Syslog, "Syslog"}, 1410ec8b83dSEd Tanous {SyslogFacility::LPR, "LPR"}, 1420ec8b83dSEd Tanous {SyslogFacility::News, "News"}, 1430ec8b83dSEd Tanous {SyslogFacility::UUCP, "UUCP"}, 1440ec8b83dSEd Tanous {SyslogFacility::Cron, "Cron"}, 1450ec8b83dSEd Tanous {SyslogFacility::Authpriv, "Authpriv"}, 1460ec8b83dSEd Tanous {SyslogFacility::FTP, "FTP"}, 1470ec8b83dSEd Tanous {SyslogFacility::NTP, "NTP"}, 1480ec8b83dSEd Tanous {SyslogFacility::Security, "Security"}, 1490ec8b83dSEd Tanous {SyslogFacility::Console, "Console"}, 1500ec8b83dSEd Tanous {SyslogFacility::SolarisCron, "SolarisCron"}, 1510ec8b83dSEd Tanous {SyslogFacility::Local0, "Local0"}, 1520ec8b83dSEd Tanous {SyslogFacility::Local1, "Local1"}, 1530ec8b83dSEd Tanous {SyslogFacility::Local2, "Local2"}, 1540ec8b83dSEd Tanous {SyslogFacility::Local3, "Local3"}, 1550ec8b83dSEd Tanous {SyslogFacility::Local4, "Local4"}, 1560ec8b83dSEd Tanous {SyslogFacility::Local5, "Local5"}, 1570ec8b83dSEd Tanous {SyslogFacility::Local6, "Local6"}, 1580ec8b83dSEd Tanous {SyslogFacility::Local7, "Local7"}, 1590ec8b83dSEd Tanous }); 1600ec8b83dSEd Tanous 1610ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, { 1620ec8b83dSEd Tanous {LogDiagnosticDataTypes::Invalid, "Invalid"}, 1630ec8b83dSEd Tanous {LogDiagnosticDataTypes::Manager, "Manager"}, 1640ec8b83dSEd Tanous {LogDiagnosticDataTypes::PreOS, "PreOS"}, 1650ec8b83dSEd Tanous {LogDiagnosticDataTypes::OS, "OS"}, 1660ec8b83dSEd Tanous {LogDiagnosticDataTypes::OEM, "OEM"}, 1670ec8b83dSEd Tanous }); 1680ec8b83dSEd Tanous 169a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogPurpose, { 170a8d8f9d8SEd Tanous {LogPurpose::Invalid, "Invalid"}, 171a8d8f9d8SEd Tanous {LogPurpose::Diagnostic, "Diagnostic"}, 172a8d8f9d8SEd Tanous {LogPurpose::Operations, "Operations"}, 173a8d8f9d8SEd Tanous {LogPurpose::Security, "Security"}, 174a8d8f9d8SEd Tanous {LogPurpose::Telemetry, "Telemetry"}, 175a8d8f9d8SEd Tanous {LogPurpose::ExternalEntity, "ExternalEntity"}, 176a8d8f9d8SEd Tanous {LogPurpose::OEM, "OEM"}, 177a8d8f9d8SEd Tanous }); 178a8d8f9d8SEd Tanous 1792ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, { 1802ae81db9SGunnar Mills {TransferProtocolType::Invalid, "Invalid"}, 1812ae81db9SGunnar Mills {TransferProtocolType::CIFS, "CIFS"}, 1822ae81db9SGunnar Mills {TransferProtocolType::FTP, "FTP"}, 1832ae81db9SGunnar Mills {TransferProtocolType::SFTP, "SFTP"}, 1842ae81db9SGunnar Mills {TransferProtocolType::HTTP, "HTTP"}, 1852ae81db9SGunnar Mills {TransferProtocolType::HTTPS, "HTTPS"}, 1862ae81db9SGunnar Mills {TransferProtocolType::NFS, "NFS"}, 1872ae81db9SGunnar Mills {TransferProtocolType::SCP, "SCP"}, 1882ae81db9SGunnar Mills {TransferProtocolType::TFTP, "TFTP"}, 1892ae81db9SGunnar Mills {TransferProtocolType::OEM, "OEM"}, 1902ae81db9SGunnar Mills }); 1912ae81db9SGunnar Mills 192*f2a8e57eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(AutoClearResolvedEntries, { 193*f2a8e57eSGunnar Mills {AutoClearResolvedEntries::Invalid, "Invalid"}, 194*f2a8e57eSGunnar Mills {AutoClearResolvedEntries::ClearEventGroup, "ClearEventGroup"}, 195*f2a8e57eSGunnar Mills {AutoClearResolvedEntries::RetainCauseResolutionEntries, "RetainCauseResolutionEntries"}, 196*f2a8e57eSGunnar Mills {AutoClearResolvedEntries::UpdateCauseEntry, "UpdateCauseEntry"}, 197*f2a8e57eSGunnar Mills {AutoClearResolvedEntries::None, "None"}, 198*f2a8e57eSGunnar Mills }); 199*f2a8e57eSGunnar Mills 2000ec8b83dSEd Tanous } 2010ec8b83dSEd Tanous // clang-format on 202