xref: /openbmc/bmcweb/redfish-core/include/generated/enums/battery.hpp (revision a08c3de2e9a788addf7c71fc2db1912e39a85d3b)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace battery
7 {
8 // clang-format off
9 
10 enum class ChargeState{
11     Invalid,
12     Idle,
13     Charging,
14     Discharging,
15 };
16 
17 enum class BatteryChemistryType{
18     Invalid,
19     LeadAcid,
20     LithiumIon,
21     NickelCadmium,
22 };
23 
24 enum class EnergyStorageType{
25     Invalid,
26     Battery,
27     Supercapacitor,
28 };
29 
30 NLOHMANN_JSON_SERIALIZE_ENUM(ChargeState, {
31     {ChargeState::Invalid, "Invalid"},
32     {ChargeState::Idle, "Idle"},
33     {ChargeState::Charging, "Charging"},
34     {ChargeState::Discharging, "Discharging"},
35 });
36 
37 NLOHMANN_JSON_SERIALIZE_ENUM(BatteryChemistryType, {
38     {BatteryChemistryType::Invalid, "Invalid"},
39     {BatteryChemistryType::LeadAcid, "LeadAcid"},
40     {BatteryChemistryType::LithiumIon, "LithiumIon"},
41     {BatteryChemistryType::NickelCadmium, "NickelCadmium"},
42 });
43 
44 NLOHMANN_JSON_SERIALIZE_ENUM(EnergyStorageType, {
45     {EnergyStorageType::Invalid, "Invalid"},
46     {EnergyStorageType::Battery, "Battery"},
47     {EnergyStorageType::Supercapacitor, "Supercapacitor"},
48 });
49 
50 }
51 // clang-format on
52