xref: /openbmc/bmcweb/features/redfish/include/generated/enums/power.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace power
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class PowerLimitException{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     NoAction,
130ec8b83dSEd Tanous     HardPowerOff,
140ec8b83dSEd Tanous     LogEventOnly,
150ec8b83dSEd Tanous     Oem,
160ec8b83dSEd Tanous };
170ec8b83dSEd Tanous 
180ec8b83dSEd Tanous enum class PowerSupplyType{
190ec8b83dSEd Tanous     Invalid,
200ec8b83dSEd Tanous     Unknown,
210ec8b83dSEd Tanous     AC,
220ec8b83dSEd Tanous     DC,
230ec8b83dSEd Tanous     ACorDC,
240ec8b83dSEd Tanous };
250ec8b83dSEd Tanous 
260ec8b83dSEd Tanous enum class LineInputVoltageType{
270ec8b83dSEd Tanous     Invalid,
280ec8b83dSEd Tanous     Unknown,
290ec8b83dSEd Tanous     ACLowLine,
300ec8b83dSEd Tanous     ACMidLine,
310ec8b83dSEd Tanous     ACHighLine,
320ec8b83dSEd Tanous     DCNeg48V,
330ec8b83dSEd Tanous     DC380V,
340ec8b83dSEd Tanous     AC120V,
350ec8b83dSEd Tanous     AC240V,
360ec8b83dSEd Tanous     AC277V,
370ec8b83dSEd Tanous     ACandDCWideRange,
380ec8b83dSEd Tanous     ACWideRange,
390ec8b83dSEd Tanous     DC240V,
400ec8b83dSEd Tanous };
410ec8b83dSEd Tanous 
420ec8b83dSEd Tanous enum class InputType{
430ec8b83dSEd Tanous     Invalid,
440ec8b83dSEd Tanous     AC,
450ec8b83dSEd Tanous     DC,
460ec8b83dSEd Tanous };
470ec8b83dSEd Tanous 
480ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PowerLimitException, {
490ec8b83dSEd Tanous     {PowerLimitException::Invalid, "Invalid"},
500ec8b83dSEd Tanous     {PowerLimitException::NoAction, "NoAction"},
510ec8b83dSEd Tanous     {PowerLimitException::HardPowerOff, "HardPowerOff"},
520ec8b83dSEd Tanous     {PowerLimitException::LogEventOnly, "LogEventOnly"},
530ec8b83dSEd Tanous     {PowerLimitException::Oem, "Oem"},
540ec8b83dSEd Tanous });
550ec8b83dSEd Tanous 
560ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(PowerSupplyType, {
570ec8b83dSEd Tanous     {PowerSupplyType::Invalid, "Invalid"},
580ec8b83dSEd Tanous     {PowerSupplyType::Unknown, "Unknown"},
590ec8b83dSEd Tanous     {PowerSupplyType::AC, "AC"},
600ec8b83dSEd Tanous     {PowerSupplyType::DC, "DC"},
610ec8b83dSEd Tanous     {PowerSupplyType::ACorDC, "ACorDC"},
620ec8b83dSEd Tanous });
630ec8b83dSEd Tanous 
640ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(LineInputVoltageType, {
650ec8b83dSEd Tanous     {LineInputVoltageType::Invalid, "Invalid"},
660ec8b83dSEd Tanous     {LineInputVoltageType::Unknown, "Unknown"},
670ec8b83dSEd Tanous     {LineInputVoltageType::ACLowLine, "ACLowLine"},
680ec8b83dSEd Tanous     {LineInputVoltageType::ACMidLine, "ACMidLine"},
690ec8b83dSEd Tanous     {LineInputVoltageType::ACHighLine, "ACHighLine"},
700ec8b83dSEd Tanous     {LineInputVoltageType::DCNeg48V, "DCNeg48V"},
710ec8b83dSEd Tanous     {LineInputVoltageType::DC380V, "DC380V"},
720ec8b83dSEd Tanous     {LineInputVoltageType::AC120V, "AC120V"},
730ec8b83dSEd Tanous     {LineInputVoltageType::AC240V, "AC240V"},
740ec8b83dSEd Tanous     {LineInputVoltageType::AC277V, "AC277V"},
750ec8b83dSEd Tanous     {LineInputVoltageType::ACandDCWideRange, "ACandDCWideRange"},
760ec8b83dSEd Tanous     {LineInputVoltageType::ACWideRange, "ACWideRange"},
770ec8b83dSEd Tanous     {LineInputVoltageType::DC240V, "DC240V"},
780ec8b83dSEd Tanous });
790ec8b83dSEd Tanous 
800ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(InputType, {
810ec8b83dSEd Tanous     {InputType::Invalid, "Invalid"},
820ec8b83dSEd Tanous     {InputType::AC, "AC"},
830ec8b83dSEd Tanous     {InputType::DC, "DC"},
840ec8b83dSEd Tanous });
850ec8b83dSEd Tanous 
860ec8b83dSEd Tanous }
870ec8b83dSEd Tanous // clang-format on
88