| #pragma once |
| #include <cstdint> |
| #include <nlohmann/json.hpp> |
| |
| namespace triggers |
| { |
| // clang-format off |
| |
| enum class MetricTypeEnum : std::uint8_t{ |
| Invalid, |
| Numeric, |
| Discrete, |
| }; |
| |
| enum class TriggerActionEnum : std::uint8_t{ |
| Invalid, |
| LogToLogService, |
| RedfishEvent, |
| RedfishMetricReport, |
| }; |
| |
| enum class DiscreteTriggerConditionEnum : std::uint8_t{ |
| Invalid, |
| Specified, |
| Changed, |
| }; |
| |
| enum class ThresholdActivation : std::uint8_t{ |
| Invalid, |
| Increasing, |
| Decreasing, |
| Either, |
| Disabled, |
| }; |
| |
| enum class DirectionOfCrossingEnum : std::uint8_t{ |
| Invalid, |
| Increasing, |
| Decreasing, |
| }; |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(MetricTypeEnum, { |
| {MetricTypeEnum::Invalid, "Invalid"}, |
| {MetricTypeEnum::Numeric, "Numeric"}, |
| {MetricTypeEnum::Discrete, "Discrete"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(TriggerActionEnum, { |
| {TriggerActionEnum::Invalid, "Invalid"}, |
| {TriggerActionEnum::LogToLogService, "LogToLogService"}, |
| {TriggerActionEnum::RedfishEvent, "RedfishEvent"}, |
| {TriggerActionEnum::RedfishMetricReport, "RedfishMetricReport"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(DiscreteTriggerConditionEnum, { |
| {DiscreteTriggerConditionEnum::Invalid, "Invalid"}, |
| {DiscreteTriggerConditionEnum::Specified, "Specified"}, |
| {DiscreteTriggerConditionEnum::Changed, "Changed"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(ThresholdActivation, { |
| {ThresholdActivation::Invalid, "Invalid"}, |
| {ThresholdActivation::Increasing, "Increasing"}, |
| {ThresholdActivation::Decreasing, "Decreasing"}, |
| {ThresholdActivation::Either, "Either"}, |
| {ThresholdActivation::Disabled, "Disabled"}, |
| }); |
| |
| NLOHMANN_JSON_SERIALIZE_ENUM(DirectionOfCrossingEnum, { |
| {DirectionOfCrossingEnum::Invalid, "Invalid"}, |
| {DirectionOfCrossingEnum::Increasing, "Increasing"}, |
| {DirectionOfCrossingEnum::Decreasing, "Decreasing"}, |
| }); |
| |
| } // namespace triggers |
| // clang-format on |