10ec8b83dSEd Tanous #pragma once 20ec8b83dSEd Tanous #include <nlohmann/json.hpp> 30ec8b83dSEd Tanous 40ec8b83dSEd Tanous namespace drive 50ec8b83dSEd Tanous { 60ec8b83dSEd Tanous // clang-format off 70ec8b83dSEd Tanous 80ec8b83dSEd Tanous enum class MediaType{ 90ec8b83dSEd Tanous Invalid, 100ec8b83dSEd Tanous HDD, 110ec8b83dSEd Tanous SSD, 120ec8b83dSEd Tanous SMR, 130ec8b83dSEd Tanous }; 140ec8b83dSEd Tanous 150ec8b83dSEd Tanous enum class HotspareType{ 160ec8b83dSEd Tanous Invalid, 170ec8b83dSEd Tanous None, 180ec8b83dSEd Tanous Global, 190ec8b83dSEd Tanous Chassis, 200ec8b83dSEd Tanous Dedicated, 210ec8b83dSEd Tanous }; 220ec8b83dSEd Tanous 230ec8b83dSEd Tanous enum class EncryptionAbility{ 240ec8b83dSEd Tanous Invalid, 250ec8b83dSEd Tanous None, 260ec8b83dSEd Tanous SelfEncryptingDrive, 270ec8b83dSEd Tanous Other, 280ec8b83dSEd Tanous }; 290ec8b83dSEd Tanous 300ec8b83dSEd Tanous enum class EncryptionStatus{ 310ec8b83dSEd Tanous Invalid, 320ec8b83dSEd Tanous Unecrypted, 330ec8b83dSEd Tanous Unlocked, 340ec8b83dSEd Tanous Locked, 350ec8b83dSEd Tanous Foreign, 360ec8b83dSEd Tanous Unencrypted, 370ec8b83dSEd Tanous }; 380ec8b83dSEd Tanous 390ec8b83dSEd Tanous enum class StatusIndicator{ 400ec8b83dSEd Tanous Invalid, 410ec8b83dSEd Tanous OK, 420ec8b83dSEd Tanous Fail, 430ec8b83dSEd Tanous Rebuild, 440ec8b83dSEd Tanous PredictiveFailureAnalysis, 450ec8b83dSEd Tanous Hotspare, 460ec8b83dSEd Tanous InACriticalArray, 470ec8b83dSEd Tanous InAFailedArray, 480ec8b83dSEd Tanous }; 490ec8b83dSEd Tanous 500ec8b83dSEd Tanous enum class HotspareReplacementModeType{ 510ec8b83dSEd Tanous Invalid, 520ec8b83dSEd Tanous Revertible, 530ec8b83dSEd Tanous NonRevertible, 540ec8b83dSEd Tanous }; 550ec8b83dSEd Tanous 560ec8b83dSEd Tanous enum class DataSanitizationType{ 570ec8b83dSEd Tanous Invalid, 580ec8b83dSEd Tanous BlockErase, 590ec8b83dSEd Tanous CryptographicErase, 600ec8b83dSEd Tanous Overwrite, 610ec8b83dSEd Tanous }; 620ec8b83dSEd Tanous 63a8d8f9d8SEd Tanous enum class FormFactor{ 64a8d8f9d8SEd Tanous Invalid, 65a8d8f9d8SEd Tanous Drive3_5, 66a8d8f9d8SEd Tanous Drive2_5, 672ae81db9SGunnar Mills EDSFF, 68a8d8f9d8SEd Tanous EDSFF_1U_Long, 69a8d8f9d8SEd Tanous EDSFF_1U_Short, 70a8d8f9d8SEd Tanous EDSFF_E3_Short, 71a8d8f9d8SEd Tanous EDSFF_E3_Long, 722ae81db9SGunnar Mills M2, 73a8d8f9d8SEd Tanous M2_2230, 74a8d8f9d8SEd Tanous M2_2242, 75a8d8f9d8SEd Tanous M2_2260, 76a8d8f9d8SEd Tanous M2_2280, 77a8d8f9d8SEd Tanous M2_22110, 78a8d8f9d8SEd Tanous U2, 79a8d8f9d8SEd Tanous PCIeSlotFullLength, 80a8d8f9d8SEd Tanous PCIeSlotLowProfile, 81a8d8f9d8SEd Tanous PCIeHalfLength, 82a8d8f9d8SEd Tanous OEM, 83a8d8f9d8SEd Tanous }; 84a8d8f9d8SEd Tanous 85f2a8e57eSGunnar Mills enum class ConfigurationLock{ 86f2a8e57eSGunnar Mills Invalid, 87f2a8e57eSGunnar Mills Enabled, 88f2a8e57eSGunnar Mills Disabled, 89f2a8e57eSGunnar Mills Partial, 90f2a8e57eSGunnar Mills }; 91f2a8e57eSGunnar Mills 92*28cfceb2SGunnar Mills enum class TargetConfigurationLockLevel{ 93*28cfceb2SGunnar Mills Invalid, 94*28cfceb2SGunnar Mills Baseline, 95*28cfceb2SGunnar Mills }; 96*28cfceb2SGunnar Mills 97*28cfceb2SGunnar Mills enum class ConfigLockOptions{ 98*28cfceb2SGunnar Mills Invalid, 99*28cfceb2SGunnar Mills Unlocked, 100*28cfceb2SGunnar Mills Locked, 101*28cfceb2SGunnar Mills LockdownUnsupported, 102*28cfceb2SGunnar Mills CommandUnsupported, 103*28cfceb2SGunnar Mills }; 104*28cfceb2SGunnar Mills 1050ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MediaType, { 1060ec8b83dSEd Tanous {MediaType::Invalid, "Invalid"}, 1070ec8b83dSEd Tanous {MediaType::HDD, "HDD"}, 1080ec8b83dSEd Tanous {MediaType::SSD, "SSD"}, 1090ec8b83dSEd Tanous {MediaType::SMR, "SMR"}, 1100ec8b83dSEd Tanous }); 1110ec8b83dSEd Tanous 1120ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareType, { 1130ec8b83dSEd Tanous {HotspareType::Invalid, "Invalid"}, 1140ec8b83dSEd Tanous {HotspareType::None, "None"}, 1150ec8b83dSEd Tanous {HotspareType::Global, "Global"}, 1160ec8b83dSEd Tanous {HotspareType::Chassis, "Chassis"}, 1170ec8b83dSEd Tanous {HotspareType::Dedicated, "Dedicated"}, 1180ec8b83dSEd Tanous }); 1190ec8b83dSEd Tanous 1200ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionAbility, { 1210ec8b83dSEd Tanous {EncryptionAbility::Invalid, "Invalid"}, 1220ec8b83dSEd Tanous {EncryptionAbility::None, "None"}, 1230ec8b83dSEd Tanous {EncryptionAbility::SelfEncryptingDrive, "SelfEncryptingDrive"}, 1240ec8b83dSEd Tanous {EncryptionAbility::Other, "Other"}, 1250ec8b83dSEd Tanous }); 1260ec8b83dSEd Tanous 1270ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionStatus, { 1280ec8b83dSEd Tanous {EncryptionStatus::Invalid, "Invalid"}, 1290ec8b83dSEd Tanous {EncryptionStatus::Unecrypted, "Unecrypted"}, 1300ec8b83dSEd Tanous {EncryptionStatus::Unlocked, "Unlocked"}, 1310ec8b83dSEd Tanous {EncryptionStatus::Locked, "Locked"}, 1320ec8b83dSEd Tanous {EncryptionStatus::Foreign, "Foreign"}, 1330ec8b83dSEd Tanous {EncryptionStatus::Unencrypted, "Unencrypted"}, 1340ec8b83dSEd Tanous }); 1350ec8b83dSEd Tanous 1360ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(StatusIndicator, { 1370ec8b83dSEd Tanous {StatusIndicator::Invalid, "Invalid"}, 1380ec8b83dSEd Tanous {StatusIndicator::OK, "OK"}, 1390ec8b83dSEd Tanous {StatusIndicator::Fail, "Fail"}, 1400ec8b83dSEd Tanous {StatusIndicator::Rebuild, "Rebuild"}, 1410ec8b83dSEd Tanous {StatusIndicator::PredictiveFailureAnalysis, "PredictiveFailureAnalysis"}, 1420ec8b83dSEd Tanous {StatusIndicator::Hotspare, "Hotspare"}, 1430ec8b83dSEd Tanous {StatusIndicator::InACriticalArray, "InACriticalArray"}, 1440ec8b83dSEd Tanous {StatusIndicator::InAFailedArray, "InAFailedArray"}, 1450ec8b83dSEd Tanous }); 1460ec8b83dSEd Tanous 1470ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareReplacementModeType, { 1480ec8b83dSEd Tanous {HotspareReplacementModeType::Invalid, "Invalid"}, 1490ec8b83dSEd Tanous {HotspareReplacementModeType::Revertible, "Revertible"}, 1500ec8b83dSEd Tanous {HotspareReplacementModeType::NonRevertible, "NonRevertible"}, 1510ec8b83dSEd Tanous }); 1520ec8b83dSEd Tanous 1530ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DataSanitizationType, { 1540ec8b83dSEd Tanous {DataSanitizationType::Invalid, "Invalid"}, 1550ec8b83dSEd Tanous {DataSanitizationType::BlockErase, "BlockErase"}, 1560ec8b83dSEd Tanous {DataSanitizationType::CryptographicErase, "CryptographicErase"}, 1570ec8b83dSEd Tanous {DataSanitizationType::Overwrite, "Overwrite"}, 1580ec8b83dSEd Tanous }); 1590ec8b83dSEd Tanous 160a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FormFactor, { 161a8d8f9d8SEd Tanous {FormFactor::Invalid, "Invalid"}, 162a8d8f9d8SEd Tanous {FormFactor::Drive3_5, "Drive3_5"}, 163a8d8f9d8SEd Tanous {FormFactor::Drive2_5, "Drive2_5"}, 1642ae81db9SGunnar Mills {FormFactor::EDSFF, "EDSFF"}, 165a8d8f9d8SEd Tanous {FormFactor::EDSFF_1U_Long, "EDSFF_1U_Long"}, 166a8d8f9d8SEd Tanous {FormFactor::EDSFF_1U_Short, "EDSFF_1U_Short"}, 167a8d8f9d8SEd Tanous {FormFactor::EDSFF_E3_Short, "EDSFF_E3_Short"}, 168a8d8f9d8SEd Tanous {FormFactor::EDSFF_E3_Long, "EDSFF_E3_Long"}, 1692ae81db9SGunnar Mills {FormFactor::M2, "M2"}, 170a8d8f9d8SEd Tanous {FormFactor::M2_2230, "M2_2230"}, 171a8d8f9d8SEd Tanous {FormFactor::M2_2242, "M2_2242"}, 172a8d8f9d8SEd Tanous {FormFactor::M2_2260, "M2_2260"}, 173a8d8f9d8SEd Tanous {FormFactor::M2_2280, "M2_2280"}, 174a8d8f9d8SEd Tanous {FormFactor::M2_22110, "M2_22110"}, 175a8d8f9d8SEd Tanous {FormFactor::U2, "U2"}, 176a8d8f9d8SEd Tanous {FormFactor::PCIeSlotFullLength, "PCIeSlotFullLength"}, 177a8d8f9d8SEd Tanous {FormFactor::PCIeSlotLowProfile, "PCIeSlotLowProfile"}, 178a8d8f9d8SEd Tanous {FormFactor::PCIeHalfLength, "PCIeHalfLength"}, 179a8d8f9d8SEd Tanous {FormFactor::OEM, "OEM"}, 180a8d8f9d8SEd Tanous }); 181a8d8f9d8SEd Tanous 182f2a8e57eSGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ConfigurationLock, { 183f2a8e57eSGunnar Mills {ConfigurationLock::Invalid, "Invalid"}, 184f2a8e57eSGunnar Mills {ConfigurationLock::Enabled, "Enabled"}, 185f2a8e57eSGunnar Mills {ConfigurationLock::Disabled, "Disabled"}, 186f2a8e57eSGunnar Mills {ConfigurationLock::Partial, "Partial"}, 187f2a8e57eSGunnar Mills }); 188f2a8e57eSGunnar Mills 189*28cfceb2SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(TargetConfigurationLockLevel, { 190*28cfceb2SGunnar Mills {TargetConfigurationLockLevel::Invalid, "Invalid"}, 191*28cfceb2SGunnar Mills {TargetConfigurationLockLevel::Baseline, "Baseline"}, 192*28cfceb2SGunnar Mills }); 193*28cfceb2SGunnar Mills 194*28cfceb2SGunnar Mills NLOHMANN_JSON_SERIALIZE_ENUM(ConfigLockOptions, { 195*28cfceb2SGunnar Mills {ConfigLockOptions::Invalid, "Invalid"}, 196*28cfceb2SGunnar Mills {ConfigLockOptions::Unlocked, "Unlocked"}, 197*28cfceb2SGunnar Mills {ConfigLockOptions::Locked, "Locked"}, 198*28cfceb2SGunnar Mills {ConfigLockOptions::LockdownUnsupported, "LockdownUnsupported"}, 199*28cfceb2SGunnar Mills {ConfigLockOptions::CommandUnsupported, "CommandUnsupported"}, 200*28cfceb2SGunnar Mills }); 201*28cfceb2SGunnar Mills 2020ec8b83dSEd Tanous } 2030ec8b83dSEd Tanous // clang-format on 204