10ec8b83dSEd Tanous #pragma once
20ec8b83dSEd Tanous #include <nlohmann/json.hpp>
30ec8b83dSEd Tanous 
40ec8b83dSEd Tanous namespace event_destination
50ec8b83dSEd Tanous {
60ec8b83dSEd Tanous // clang-format off
70ec8b83dSEd Tanous 
80ec8b83dSEd Tanous enum class EventFormatType{
90ec8b83dSEd Tanous     Invalid,
100ec8b83dSEd Tanous     Event,
110ec8b83dSEd Tanous     MetricReport,
120ec8b83dSEd Tanous };
130ec8b83dSEd Tanous 
140ec8b83dSEd Tanous enum class EventDestinationProtocol{
150ec8b83dSEd Tanous     Invalid,
160ec8b83dSEd Tanous     Redfish,
17a8d8f9d8SEd Tanous     Kafka,
180ec8b83dSEd Tanous     SNMPv1,
190ec8b83dSEd Tanous     SNMPv2c,
200ec8b83dSEd Tanous     SNMPv3,
210ec8b83dSEd Tanous     SMTP,
220ec8b83dSEd Tanous     SyslogTLS,
230ec8b83dSEd Tanous     SyslogTCP,
240ec8b83dSEd Tanous     SyslogUDP,
250ec8b83dSEd Tanous     SyslogRELP,
260ec8b83dSEd Tanous     OEM,
270ec8b83dSEd Tanous };
280ec8b83dSEd Tanous 
290ec8b83dSEd Tanous enum class SubscriptionType{
300ec8b83dSEd Tanous     Invalid,
310ec8b83dSEd Tanous     RedfishEvent,
320ec8b83dSEd Tanous     SSE,
330ec8b83dSEd Tanous     SNMPTrap,
340ec8b83dSEd Tanous     SNMPInform,
350ec8b83dSEd Tanous     Syslog,
360ec8b83dSEd Tanous     OEM,
370ec8b83dSEd Tanous };
380ec8b83dSEd Tanous 
390ec8b83dSEd Tanous enum class DeliveryRetryPolicy{
400ec8b83dSEd Tanous     Invalid,
410ec8b83dSEd Tanous     TerminateAfterRetries,
420ec8b83dSEd Tanous     SuspendRetries,
430ec8b83dSEd Tanous     RetryForever,
440ec8b83dSEd Tanous     RetryForeverWithBackoff,
450ec8b83dSEd Tanous };
460ec8b83dSEd Tanous 
470ec8b83dSEd Tanous enum class SNMPAuthenticationProtocols{
480ec8b83dSEd Tanous     Invalid,
490ec8b83dSEd Tanous     None,
500ec8b83dSEd Tanous     CommunityString,
510ec8b83dSEd Tanous     HMAC_MD5,
520ec8b83dSEd Tanous     HMAC_SHA96,
530ec8b83dSEd Tanous     HMAC128_SHA224,
540ec8b83dSEd Tanous     HMAC192_SHA256,
550ec8b83dSEd Tanous     HMAC256_SHA384,
560ec8b83dSEd Tanous     HMAC384_SHA512,
570ec8b83dSEd Tanous };
580ec8b83dSEd Tanous 
590ec8b83dSEd Tanous enum class SNMPEncryptionProtocols{
600ec8b83dSEd Tanous     Invalid,
610ec8b83dSEd Tanous     None,
620ec8b83dSEd Tanous     CBC_DES,
630ec8b83dSEd Tanous     CFB128_AES128,
64*2ae81db9SGunnar Mills     CFB128_AES192,
65*2ae81db9SGunnar Mills     CFB128_AES256,
660ec8b83dSEd Tanous };
670ec8b83dSEd Tanous 
680ec8b83dSEd Tanous enum class SyslogSeverity{
690ec8b83dSEd Tanous     Invalid,
700ec8b83dSEd Tanous     Emergency,
710ec8b83dSEd Tanous     Alert,
720ec8b83dSEd Tanous     Critical,
730ec8b83dSEd Tanous     Error,
740ec8b83dSEd Tanous     Warning,
750ec8b83dSEd Tanous     Notice,
760ec8b83dSEd Tanous     Informational,
770ec8b83dSEd Tanous     Debug,
780ec8b83dSEd Tanous     All,
790ec8b83dSEd Tanous };
800ec8b83dSEd Tanous 
810ec8b83dSEd Tanous enum class SyslogFacility{
820ec8b83dSEd Tanous     Invalid,
830ec8b83dSEd Tanous     Kern,
840ec8b83dSEd Tanous     User,
850ec8b83dSEd Tanous     Mail,
860ec8b83dSEd Tanous     Daemon,
870ec8b83dSEd Tanous     Auth,
880ec8b83dSEd Tanous     Syslog,
890ec8b83dSEd Tanous     LPR,
900ec8b83dSEd Tanous     News,
910ec8b83dSEd Tanous     UUCP,
920ec8b83dSEd Tanous     Cron,
930ec8b83dSEd Tanous     Authpriv,
940ec8b83dSEd Tanous     FTP,
950ec8b83dSEd Tanous     NTP,
960ec8b83dSEd Tanous     Security,
970ec8b83dSEd Tanous     Console,
980ec8b83dSEd Tanous     SolarisCron,
990ec8b83dSEd Tanous     Local0,
1000ec8b83dSEd Tanous     Local1,
1010ec8b83dSEd Tanous     Local2,
1020ec8b83dSEd Tanous     Local3,
1030ec8b83dSEd Tanous     Local4,
1040ec8b83dSEd Tanous     Local5,
1050ec8b83dSEd Tanous     Local6,
1060ec8b83dSEd Tanous     Local7,
1070ec8b83dSEd Tanous };
1080ec8b83dSEd Tanous 
1090ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventFormatType, {
1100ec8b83dSEd Tanous     {EventFormatType::Invalid, "Invalid"},
1110ec8b83dSEd Tanous     {EventFormatType::Event, "Event"},
1120ec8b83dSEd Tanous     {EventFormatType::MetricReport, "MetricReport"},
1130ec8b83dSEd Tanous });
1140ec8b83dSEd Tanous 
1150ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventDestinationProtocol, {
1160ec8b83dSEd Tanous     {EventDestinationProtocol::Invalid, "Invalid"},
1170ec8b83dSEd Tanous     {EventDestinationProtocol::Redfish, "Redfish"},
118a8d8f9d8SEd Tanous     {EventDestinationProtocol::Kafka, "Kafka"},
1190ec8b83dSEd Tanous     {EventDestinationProtocol::SNMPv1, "SNMPv1"},
1200ec8b83dSEd Tanous     {EventDestinationProtocol::SNMPv2c, "SNMPv2c"},
1210ec8b83dSEd Tanous     {EventDestinationProtocol::SNMPv3, "SNMPv3"},
1220ec8b83dSEd Tanous     {EventDestinationProtocol::SMTP, "SMTP"},
1230ec8b83dSEd Tanous     {EventDestinationProtocol::SyslogTLS, "SyslogTLS"},
1240ec8b83dSEd Tanous     {EventDestinationProtocol::SyslogTCP, "SyslogTCP"},
1250ec8b83dSEd Tanous     {EventDestinationProtocol::SyslogUDP, "SyslogUDP"},
1260ec8b83dSEd Tanous     {EventDestinationProtocol::SyslogRELP, "SyslogRELP"},
1270ec8b83dSEd Tanous     {EventDestinationProtocol::OEM, "OEM"},
1280ec8b83dSEd Tanous });
1290ec8b83dSEd Tanous 
1300ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SubscriptionType, {
1310ec8b83dSEd Tanous     {SubscriptionType::Invalid, "Invalid"},
1320ec8b83dSEd Tanous     {SubscriptionType::RedfishEvent, "RedfishEvent"},
1330ec8b83dSEd Tanous     {SubscriptionType::SSE, "SSE"},
1340ec8b83dSEd Tanous     {SubscriptionType::SNMPTrap, "SNMPTrap"},
1350ec8b83dSEd Tanous     {SubscriptionType::SNMPInform, "SNMPInform"},
1360ec8b83dSEd Tanous     {SubscriptionType::Syslog, "Syslog"},
1370ec8b83dSEd Tanous     {SubscriptionType::OEM, "OEM"},
1380ec8b83dSEd Tanous });
1390ec8b83dSEd Tanous 
1400ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DeliveryRetryPolicy, {
1410ec8b83dSEd Tanous     {DeliveryRetryPolicy::Invalid, "Invalid"},
1420ec8b83dSEd Tanous     {DeliveryRetryPolicy::TerminateAfterRetries, "TerminateAfterRetries"},
1430ec8b83dSEd Tanous     {DeliveryRetryPolicy::SuspendRetries, "SuspendRetries"},
1440ec8b83dSEd Tanous     {DeliveryRetryPolicy::RetryForever, "RetryForever"},
1450ec8b83dSEd Tanous     {DeliveryRetryPolicy::RetryForeverWithBackoff, "RetryForeverWithBackoff"},
1460ec8b83dSEd Tanous });
1470ec8b83dSEd Tanous 
1480ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SNMPAuthenticationProtocols, {
1490ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::Invalid, "Invalid"},
1500ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::None, "None"},
1510ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::CommunityString, "CommunityString"},
1520ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC_MD5, "HMAC_MD5"},
1530ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC_SHA96, "HMAC_SHA96"},
1540ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC128_SHA224, "HMAC128_SHA224"},
1550ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC192_SHA256, "HMAC192_SHA256"},
1560ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC256_SHA384, "HMAC256_SHA384"},
1570ec8b83dSEd Tanous     {SNMPAuthenticationProtocols::HMAC384_SHA512, "HMAC384_SHA512"},
1580ec8b83dSEd Tanous });
1590ec8b83dSEd Tanous 
1600ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SNMPEncryptionProtocols, {
1610ec8b83dSEd Tanous     {SNMPEncryptionProtocols::Invalid, "Invalid"},
1620ec8b83dSEd Tanous     {SNMPEncryptionProtocols::None, "None"},
1630ec8b83dSEd Tanous     {SNMPEncryptionProtocols::CBC_DES, "CBC_DES"},
1640ec8b83dSEd Tanous     {SNMPEncryptionProtocols::CFB128_AES128, "CFB128_AES128"},
165*2ae81db9SGunnar Mills     {SNMPEncryptionProtocols::CFB128_AES192, "CFB128_AES192"},
166*2ae81db9SGunnar Mills     {SNMPEncryptionProtocols::CFB128_AES256, "CFB128_AES256"},
1670ec8b83dSEd Tanous });
1680ec8b83dSEd Tanous 
1690ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, {
1700ec8b83dSEd Tanous     {SyslogSeverity::Invalid, "Invalid"},
1710ec8b83dSEd Tanous     {SyslogSeverity::Emergency, "Emergency"},
1720ec8b83dSEd Tanous     {SyslogSeverity::Alert, "Alert"},
1730ec8b83dSEd Tanous     {SyslogSeverity::Critical, "Critical"},
1740ec8b83dSEd Tanous     {SyslogSeverity::Error, "Error"},
1750ec8b83dSEd Tanous     {SyslogSeverity::Warning, "Warning"},
1760ec8b83dSEd Tanous     {SyslogSeverity::Notice, "Notice"},
1770ec8b83dSEd Tanous     {SyslogSeverity::Informational, "Informational"},
1780ec8b83dSEd Tanous     {SyslogSeverity::Debug, "Debug"},
1790ec8b83dSEd Tanous     {SyslogSeverity::All, "All"},
1800ec8b83dSEd Tanous });
1810ec8b83dSEd Tanous 
1820ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, {
1830ec8b83dSEd Tanous     {SyslogFacility::Invalid, "Invalid"},
1840ec8b83dSEd Tanous     {SyslogFacility::Kern, "Kern"},
1850ec8b83dSEd Tanous     {SyslogFacility::User, "User"},
1860ec8b83dSEd Tanous     {SyslogFacility::Mail, "Mail"},
1870ec8b83dSEd Tanous     {SyslogFacility::Daemon, "Daemon"},
1880ec8b83dSEd Tanous     {SyslogFacility::Auth, "Auth"},
1890ec8b83dSEd Tanous     {SyslogFacility::Syslog, "Syslog"},
1900ec8b83dSEd Tanous     {SyslogFacility::LPR, "LPR"},
1910ec8b83dSEd Tanous     {SyslogFacility::News, "News"},
1920ec8b83dSEd Tanous     {SyslogFacility::UUCP, "UUCP"},
1930ec8b83dSEd Tanous     {SyslogFacility::Cron, "Cron"},
1940ec8b83dSEd Tanous     {SyslogFacility::Authpriv, "Authpriv"},
1950ec8b83dSEd Tanous     {SyslogFacility::FTP, "FTP"},
1960ec8b83dSEd Tanous     {SyslogFacility::NTP, "NTP"},
1970ec8b83dSEd Tanous     {SyslogFacility::Security, "Security"},
1980ec8b83dSEd Tanous     {SyslogFacility::Console, "Console"},
1990ec8b83dSEd Tanous     {SyslogFacility::SolarisCron, "SolarisCron"},
2000ec8b83dSEd Tanous     {SyslogFacility::Local0, "Local0"},
2010ec8b83dSEd Tanous     {SyslogFacility::Local1, "Local1"},
2020ec8b83dSEd Tanous     {SyslogFacility::Local2, "Local2"},
2030ec8b83dSEd Tanous     {SyslogFacility::Local3, "Local3"},
2040ec8b83dSEd Tanous     {SyslogFacility::Local4, "Local4"},
2050ec8b83dSEd Tanous     {SyslogFacility::Local5, "Local5"},
2060ec8b83dSEd Tanous     {SyslogFacility::Local6, "Local6"},
2070ec8b83dSEd Tanous     {SyslogFacility::Local7, "Local7"},
2080ec8b83dSEd Tanous });
2090ec8b83dSEd Tanous 
2100ec8b83dSEd Tanous }
2110ec8b83dSEd Tanous // clang-format on
212