1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 #pragma once 4 #include <nlohmann/json.hpp> 5 6 namespace cooling_unit 7 { 8 // clang-format off 9 10 enum class CoolingEquipmentType{ 11 Invalid, 12 CDU, 13 HeatExchanger, 14 ImmersionUnit, 15 RPU, 16 }; 17 18 enum class CoolingUnitMode{ 19 Invalid, 20 Enabled, 21 Disabled, 22 }; 23 24 enum class ExportType{ 25 Invalid, 26 Clone, 27 Replacement, 28 }; 29 30 enum class Component{ 31 Invalid, 32 All, 33 Manager, 34 ManagerAccounts, 35 CoolingUnit, 36 }; 37 38 enum class ExportSecurity{ 39 Invalid, 40 IncludeSensitiveData, 41 HashedDataOnly, 42 ExcludeSensitiveData, 43 }; 44 45 NLOHMANN_JSON_SERIALIZE_ENUM(CoolingEquipmentType, { 46 {CoolingEquipmentType::Invalid, "Invalid"}, 47 {CoolingEquipmentType::CDU, "CDU"}, 48 {CoolingEquipmentType::HeatExchanger, "HeatExchanger"}, 49 {CoolingEquipmentType::ImmersionUnit, "ImmersionUnit"}, 50 {CoolingEquipmentType::RPU, "RPU"}, 51 }); 52 53 NLOHMANN_JSON_SERIALIZE_ENUM(CoolingUnitMode, { 54 {CoolingUnitMode::Invalid, "Invalid"}, 55 {CoolingUnitMode::Enabled, "Enabled"}, 56 {CoolingUnitMode::Disabled, "Disabled"}, 57 }); 58 59 NLOHMANN_JSON_SERIALIZE_ENUM(ExportType, { 60 {ExportType::Invalid, "Invalid"}, 61 {ExportType::Clone, "Clone"}, 62 {ExportType::Replacement, "Replacement"}, 63 }); 64 65 NLOHMANN_JSON_SERIALIZE_ENUM(Component, { 66 {Component::Invalid, "Invalid"}, 67 {Component::All, "All"}, 68 {Component::Manager, "Manager"}, 69 {Component::ManagerAccounts, "ManagerAccounts"}, 70 {Component::CoolingUnit, "CoolingUnit"}, 71 }); 72 73 NLOHMANN_JSON_SERIALIZE_ENUM(ExportSecurity, { 74 {ExportSecurity::Invalid, "Invalid"}, 75 {ExportSecurity::IncludeSensitiveData, "IncludeSensitiveData"}, 76 {ExportSecurity::HashedDataOnly, "HashedDataOnly"}, 77 {ExportSecurity::ExcludeSensitiveData, "ExcludeSensitiveData"}, 78 }); 79 80 } 81 // clang-format on 82