xref: /openbmc/bmcweb/features/redfish/include/generated/enums/log_service.hpp (revision d125652e8a30dfeaad88bbfa5b1e04a80610469c)
140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace log_service
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class OverWritePolicy{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     Unknown,
130ec8b83dSEd Tanous     WrapsWhenFull,
140ec8b83dSEd Tanous     NeverOverWrites,
150ec8b83dSEd Tanous };
160ec8b83dSEd Tanous 
170ec8b83dSEd Tanous enum class LogEntryTypes{
180ec8b83dSEd Tanous     Invalid,
190ec8b83dSEd Tanous     Event,
200ec8b83dSEd Tanous     SEL,
210ec8b83dSEd Tanous     Multiple,
220ec8b83dSEd Tanous     OEM,
23e9cc1bc9SEd Tanous     CXL,
240ec8b83dSEd Tanous };
250ec8b83dSEd Tanous 
260ec8b83dSEd Tanous enum class SyslogSeverity{
270ec8b83dSEd Tanous     Invalid,
280ec8b83dSEd Tanous     Emergency,
290ec8b83dSEd Tanous     Alert,
300ec8b83dSEd Tanous     Critical,
310ec8b83dSEd Tanous     Error,
320ec8b83dSEd Tanous     Warning,
330ec8b83dSEd Tanous     Notice,
340ec8b83dSEd Tanous     Informational,
350ec8b83dSEd Tanous     Debug,
360ec8b83dSEd Tanous     All,
370ec8b83dSEd Tanous };
380ec8b83dSEd Tanous 
390ec8b83dSEd Tanous enum class SyslogFacility{
400ec8b83dSEd Tanous     Invalid,
410ec8b83dSEd Tanous     Kern,
420ec8b83dSEd Tanous     User,
430ec8b83dSEd Tanous     Mail,
440ec8b83dSEd Tanous     Daemon,
450ec8b83dSEd Tanous     Auth,
460ec8b83dSEd Tanous     Syslog,
470ec8b83dSEd Tanous     LPR,
480ec8b83dSEd Tanous     News,
490ec8b83dSEd Tanous     UUCP,
500ec8b83dSEd Tanous     Cron,
510ec8b83dSEd Tanous     Authpriv,
520ec8b83dSEd Tanous     FTP,
530ec8b83dSEd Tanous     NTP,
540ec8b83dSEd Tanous     Security,
550ec8b83dSEd Tanous     Console,
560ec8b83dSEd Tanous     SolarisCron,
570ec8b83dSEd Tanous     Local0,
580ec8b83dSEd Tanous     Local1,
590ec8b83dSEd Tanous     Local2,
600ec8b83dSEd Tanous     Local3,
610ec8b83dSEd Tanous     Local4,
620ec8b83dSEd Tanous     Local5,
630ec8b83dSEd Tanous     Local6,
640ec8b83dSEd Tanous     Local7,
650ec8b83dSEd Tanous };
660ec8b83dSEd Tanous 
670ec8b83dSEd Tanous enum class LogDiagnosticDataTypes{
680ec8b83dSEd Tanous     Invalid,
690ec8b83dSEd Tanous     Manager,
700ec8b83dSEd Tanous     PreOS,
710ec8b83dSEd Tanous     OS,
720ec8b83dSEd Tanous     OEM,
73*d125652eSGunnar Mills     Device,
740ec8b83dSEd Tanous };
750ec8b83dSEd Tanous 
76a8d8f9d8SEd Tanous enum class LogPurpose{
77a8d8f9d8SEd Tanous     Invalid,
78a8d8f9d8SEd Tanous     Diagnostic,
79a8d8f9d8SEd Tanous     Operations,
80a8d8f9d8SEd Tanous     Security,
81a8d8f9d8SEd Tanous     Telemetry,
82a8d8f9d8SEd Tanous     ExternalEntity,
83a8d8f9d8SEd Tanous     OEM,
84a8d8f9d8SEd Tanous };
85a8d8f9d8SEd Tanous 
862ae81db9SGunnar Mills enum class TransferProtocolType{
872ae81db9SGunnar Mills     Invalid,
882ae81db9SGunnar Mills     CIFS,
892ae81db9SGunnar Mills     FTP,
902ae81db9SGunnar Mills     SFTP,
912ae81db9SGunnar Mills     HTTP,
922ae81db9SGunnar Mills     HTTPS,
932ae81db9SGunnar Mills     NFS,
942ae81db9SGunnar Mills     SCP,
952ae81db9SGunnar Mills     TFTP,
962ae81db9SGunnar Mills     OEM,
972ae81db9SGunnar Mills };
982ae81db9SGunnar Mills 
99f2a8e57eSGunnar Mills enum class AutoClearResolvedEntries{
100f2a8e57eSGunnar Mills     Invalid,
101f2a8e57eSGunnar Mills     ClearEventGroup,
102f2a8e57eSGunnar Mills     RetainCauseResolutionEntries,
103f2a8e57eSGunnar Mills     UpdateCauseEntry,
104f2a8e57eSGunnar Mills     None,
105f2a8e57eSGunnar Mills };
106f2a8e57eSGunnar Mills 
1070ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(OverWritePolicy, {
1080ec8b83dSEd Tanous     {OverWritePolicy::Invalid, "Invalid"},
1090ec8b83dSEd Tanous     {OverWritePolicy::Unknown, "Unknown"},
1100ec8b83dSEd Tanous     {OverWritePolicy::WrapsWhenFull, "WrapsWhenFull"},
1110ec8b83dSEd Tanous     {OverWritePolicy::NeverOverWrites, "NeverOverWrites"},
1120ec8b83dSEd Tanous });
1130ec8b83dSEd Tanous 
1140ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryTypes, {
1150ec8b83dSEd Tanous     {LogEntryTypes::Invalid, "Invalid"},
1160ec8b83dSEd Tanous     {LogEntryTypes::Event, "Event"},
1170ec8b83dSEd Tanous     {LogEntryTypes::SEL, "SEL"},
1180ec8b83dSEd Tanous     {LogEntryTypes::Multiple, "Multiple"},
1190ec8b83dSEd Tanous     {LogEntryTypes::OEM, "OEM"},
120e9cc1bc9SEd Tanous     {LogEntryTypes::CXL, "CXL"},
1210ec8b83dSEd Tanous });
1220ec8b83dSEd Tanous 
1230ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, {
1240ec8b83dSEd Tanous     {SyslogSeverity::Invalid, "Invalid"},
1250ec8b83dSEd Tanous     {SyslogSeverity::Emergency, "Emergency"},
1260ec8b83dSEd Tanous     {SyslogSeverity::Alert, "Alert"},
1270ec8b83dSEd Tanous     {SyslogSeverity::Critical, "Critical"},
1280ec8b83dSEd Tanous     {SyslogSeverity::Error, "Error"},
1290ec8b83dSEd Tanous     {SyslogSeverity::Warning, "Warning"},
1300ec8b83dSEd Tanous     {SyslogSeverity::Notice, "Notice"},
1310ec8b83dSEd Tanous     {SyslogSeverity::Informational, "Informational"},
1320ec8b83dSEd Tanous     {SyslogSeverity::Debug, "Debug"},
1330ec8b83dSEd Tanous     {SyslogSeverity::All, "All"},
1340ec8b83dSEd Tanous });
1350ec8b83dSEd Tanous 
1360ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, {
1370ec8b83dSEd Tanous     {SyslogFacility::Invalid, "Invalid"},
1380ec8b83dSEd Tanous     {SyslogFacility::Kern, "Kern"},
1390ec8b83dSEd Tanous     {SyslogFacility::User, "User"},
1400ec8b83dSEd Tanous     {SyslogFacility::Mail, "Mail"},
1410ec8b83dSEd Tanous     {SyslogFacility::Daemon, "Daemon"},
1420ec8b83dSEd Tanous     {SyslogFacility::Auth, "Auth"},
1430ec8b83dSEd Tanous     {SyslogFacility::Syslog, "Syslog"},
1440ec8b83dSEd Tanous     {SyslogFacility::LPR, "LPR"},
1450ec8b83dSEd Tanous     {SyslogFacility::News, "News"},
1460ec8b83dSEd Tanous     {SyslogFacility::UUCP, "UUCP"},
1470ec8b83dSEd Tanous     {SyslogFacility::Cron, "Cron"},
1480ec8b83dSEd Tanous     {SyslogFacility::Authpriv, "Authpriv"},
1490ec8b83dSEd Tanous     {SyslogFacility::FTP, "FTP"},
1500ec8b83dSEd Tanous     {SyslogFacility::NTP, "NTP"},
1510ec8b83dSEd Tanous     {SyslogFacility::Security, "Security"},
1520ec8b83dSEd Tanous     {SyslogFacility::Console, "Console"},
1530ec8b83dSEd Tanous     {SyslogFacility::SolarisCron, "SolarisCron"},
1540ec8b83dSEd Tanous     {SyslogFacility::Local0, "Local0"},
1550ec8b83dSEd Tanous     {SyslogFacility::Local1, "Local1"},
1560ec8b83dSEd Tanous     {SyslogFacility::Local2, "Local2"},
1570ec8b83dSEd Tanous     {SyslogFacility::Local3, "Local3"},
1580ec8b83dSEd Tanous     {SyslogFacility::Local4, "Local4"},
1590ec8b83dSEd Tanous     {SyslogFacility::Local5, "Local5"},
1600ec8b83dSEd Tanous     {SyslogFacility::Local6, "Local6"},
1610ec8b83dSEd Tanous     {SyslogFacility::Local7, "Local7"},
1620ec8b83dSEd Tanous });
1630ec8b83dSEd Tanous 
1640ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, {
1650ec8b83dSEd Tanous     {LogDiagnosticDataTypes::Invalid, "Invalid"},
1660ec8b83dSEd Tanous     {LogDiagnosticDataTypes::Manager, "Manager"},
1670ec8b83dSEd Tanous     {LogDiagnosticDataTypes::PreOS, "PreOS"},
1680ec8b83dSEd Tanous     {LogDiagnosticDataTypes::OS, "OS"},
1690ec8b83dSEd Tanous     {LogDiagnosticDataTypes::OEM, "OEM"},
170*d125652eSGunnar Mills     {LogDiagnosticDataTypes::Device, "Device"},
1710ec8b83dSEd Tanous });
1720ec8b83dSEd Tanous 
173a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LogPurpose, {
174a8d8f9d8SEd Tanous     {LogPurpose::Invalid, "Invalid"},
175a8d8f9d8SEd Tanous     {LogPurpose::Diagnostic, "Diagnostic"},
176a8d8f9d8SEd Tanous     {LogPurpose::Operations, "Operations"},
177a8d8f9d8SEd Tanous     {LogPurpose::Security, "Security"},
178a8d8f9d8SEd Tanous     {LogPurpose::Telemetry, "Telemetry"},
179a8d8f9d8SEd Tanous     {LogPurpose::ExternalEntity, "ExternalEntity"},
180a8d8f9d8SEd Tanous     {LogPurpose::OEM, "OEM"},
181a8d8f9d8SEd Tanous });
182a8d8f9d8SEd Tanous 
1832ae81db9SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, {
1842ae81db9SGunnar Mills     {TransferProtocolType::Invalid, "Invalid"},
1852ae81db9SGunnar Mills     {TransferProtocolType::CIFS, "CIFS"},
1862ae81db9SGunnar Mills     {TransferProtocolType::FTP, "FTP"},
1872ae81db9SGunnar Mills     {TransferProtocolType::SFTP, "SFTP"},
1882ae81db9SGunnar Mills     {TransferProtocolType::HTTP, "HTTP"},
1892ae81db9SGunnar Mills     {TransferProtocolType::HTTPS, "HTTPS"},
1902ae81db9SGunnar Mills     {TransferProtocolType::NFS, "NFS"},
1912ae81db9SGunnar Mills     {TransferProtocolType::SCP, "SCP"},
1922ae81db9SGunnar Mills     {TransferProtocolType::TFTP, "TFTP"},
1932ae81db9SGunnar Mills     {TransferProtocolType::OEM, "OEM"},
1942ae81db9SGunnar Mills });
1952ae81db9SGunnar Mills 
196f2a8e57eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(AutoClearResolvedEntries, {
197f2a8e57eSGunnar Mills     {AutoClearResolvedEntries::Invalid, "Invalid"},
198f2a8e57eSGunnar Mills     {AutoClearResolvedEntries::ClearEventGroup, "ClearEventGroup"},
199f2a8e57eSGunnar Mills     {AutoClearResolvedEntries::RetainCauseResolutionEntries, "RetainCauseResolutionEntries"},
200f2a8e57eSGunnar Mills     {AutoClearResolvedEntries::UpdateCauseEntry, "UpdateCauseEntry"},
201f2a8e57eSGunnar Mills     {AutoClearResolvedEntries::None, "None"},
202f2a8e57eSGunnar Mills });
203f2a8e57eSGunnar Mills 
2040ec8b83dSEd Tanous }
2050ec8b83dSEd Tanous // clang-format on
206