1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace storage 5 { 6 // clang-format off 7 8 enum class ResetToDefaultsType{ 9 Invalid, 10 ResetAll, 11 PreserveVolumes, 12 }; 13 14 enum class HotspareActivationPolicy{ 15 Invalid, 16 OnDriveFailure, 17 OnDrivePredictedFailure, 18 OEM, 19 }; 20 21 enum class EncryptionMode{ 22 Invalid, 23 Disabled, 24 UseExternalKey, 25 UseLocalKey, 26 }; 27 28 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 29 {ResetToDefaultsType::Invalid, "Invalid"}, 30 {ResetToDefaultsType::ResetAll, "ResetAll"}, 31 {ResetToDefaultsType::PreserveVolumes, "PreserveVolumes"}, 32 }); 33 34 NLOHMANN_JSON_SERIALIZE_ENUM(HotspareActivationPolicy, { 35 {HotspareActivationPolicy::Invalid, "Invalid"}, 36 {HotspareActivationPolicy::OnDriveFailure, "OnDriveFailure"}, 37 {HotspareActivationPolicy::OnDrivePredictedFailure, "OnDrivePredictedFailure"}, 38 {HotspareActivationPolicy::OEM, "OEM"}, 39 }); 40 41 NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionMode, { 42 {EncryptionMode::Invalid, "Invalid"}, 43 {EncryptionMode::Disabled, "Disabled"}, 44 {EncryptionMode::UseExternalKey, "UseExternalKey"}, 45 {EncryptionMode::UseLocalKey, "UseLocalKey"}, 46 }); 47 48 } 49 // clang-format on 50