1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace outlet_group 5 { 6 // clang-format off 7 8 enum class PowerState{ 9 Invalid, 10 On, 11 Off, 12 PowerCycle, 13 }; 14 15 enum class OutletGroupType{ 16 Invalid, 17 HardwareDefined, 18 UserDefined, 19 }; 20 21 NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, { 22 {PowerState::Invalid, "Invalid"}, 23 {PowerState::On, "On"}, 24 {PowerState::Off, "Off"}, 25 {PowerState::PowerCycle, "PowerCycle"}, 26 }); 27 28 NLOHMANN_JSON_SERIALIZE_ENUM(OutletGroupType, { 29 {OutletGroupType::Invalid, "Invalid"}, 30 {OutletGroupType::HardwareDefined, "HardwareDefined"}, 31 {OutletGroupType::UserDefined, "UserDefined"}, 32 }); 33 34 } 35 // clang-format on 36