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

    if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                     "PowerMode.Static")
    {
        aResp->res.jsonValue["PowerMode"] = "Static";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.MaximumPerformance")
    {
        aResp->res.jsonValue["PowerMode"] = "MaximumPerformance";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.PowerSaving")
    {
        aResp->res.jsonValue["PowerMode"] = "PowerSaving";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.OEM")
    {
        aResp->res.jsonValue["PowerMode"] = "OEM";
    }
    else
    {
        // Any other values would be invalid
        BMCWEB_LOG_DEBUG << "PowerMode value was not valid: " << modeValue;
        messages::internalError(aResp->res);
    }
}
/**
 * @brief Translate the PowerMode to a response message.
 *
 * @param[in] aResp  Shared pointer for generating response message.
 * @param[in] modeValue  PowerMode value to be translated
 *
 * @return None.
 */
@brief Translate the PowerMode to a response message.
@param[in] aResp  Shared pointer for generating response message.
@param[in] modeValue  PowerMode value to be translated

@return None.
@brief Translate the PowerMode to a response message . @param [ in ] aResp Shared pointer for generating response message . @param [ in ] modeValue PowerMode value to be translated @return None .
inline void translatePowerMode(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                               const std::string& modeValue)
{
    std::string modeString;
    if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                     "PowerMode.Static")
    {
        aResp->res.jsonValue["PowerMode"] = "Static";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.MaximumPerformance")
    {
        aResp->res.jsonValue["PowerMode"] = "MaximumPerformance";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.PowerSaving")
    {
        aResp->res.jsonValue["PowerMode"] = "PowerSaving";
    }
    else if (modeValue == "xyz.openbmc_project.Control.Power.Mode."
                          "PowerMode.OEM")
    {
        aResp->res.jsonValue["PowerMode"] = "OEM";
    }
    else
    {
        BMCWEB_LOG_DEBUG << "PowerMode value was not valid: " << modeValue;
        messages::internalError(aResp->res);
    }
}
inline void translatePowerMode ( const std :: shared_ptr < bmcweb :: AsyncResp > & aResp , const std :: string & modeValue ) { std :: string modeString ; if ( modeValue == " " " " ) { aResp -> res . jsonValue [ " " ] = " " ; } else if ( modeValue == " " " " ) { aResp -> res . jsonValue [ " " ] = " " ; } else if ( modeValue == " " " " ) { aResp -> res . jsonValue [ " " ] = " " ; } else if ( modeValue == " " " " ) { aResp -> res . jsonValue [ " " ] = " " ; } else { BMCWEB_LOG_DEBUG << " " << modeValue ; messages :: internalError ( aResp -> res ) ; } }
@brief Translate the PowerMode to a response message.
@brief Translate the PowerMode to a response message .
// Any other values would be invalid