xref: /openbmc/bmcweb/redfish-core/include/generated/enums/drive.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace drive
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class MediaType{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     HDD,
130ec8b83dSEd Tanous     SSD,
140ec8b83dSEd Tanous     SMR,
150ec8b83dSEd Tanous };
160ec8b83dSEd Tanous 
170ec8b83dSEd Tanous enum class HotspareType{
180ec8b83dSEd Tanous     Invalid,
190ec8b83dSEd Tanous     None,
200ec8b83dSEd Tanous     Global,
210ec8b83dSEd Tanous     Chassis,
220ec8b83dSEd Tanous     Dedicated,
230ec8b83dSEd Tanous };
240ec8b83dSEd Tanous 
250ec8b83dSEd Tanous enum class EncryptionAbility{
260ec8b83dSEd Tanous     Invalid,
270ec8b83dSEd Tanous     None,
280ec8b83dSEd Tanous     SelfEncryptingDrive,
290ec8b83dSEd Tanous     Other,
300ec8b83dSEd Tanous };
310ec8b83dSEd Tanous 
320ec8b83dSEd Tanous enum class EncryptionStatus{
330ec8b83dSEd Tanous     Invalid,
340ec8b83dSEd Tanous     Unecrypted,
350ec8b83dSEd Tanous     Unlocked,
360ec8b83dSEd Tanous     Locked,
370ec8b83dSEd Tanous     Foreign,
380ec8b83dSEd Tanous     Unencrypted,
390ec8b83dSEd Tanous };
400ec8b83dSEd Tanous 
410ec8b83dSEd Tanous enum class StatusIndicator{
420ec8b83dSEd Tanous     Invalid,
430ec8b83dSEd Tanous     OK,
440ec8b83dSEd Tanous     Fail,
450ec8b83dSEd Tanous     Rebuild,
460ec8b83dSEd Tanous     PredictiveFailureAnalysis,
470ec8b83dSEd Tanous     Hotspare,
480ec8b83dSEd Tanous     InACriticalArray,
490ec8b83dSEd Tanous     InAFailedArray,
500ec8b83dSEd Tanous };
510ec8b83dSEd Tanous 
520ec8b83dSEd Tanous enum class HotspareReplacementModeType{
530ec8b83dSEd Tanous     Invalid,
540ec8b83dSEd Tanous     Revertible,
550ec8b83dSEd Tanous     NonRevertible,
560ec8b83dSEd Tanous };
570ec8b83dSEd Tanous 
580ec8b83dSEd Tanous enum class DataSanitizationType{
590ec8b83dSEd Tanous     Invalid,
600ec8b83dSEd Tanous     BlockErase,
610ec8b83dSEd Tanous     CryptographicErase,
620ec8b83dSEd Tanous     Overwrite,
630ec8b83dSEd Tanous };
640ec8b83dSEd Tanous 
65a8d8f9d8SEd Tanous enum class FormFactor{
66a8d8f9d8SEd Tanous     Invalid,
67a8d8f9d8SEd Tanous     Drive3_5,
68a8d8f9d8SEd Tanous     Drive2_5,
692ae81db9SGunnar Mills     EDSFF,
70a8d8f9d8SEd Tanous     EDSFF_1U_Long,
71a8d8f9d8SEd Tanous     EDSFF_1U_Short,
72a8d8f9d8SEd Tanous     EDSFF_E3_Short,
73a8d8f9d8SEd Tanous     EDSFF_E3_Long,
742ae81db9SGunnar Mills     M2,
75a8d8f9d8SEd Tanous     M2_2230,
76a8d8f9d8SEd Tanous     M2_2242,
77a8d8f9d8SEd Tanous     M2_2260,
78a8d8f9d8SEd Tanous     M2_2280,
79a8d8f9d8SEd Tanous     M2_22110,
80a8d8f9d8SEd Tanous     U2,
81a8d8f9d8SEd Tanous     PCIeSlotFullLength,
82a8d8f9d8SEd Tanous     PCIeSlotLowProfile,
83a8d8f9d8SEd Tanous     PCIeHalfLength,
84a8d8f9d8SEd Tanous     OEM,
85a8d8f9d8SEd Tanous };
86a8d8f9d8SEd Tanous 
87f2a8e57eSGunnar Mills enum class ConfigurationLock{
88f2a8e57eSGunnar Mills     Invalid,
89f2a8e57eSGunnar Mills     Enabled,
90f2a8e57eSGunnar Mills     Disabled,
91f2a8e57eSGunnar Mills     Partial,
92f2a8e57eSGunnar Mills };
93f2a8e57eSGunnar Mills 
9428cfceb2SGunnar Mills enum class TargetConfigurationLockLevel{
9528cfceb2SGunnar Mills     Invalid,
9628cfceb2SGunnar Mills     Baseline,
9728cfceb2SGunnar Mills };
9828cfceb2SGunnar Mills 
9928cfceb2SGunnar Mills enum class ConfigLockOptions{
10028cfceb2SGunnar Mills     Invalid,
10128cfceb2SGunnar Mills     Unlocked,
10228cfceb2SGunnar Mills     Locked,
10328cfceb2SGunnar Mills     LockdownUnsupported,
10428cfceb2SGunnar Mills     CommandUnsupported,
10528cfceb2SGunnar Mills };
10628cfceb2SGunnar Mills 
1070ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MediaType, {
1080ec8b83dSEd Tanous     {MediaType::Invalid, "Invalid"},
1090ec8b83dSEd Tanous     {MediaType::HDD, "HDD"},
1100ec8b83dSEd Tanous     {MediaType::SSD, "SSD"},
1110ec8b83dSEd Tanous     {MediaType::SMR, "SMR"},
1120ec8b83dSEd Tanous });
1130ec8b83dSEd Tanous 
1140ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareType, {
1150ec8b83dSEd Tanous     {HotspareType::Invalid, "Invalid"},
1160ec8b83dSEd Tanous     {HotspareType::None, "None"},
1170ec8b83dSEd Tanous     {HotspareType::Global, "Global"},
1180ec8b83dSEd Tanous     {HotspareType::Chassis, "Chassis"},
1190ec8b83dSEd Tanous     {HotspareType::Dedicated, "Dedicated"},
1200ec8b83dSEd Tanous });
1210ec8b83dSEd Tanous 
1220ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionAbility, {
1230ec8b83dSEd Tanous     {EncryptionAbility::Invalid, "Invalid"},
1240ec8b83dSEd Tanous     {EncryptionAbility::None, "None"},
1250ec8b83dSEd Tanous     {EncryptionAbility::SelfEncryptingDrive, "SelfEncryptingDrive"},
1260ec8b83dSEd Tanous     {EncryptionAbility::Other, "Other"},
1270ec8b83dSEd Tanous });
1280ec8b83dSEd Tanous 
1290ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionStatus, {
1300ec8b83dSEd Tanous     {EncryptionStatus::Invalid, "Invalid"},
1310ec8b83dSEd Tanous     {EncryptionStatus::Unecrypted, "Unecrypted"},
1320ec8b83dSEd Tanous     {EncryptionStatus::Unlocked, "Unlocked"},
1330ec8b83dSEd Tanous     {EncryptionStatus::Locked, "Locked"},
1340ec8b83dSEd Tanous     {EncryptionStatus::Foreign, "Foreign"},
1350ec8b83dSEd Tanous     {EncryptionStatus::Unencrypted, "Unencrypted"},
1360ec8b83dSEd Tanous });
1370ec8b83dSEd Tanous 
1380ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(StatusIndicator, {
1390ec8b83dSEd Tanous     {StatusIndicator::Invalid, "Invalid"},
1400ec8b83dSEd Tanous     {StatusIndicator::OK, "OK"},
1410ec8b83dSEd Tanous     {StatusIndicator::Fail, "Fail"},
1420ec8b83dSEd Tanous     {StatusIndicator::Rebuild, "Rebuild"},
1430ec8b83dSEd Tanous     {StatusIndicator::PredictiveFailureAnalysis, "PredictiveFailureAnalysis"},
1440ec8b83dSEd Tanous     {StatusIndicator::Hotspare, "Hotspare"},
1450ec8b83dSEd Tanous     {StatusIndicator::InACriticalArray, "InACriticalArray"},
1460ec8b83dSEd Tanous     {StatusIndicator::InAFailedArray, "InAFailedArray"},
1470ec8b83dSEd Tanous });
1480ec8b83dSEd Tanous 
1490ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareReplacementModeType, {
1500ec8b83dSEd Tanous     {HotspareReplacementModeType::Invalid, "Invalid"},
1510ec8b83dSEd Tanous     {HotspareReplacementModeType::Revertible, "Revertible"},
1520ec8b83dSEd Tanous     {HotspareReplacementModeType::NonRevertible, "NonRevertible"},
1530ec8b83dSEd Tanous });
1540ec8b83dSEd Tanous 
1550ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DataSanitizationType, {
1560ec8b83dSEd Tanous     {DataSanitizationType::Invalid, "Invalid"},
1570ec8b83dSEd Tanous     {DataSanitizationType::BlockErase, "BlockErase"},
1580ec8b83dSEd Tanous     {DataSanitizationType::CryptographicErase, "CryptographicErase"},
1590ec8b83dSEd Tanous     {DataSanitizationType::Overwrite, "Overwrite"},
1600ec8b83dSEd Tanous });
1610ec8b83dSEd Tanous 
162a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FormFactor, {
163a8d8f9d8SEd Tanous     {FormFactor::Invalid, "Invalid"},
164a8d8f9d8SEd Tanous     {FormFactor::Drive3_5, "Drive3_5"},
165a8d8f9d8SEd Tanous     {FormFactor::Drive2_5, "Drive2_5"},
1662ae81db9SGunnar Mills     {FormFactor::EDSFF, "EDSFF"},
167a8d8f9d8SEd Tanous     {FormFactor::EDSFF_1U_Long, "EDSFF_1U_Long"},
168a8d8f9d8SEd Tanous     {FormFactor::EDSFF_1U_Short, "EDSFF_1U_Short"},
169a8d8f9d8SEd Tanous     {FormFactor::EDSFF_E3_Short, "EDSFF_E3_Short"},
170a8d8f9d8SEd Tanous     {FormFactor::EDSFF_E3_Long, "EDSFF_E3_Long"},
1712ae81db9SGunnar Mills     {FormFactor::M2, "M2"},
172a8d8f9d8SEd Tanous     {FormFactor::M2_2230, "M2_2230"},
173a8d8f9d8SEd Tanous     {FormFactor::M2_2242, "M2_2242"},
174a8d8f9d8SEd Tanous     {FormFactor::M2_2260, "M2_2260"},
175a8d8f9d8SEd Tanous     {FormFactor::M2_2280, "M2_2280"},
176a8d8f9d8SEd Tanous     {FormFactor::M2_22110, "M2_22110"},
177a8d8f9d8SEd Tanous     {FormFactor::U2, "U2"},
178a8d8f9d8SEd Tanous     {FormFactor::PCIeSlotFullLength, "PCIeSlotFullLength"},
179a8d8f9d8SEd Tanous     {FormFactor::PCIeSlotLowProfile, "PCIeSlotLowProfile"},
180a8d8f9d8SEd Tanous     {FormFactor::PCIeHalfLength, "PCIeHalfLength"},
181a8d8f9d8SEd Tanous     {FormFactor::OEM, "OEM"},
182a8d8f9d8SEd Tanous });
183a8d8f9d8SEd Tanous 
184f2a8e57eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ConfigurationLock, {
185f2a8e57eSGunnar Mills     {ConfigurationLock::Invalid, "Invalid"},
186f2a8e57eSGunnar Mills     {ConfigurationLock::Enabled, "Enabled"},
187f2a8e57eSGunnar Mills     {ConfigurationLock::Disabled, "Disabled"},
188f2a8e57eSGunnar Mills     {ConfigurationLock::Partial, "Partial"},
189f2a8e57eSGunnar Mills });
190f2a8e57eSGunnar Mills 
19128cfceb2SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(TargetConfigurationLockLevel, {
19228cfceb2SGunnar Mills     {TargetConfigurationLockLevel::Invalid, "Invalid"},
19328cfceb2SGunnar Mills     {TargetConfigurationLockLevel::Baseline, "Baseline"},
19428cfceb2SGunnar Mills });
19528cfceb2SGunnar Mills 
19628cfceb2SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ConfigLockOptions, {
19728cfceb2SGunnar Mills     {ConfigLockOptions::Invalid, "Invalid"},
19828cfceb2SGunnar Mills     {ConfigLockOptions::Unlocked, "Unlocked"},
19928cfceb2SGunnar Mills     {ConfigLockOptions::Locked, "Locked"},
20028cfceb2SGunnar Mills     {ConfigLockOptions::LockdownUnsupported, "LockdownUnsupported"},
20128cfceb2SGunnar Mills     {ConfigLockOptions::CommandUnsupported, "CommandUnsupported"},
20228cfceb2SGunnar Mills });
20328cfceb2SGunnar Mills 
2040ec8b83dSEd Tanous }
2050ec8b83dSEd Tanous // clang-format on
206