/** * Jungfraujoch * API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. * * The version of the OpenAPI document: 1.0.0-rc.58 * Contact: filip.leonarski@psi.ch * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #include "Error_message.h" #include "Helpers.h" #include namespace org::openapitools::server::model { Error_message::Error_message() { m_Msg = ""; m_Reason = ""; } void Error_message::validate() const { std::stringstream msg; if (!validate(msg)) { throw org::openapitools::server::helpers::ValidationException(msg.str()); } } bool Error_message::validate(std::stringstream& msg) const { return validate(msg, ""); } bool Error_message::validate(std::stringstream& msg, const std::string& pathPrefix) const { bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Error_message" : pathPrefix; return success; } bool Error_message::operator==(const Error_message& rhs) const { return (getMsg() == rhs.getMsg()) && (getReason() == rhs.getReason()) ; } bool Error_message::operator!=(const Error_message& rhs) const { return !(*this == rhs); } void to_json(nlohmann::json& j, const Error_message& o) { j = nlohmann::json::object(); j["msg"] = o.m_Msg; j["reason"] = o.m_Reason; } void from_json(const nlohmann::json& j, Error_message& o) { j.at("msg").get_to(o.m_Msg); j.at("reason").get_to(o.m_Reason); } std::string Error_message::getMsg() const { return m_Msg; } void Error_message::setMsg(std::string const& value) { m_Msg = value; } std::string Error_message::getReason() const { return m_Reason; } void Error_message::setReason(std::string const& value) { m_Reason = value; } } // namespace org::openapitools::server::model