xref: /openbmc/bmcweb/features/redfish/include/generated/enums/triggers.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 triggers
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class MetricTypeEnum{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     Numeric,
130ec8b83dSEd Tanous     Discrete,
140ec8b83dSEd Tanous };
150ec8b83dSEd Tanous 
160ec8b83dSEd Tanous enum class TriggerActionEnum{
170ec8b83dSEd Tanous     Invalid,
180ec8b83dSEd Tanous     LogToLogService,
190ec8b83dSEd Tanous     RedfishEvent,
200ec8b83dSEd Tanous     RedfishMetricReport,
210ec8b83dSEd Tanous };
220ec8b83dSEd Tanous 
230ec8b83dSEd Tanous enum class DiscreteTriggerConditionEnum{
240ec8b83dSEd Tanous     Invalid,
250ec8b83dSEd Tanous     Specified,
260ec8b83dSEd Tanous     Changed,
270ec8b83dSEd Tanous };
280ec8b83dSEd Tanous 
290ec8b83dSEd Tanous enum class ThresholdActivation{
300ec8b83dSEd Tanous     Invalid,
310ec8b83dSEd Tanous     Increasing,
320ec8b83dSEd Tanous     Decreasing,
330ec8b83dSEd Tanous     Either,
34f263e09cSEd Tanous     Disabled,
350ec8b83dSEd Tanous };
360ec8b83dSEd Tanous 
370ec8b83dSEd Tanous enum class DirectionOfCrossingEnum{
380ec8b83dSEd Tanous     Invalid,
390ec8b83dSEd Tanous     Increasing,
400ec8b83dSEd Tanous     Decreasing,
410ec8b83dSEd Tanous };
420ec8b83dSEd Tanous 
43f2a8e57eSGunnar Mills enum class TriggerActionMessage{
44f2a8e57eSGunnar Mills     Invalid,
45f2a8e57eSGunnar Mills     Telemetry,
46f2a8e57eSGunnar Mills     DriveMediaLife,
47f2a8e57eSGunnar Mills     ConnectionSpeed,
48f2a8e57eSGunnar Mills };
49f2a8e57eSGunnar Mills 
500ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MetricTypeEnum, {
510ec8b83dSEd Tanous     {MetricTypeEnum::Invalid, "Invalid"},
520ec8b83dSEd Tanous     {MetricTypeEnum::Numeric, "Numeric"},
530ec8b83dSEd Tanous     {MetricTypeEnum::Discrete, "Discrete"},
540ec8b83dSEd Tanous });
550ec8b83dSEd Tanous 
560ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TriggerActionEnum, {
570ec8b83dSEd Tanous     {TriggerActionEnum::Invalid, "Invalid"},
580ec8b83dSEd Tanous     {TriggerActionEnum::LogToLogService, "LogToLogService"},
590ec8b83dSEd Tanous     {TriggerActionEnum::RedfishEvent, "RedfishEvent"},
600ec8b83dSEd Tanous     {TriggerActionEnum::RedfishMetricReport, "RedfishMetricReport"},
610ec8b83dSEd Tanous });
620ec8b83dSEd Tanous 
630ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DiscreteTriggerConditionEnum, {
640ec8b83dSEd Tanous     {DiscreteTriggerConditionEnum::Invalid, "Invalid"},
650ec8b83dSEd Tanous     {DiscreteTriggerConditionEnum::Specified, "Specified"},
660ec8b83dSEd Tanous     {DiscreteTriggerConditionEnum::Changed, "Changed"},
670ec8b83dSEd Tanous });
680ec8b83dSEd Tanous 
690ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThresholdActivation, {
700ec8b83dSEd Tanous     {ThresholdActivation::Invalid, "Invalid"},
710ec8b83dSEd Tanous     {ThresholdActivation::Increasing, "Increasing"},
720ec8b83dSEd Tanous     {ThresholdActivation::Decreasing, "Decreasing"},
730ec8b83dSEd Tanous     {ThresholdActivation::Either, "Either"},
74f263e09cSEd Tanous     {ThresholdActivation::Disabled, "Disabled"},
750ec8b83dSEd Tanous });
760ec8b83dSEd Tanous 
770ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DirectionOfCrossingEnum, {
780ec8b83dSEd Tanous     {DirectionOfCrossingEnum::Invalid, "Invalid"},
790ec8b83dSEd Tanous     {DirectionOfCrossingEnum::Increasing, "Increasing"},
800ec8b83dSEd Tanous     {DirectionOfCrossingEnum::Decreasing, "Decreasing"},
810ec8b83dSEd Tanous });
820ec8b83dSEd Tanous 
83f2a8e57eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(TriggerActionMessage, {
84f2a8e57eSGunnar Mills     {TriggerActionMessage::Invalid, "Invalid"},
85f2a8e57eSGunnar Mills     {TriggerActionMessage::Telemetry, "Telemetry"},
86f2a8e57eSGunnar Mills     {TriggerActionMessage::DriveMediaLife, "DriveMediaLife"},
87f2a8e57eSGunnar Mills     {TriggerActionMessage::ConnectionSpeed, "ConnectionSpeed"},
88f2a8e57eSGunnar Mills });
89f2a8e57eSGunnar Mills 
900ec8b83dSEd Tanous }
910ec8b83dSEd Tanous // clang-format on
92