xref: /openbmc/bmcweb/redfish-core/include/generated/enums/log_entry.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace log_entry
7 {
8 // clang-format off
9 
10 enum class EventSeverity{
11     Invalid,
12     OK,
13     Warning,
14     Critical,
15 };
16 
17 enum class LogEntryType{
18     Invalid,
19     Event,
20     SEL,
21     Oem,
22     CXL,
23 };
24 
25 enum class LogDiagnosticDataTypes{
26     Invalid,
27     Manager,
28     PreOS,
29     OS,
30     OEM,
31     CPER,
32     CPERSection,
33 };
34 
35 enum class OriginatorTypes{
36     Invalid,
37     Client,
38     Internal,
39     SupportingService,
40 };
41 
42 enum class CXLEntryType{
43     Invalid,
44     DynamicCapacity,
45     Informational,
46     Warning,
47     Failure,
48     Fatal,
49 };
50 
51 NLOHMANN_JSON_SERIALIZE_ENUM(EventSeverity, {
52     {EventSeverity::Invalid, "Invalid"},
53     {EventSeverity::OK, "OK"},
54     {EventSeverity::Warning, "Warning"},
55     {EventSeverity::Critical, "Critical"},
56 });
57 
58 NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryType, {
59     {LogEntryType::Invalid, "Invalid"},
60     {LogEntryType::Event, "Event"},
61     {LogEntryType::SEL, "SEL"},
62     {LogEntryType::Oem, "Oem"},
63     {LogEntryType::CXL, "CXL"},
64 });
65 
66 NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, {
67     {LogDiagnosticDataTypes::Invalid, "Invalid"},
68     {LogDiagnosticDataTypes::Manager, "Manager"},
69     {LogDiagnosticDataTypes::PreOS, "PreOS"},
70     {LogDiagnosticDataTypes::OS, "OS"},
71     {LogDiagnosticDataTypes::OEM, "OEM"},
72     {LogDiagnosticDataTypes::CPER, "CPER"},
73     {LogDiagnosticDataTypes::CPERSection, "CPERSection"},
74 });
75 
76 NLOHMANN_JSON_SERIALIZE_ENUM(OriginatorTypes, {
77     {OriginatorTypes::Invalid, "Invalid"},
78     {OriginatorTypes::Client, "Client"},
79     {OriginatorTypes::Internal, "Internal"},
80     {OriginatorTypes::SupportingService, "SupportingService"},
81 });
82 
83 NLOHMANN_JSON_SERIALIZE_ENUM(CXLEntryType, {
84     {CXLEntryType::Invalid, "Invalid"},
85     {CXLEntryType::DynamicCapacity, "DynamicCapacity"},
86     {CXLEntryType::Informational, "Informational"},
87     {CXLEntryType::Warning, "Warning"},
88     {CXLEntryType::Failure, "Failure"},
89     {CXLEntryType::Fatal, "Fatal"},
90 });
91 
92 }
93 // clang-format on
94