xref: /openbmc/bmcweb/redfish-core/include/generated/enums/redundancy.hpp (revision d1a3caa4eda8ca07cd656b4e4e8aa1e4ffe53e1e)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace redundancy
7 {
8 // clang-format off
9 
10 enum class RedundancyMode{
11     Invalid,
12     Failover,
13     Nm,
14     Sharing,
15     Sparing,
16     NotRedundant,
17 };
18 
19 enum class RedundancyType{
20     Invalid,
21     Failover,
22     NPlusM,
23     Sharing,
24     Sparing,
25     NotRedundant,
26 };
27 
28 NLOHMANN_JSON_SERIALIZE_ENUM(RedundancyMode, {
29     {RedundancyMode::Invalid, "Invalid"},
30     {RedundancyMode::Failover, "Failover"},
31     {RedundancyMode::Nm, "N+m"},
32     {RedundancyMode::Sharing, "Sharing"},
33     {RedundancyMode::Sparing, "Sparing"},
34     {RedundancyMode::NotRedundant, "NotRedundant"},
35 });
36 
37 NLOHMANN_JSON_SERIALIZE_ENUM(RedundancyType, {
38     {RedundancyType::Invalid, "Invalid"},
39     {RedundancyType::Failover, "Failover"},
40     {RedundancyType::NPlusM, "NPlusM"},
41     {RedundancyType::Sharing, "Sharing"},
42     {RedundancyType::Sparing, "Sparing"},
43     {RedundancyType::NotRedundant, "NotRedundant"},
44 });
45 
46 }
47 // clang-format on
48