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 enum class AutoVolumeCreate{ 29 Invalid, 30 Disabled, 31 NonRAID, 32 RAID0, 33 RAID1, 34 }; 35 36 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 37 {ResetToDefaultsType::Invalid, "Invalid"}, 38 {ResetToDefaultsType::ResetAll, "ResetAll"}, 39 {ResetToDefaultsType::PreserveVolumes, "PreserveVolumes"}, 40 }); 41 42 NLOHMANN_JSON_SERIALIZE_ENUM(HotspareActivationPolicy, { 43 {HotspareActivationPolicy::Invalid, "Invalid"}, 44 {HotspareActivationPolicy::OnDriveFailure, "OnDriveFailure"}, 45 {HotspareActivationPolicy::OnDrivePredictedFailure, "OnDrivePredictedFailure"}, 46 {HotspareActivationPolicy::OEM, "OEM"}, 47 }); 48 49 NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionMode, { 50 {EncryptionMode::Invalid, "Invalid"}, 51 {EncryptionMode::Disabled, "Disabled"}, 52 {EncryptionMode::UseExternalKey, "UseExternalKey"}, 53 {EncryptionMode::UseLocalKey, "UseLocalKey"}, 54 }); 55 56 NLOHMANN_JSON_SERIALIZE_ENUM(AutoVolumeCreate, { 57 {AutoVolumeCreate::Invalid, "Invalid"}, 58 {AutoVolumeCreate::Disabled, "Disabled"}, 59 {AutoVolumeCreate::NonRAID, "NonRAID"}, 60 {AutoVolumeCreate::RAID0, "RAID0"}, 61 {AutoVolumeCreate::RAID1, "RAID1"}, 62 }); 63 64 } 65 // clang-format on 66