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