xref: /openbmc/bmcweb/features/redfish/include/generated/enums/event.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace event
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class EventType{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     StatusChange,
130ec8b83dSEd Tanous     ResourceUpdated,
140ec8b83dSEd Tanous     ResourceAdded,
150ec8b83dSEd Tanous     ResourceRemoved,
160ec8b83dSEd Tanous     Alert,
170ec8b83dSEd Tanous     MetricReport,
180ec8b83dSEd Tanous     Other,
190ec8b83dSEd Tanous };
200ec8b83dSEd Tanous 
21f263e09cSEd Tanous enum class DiagnosticDataTypes{
22f263e09cSEd Tanous     Invalid,
23f263e09cSEd Tanous     Manager,
24f263e09cSEd Tanous     PreOS,
25f263e09cSEd Tanous     OS,
26f263e09cSEd Tanous     OEM,
27f263e09cSEd Tanous     CPER,
28f263e09cSEd Tanous     CPERSection,
29f263e09cSEd Tanous };
30f263e09cSEd Tanous 
310ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EventType, {
320ec8b83dSEd Tanous     {EventType::Invalid, "Invalid"},
330ec8b83dSEd Tanous     {EventType::StatusChange, "StatusChange"},
340ec8b83dSEd Tanous     {EventType::ResourceUpdated, "ResourceUpdated"},
350ec8b83dSEd Tanous     {EventType::ResourceAdded, "ResourceAdded"},
360ec8b83dSEd Tanous     {EventType::ResourceRemoved, "ResourceRemoved"},
370ec8b83dSEd Tanous     {EventType::Alert, "Alert"},
380ec8b83dSEd Tanous     {EventType::MetricReport, "MetricReport"},
390ec8b83dSEd Tanous     {EventType::Other, "Other"},
400ec8b83dSEd Tanous });
410ec8b83dSEd Tanous 
42f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DiagnosticDataTypes, {
43f263e09cSEd Tanous     {DiagnosticDataTypes::Invalid, "Invalid"},
44f263e09cSEd Tanous     {DiagnosticDataTypes::Manager, "Manager"},
45f263e09cSEd Tanous     {DiagnosticDataTypes::PreOS, "PreOS"},
46f263e09cSEd Tanous     {DiagnosticDataTypes::OS, "OS"},
47f263e09cSEd Tanous     {DiagnosticDataTypes::OEM, "OEM"},
48f263e09cSEd Tanous     {DiagnosticDataTypes::CPER, "CPER"},
49f263e09cSEd Tanous     {DiagnosticDataTypes::CPERSection, "CPERSection"},
50f263e09cSEd Tanous });
51f263e09cSEd Tanous 
520ec8b83dSEd Tanous }
530ec8b83dSEd Tanous // clang-format on
54