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