1*0ec8b83dSEd Tanous #pragma once 2*0ec8b83dSEd Tanous #include <nlohmann/json.hpp> 3*0ec8b83dSEd Tanous 4*0ec8b83dSEd Tanous namespace drive 5*0ec8b83dSEd Tanous { 6*0ec8b83dSEd Tanous // clang-format off 7*0ec8b83dSEd Tanous 8*0ec8b83dSEd Tanous enum class MediaType{ 9*0ec8b83dSEd Tanous Invalid, 10*0ec8b83dSEd Tanous HDD, 11*0ec8b83dSEd Tanous SSD, 12*0ec8b83dSEd Tanous SMR, 13*0ec8b83dSEd Tanous }; 14*0ec8b83dSEd Tanous 15*0ec8b83dSEd Tanous enum class HotspareType{ 16*0ec8b83dSEd Tanous Invalid, 17*0ec8b83dSEd Tanous None, 18*0ec8b83dSEd Tanous Global, 19*0ec8b83dSEd Tanous Chassis, 20*0ec8b83dSEd Tanous Dedicated, 21*0ec8b83dSEd Tanous }; 22*0ec8b83dSEd Tanous 23*0ec8b83dSEd Tanous enum class EncryptionAbility{ 24*0ec8b83dSEd Tanous Invalid, 25*0ec8b83dSEd Tanous None, 26*0ec8b83dSEd Tanous SelfEncryptingDrive, 27*0ec8b83dSEd Tanous Other, 28*0ec8b83dSEd Tanous }; 29*0ec8b83dSEd Tanous 30*0ec8b83dSEd Tanous enum class EncryptionStatus{ 31*0ec8b83dSEd Tanous Invalid, 32*0ec8b83dSEd Tanous Unecrypted, 33*0ec8b83dSEd Tanous Unlocked, 34*0ec8b83dSEd Tanous Locked, 35*0ec8b83dSEd Tanous Foreign, 36*0ec8b83dSEd Tanous Unencrypted, 37*0ec8b83dSEd Tanous }; 38*0ec8b83dSEd Tanous 39*0ec8b83dSEd Tanous enum class StatusIndicator{ 40*0ec8b83dSEd Tanous Invalid, 41*0ec8b83dSEd Tanous OK, 42*0ec8b83dSEd Tanous Fail, 43*0ec8b83dSEd Tanous Rebuild, 44*0ec8b83dSEd Tanous PredictiveFailureAnalysis, 45*0ec8b83dSEd Tanous Hotspare, 46*0ec8b83dSEd Tanous InACriticalArray, 47*0ec8b83dSEd Tanous InAFailedArray, 48*0ec8b83dSEd Tanous }; 49*0ec8b83dSEd Tanous 50*0ec8b83dSEd Tanous enum class HotspareReplacementModeType{ 51*0ec8b83dSEd Tanous Invalid, 52*0ec8b83dSEd Tanous Revertible, 53*0ec8b83dSEd Tanous NonRevertible, 54*0ec8b83dSEd Tanous }; 55*0ec8b83dSEd Tanous 56*0ec8b83dSEd Tanous enum class DataSanitizationType{ 57*0ec8b83dSEd Tanous Invalid, 58*0ec8b83dSEd Tanous BlockErase, 59*0ec8b83dSEd Tanous CryptographicErase, 60*0ec8b83dSEd Tanous Overwrite, 61*0ec8b83dSEd Tanous }; 62*0ec8b83dSEd Tanous 63*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(MediaType, { 64*0ec8b83dSEd Tanous {MediaType::Invalid, "Invalid"}, 65*0ec8b83dSEd Tanous {MediaType::HDD, "HDD"}, 66*0ec8b83dSEd Tanous {MediaType::SSD, "SSD"}, 67*0ec8b83dSEd Tanous {MediaType::SMR, "SMR"}, 68*0ec8b83dSEd Tanous }); 69*0ec8b83dSEd Tanous 70*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareType, { 71*0ec8b83dSEd Tanous {HotspareType::Invalid, "Invalid"}, 72*0ec8b83dSEd Tanous {HotspareType::None, "None"}, 73*0ec8b83dSEd Tanous {HotspareType::Global, "Global"}, 74*0ec8b83dSEd Tanous {HotspareType::Chassis, "Chassis"}, 75*0ec8b83dSEd Tanous {HotspareType::Dedicated, "Dedicated"}, 76*0ec8b83dSEd Tanous }); 77*0ec8b83dSEd Tanous 78*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionAbility, { 79*0ec8b83dSEd Tanous {EncryptionAbility::Invalid, "Invalid"}, 80*0ec8b83dSEd Tanous {EncryptionAbility::None, "None"}, 81*0ec8b83dSEd Tanous {EncryptionAbility::SelfEncryptingDrive, "SelfEncryptingDrive"}, 82*0ec8b83dSEd Tanous {EncryptionAbility::Other, "Other"}, 83*0ec8b83dSEd Tanous }); 84*0ec8b83dSEd Tanous 85*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionStatus, { 86*0ec8b83dSEd Tanous {EncryptionStatus::Invalid, "Invalid"}, 87*0ec8b83dSEd Tanous {EncryptionStatus::Unecrypted, "Unecrypted"}, 88*0ec8b83dSEd Tanous {EncryptionStatus::Unlocked, "Unlocked"}, 89*0ec8b83dSEd Tanous {EncryptionStatus::Locked, "Locked"}, 90*0ec8b83dSEd Tanous {EncryptionStatus::Foreign, "Foreign"}, 91*0ec8b83dSEd Tanous {EncryptionStatus::Unencrypted, "Unencrypted"}, 92*0ec8b83dSEd Tanous }); 93*0ec8b83dSEd Tanous 94*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(StatusIndicator, { 95*0ec8b83dSEd Tanous {StatusIndicator::Invalid, "Invalid"}, 96*0ec8b83dSEd Tanous {StatusIndicator::OK, "OK"}, 97*0ec8b83dSEd Tanous {StatusIndicator::Fail, "Fail"}, 98*0ec8b83dSEd Tanous {StatusIndicator::Rebuild, "Rebuild"}, 99*0ec8b83dSEd Tanous {StatusIndicator::PredictiveFailureAnalysis, "PredictiveFailureAnalysis"}, 100*0ec8b83dSEd Tanous {StatusIndicator::Hotspare, "Hotspare"}, 101*0ec8b83dSEd Tanous {StatusIndicator::InACriticalArray, "InACriticalArray"}, 102*0ec8b83dSEd Tanous {StatusIndicator::InAFailedArray, "InAFailedArray"}, 103*0ec8b83dSEd Tanous }); 104*0ec8b83dSEd Tanous 105*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(HotspareReplacementModeType, { 106*0ec8b83dSEd Tanous {HotspareReplacementModeType::Invalid, "Invalid"}, 107*0ec8b83dSEd Tanous {HotspareReplacementModeType::Revertible, "Revertible"}, 108*0ec8b83dSEd Tanous {HotspareReplacementModeType::NonRevertible, "NonRevertible"}, 109*0ec8b83dSEd Tanous }); 110*0ec8b83dSEd Tanous 111*0ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(DataSanitizationType, { 112*0ec8b83dSEd Tanous {DataSanitizationType::Invalid, "Invalid"}, 113*0ec8b83dSEd Tanous {DataSanitizationType::BlockErase, "BlockErase"}, 114*0ec8b83dSEd Tanous {DataSanitizationType::CryptographicErase, "CryptographicErase"}, 115*0ec8b83dSEd Tanous {DataSanitizationType::Overwrite, "Overwrite"}, 116*0ec8b83dSEd Tanous }); 117*0ec8b83dSEd Tanous 118*0ec8b83dSEd Tanous } 119*0ec8b83dSEd Tanous // clang-format on 120