Files
Jungfraujoch/broker/gen/model/Scan_result_images_inner.cpp
2025-07-18 11:42:39 +02:00

598 lines
15 KiB
C++

/**
* 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. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.66
* 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 "Scan_result_images_inner.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Scan_result_images_inner::Scan_result_images_inner()
{
m_Efficiency = 0.0f;
m_number = 0L;
m_Nx = 0L;
m_NxIsSet = false;
m_Ny = 0L;
m_NyIsSet = false;
m_Bkg = 0.0f;
m_BkgIsSet = false;
m_Spots = 0L;
m_SpotsIsSet = false;
m_Spots_low_res = 0L;
m_Spots_low_resIsSet = false;
m_Spots_indexed = 0L;
m_Spots_indexedIsSet = false;
m_Spots_ice = 0L;
m_Spots_iceIsSet = false;
m_Index = 0L;
m_IndexIsSet = false;
m_Mos = 0.0f;
m_MosIsSet = false;
m_b = 0.0f;
m_bIsSet = false;
m_UcIsSet = false;
m_Xfel_pulseid = 0L;
m_Xfel_pulseidIsSet = false;
m_Pixel_sum = 0L;
m_Pixel_sumIsSet = false;
m_Max = 0L;
m_MaxIsSet = false;
m_Sat = 0L;
m_SatIsSet = false;
m_Err = 0L;
m_ErrIsSet = false;
m_Res = 0.0f;
m_ResIsSet = false;
}
void Scan_result_images_inner::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Scan_result_images_inner::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Scan_result_images_inner::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Scan_result_images_inner" : pathPrefix;
return success;
}
bool Scan_result_images_inner::operator==(const Scan_result_images_inner& rhs) const
{
return
(getEfficiency() == rhs.getEfficiency())
&&
(getNumber() == rhs.getNumber())
&&
((!nxIsSet() && !rhs.nxIsSet()) || (nxIsSet() && rhs.nxIsSet() && getNx() == rhs.getNx())) &&
((!nyIsSet() && !rhs.nyIsSet()) || (nyIsSet() && rhs.nyIsSet() && getNy() == rhs.getNy())) &&
((!bkgIsSet() && !rhs.bkgIsSet()) || (bkgIsSet() && rhs.bkgIsSet() && getBkg() == rhs.getBkg())) &&
((!spotsIsSet() && !rhs.spotsIsSet()) || (spotsIsSet() && rhs.spotsIsSet() && getSpots() == rhs.getSpots())) &&
((!spotsLowResIsSet() && !rhs.spotsLowResIsSet()) || (spotsLowResIsSet() && rhs.spotsLowResIsSet() && getSpotsLowRes() == rhs.getSpotsLowRes())) &&
((!spotsIndexedIsSet() && !rhs.spotsIndexedIsSet()) || (spotsIndexedIsSet() && rhs.spotsIndexedIsSet() && getSpotsIndexed() == rhs.getSpotsIndexed())) &&
((!spotsIceIsSet() && !rhs.spotsIceIsSet()) || (spotsIceIsSet() && rhs.spotsIceIsSet() && getSpotsIce() == rhs.getSpotsIce())) &&
((!indexIsSet() && !rhs.indexIsSet()) || (indexIsSet() && rhs.indexIsSet() && getIndex() == rhs.getIndex())) &&
((!mosIsSet() && !rhs.mosIsSet()) || (mosIsSet() && rhs.mosIsSet() && getMos() == rhs.getMos())) &&
((!BIsSet() && !rhs.BIsSet()) || (BIsSet() && rhs.BIsSet() && getB() == rhs.getB())) &&
((!ucIsSet() && !rhs.ucIsSet()) || (ucIsSet() && rhs.ucIsSet() && getUc() == rhs.getUc())) &&
((!xfelPulseidIsSet() && !rhs.xfelPulseidIsSet()) || (xfelPulseidIsSet() && rhs.xfelPulseidIsSet() && getXfelPulseid() == rhs.getXfelPulseid())) &&
((!pixelSumIsSet() && !rhs.pixelSumIsSet()) || (pixelSumIsSet() && rhs.pixelSumIsSet() && getPixelSum() == rhs.getPixelSum())) &&
((!maxIsSet() && !rhs.maxIsSet()) || (maxIsSet() && rhs.maxIsSet() && getMax() == rhs.getMax())) &&
((!satIsSet() && !rhs.satIsSet()) || (satIsSet() && rhs.satIsSet() && getSat() == rhs.getSat())) &&
((!errIsSet() && !rhs.errIsSet()) || (errIsSet() && rhs.errIsSet() && getErr() == rhs.getErr())) &&
((!resIsSet() && !rhs.resIsSet()) || (resIsSet() && rhs.resIsSet() && getRes() == rhs.getRes()))
;
}
bool Scan_result_images_inner::operator!=(const Scan_result_images_inner& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Scan_result_images_inner& o)
{
j = nlohmann::json::object();
j["efficiency"] = o.m_Efficiency;
j["number"] = o.m_number;
if(o.nxIsSet())
j["nx"] = o.m_Nx;
if(o.nyIsSet())
j["ny"] = o.m_Ny;
if(o.bkgIsSet())
j["bkg"] = o.m_Bkg;
if(o.spotsIsSet())
j["spots"] = o.m_Spots;
if(o.spotsLowResIsSet())
j["spots_low_res"] = o.m_Spots_low_res;
if(o.spotsIndexedIsSet())
j["spots_indexed"] = o.m_Spots_indexed;
if(o.spotsIceIsSet())
j["spots_ice"] = o.m_Spots_ice;
if(o.indexIsSet())
j["index"] = o.m_Index;
if(o.mosIsSet())
j["mos"] = o.m_Mos;
if(o.BIsSet())
j["b"] = o.m_b;
if(o.ucIsSet())
j["uc"] = o.m_Uc;
if(o.xfelPulseidIsSet())
j["xfel_pulseid"] = o.m_Xfel_pulseid;
if(o.pixelSumIsSet())
j["pixel_sum"] = o.m_Pixel_sum;
if(o.maxIsSet())
j["max"] = o.m_Max;
if(o.satIsSet())
j["sat"] = o.m_Sat;
if(o.errIsSet())
j["err"] = o.m_Err;
if(o.resIsSet())
j["res"] = o.m_Res;
}
void from_json(const nlohmann::json& j, Scan_result_images_inner& o)
{
j.at("efficiency").get_to(o.m_Efficiency);
j.at("number").get_to(o.m_number);
if(j.find("nx") != j.end())
{
j.at("nx").get_to(o.m_Nx);
o.m_NxIsSet = true;
}
if(j.find("ny") != j.end())
{
j.at("ny").get_to(o.m_Ny);
o.m_NyIsSet = true;
}
if(j.find("bkg") != j.end())
{
j.at("bkg").get_to(o.m_Bkg);
o.m_BkgIsSet = true;
}
if(j.find("spots") != j.end())
{
j.at("spots").get_to(o.m_Spots);
o.m_SpotsIsSet = true;
}
if(j.find("spots_low_res") != j.end())
{
j.at("spots_low_res").get_to(o.m_Spots_low_res);
o.m_Spots_low_resIsSet = true;
}
if(j.find("spots_indexed") != j.end())
{
j.at("spots_indexed").get_to(o.m_Spots_indexed);
o.m_Spots_indexedIsSet = true;
}
if(j.find("spots_ice") != j.end())
{
j.at("spots_ice").get_to(o.m_Spots_ice);
o.m_Spots_iceIsSet = true;
}
if(j.find("index") != j.end())
{
j.at("index").get_to(o.m_Index);
o.m_IndexIsSet = true;
}
if(j.find("mos") != j.end())
{
j.at("mos").get_to(o.m_Mos);
o.m_MosIsSet = true;
}
if(j.find("b") != j.end())
{
j.at("b").get_to(o.m_b);
o.m_bIsSet = true;
}
if(j.find("uc") != j.end())
{
j.at("uc").get_to(o.m_Uc);
o.m_UcIsSet = true;
}
if(j.find("xfel_pulseid") != j.end())
{
j.at("xfel_pulseid").get_to(o.m_Xfel_pulseid);
o.m_Xfel_pulseidIsSet = true;
}
if(j.find("pixel_sum") != j.end())
{
j.at("pixel_sum").get_to(o.m_Pixel_sum);
o.m_Pixel_sumIsSet = true;
}
if(j.find("max") != j.end())
{
j.at("max").get_to(o.m_Max);
o.m_MaxIsSet = true;
}
if(j.find("sat") != j.end())
{
j.at("sat").get_to(o.m_Sat);
o.m_SatIsSet = true;
}
if(j.find("err") != j.end())
{
j.at("err").get_to(o.m_Err);
o.m_ErrIsSet = true;
}
if(j.find("res") != j.end())
{
j.at("res").get_to(o.m_Res);
o.m_ResIsSet = true;
}
}
float Scan_result_images_inner::getEfficiency() const
{
return m_Efficiency;
}
void Scan_result_images_inner::setEfficiency(float const value)
{
m_Efficiency = value;
}
int64_t Scan_result_images_inner::getNumber() const
{
return m_number;
}
void Scan_result_images_inner::setNumber(int64_t const value)
{
m_number = value;
}
int64_t Scan_result_images_inner::getNx() const
{
return m_Nx;
}
void Scan_result_images_inner::setNx(int64_t const value)
{
m_Nx = value;
m_NxIsSet = true;
}
bool Scan_result_images_inner::nxIsSet() const
{
return m_NxIsSet;
}
void Scan_result_images_inner::unsetNx()
{
m_NxIsSet = false;
}
int64_t Scan_result_images_inner::getNy() const
{
return m_Ny;
}
void Scan_result_images_inner::setNy(int64_t const value)
{
m_Ny = value;
m_NyIsSet = true;
}
bool Scan_result_images_inner::nyIsSet() const
{
return m_NyIsSet;
}
void Scan_result_images_inner::unsetNy()
{
m_NyIsSet = false;
}
float Scan_result_images_inner::getBkg() const
{
return m_Bkg;
}
void Scan_result_images_inner::setBkg(float const value)
{
m_Bkg = value;
m_BkgIsSet = true;
}
bool Scan_result_images_inner::bkgIsSet() const
{
return m_BkgIsSet;
}
void Scan_result_images_inner::unsetBkg()
{
m_BkgIsSet = false;
}
int64_t Scan_result_images_inner::getSpots() const
{
return m_Spots;
}
void Scan_result_images_inner::setSpots(int64_t const value)
{
m_Spots = value;
m_SpotsIsSet = true;
}
bool Scan_result_images_inner::spotsIsSet() const
{
return m_SpotsIsSet;
}
void Scan_result_images_inner::unsetSpots()
{
m_SpotsIsSet = false;
}
int64_t Scan_result_images_inner::getSpotsLowRes() const
{
return m_Spots_low_res;
}
void Scan_result_images_inner::setSpotsLowRes(int64_t const value)
{
m_Spots_low_res = value;
m_Spots_low_resIsSet = true;
}
bool Scan_result_images_inner::spotsLowResIsSet() const
{
return m_Spots_low_resIsSet;
}
void Scan_result_images_inner::unsetSpots_low_res()
{
m_Spots_low_resIsSet = false;
}
int64_t Scan_result_images_inner::getSpotsIndexed() const
{
return m_Spots_indexed;
}
void Scan_result_images_inner::setSpotsIndexed(int64_t const value)
{
m_Spots_indexed = value;
m_Spots_indexedIsSet = true;
}
bool Scan_result_images_inner::spotsIndexedIsSet() const
{
return m_Spots_indexedIsSet;
}
void Scan_result_images_inner::unsetSpots_indexed()
{
m_Spots_indexedIsSet = false;
}
int64_t Scan_result_images_inner::getSpotsIce() const
{
return m_Spots_ice;
}
void Scan_result_images_inner::setSpotsIce(int64_t const value)
{
m_Spots_ice = value;
m_Spots_iceIsSet = true;
}
bool Scan_result_images_inner::spotsIceIsSet() const
{
return m_Spots_iceIsSet;
}
void Scan_result_images_inner::unsetSpots_ice()
{
m_Spots_iceIsSet = false;
}
int64_t Scan_result_images_inner::getIndex() const
{
return m_Index;
}
void Scan_result_images_inner::setIndex(int64_t const value)
{
m_Index = value;
m_IndexIsSet = true;
}
bool Scan_result_images_inner::indexIsSet() const
{
return m_IndexIsSet;
}
void Scan_result_images_inner::unsetIndex()
{
m_IndexIsSet = false;
}
float Scan_result_images_inner::getMos() const
{
return m_Mos;
}
void Scan_result_images_inner::setMos(float const value)
{
m_Mos = value;
m_MosIsSet = true;
}
bool Scan_result_images_inner::mosIsSet() const
{
return m_MosIsSet;
}
void Scan_result_images_inner::unsetMos()
{
m_MosIsSet = false;
}
float Scan_result_images_inner::getB() const
{
return m_b;
}
void Scan_result_images_inner::setB(float const value)
{
m_b = value;
m_bIsSet = true;
}
bool Scan_result_images_inner::BIsSet() const
{
return m_bIsSet;
}
void Scan_result_images_inner::unsetb()
{
m_bIsSet = false;
}
org::openapitools::server::model::Unit_cell Scan_result_images_inner::getUc() const
{
return m_Uc;
}
void Scan_result_images_inner::setUc(org::openapitools::server::model::Unit_cell const& value)
{
m_Uc = value;
m_UcIsSet = true;
}
bool Scan_result_images_inner::ucIsSet() const
{
return m_UcIsSet;
}
void Scan_result_images_inner::unsetUc()
{
m_UcIsSet = false;
}
int64_t Scan_result_images_inner::getXfelPulseid() const
{
return m_Xfel_pulseid;
}
void Scan_result_images_inner::setXfelPulseid(int64_t const value)
{
m_Xfel_pulseid = value;
m_Xfel_pulseidIsSet = true;
}
bool Scan_result_images_inner::xfelPulseidIsSet() const
{
return m_Xfel_pulseidIsSet;
}
void Scan_result_images_inner::unsetXfel_pulseid()
{
m_Xfel_pulseidIsSet = false;
}
int64_t Scan_result_images_inner::getPixelSum() const
{
return m_Pixel_sum;
}
void Scan_result_images_inner::setPixelSum(int64_t const value)
{
m_Pixel_sum = value;
m_Pixel_sumIsSet = true;
}
bool Scan_result_images_inner::pixelSumIsSet() const
{
return m_Pixel_sumIsSet;
}
void Scan_result_images_inner::unsetPixel_sum()
{
m_Pixel_sumIsSet = false;
}
int64_t Scan_result_images_inner::getMax() const
{
return m_Max;
}
void Scan_result_images_inner::setMax(int64_t const value)
{
m_Max = value;
m_MaxIsSet = true;
}
bool Scan_result_images_inner::maxIsSet() const
{
return m_MaxIsSet;
}
void Scan_result_images_inner::unsetMax()
{
m_MaxIsSet = false;
}
int64_t Scan_result_images_inner::getSat() const
{
return m_Sat;
}
void Scan_result_images_inner::setSat(int64_t const value)
{
m_Sat = value;
m_SatIsSet = true;
}
bool Scan_result_images_inner::satIsSet() const
{
return m_SatIsSet;
}
void Scan_result_images_inner::unsetSat()
{
m_SatIsSet = false;
}
int64_t Scan_result_images_inner::getErr() const
{
return m_Err;
}
void Scan_result_images_inner::setErr(int64_t const value)
{
m_Err = value;
m_ErrIsSet = true;
}
bool Scan_result_images_inner::errIsSet() const
{
return m_ErrIsSet;
}
void Scan_result_images_inner::unsetErr()
{
m_ErrIsSet = false;
}
float Scan_result_images_inner::getRes() const
{
return m_Res;
}
void Scan_result_images_inner::setRes(float const value)
{
m_Res = value;
m_ResIsSet = true;
}
bool Scan_result_images_inner::resIsSet() const
{
return m_ResIsSet;
}
void Scan_result_images_inner::unsetRes()
{
m_ResIsSet = false;
}
} // namespace org::openapitools::server::model