1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace storage_controller 5 { 6 // clang-format off 7 8 enum class NVMeControllerType{ 9 Invalid, 10 Admin, 11 Discovery, 12 IO, 13 }; 14 15 enum class ANAAccessState{ 16 Invalid, 17 Optimized, 18 NonOptimized, 19 Inaccessible, 20 PersistentLoss, 21 }; 22 23 NLOHMANN_JSON_SERIALIZE_ENUM(NVMeControllerType, { 24 {NVMeControllerType::Invalid, "Invalid"}, 25 {NVMeControllerType::Admin, "Admin"}, 26 {NVMeControllerType::Discovery, "Discovery"}, 27 {NVMeControllerType::IO, "IO"}, 28 }); 29 30 NLOHMANN_JSON_SERIALIZE_ENUM(ANAAccessState, { 31 {ANAAccessState::Invalid, "Invalid"}, 32 {ANAAccessState::Optimized, "Optimized"}, 33 {ANAAccessState::NonOptimized, "NonOptimized"}, 34 {ANAAccessState::Inaccessible, "Inaccessible"}, 35 {ANAAccessState::PersistentLoss, "PersistentLoss"}, 36 }); 37 38 } 39 // clang-format on 40