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 63*a8d8f9d8SEd Tanous enum class FormFactor{ 64*a8d8f9d8SEd Tanous Invalid, 65*a8d8f9d8SEd Tanous Drive3_5, 66*a8d8f9d8SEd Tanous Drive2_5, 67*a8d8f9d8SEd Tanous EDSFF_1U_Long, 68*a8d8f9d8SEd Tanous EDSFF_1U_Short, 69*a8d8f9d8SEd Tanous EDSFF_E3_Short, 70*a8d8f9d8SEd Tanous EDSFF_E3_Long, 71*a8d8f9d8SEd Tanous M2_2230, 72*a8d8f9d8SEd Tanous M2_2242, 73*a8d8f9d8SEd Tanous M2_2260, 74*a8d8f9d8SEd Tanous M2_2280, 75*a8d8f9d8SEd Tanous M2_22110, 76*a8d8f9d8SEd Tanous U2, 77*a8d8f9d8SEd Tanous PCIeSlotFullLength, 78*a8d8f9d8SEd Tanous PCIeSlotLowProfile, 79*a8d8f9d8SEd Tanous PCIeHalfLength, 80*a8d8f9d8SEd Tanous OEM, 81*a8d8f9d8SEd Tanous }; 82*a8d8f9d8SEd Tanous 830ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MediaType, { 840ec8b83dSEd Tanous {MediaType::Invalid, "Invalid"}, 850ec8b83dSEd Tanous {MediaType::HDD, "HDD"}, 860ec8b83dSEd Tanous {MediaType::SSD, "SSD"}, 870ec8b83dSEd Tanous {MediaType::SMR, "SMR"}, 880ec8b83dSEd Tanous }); 890ec8b83dSEd Tanous 900ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareType, { 910ec8b83dSEd Tanous {HotspareType::Invalid, "Invalid"}, 920ec8b83dSEd Tanous {HotspareType::None, "None"}, 930ec8b83dSEd Tanous {HotspareType::Global, "Global"}, 940ec8b83dSEd Tanous {HotspareType::Chassis, "Chassis"}, 950ec8b83dSEd Tanous {HotspareType::Dedicated, "Dedicated"}, 960ec8b83dSEd Tanous }); 970ec8b83dSEd Tanous 980ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionAbility, { 990ec8b83dSEd Tanous {EncryptionAbility::Invalid, "Invalid"}, 1000ec8b83dSEd Tanous {EncryptionAbility::None, "None"}, 1010ec8b83dSEd Tanous {EncryptionAbility::SelfEncryptingDrive, "SelfEncryptingDrive"}, 1020ec8b83dSEd Tanous {EncryptionAbility::Other, "Other"}, 1030ec8b83dSEd Tanous }); 1040ec8b83dSEd Tanous 1050ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionStatus, { 1060ec8b83dSEd Tanous {EncryptionStatus::Invalid, "Invalid"}, 1070ec8b83dSEd Tanous {EncryptionStatus::Unecrypted, "Unecrypted"}, 1080ec8b83dSEd Tanous {EncryptionStatus::Unlocked, "Unlocked"}, 1090ec8b83dSEd Tanous {EncryptionStatus::Locked, "Locked"}, 1100ec8b83dSEd Tanous {EncryptionStatus::Foreign, "Foreign"}, 1110ec8b83dSEd Tanous {EncryptionStatus::Unencrypted, "Unencrypted"}, 1120ec8b83dSEd Tanous }); 1130ec8b83dSEd Tanous 1140ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(StatusIndicator, { 1150ec8b83dSEd Tanous {StatusIndicator::Invalid, "Invalid"}, 1160ec8b83dSEd Tanous {StatusIndicator::OK, "OK"}, 1170ec8b83dSEd Tanous {StatusIndicator::Fail, "Fail"}, 1180ec8b83dSEd Tanous {StatusIndicator::Rebuild, "Rebuild"}, 1190ec8b83dSEd Tanous {StatusIndicator::PredictiveFailureAnalysis, "PredictiveFailureAnalysis"}, 1200ec8b83dSEd Tanous {StatusIndicator::Hotspare, "Hotspare"}, 1210ec8b83dSEd Tanous {StatusIndicator::InACriticalArray, "InACriticalArray"}, 1220ec8b83dSEd Tanous {StatusIndicator::InAFailedArray, "InAFailedArray"}, 1230ec8b83dSEd Tanous }); 1240ec8b83dSEd Tanous 1250ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareReplacementModeType, { 1260ec8b83dSEd Tanous {HotspareReplacementModeType::Invalid, "Invalid"}, 1270ec8b83dSEd Tanous {HotspareReplacementModeType::Revertible, "Revertible"}, 1280ec8b83dSEd Tanous {HotspareReplacementModeType::NonRevertible, "NonRevertible"}, 1290ec8b83dSEd Tanous }); 1300ec8b83dSEd Tanous 1310ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DataSanitizationType, { 1320ec8b83dSEd Tanous {DataSanitizationType::Invalid, "Invalid"}, 1330ec8b83dSEd Tanous {DataSanitizationType::BlockErase, "BlockErase"}, 1340ec8b83dSEd Tanous {DataSanitizationType::CryptographicErase, "CryptographicErase"}, 1350ec8b83dSEd Tanous {DataSanitizationType::Overwrite, "Overwrite"}, 1360ec8b83dSEd Tanous }); 1370ec8b83dSEd Tanous 138*a8d8f9d8SEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FormFactor, { 139*a8d8f9d8SEd Tanous {FormFactor::Invalid, "Invalid"}, 140*a8d8f9d8SEd Tanous {FormFactor::Drive3_5, "Drive3_5"}, 141*a8d8f9d8SEd Tanous {FormFactor::Drive2_5, "Drive2_5"}, 142*a8d8f9d8SEd Tanous {FormFactor::EDSFF_1U_Long, "EDSFF_1U_Long"}, 143*a8d8f9d8SEd Tanous {FormFactor::EDSFF_1U_Short, "EDSFF_1U_Short"}, 144*a8d8f9d8SEd Tanous {FormFactor::EDSFF_E3_Short, "EDSFF_E3_Short"}, 145*a8d8f9d8SEd Tanous {FormFactor::EDSFF_E3_Long, "EDSFF_E3_Long"}, 146*a8d8f9d8SEd Tanous {FormFactor::M2_2230, "M2_2230"}, 147*a8d8f9d8SEd Tanous {FormFactor::M2_2242, "M2_2242"}, 148*a8d8f9d8SEd Tanous {FormFactor::M2_2260, "M2_2260"}, 149*a8d8f9d8SEd Tanous {FormFactor::M2_2280, "M2_2280"}, 150*a8d8f9d8SEd Tanous {FormFactor::M2_22110, "M2_22110"}, 151*a8d8f9d8SEd Tanous {FormFactor::U2, "U2"}, 152*a8d8f9d8SEd Tanous {FormFactor::PCIeSlotFullLength, "PCIeSlotFullLength"}, 153*a8d8f9d8SEd Tanous {FormFactor::PCIeSlotLowProfile, "PCIeSlotLowProfile"}, 154*a8d8f9d8SEd Tanous {FormFactor::PCIeHalfLength, "PCIeHalfLength"}, 155*a8d8f9d8SEd Tanous {FormFactor::OEM, "OEM"}, 156*a8d8f9d8SEd Tanous }); 157*a8d8f9d8SEd Tanous 1580ec8b83dSEd Tanous } 1590ec8b83dSEd Tanous // clang-format on 160