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     PasswordOnly,
27     PasswordWithExternalKey,
28     PasswordWithLocalKey,
29 };
30 
31 enum class AutoVolumeCreate{
32     Invalid,
33     Disabled,
34     NonRAID,
35     RAID0,
36     RAID1,
37 };
38 
39 enum class ConfigurationLock{
40     Invalid,
41     Enabled,
42     Disabled,
43     Partial,
44 };
45 
46 enum class TargetConfigurationLockLevel{
47     Invalid,
48     Baseline,
49 };
50 
51 enum class ConfigLockOptions{
52     Invalid,
53     Unlocked,
54     Locked,
55     LockdownUnsupported,
56     CommandUnsupported,
57 };
58 
59 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, {
60     {ResetToDefaultsType::Invalid, "Invalid"},
61     {ResetToDefaultsType::ResetAll, "ResetAll"},
62     {ResetToDefaultsType::PreserveVolumes, "PreserveVolumes"},
63 });
64 
65 NLOHMANN_JSON_SERIALIZE_ENUM(HotspareActivationPolicy, {
66     {HotspareActivationPolicy::Invalid, "Invalid"},
67     {HotspareActivationPolicy::OnDriveFailure, "OnDriveFailure"},
68     {HotspareActivationPolicy::OnDrivePredictedFailure, "OnDrivePredictedFailure"},
69     {HotspareActivationPolicy::OEM, "OEM"},
70 });
71 
72 NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionMode, {
73     {EncryptionMode::Invalid, "Invalid"},
74     {EncryptionMode::Disabled, "Disabled"},
75     {EncryptionMode::UseExternalKey, "UseExternalKey"},
76     {EncryptionMode::UseLocalKey, "UseLocalKey"},
77     {EncryptionMode::PasswordOnly, "PasswordOnly"},
78     {EncryptionMode::PasswordWithExternalKey, "PasswordWithExternalKey"},
79     {EncryptionMode::PasswordWithLocalKey, "PasswordWithLocalKey"},
80 });
81 
82 NLOHMANN_JSON_SERIALIZE_ENUM(AutoVolumeCreate, {
83     {AutoVolumeCreate::Invalid, "Invalid"},
84     {AutoVolumeCreate::Disabled, "Disabled"},
85     {AutoVolumeCreate::NonRAID, "NonRAID"},
86     {AutoVolumeCreate::RAID0, "RAID0"},
87     {AutoVolumeCreate::RAID1, "RAID1"},
88 });
89 
90 NLOHMANN_JSON_SERIALIZE_ENUM(ConfigurationLock, {
91     {ConfigurationLock::Invalid, "Invalid"},
92     {ConfigurationLock::Enabled, "Enabled"},
93     {ConfigurationLock::Disabled, "Disabled"},
94     {ConfigurationLock::Partial, "Partial"},
95 });
96 
97 NLOHMANN_JSON_SERIALIZE_ENUM(TargetConfigurationLockLevel, {
98     {TargetConfigurationLockLevel::Invalid, "Invalid"},
99     {TargetConfigurationLockLevel::Baseline, "Baseline"},
100 });
101 
102 NLOHMANN_JSON_SERIALIZE_ENUM(ConfigLockOptions, {
103     {ConfigLockOptions::Invalid, "Invalid"},
104     {ConfigLockOptions::Unlocked, "Unlocked"},
105     {ConfigLockOptions::Locked, "Locked"},
106     {ConfigLockOptions::LockdownUnsupported, "LockdownUnsupported"},
107     {ConfigLockOptions::CommandUnsupported, "CommandUnsupported"},
108 });
109 
110 }
111 // clang-format on
112