summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/redundancy.hpp
blob: 8c14cc4529a58e27adee983d2578ad8d9657863e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>

namespace redundancy
{
// clang-format off

enum class RedundancyMode{
    Invalid,
    Failover,
    Nm,
    Sharing,
    Sparing,
    NotRedundant,
};

enum class RedundancyType{
    Invalid,
    Failover,
    NPlusM,
    Sharing,
    Sparing,
    NotRedundant,
};

NLOHMANN_JSON_SERIALIZE_ENUM(RedundancyMode, {
    {RedundancyMode::Invalid, "Invalid"},
    {RedundancyMode::Failover, "Failover"},
    {RedundancyMode::Nm, "N+m"},
    {RedundancyMode::Sharing, "Sharing"},
    {RedundancyMode::Sparing, "Sparing"},
    {RedundancyMode::NotRedundant, "NotRedundant"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(RedundancyType, {
    {RedundancyType::Invalid, "Invalid"},
    {RedundancyType::Failover, "Failover"},
    {RedundancyType::NPlusM, "NPlusM"},
    {RedundancyType::Sharing, "Sharing"},
    {RedundancyType::Sparing, "Sparing"},
    {RedundancyType::NotRedundant, "NotRedundant"},
});

// clang-format on
} // namespace redundancy