xref: /openbmc/bmcweb/redfish-core/include/generated/enums/resource_block.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 resource_block
7 {
8 // clang-format off
9 
10 enum class ResourceBlockType{
11     Invalid,
12     Compute,
13     Processor,
14     Memory,
15     Network,
16     Storage,
17     ComputerSystem,
18     Expansion,
19     IndependentResource,
20 };
21 
22 enum class CompositionState{
23     Invalid,
24     Composing,
25     ComposedAndAvailable,
26     Composed,
27     Unused,
28     Failed,
29     Unavailable,
30 };
31 
32 enum class PoolType{
33     Invalid,
34     Free,
35     Active,
36     Unassigned,
37 };
38 
39 NLOHMANN_JSON_SERIALIZE_ENUM(ResourceBlockType, {
40     {ResourceBlockType::Invalid, "Invalid"},
41     {ResourceBlockType::Compute, "Compute"},
42     {ResourceBlockType::Processor, "Processor"},
43     {ResourceBlockType::Memory, "Memory"},
44     {ResourceBlockType::Network, "Network"},
45     {ResourceBlockType::Storage, "Storage"},
46     {ResourceBlockType::ComputerSystem, "ComputerSystem"},
47     {ResourceBlockType::Expansion, "Expansion"},
48     {ResourceBlockType::IndependentResource, "IndependentResource"},
49 });
50 
51 NLOHMANN_JSON_SERIALIZE_ENUM(CompositionState, {
52     {CompositionState::Invalid, "Invalid"},
53     {CompositionState::Composing, "Composing"},
54     {CompositionState::ComposedAndAvailable, "ComposedAndAvailable"},
55     {CompositionState::Composed, "Composed"},
56     {CompositionState::Unused, "Unused"},
57     {CompositionState::Failed, "Failed"},
58     {CompositionState::Unavailable, "Unavailable"},
59 });
60 
61 NLOHMANN_JSON_SERIALIZE_ENUM(PoolType, {
62     {PoolType::Invalid, "Invalid"},
63     {PoolType::Free, "Free"},
64     {PoolType::Active, "Active"},
65     {PoolType::Unassigned, "Unassigned"},
66 });
67 
68 }
69 // clang-format on
70