/** * Jungfraujoch writer * Jungfraujoch Writer Web API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #include "Writer_statistics.h" #include "Helpers.h" #include namespace org::openapitools::server::model { Writer_statistics::Writer_statistics() { m_Nimages = 0L; m_NimagesIsSet = false; m_Performance_MBs = 0.0f; m_Performance_MBsIsSet = false; m_Performance_Hz = 0.0f; m_Performance_HzIsSet = false; m_File_prefix = ""; m_File_prefixIsSet = false; m_State = ""; m_StateIsSet = false; } void Writer_statistics::validate() const { std::stringstream msg; if (!validate(msg)) { throw org::openapitools::server::helpers::ValidationException(msg.str()); } } bool Writer_statistics::validate(std::stringstream& msg) const { return validate(msg, ""); } bool Writer_statistics::validate(std::stringstream& msg, const std::string& pathPrefix) const { bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Writer_statistics" : pathPrefix; return success; } bool Writer_statistics::operator==(const Writer_statistics& rhs) const { return ((!nimagesIsSet() && !rhs.nimagesIsSet()) || (nimagesIsSet() && rhs.nimagesIsSet() && getNimages() == rhs.getNimages())) && ((!performanceMBsIsSet() && !rhs.performanceMBsIsSet()) || (performanceMBsIsSet() && rhs.performanceMBsIsSet() && getPerformanceMBs() == rhs.getPerformanceMBs())) && ((!performanceHzIsSet() && !rhs.performanceHzIsSet()) || (performanceHzIsSet() && rhs.performanceHzIsSet() && getPerformanceHz() == rhs.getPerformanceHz())) && ((!filePrefixIsSet() && !rhs.filePrefixIsSet()) || (filePrefixIsSet() && rhs.filePrefixIsSet() && getFilePrefix() == rhs.getFilePrefix())) && ((!stateIsSet() && !rhs.stateIsSet()) || (stateIsSet() && rhs.stateIsSet() && getState() == rhs.getState())) ; } bool Writer_statistics::operator!=(const Writer_statistics& rhs) const { return !(*this == rhs); } void to_json(nlohmann::json& j, const Writer_statistics& o) { j = nlohmann::json(); if(o.nimagesIsSet()) j["nimages"] = o.m_Nimages; if(o.performanceMBsIsSet()) j["performance_MBs"] = o.m_Performance_MBs; if(o.performanceHzIsSet()) j["performance_Hz"] = o.m_Performance_Hz; if(o.filePrefixIsSet()) j["file_prefix"] = o.m_File_prefix; if(o.stateIsSet()) j["state"] = o.m_State; } void from_json(const nlohmann::json& j, Writer_statistics& o) { if(j.find("nimages") != j.end()) { j.at("nimages").get_to(o.m_Nimages); o.m_NimagesIsSet = true; } if(j.find("performance_MBs") != j.end()) { j.at("performance_MBs").get_to(o.m_Performance_MBs); o.m_Performance_MBsIsSet = true; } if(j.find("performance_Hz") != j.end()) { j.at("performance_Hz").get_to(o.m_Performance_Hz); o.m_Performance_HzIsSet = true; } if(j.find("file_prefix") != j.end()) { j.at("file_prefix").get_to(o.m_File_prefix); o.m_File_prefixIsSet = true; } if(j.find("state") != j.end()) { j.at("state").get_to(o.m_State); o.m_StateIsSet = true; } } int64_t Writer_statistics::getNimages() const { return m_Nimages; } void Writer_statistics::setNimages(int64_t const value) { m_Nimages = value; m_NimagesIsSet = true; } bool Writer_statistics::nimagesIsSet() const { return m_NimagesIsSet; } void Writer_statistics::unsetNimages() { m_NimagesIsSet = false; } float Writer_statistics::getPerformanceMBs() const { return m_Performance_MBs; } void Writer_statistics::setPerformanceMBs(float const value) { m_Performance_MBs = value; m_Performance_MBsIsSet = true; } bool Writer_statistics::performanceMBsIsSet() const { return m_Performance_MBsIsSet; } void Writer_statistics::unsetPerformance_MBs() { m_Performance_MBsIsSet = false; } float Writer_statistics::getPerformanceHz() const { return m_Performance_Hz; } void Writer_statistics::setPerformanceHz(float const value) { m_Performance_Hz = value; m_Performance_HzIsSet = true; } bool Writer_statistics::performanceHzIsSet() const { return m_Performance_HzIsSet; } void Writer_statistics::unsetPerformance_Hz() { m_Performance_HzIsSet = false; } std::string Writer_statistics::getFilePrefix() const { return m_File_prefix; } void Writer_statistics::setFilePrefix(std::string const& value) { m_File_prefix = value; m_File_prefixIsSet = true; } bool Writer_statistics::filePrefixIsSet() const { return m_File_prefixIsSet; } void Writer_statistics::unsetFile_prefix() { m_File_prefixIsSet = false; } std::string Writer_statistics::getState() const { return m_State; } void Writer_statistics::setState(std::string const& value) { m_State = value; m_StateIsSet = true; } bool Writer_statistics::stateIsSet() const { return m_StateIsSet; } void Writer_statistics::unsetState() { m_StateIsSet = false; } } // namespace org::openapitools::server::model