1*0ec8b83dSEd Tanous #pragma once 2*0ec8b83dSEd Tanous #include <nlohmann/json.hpp> 3*0ec8b83dSEd Tanous 4*0ec8b83dSEd Tanous namespace event_destination 5*0ec8b83dSEd Tanous { 6*0ec8b83dSEd Tanous // clang-format off 7*0ec8b83dSEd Tanous 8*0ec8b83dSEd Tanous enum class EventFormatType{ 9*0ec8b83dSEd Tanous Invalid, 10*0ec8b83dSEd Tanous Event, 11*0ec8b83dSEd Tanous MetricReport, 12*0ec8b83dSEd Tanous }; 13*0ec8b83dSEd Tanous 14*0ec8b83dSEd Tanous enum class EventDestinationProtocol{ 15*0ec8b83dSEd Tanous Invalid, 16*0ec8b83dSEd Tanous Redfish, 17*0ec8b83dSEd Tanous SNMPv1, 18*0ec8b83dSEd Tanous SNMPv2c, 19*0ec8b83dSEd Tanous SNMPv3, 20*0ec8b83dSEd Tanous SMTP, 21*0ec8b83dSEd Tanous SyslogTLS, 22*0ec8b83dSEd Tanous SyslogTCP, 23*0ec8b83dSEd Tanous SyslogUDP, 24*0ec8b83dSEd Tanous SyslogRELP, 25*0ec8b83dSEd Tanous OEM, 26*0ec8b83dSEd Tanous }; 27*0ec8b83dSEd Tanous 28*0ec8b83dSEd Tanous enum class SubscriptionType{ 29*0ec8b83dSEd Tanous Invalid, 30*0ec8b83dSEd Tanous RedfishEvent, 31*0ec8b83dSEd Tanous SSE, 32*0ec8b83dSEd Tanous SNMPTrap, 33*0ec8b83dSEd Tanous SNMPInform, 34*0ec8b83dSEd Tanous Syslog, 35*0ec8b83dSEd Tanous OEM, 36*0ec8b83dSEd Tanous }; 37*0ec8b83dSEd Tanous 38*0ec8b83dSEd Tanous enum class DeliveryRetryPolicy{ 39*0ec8b83dSEd Tanous Invalid, 40*0ec8b83dSEd Tanous TerminateAfterRetries, 41*0ec8b83dSEd Tanous SuspendRetries, 42*0ec8b83dSEd Tanous RetryForever, 43*0ec8b83dSEd Tanous RetryForeverWithBackoff, 44*0ec8b83dSEd Tanous }; 45*0ec8b83dSEd Tanous 46*0ec8b83dSEd Tanous enum class SNMPAuthenticationProtocols{ 47*0ec8b83dSEd Tanous Invalid, 48*0ec8b83dSEd Tanous None, 49*0ec8b83dSEd Tanous CommunityString, 50*0ec8b83dSEd Tanous HMAC_MD5, 51*0ec8b83dSEd Tanous HMAC_SHA96, 52*0ec8b83dSEd Tanous HMAC128_SHA224, 53*0ec8b83dSEd Tanous HMAC192_SHA256, 54*0ec8b83dSEd Tanous HMAC256_SHA384, 55*0ec8b83dSEd Tanous HMAC384_SHA512, 56*0ec8b83dSEd Tanous }; 57*0ec8b83dSEd Tanous 58*0ec8b83dSEd Tanous enum class SNMPEncryptionProtocols{ 59*0ec8b83dSEd Tanous Invalid, 60*0ec8b83dSEd Tanous None, 61*0ec8b83dSEd Tanous CBC_DES, 62*0ec8b83dSEd Tanous CFB128_AES128, 63*0ec8b83dSEd Tanous }; 64*0ec8b83dSEd Tanous 65*0ec8b83dSEd Tanous enum class SyslogSeverity{ 66*0ec8b83dSEd Tanous Invalid, 67*0ec8b83dSEd Tanous Emergency, 68*0ec8b83dSEd Tanous Alert, 69*0ec8b83dSEd Tanous Critical, 70*0ec8b83dSEd Tanous Error, 71*0ec8b83dSEd Tanous Warning, 72*0ec8b83dSEd Tanous Notice, 73*0ec8b83dSEd Tanous Informational, 74*0ec8b83dSEd Tanous Debug, 75*0ec8b83dSEd Tanous All, 76*0ec8b83dSEd Tanous }; 77*0ec8b83dSEd Tanous 78*0ec8b83dSEd Tanous enum class SyslogFacility{ 79*0ec8b83dSEd Tanous Invalid, 80*0ec8b83dSEd Tanous Kern, 81*0ec8b83dSEd Tanous User, 82*0ec8b83dSEd Tanous Mail, 83*0ec8b83dSEd Tanous Daemon, 84*0ec8b83dSEd Tanous Auth, 85*0ec8b83dSEd Tanous Syslog, 86*0ec8b83dSEd Tanous LPR, 87*0ec8b83dSEd Tanous News, 88*0ec8b83dSEd Tanous UUCP, 89*0ec8b83dSEd Tanous Cron, 90*0ec8b83dSEd Tanous Authpriv, 91*0ec8b83dSEd Tanous FTP, 92*0ec8b83dSEd Tanous NTP, 93*0ec8b83dSEd Tanous Security, 94*0ec8b83dSEd Tanous Console, 95*0ec8b83dSEd Tanous SolarisCron, 96*0ec8b83dSEd Tanous Local0, 97*0ec8b83dSEd Tanous Local1, 98*0ec8b83dSEd Tanous Local2, 99*0ec8b83dSEd Tanous Local3, 100*0ec8b83dSEd Tanous Local4, 101*0ec8b83dSEd Tanous Local5, 102*0ec8b83dSEd Tanous Local6, 103*0ec8b83dSEd Tanous Local7, 104*0ec8b83dSEd Tanous }; 105*0ec8b83dSEd Tanous 106*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventFormatType, { 107*0ec8b83dSEd Tanous {EventFormatType::Invalid, "Invalid"}, 108*0ec8b83dSEd Tanous {EventFormatType::Event, "Event"}, 109*0ec8b83dSEd Tanous {EventFormatType::MetricReport, "MetricReport"}, 110*0ec8b83dSEd Tanous }); 111*0ec8b83dSEd Tanous 112*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventDestinationProtocol, { 113*0ec8b83dSEd Tanous {EventDestinationProtocol::Invalid, "Invalid"}, 114*0ec8b83dSEd Tanous {EventDestinationProtocol::Redfish, "Redfish"}, 115*0ec8b83dSEd Tanous {EventDestinationProtocol::SNMPv1, "SNMPv1"}, 116*0ec8b83dSEd Tanous {EventDestinationProtocol::SNMPv2c, "SNMPv2c"}, 117*0ec8b83dSEd Tanous {EventDestinationProtocol::SNMPv3, "SNMPv3"}, 118*0ec8b83dSEd Tanous {EventDestinationProtocol::SMTP, "SMTP"}, 119*0ec8b83dSEd Tanous {EventDestinationProtocol::SyslogTLS, "SyslogTLS"}, 120*0ec8b83dSEd Tanous {EventDestinationProtocol::SyslogTCP, "SyslogTCP"}, 121*0ec8b83dSEd Tanous {EventDestinationProtocol::SyslogUDP, "SyslogUDP"}, 122*0ec8b83dSEd Tanous {EventDestinationProtocol::SyslogRELP, "SyslogRELP"}, 123*0ec8b83dSEd Tanous {EventDestinationProtocol::OEM, "OEM"}, 124*0ec8b83dSEd Tanous }); 125*0ec8b83dSEd Tanous 126*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SubscriptionType, { 127*0ec8b83dSEd Tanous {SubscriptionType::Invalid, "Invalid"}, 128*0ec8b83dSEd Tanous {SubscriptionType::RedfishEvent, "RedfishEvent"}, 129*0ec8b83dSEd Tanous {SubscriptionType::SSE, "SSE"}, 130*0ec8b83dSEd Tanous {SubscriptionType::SNMPTrap, "SNMPTrap"}, 131*0ec8b83dSEd Tanous {SubscriptionType::SNMPInform, "SNMPInform"}, 132*0ec8b83dSEd Tanous {SubscriptionType::Syslog, "Syslog"}, 133*0ec8b83dSEd Tanous {SubscriptionType::OEM, "OEM"}, 134*0ec8b83dSEd Tanous }); 135*0ec8b83dSEd Tanous 136*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DeliveryRetryPolicy, { 137*0ec8b83dSEd Tanous {DeliveryRetryPolicy::Invalid, "Invalid"}, 138*0ec8b83dSEd Tanous {DeliveryRetryPolicy::TerminateAfterRetries, "TerminateAfterRetries"}, 139*0ec8b83dSEd Tanous {DeliveryRetryPolicy::SuspendRetries, "SuspendRetries"}, 140*0ec8b83dSEd Tanous {DeliveryRetryPolicy::RetryForever, "RetryForever"}, 141*0ec8b83dSEd Tanous {DeliveryRetryPolicy::RetryForeverWithBackoff, "RetryForeverWithBackoff"}, 142*0ec8b83dSEd Tanous }); 143*0ec8b83dSEd Tanous 144*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SNMPAuthenticationProtocols, { 145*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::Invalid, "Invalid"}, 146*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::None, "None"}, 147*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::CommunityString, "CommunityString"}, 148*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC_MD5, "HMAC_MD5"}, 149*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC_SHA96, "HMAC_SHA96"}, 150*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC128_SHA224, "HMAC128_SHA224"}, 151*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC192_SHA256, "HMAC192_SHA256"}, 152*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC256_SHA384, "HMAC256_SHA384"}, 153*0ec8b83dSEd Tanous {SNMPAuthenticationProtocols::HMAC384_SHA512, "HMAC384_SHA512"}, 154*0ec8b83dSEd Tanous }); 155*0ec8b83dSEd Tanous 156*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SNMPEncryptionProtocols, { 157*0ec8b83dSEd Tanous {SNMPEncryptionProtocols::Invalid, "Invalid"}, 158*0ec8b83dSEd Tanous {SNMPEncryptionProtocols::None, "None"}, 159*0ec8b83dSEd Tanous {SNMPEncryptionProtocols::CBC_DES, "CBC_DES"}, 160*0ec8b83dSEd Tanous {SNMPEncryptionProtocols::CFB128_AES128, "CFB128_AES128"}, 161*0ec8b83dSEd Tanous }); 162*0ec8b83dSEd Tanous 163*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, { 164*0ec8b83dSEd Tanous {SyslogSeverity::Invalid, "Invalid"}, 165*0ec8b83dSEd Tanous {SyslogSeverity::Emergency, "Emergency"}, 166*0ec8b83dSEd Tanous {SyslogSeverity::Alert, "Alert"}, 167*0ec8b83dSEd Tanous {SyslogSeverity::Critical, "Critical"}, 168*0ec8b83dSEd Tanous {SyslogSeverity::Error, "Error"}, 169*0ec8b83dSEd Tanous {SyslogSeverity::Warning, "Warning"}, 170*0ec8b83dSEd Tanous {SyslogSeverity::Notice, "Notice"}, 171*0ec8b83dSEd Tanous {SyslogSeverity::Informational, "Informational"}, 172*0ec8b83dSEd Tanous {SyslogSeverity::Debug, "Debug"}, 173*0ec8b83dSEd Tanous {SyslogSeverity::All, "All"}, 174*0ec8b83dSEd Tanous }); 175*0ec8b83dSEd Tanous 176*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, { 177*0ec8b83dSEd Tanous {SyslogFacility::Invalid, "Invalid"}, 178*0ec8b83dSEd Tanous {SyslogFacility::Kern, "Kern"}, 179*0ec8b83dSEd Tanous {SyslogFacility::User, "User"}, 180*0ec8b83dSEd Tanous {SyslogFacility::Mail, "Mail"}, 181*0ec8b83dSEd Tanous {SyslogFacility::Daemon, "Daemon"}, 182*0ec8b83dSEd Tanous {SyslogFacility::Auth, "Auth"}, 183*0ec8b83dSEd Tanous {SyslogFacility::Syslog, "Syslog"}, 184*0ec8b83dSEd Tanous {SyslogFacility::LPR, "LPR"}, 185*0ec8b83dSEd Tanous {SyslogFacility::News, "News"}, 186*0ec8b83dSEd Tanous {SyslogFacility::UUCP, "UUCP"}, 187*0ec8b83dSEd Tanous {SyslogFacility::Cron, "Cron"}, 188*0ec8b83dSEd Tanous {SyslogFacility::Authpriv, "Authpriv"}, 189*0ec8b83dSEd Tanous {SyslogFacility::FTP, "FTP"}, 190*0ec8b83dSEd Tanous {SyslogFacility::NTP, "NTP"}, 191*0ec8b83dSEd Tanous {SyslogFacility::Security, "Security"}, 192*0ec8b83dSEd Tanous {SyslogFacility::Console, "Console"}, 193*0ec8b83dSEd Tanous {SyslogFacility::SolarisCron, "SolarisCron"}, 194*0ec8b83dSEd Tanous {SyslogFacility::Local0, "Local0"}, 195*0ec8b83dSEd Tanous {SyslogFacility::Local1, "Local1"}, 196*0ec8b83dSEd Tanous {SyslogFacility::Local2, "Local2"}, 197*0ec8b83dSEd Tanous {SyslogFacility::Local3, "Local3"}, 198*0ec8b83dSEd Tanous {SyslogFacility::Local4, "Local4"}, 199*0ec8b83dSEd Tanous {SyslogFacility::Local5, "Local5"}, 200*0ec8b83dSEd Tanous {SyslogFacility::Local6, "Local6"}, 201*0ec8b83dSEd Tanous {SyslogFacility::Local7, "Local7"}, 202*0ec8b83dSEd Tanous }); 203*0ec8b83dSEd Tanous 204*0ec8b83dSEd Tanous } 205*0ec8b83dSEd Tanous // clang-format on 206