1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace metric_report_definition 5 { 6 // clang-format off 7 8 enum class MetricReportDefinitionType{ 9 Invalid, 10 Periodic, 11 OnChange, 12 OnRequest, 13 }; 14 15 enum class ReportActionsEnum{ 16 Invalid, 17 LogToMetricReportsCollection, 18 RedfishEvent, 19 }; 20 21 enum class ReportUpdatesEnum{ 22 Invalid, 23 Overwrite, 24 AppendWrapsWhenFull, 25 AppendStopsWhenFull, 26 NewReport, 27 }; 28 29 enum class CalculationAlgorithmEnum{ 30 Invalid, 31 Average, 32 Maximum, 33 Minimum, 34 Summation, 35 }; 36 37 enum class CollectionTimeScope{ 38 Invalid, 39 Point, 40 Interval, 41 StartupInterval, 42 }; 43 44 NLOHMANN_JSON_SERIALIZE_ENUM(MetricReportDefinitionType, { 45 {MetricReportDefinitionType::Invalid, "Invalid"}, 46 {MetricReportDefinitionType::Periodic, "Periodic"}, 47 {MetricReportDefinitionType::OnChange, "OnChange"}, 48 {MetricReportDefinitionType::OnRequest, "OnRequest"}, 49 }); 50 51 NLOHMANN_JSON_SERIALIZE_ENUM(ReportActionsEnum, { 52 {ReportActionsEnum::Invalid, "Invalid"}, 53 {ReportActionsEnum::LogToMetricReportsCollection, "LogToMetricReportsCollection"}, 54 {ReportActionsEnum::RedfishEvent, "RedfishEvent"}, 55 }); 56 57 NLOHMANN_JSON_SERIALIZE_ENUM(ReportUpdatesEnum, { 58 {ReportUpdatesEnum::Invalid, "Invalid"}, 59 {ReportUpdatesEnum::Overwrite, "Overwrite"}, 60 {ReportUpdatesEnum::AppendWrapsWhenFull, "AppendWrapsWhenFull"}, 61 {ReportUpdatesEnum::AppendStopsWhenFull, "AppendStopsWhenFull"}, 62 {ReportUpdatesEnum::NewReport, "NewReport"}, 63 }); 64 65 NLOHMANN_JSON_SERIALIZE_ENUM(CalculationAlgorithmEnum, { 66 {CalculationAlgorithmEnum::Invalid, "Invalid"}, 67 {CalculationAlgorithmEnum::Average, "Average"}, 68 {CalculationAlgorithmEnum::Maximum, "Maximum"}, 69 {CalculationAlgorithmEnum::Minimum, "Minimum"}, 70 {CalculationAlgorithmEnum::Summation, "Summation"}, 71 }); 72 73 NLOHMANN_JSON_SERIALIZE_ENUM(CollectionTimeScope, { 74 {CollectionTimeScope::Invalid, "Invalid"}, 75 {CollectionTimeScope::Point, "Point"}, 76 {CollectionTimeScope::Interval, "Interval"}, 77 {CollectionTimeScope::StartupInterval, "StartupInterval"}, 78 }); 79 80 } 81 // clang-format on 82