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 enum class ConfigurationLock{
37     Invalid,
38     Enabled,
39     Disabled,
40     Partial,
41 };
42 
43 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, {
44     {ResetToDefaultsType::Invalid, "Invalid"},
45     {ResetToDefaultsType::ResetAll, "ResetAll"},
46     {ResetToDefaultsType::PreserveVolumes, "PreserveVolumes"},
47 });
48 
49 NLOHMANN_JSON_SERIALIZE_ENUM(HotspareActivationPolicy, {
50     {HotspareActivationPolicy::Invalid, "Invalid"},
51     {HotspareActivationPolicy::OnDriveFailure, "OnDriveFailure"},
52     {HotspareActivationPolicy::OnDrivePredictedFailure, "OnDrivePredictedFailure"},
53     {HotspareActivationPolicy::OEM, "OEM"},
54 });
55 
56 NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionMode, {
57     {EncryptionMode::Invalid, "Invalid"},
58     {EncryptionMode::Disabled, "Disabled"},
59     {EncryptionMode::UseExternalKey, "UseExternalKey"},
60     {EncryptionMode::UseLocalKey, "UseLocalKey"},
61 });
62 
63 NLOHMANN_JSON_SERIALIZE_ENUM(AutoVolumeCreate, {
64     {AutoVolumeCreate::Invalid, "Invalid"},
65     {AutoVolumeCreate::Disabled, "Disabled"},
66     {AutoVolumeCreate::NonRAID, "NonRAID"},
67     {AutoVolumeCreate::RAID0, "RAID0"},
68     {AutoVolumeCreate::RAID1, "RAID1"},
69 });
70 
71 NLOHMANN_JSON_SERIALIZE_ENUM(ConfigurationLock, {
72     {ConfigurationLock::Invalid, "Invalid"},
73     {ConfigurationLock::Enabled, "Enabled"},
74     {ConfigurationLock::Disabled, "Disabled"},
75     {ConfigurationLock::Partial, "Partial"},
76 });
77 
78 }
79 // clang-format on
80