redfish-core/lib/systems.hpp
inline std::string
    validatePowerMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                      const std::string& modeString)
{
    std::string mode;

    if (modeString == "Static")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static";
    }
    else if (modeString == "MaximumPerformance")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode."
               "MaximumPerformance";
    }
    else if (modeString == "PowerSaving")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving";
    }
    else
    {
        messages::propertyValueNotInList(aResp->res, modeString, "PowerMode");
    }
    return mode;
}
/**
 * @brief Validate the specified mode is valid and return the PowerMode
 * name associated with that string
 *
 * @param[in] aResp   Shared pointer for generating response message.
 * @param[in] modeString  String representing the desired PowerMode
 *
 * @return PowerMode value or empty string if mode is not valid
 */
@brief Validate the specified mode is valid and return the PowerMode
name associated with that string

@param[in] aResp   Shared pointer for generating response message.
@param[in] modeString  String representing the desired PowerMode

@return PowerMode value or empty string if mode is not valid
@brief Validate the specified mode is valid and return the PowerMode name associated with that string @param [ in ] aResp Shared pointer for generating response message . @param [ in ] modeString String representing the desired PowerMode @return PowerMode value or empty string if mode is not valid
inline std::string
    validatePowerMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                      const std::string& modeString)
{
    std::string mode;
    if (modeString == "Static")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static";
    }
    else if (modeString == "MaximumPerformance")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode."
               "MaximumPerformance";
    }
    else if (modeString == "PowerSaving")
    {
        mode = "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving";
    }
    else
    {
        messages::propertyValueNotInList(aResp->res, modeString, "PowerMode");
    }
    return mode;
}
inline std :: string validatePowerMode ( const std :: shared_ptr < bmcweb :: AsyncResp > & aResp , const std :: string & modeString ) { std :: string mode ; if ( modeString == " " ) { mode = " " ; } else if ( modeString == " " ) { mode = " " " " ; } else if ( modeString == " " ) { mode = " " ; } else { messages :: propertyValueNotInList ( aResp -> res , modeString , " " ) ; } return mode ; }
@brief Validate the specified mode is valid and return the PowerMode
 name associated with that string
@brief Validate the specified mode is valid and return the PowerMode name associated with that string