xref: /openbmc/bmcweb/redfish-core/include/generated/enums/volume.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3853c0dc5SEd Tanous #pragma once
4853c0dc5SEd Tanous #include <nlohmann/json.hpp>
5853c0dc5SEd Tanous 
6853c0dc5SEd Tanous namespace volume
7853c0dc5SEd Tanous {
8853c0dc5SEd Tanous // clang-format off
9853c0dc5SEd Tanous 
10853c0dc5SEd Tanous enum class InitializeType{
11853c0dc5SEd Tanous     Invalid,
12853c0dc5SEd Tanous     Fast,
13853c0dc5SEd Tanous     Slow,
14853c0dc5SEd Tanous };
15853c0dc5SEd Tanous 
16853c0dc5SEd Tanous enum class InitializeMethod{
17853c0dc5SEd Tanous     Invalid,
18853c0dc5SEd Tanous     Skip,
19853c0dc5SEd Tanous     Background,
20853c0dc5SEd Tanous     Foreground,
21853c0dc5SEd Tanous };
22853c0dc5SEd Tanous 
23853c0dc5SEd Tanous enum class RAIDType{
24853c0dc5SEd Tanous     Invalid,
25853c0dc5SEd Tanous     RAID0,
26853c0dc5SEd Tanous     RAID1,
27853c0dc5SEd Tanous     RAID3,
28853c0dc5SEd Tanous     RAID4,
29853c0dc5SEd Tanous     RAID5,
30853c0dc5SEd Tanous     RAID6,
31853c0dc5SEd Tanous     RAID10,
32853c0dc5SEd Tanous     RAID01,
33853c0dc5SEd Tanous     RAID6TP,
34853c0dc5SEd Tanous     RAID1E,
35853c0dc5SEd Tanous     RAID50,
36853c0dc5SEd Tanous     RAID60,
37853c0dc5SEd Tanous     RAID00,
38853c0dc5SEd Tanous     RAID10E,
39853c0dc5SEd Tanous     RAID1Triple,
40853c0dc5SEd Tanous     RAID10Triple,
41853c0dc5SEd Tanous     None,
42853c0dc5SEd Tanous };
43853c0dc5SEd Tanous 
44853c0dc5SEd Tanous enum class VolumeType{
45853c0dc5SEd Tanous     Invalid,
46853c0dc5SEd Tanous     RawDevice,
47853c0dc5SEd Tanous     NonRedundant,
48853c0dc5SEd Tanous     Mirrored,
49853c0dc5SEd Tanous     StripedWithParity,
50853c0dc5SEd Tanous     SpannedMirrors,
51853c0dc5SEd Tanous     SpannedStripesWithParity,
52853c0dc5SEd Tanous };
53853c0dc5SEd Tanous 
54853c0dc5SEd Tanous enum class EncryptionTypes{
55853c0dc5SEd Tanous     Invalid,
56853c0dc5SEd Tanous     NativeDriveEncryption,
57853c0dc5SEd Tanous     ControllerAssisted,
58853c0dc5SEd Tanous     SoftwareAssisted,
59853c0dc5SEd Tanous };
60853c0dc5SEd Tanous 
61853c0dc5SEd Tanous enum class WriteHoleProtectionPolicyType{
62853c0dc5SEd Tanous     Invalid,
63853c0dc5SEd Tanous     Off,
64853c0dc5SEd Tanous     Journaling,
65853c0dc5SEd Tanous     DistributedLog,
66853c0dc5SEd Tanous     Oem,
67853c0dc5SEd Tanous };
68853c0dc5SEd Tanous 
69853c0dc5SEd Tanous enum class VolumeUsageType{
70853c0dc5SEd Tanous     Invalid,
71853c0dc5SEd Tanous     Data,
72853c0dc5SEd Tanous     SystemData,
73853c0dc5SEd Tanous     CacheOnly,
74853c0dc5SEd Tanous     SystemReserve,
75853c0dc5SEd Tanous     ReplicationReserve,
76853c0dc5SEd Tanous };
77853c0dc5SEd Tanous 
78853c0dc5SEd Tanous enum class ReadCachePolicyType{
79853c0dc5SEd Tanous     Invalid,
80853c0dc5SEd Tanous     ReadAhead,
81853c0dc5SEd Tanous     AdaptiveReadAhead,
82853c0dc5SEd Tanous     Off,
83853c0dc5SEd Tanous };
84853c0dc5SEd Tanous 
85853c0dc5SEd Tanous enum class WriteCachePolicyType{
86853c0dc5SEd Tanous     Invalid,
87853c0dc5SEd Tanous     WriteThrough,
88853c0dc5SEd Tanous     ProtectedWriteBack,
89853c0dc5SEd Tanous     UnprotectedWriteBack,
90853c0dc5SEd Tanous     Off,
91853c0dc5SEd Tanous };
92853c0dc5SEd Tanous 
93853c0dc5SEd Tanous enum class WriteCacheStateType{
94853c0dc5SEd Tanous     Invalid,
95853c0dc5SEd Tanous     Unprotected,
96853c0dc5SEd Tanous     Protected,
97853c0dc5SEd Tanous     Degraded,
98853c0dc5SEd Tanous };
99853c0dc5SEd Tanous 
100853c0dc5SEd Tanous enum class LBAFormatType{
101853c0dc5SEd Tanous     Invalid,
102853c0dc5SEd Tanous     LBAFormat0,
103853c0dc5SEd Tanous     LBAFormat1,
104853c0dc5SEd Tanous     LBAFormat2,
105853c0dc5SEd Tanous     LBAFormat3,
106853c0dc5SEd Tanous     LBAFormat4,
107853c0dc5SEd Tanous     LBAFormat5,
108853c0dc5SEd Tanous     LBAFormat6,
109853c0dc5SEd Tanous     LBAFormat7,
110853c0dc5SEd Tanous     LBAFormat8,
111853c0dc5SEd Tanous     LBAFormat9,
112853c0dc5SEd Tanous     LBAFormat10,
113853c0dc5SEd Tanous     LBAFormat11,
114853c0dc5SEd Tanous     LBAFormat12,
115853c0dc5SEd Tanous     LBAFormat13,
116853c0dc5SEd Tanous     LBAFormat14,
117853c0dc5SEd Tanous     LBAFormat15,
118853c0dc5SEd Tanous };
119853c0dc5SEd Tanous 
120f263e09cSEd Tanous enum class NamespaceType{
121f263e09cSEd Tanous     Invalid,
122f263e09cSEd Tanous     Block,
123f263e09cSEd Tanous     KeyValue,
124f263e09cSEd Tanous     ZNS,
125f263e09cSEd Tanous     Computational,
126f263e09cSEd Tanous };
127f263e09cSEd Tanous 
128f263e09cSEd Tanous enum class OperationType{
129f263e09cSEd Tanous     Invalid,
130f263e09cSEd Tanous     Deduplicate,
131f263e09cSEd Tanous     CheckConsistency,
132f263e09cSEd Tanous     Initialize,
133f263e09cSEd Tanous     Replicate,
134f263e09cSEd Tanous     Delete,
135f263e09cSEd Tanous     ChangeRAIDType,
136f263e09cSEd Tanous     Rebuild,
137f263e09cSEd Tanous     Encrypt,
138f263e09cSEd Tanous     Decrypt,
139f263e09cSEd Tanous     Resize,
140f263e09cSEd Tanous     Compress,
141f263e09cSEd Tanous     Sanitize,
142f263e09cSEd Tanous     Format,
143e9cc1bc9SEd Tanous     ChangeStripSize,
144f263e09cSEd Tanous };
145f263e09cSEd Tanous 
146f263e09cSEd Tanous enum class LBARelativePerformanceType{
147f263e09cSEd Tanous     Invalid,
148f263e09cSEd Tanous     Best,
149f263e09cSEd Tanous     Better,
150f263e09cSEd Tanous     Good,
151f263e09cSEd Tanous     Degraded,
152f263e09cSEd Tanous };
153f263e09cSEd Tanous 
154853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(InitializeType, {
155853c0dc5SEd Tanous     {InitializeType::Invalid, "Invalid"},
156853c0dc5SEd Tanous     {InitializeType::Fast, "Fast"},
157853c0dc5SEd Tanous     {InitializeType::Slow, "Slow"},
158853c0dc5SEd Tanous });
159853c0dc5SEd Tanous 
160853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(InitializeMethod, {
161853c0dc5SEd Tanous     {InitializeMethod::Invalid, "Invalid"},
162853c0dc5SEd Tanous     {InitializeMethod::Skip, "Skip"},
163853c0dc5SEd Tanous     {InitializeMethod::Background, "Background"},
164853c0dc5SEd Tanous     {InitializeMethod::Foreground, "Foreground"},
165853c0dc5SEd Tanous });
166853c0dc5SEd Tanous 
167853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(RAIDType, {
168853c0dc5SEd Tanous     {RAIDType::Invalid, "Invalid"},
169853c0dc5SEd Tanous     {RAIDType::RAID0, "RAID0"},
170853c0dc5SEd Tanous     {RAIDType::RAID1, "RAID1"},
171853c0dc5SEd Tanous     {RAIDType::RAID3, "RAID3"},
172853c0dc5SEd Tanous     {RAIDType::RAID4, "RAID4"},
173853c0dc5SEd Tanous     {RAIDType::RAID5, "RAID5"},
174853c0dc5SEd Tanous     {RAIDType::RAID6, "RAID6"},
175853c0dc5SEd Tanous     {RAIDType::RAID10, "RAID10"},
176853c0dc5SEd Tanous     {RAIDType::RAID01, "RAID01"},
177853c0dc5SEd Tanous     {RAIDType::RAID6TP, "RAID6TP"},
178853c0dc5SEd Tanous     {RAIDType::RAID1E, "RAID1E"},
179853c0dc5SEd Tanous     {RAIDType::RAID50, "RAID50"},
180853c0dc5SEd Tanous     {RAIDType::RAID60, "RAID60"},
181853c0dc5SEd Tanous     {RAIDType::RAID00, "RAID00"},
182853c0dc5SEd Tanous     {RAIDType::RAID10E, "RAID10E"},
183853c0dc5SEd Tanous     {RAIDType::RAID1Triple, "RAID1Triple"},
184853c0dc5SEd Tanous     {RAIDType::RAID10Triple, "RAID10Triple"},
185853c0dc5SEd Tanous     {RAIDType::None, "None"},
186853c0dc5SEd Tanous });
187853c0dc5SEd Tanous 
188853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(VolumeType, {
189853c0dc5SEd Tanous     {VolumeType::Invalid, "Invalid"},
190853c0dc5SEd Tanous     {VolumeType::RawDevice, "RawDevice"},
191853c0dc5SEd Tanous     {VolumeType::NonRedundant, "NonRedundant"},
192853c0dc5SEd Tanous     {VolumeType::Mirrored, "Mirrored"},
193853c0dc5SEd Tanous     {VolumeType::StripedWithParity, "StripedWithParity"},
194853c0dc5SEd Tanous     {VolumeType::SpannedMirrors, "SpannedMirrors"},
195853c0dc5SEd Tanous     {VolumeType::SpannedStripesWithParity, "SpannedStripesWithParity"},
196853c0dc5SEd Tanous });
197853c0dc5SEd Tanous 
198853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionTypes, {
199853c0dc5SEd Tanous     {EncryptionTypes::Invalid, "Invalid"},
200853c0dc5SEd Tanous     {EncryptionTypes::NativeDriveEncryption, "NativeDriveEncryption"},
201853c0dc5SEd Tanous     {EncryptionTypes::ControllerAssisted, "ControllerAssisted"},
202853c0dc5SEd Tanous     {EncryptionTypes::SoftwareAssisted, "SoftwareAssisted"},
203853c0dc5SEd Tanous });
204853c0dc5SEd Tanous 
205853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(WriteHoleProtectionPolicyType, {
206853c0dc5SEd Tanous     {WriteHoleProtectionPolicyType::Invalid, "Invalid"},
207853c0dc5SEd Tanous     {WriteHoleProtectionPolicyType::Off, "Off"},
208853c0dc5SEd Tanous     {WriteHoleProtectionPolicyType::Journaling, "Journaling"},
209853c0dc5SEd Tanous     {WriteHoleProtectionPolicyType::DistributedLog, "DistributedLog"},
210853c0dc5SEd Tanous     {WriteHoleProtectionPolicyType::Oem, "Oem"},
211853c0dc5SEd Tanous });
212853c0dc5SEd Tanous 
213853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(VolumeUsageType, {
214853c0dc5SEd Tanous     {VolumeUsageType::Invalid, "Invalid"},
215853c0dc5SEd Tanous     {VolumeUsageType::Data, "Data"},
216853c0dc5SEd Tanous     {VolumeUsageType::SystemData, "SystemData"},
217853c0dc5SEd Tanous     {VolumeUsageType::CacheOnly, "CacheOnly"},
218853c0dc5SEd Tanous     {VolumeUsageType::SystemReserve, "SystemReserve"},
219853c0dc5SEd Tanous     {VolumeUsageType::ReplicationReserve, "ReplicationReserve"},
220853c0dc5SEd Tanous });
221853c0dc5SEd Tanous 
222853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ReadCachePolicyType, {
223853c0dc5SEd Tanous     {ReadCachePolicyType::Invalid, "Invalid"},
224853c0dc5SEd Tanous     {ReadCachePolicyType::ReadAhead, "ReadAhead"},
225853c0dc5SEd Tanous     {ReadCachePolicyType::AdaptiveReadAhead, "AdaptiveReadAhead"},
226853c0dc5SEd Tanous     {ReadCachePolicyType::Off, "Off"},
227853c0dc5SEd Tanous });
228853c0dc5SEd Tanous 
229853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(WriteCachePolicyType, {
230853c0dc5SEd Tanous     {WriteCachePolicyType::Invalid, "Invalid"},
231853c0dc5SEd Tanous     {WriteCachePolicyType::WriteThrough, "WriteThrough"},
232853c0dc5SEd Tanous     {WriteCachePolicyType::ProtectedWriteBack, "ProtectedWriteBack"},
233853c0dc5SEd Tanous     {WriteCachePolicyType::UnprotectedWriteBack, "UnprotectedWriteBack"},
234853c0dc5SEd Tanous     {WriteCachePolicyType::Off, "Off"},
235853c0dc5SEd Tanous });
236853c0dc5SEd Tanous 
237853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(WriteCacheStateType, {
238853c0dc5SEd Tanous     {WriteCacheStateType::Invalid, "Invalid"},
239853c0dc5SEd Tanous     {WriteCacheStateType::Unprotected, "Unprotected"},
240853c0dc5SEd Tanous     {WriteCacheStateType::Protected, "Protected"},
241853c0dc5SEd Tanous     {WriteCacheStateType::Degraded, "Degraded"},
242853c0dc5SEd Tanous });
243853c0dc5SEd Tanous 
244853c0dc5SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LBAFormatType, {
245853c0dc5SEd Tanous     {LBAFormatType::Invalid, "Invalid"},
246853c0dc5SEd Tanous     {LBAFormatType::LBAFormat0, "LBAFormat0"},
247853c0dc5SEd Tanous     {LBAFormatType::LBAFormat1, "LBAFormat1"},
248853c0dc5SEd Tanous     {LBAFormatType::LBAFormat2, "LBAFormat2"},
249853c0dc5SEd Tanous     {LBAFormatType::LBAFormat3, "LBAFormat3"},
250853c0dc5SEd Tanous     {LBAFormatType::LBAFormat4, "LBAFormat4"},
251853c0dc5SEd Tanous     {LBAFormatType::LBAFormat5, "LBAFormat5"},
252853c0dc5SEd Tanous     {LBAFormatType::LBAFormat6, "LBAFormat6"},
253853c0dc5SEd Tanous     {LBAFormatType::LBAFormat7, "LBAFormat7"},
254853c0dc5SEd Tanous     {LBAFormatType::LBAFormat8, "LBAFormat8"},
255853c0dc5SEd Tanous     {LBAFormatType::LBAFormat9, "LBAFormat9"},
256853c0dc5SEd Tanous     {LBAFormatType::LBAFormat10, "LBAFormat10"},
257853c0dc5SEd Tanous     {LBAFormatType::LBAFormat11, "LBAFormat11"},
258853c0dc5SEd Tanous     {LBAFormatType::LBAFormat12, "LBAFormat12"},
259853c0dc5SEd Tanous     {LBAFormatType::LBAFormat13, "LBAFormat13"},
260853c0dc5SEd Tanous     {LBAFormatType::LBAFormat14, "LBAFormat14"},
261853c0dc5SEd Tanous     {LBAFormatType::LBAFormat15, "LBAFormat15"},
262853c0dc5SEd Tanous });
263853c0dc5SEd Tanous 
264f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(NamespaceType, {
265f263e09cSEd Tanous     {NamespaceType::Invalid, "Invalid"},
266f263e09cSEd Tanous     {NamespaceType::Block, "Block"},
267f263e09cSEd Tanous     {NamespaceType::KeyValue, "KeyValue"},
268f263e09cSEd Tanous     {NamespaceType::ZNS, "ZNS"},
269f263e09cSEd Tanous     {NamespaceType::Computational, "Computational"},
270f263e09cSEd Tanous });
271f263e09cSEd Tanous 
272f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(OperationType, {
273f263e09cSEd Tanous     {OperationType::Invalid, "Invalid"},
274f263e09cSEd Tanous     {OperationType::Deduplicate, "Deduplicate"},
275f263e09cSEd Tanous     {OperationType::CheckConsistency, "CheckConsistency"},
276f263e09cSEd Tanous     {OperationType::Initialize, "Initialize"},
277f263e09cSEd Tanous     {OperationType::Replicate, "Replicate"},
278f263e09cSEd Tanous     {OperationType::Delete, "Delete"},
279f263e09cSEd Tanous     {OperationType::ChangeRAIDType, "ChangeRAIDType"},
280f263e09cSEd Tanous     {OperationType::Rebuild, "Rebuild"},
281f263e09cSEd Tanous     {OperationType::Encrypt, "Encrypt"},
282f263e09cSEd Tanous     {OperationType::Decrypt, "Decrypt"},
283f263e09cSEd Tanous     {OperationType::Resize, "Resize"},
284f263e09cSEd Tanous     {OperationType::Compress, "Compress"},
285f263e09cSEd Tanous     {OperationType::Sanitize, "Sanitize"},
286f263e09cSEd Tanous     {OperationType::Format, "Format"},
287e9cc1bc9SEd Tanous     {OperationType::ChangeStripSize, "ChangeStripSize"},
288f263e09cSEd Tanous });
289f263e09cSEd Tanous 
290f263e09cSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LBARelativePerformanceType, {
291f263e09cSEd Tanous     {LBARelativePerformanceType::Invalid, "Invalid"},
292f263e09cSEd Tanous     {LBARelativePerformanceType::Best, "Best"},
293f263e09cSEd Tanous     {LBARelativePerformanceType::Better, "Better"},
294f263e09cSEd Tanous     {LBARelativePerformanceType::Good, "Good"},
295f263e09cSEd Tanous     {LBARelativePerformanceType::Degraded, "Degraded"},
296f263e09cSEd Tanous });
297f263e09cSEd Tanous 
298853c0dc5SEd Tanous }
299853c0dc5SEd Tanous // clang-format on
300