/**
 * SDRangel
 * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube    ---   Limitations and specifcities:    * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method.   * Preset import and export from/to file is a server only feature.   * Device set focus is a GUI only feature.   * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator   * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time   * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time    --- 
 *
 * OpenAPI spec version: 7.0.0
 * Contact: f4exb06@gmail.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


#include "SWGGLSpectrum.h"

#include "SWGHelpers.h"

#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>

namespace SWGSDRangel {

SWGGLSpectrum::SWGGLSpectrum(QString* json) {
    init();
    this->fromJson(*json);
}

SWGGLSpectrum::SWGGLSpectrum() {
    fft_size = 0;
    m_fft_size_isSet = false;
    fft_overlap = 0;
    m_fft_overlap_isSet = false;
    fft_window = 0;
    m_fft_window_isSet = false;
    ref_level = 0.0f;
    m_ref_level_isSet = false;
    power_range = 0.0f;
    m_power_range_isSet = false;
    fps_period_ms = 0;
    m_fps_period_ms_isSet = false;
    display_waterfall = 0;
    m_display_waterfall_isSet = false;
    inverted_waterfall = 0;
    m_inverted_waterfall_isSet = false;
    display_max_hold = 0;
    m_display_max_hold_isSet = false;
    display_histogram = 0;
    m_display_histogram_isSet = false;
    decay = 0;
    m_decay_isSet = false;
    display_grid = 0;
    m_display_grid_isSet = false;
    display_grid_intensity = 0;
    m_display_grid_intensity_isSet = false;
    decay_divisor = 0;
    m_decay_divisor_isSet = false;
    histogram_stroke = 0;
    m_histogram_stroke_isSet = false;
    display_current = 0;
    m_display_current_isSet = false;
    display_trace_intensity = 0;
    m_display_trace_intensity_isSet = false;
    waterfall_share = 0.0f;
    m_waterfall_share_isSet = false;
    averaging_mode = 0;
    m_averaging_mode_isSet = false;
    averaging_value = 0;
    m_averaging_value_isSet = false;
    linear = 0;
    m_linear_isSet = false;
    ssb = 0;
    m_ssb_isSet = false;
    usb = 0;
    m_usb_isSet = false;
    ws_spectrum = 0;
    m_ws_spectrum_isSet = false;
    ws_spectrum_address = nullptr;
    m_ws_spectrum_address_isSet = false;
    ws_spectrum_port = 0;
    m_ws_spectrum_port_isSet = false;
    markers_display = 0;
    m_markers_display_isSet = false;
    use_calibration = 0;
    m_use_calibration_isSet = false;
    calibration_interp_mode = 0;
    m_calibration_interp_mode_isSet = false;
    histogram_markers = nullptr;
    m_histogram_markers_isSet = false;
    waterfall_markers = nullptr;
    m_waterfall_markers_isSet = false;
    annotation_markers = nullptr;
    m_annotation_markers_isSet = false;
    calibration_points = nullptr;
    m_calibration_points_isSet = false;
}

SWGGLSpectrum::~SWGGLSpectrum() {
    this->cleanup();
}

void
SWGGLSpectrum::init() {
    fft_size = 0;
    m_fft_size_isSet = false;
    fft_overlap = 0;
    m_fft_overlap_isSet = false;
    fft_window = 0;
    m_fft_window_isSet = false;
    ref_level = 0.0f;
    m_ref_level_isSet = false;
    power_range = 0.0f;
    m_power_range_isSet = false;
    fps_period_ms = 0;
    m_fps_period_ms_isSet = false;
    display_waterfall = 0;
    m_display_waterfall_isSet = false;
    inverted_waterfall = 0;
    m_inverted_waterfall_isSet = false;
    display_max_hold = 0;
    m_display_max_hold_isSet = false;
    display_histogram = 0;
    m_display_histogram_isSet = false;
    decay = 0;
    m_decay_isSet = false;
    display_grid = 0;
    m_display_grid_isSet = false;
    display_grid_intensity = 0;
    m_display_grid_intensity_isSet = false;
    decay_divisor = 0;
    m_decay_divisor_isSet = false;
    histogram_stroke = 0;
    m_histogram_stroke_isSet = false;
    display_current = 0;
    m_display_current_isSet = false;
    display_trace_intensity = 0;
    m_display_trace_intensity_isSet = false;
    waterfall_share = 0.0f;
    m_waterfall_share_isSet = false;
    averaging_mode = 0;
    m_averaging_mode_isSet = false;
    averaging_value = 0;
    m_averaging_value_isSet = false;
    linear = 0;
    m_linear_isSet = false;
    ssb = 0;
    m_ssb_isSet = false;
    usb = 0;
    m_usb_isSet = false;
    ws_spectrum = 0;
    m_ws_spectrum_isSet = false;
    ws_spectrum_address = new QString("");
    m_ws_spectrum_address_isSet = false;
    ws_spectrum_port = 0;
    m_ws_spectrum_port_isSet = false;
    markers_display = 0;
    m_markers_display_isSet = false;
    use_calibration = 0;
    m_use_calibration_isSet = false;
    calibration_interp_mode = 0;
    m_calibration_interp_mode_isSet = false;
    histogram_markers = new QList<SWGSpectrumHistogramMarker*>();
    m_histogram_markers_isSet = false;
    waterfall_markers = new QList<SWGSpectrumWaterfallMarker*>();
    m_waterfall_markers_isSet = false;
    annotation_markers = new QList<SWGSpectrumAnnotationMarker*>();
    m_annotation_markers_isSet = false;
    calibration_points = new QList<SWGSpectrumCalibrationPoint*>();
    m_calibration_points_isSet = false;
}

void
SWGGLSpectrum::cleanup() {
























    if(ws_spectrum_address != nullptr) { 
        delete ws_spectrum_address;
    }




    if(histogram_markers != nullptr) { 
        auto arr = histogram_markers;
        for(auto o: *arr) { 
            delete o;
        }
        delete histogram_markers;
    }
    if(waterfall_markers != nullptr) { 
        auto arr = waterfall_markers;
        for(auto o: *arr) { 
            delete o;
        }
        delete waterfall_markers;
    }
    if(annotation_markers != nullptr) { 
        auto arr = annotation_markers;
        for(auto o: *arr) { 
            delete o;
        }
        delete annotation_markers;
    }
    if(calibration_points != nullptr) { 
        auto arr = calibration_points;
        for(auto o: *arr) { 
            delete o;
        }
        delete calibration_points;
    }
}

SWGGLSpectrum*
SWGGLSpectrum::fromJson(QString &json) {
    QByteArray array (json.toStdString().c_str());
    QJsonDocument doc = QJsonDocument::fromJson(array);
    QJsonObject jsonObject = doc.object();
    this->fromJsonObject(jsonObject);
    return this;
}

void
SWGGLSpectrum::fromJsonObject(QJsonObject &pJson) {
    ::SWGSDRangel::setValue(&fft_size, pJson["fftSize"], "qint32", "");
    
    ::SWGSDRangel::setValue(&fft_overlap, pJson["fftOverlap"], "qint32", "");
    
    ::SWGSDRangel::setValue(&fft_window, pJson["fftWindow"], "qint32", "");
    
    ::SWGSDRangel::setValue(&ref_level, pJson["refLevel"], "float", "");
    
    ::SWGSDRangel::setValue(&power_range, pJson["powerRange"], "float", "");
    
    ::SWGSDRangel::setValue(&fps_period_ms, pJson["fpsPeriodMs"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_waterfall, pJson["displayWaterfall"], "qint32", "");
    
    ::SWGSDRangel::setValue(&inverted_waterfall, pJson["invertedWaterfall"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_max_hold, pJson["displayMaxHold"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_histogram, pJson["displayHistogram"], "qint32", "");
    
    ::SWGSDRangel::setValue(&decay, pJson["decay"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_grid, pJson["displayGrid"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_grid_intensity, pJson["displayGridIntensity"], "qint32", "");
    
    ::SWGSDRangel::setValue(&decay_divisor, pJson["decayDivisor"], "qint32", "");
    
    ::SWGSDRangel::setValue(&histogram_stroke, pJson["histogramStroke"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_current, pJson["displayCurrent"], "qint32", "");
    
    ::SWGSDRangel::setValue(&display_trace_intensity, pJson["displayTraceIntensity"], "qint32", "");
    
    ::SWGSDRangel::setValue(&waterfall_share, pJson["waterfallShare"], "float", "");
    
    ::SWGSDRangel::setValue(&averaging_mode, pJson["averagingMode"], "qint32", "");
    
    ::SWGSDRangel::setValue(&averaging_value, pJson["averagingValue"], "qint32", "");
    
    ::SWGSDRangel::setValue(&linear, pJson["linear"], "qint32", "");
    
    ::SWGSDRangel::setValue(&ssb, pJson["ssb"], "qint32", "");
    
    ::SWGSDRangel::setValue(&usb, pJson["usb"], "qint32", "");
    
    ::SWGSDRangel::setValue(&ws_spectrum, pJson["wsSpectrum"], "qint32", "");
    
    ::SWGSDRangel::setValue(&ws_spectrum_address, pJson["wsSpectrumAddress"], "QString", "QString");
    
    ::SWGSDRangel::setValue(&ws_spectrum_port, pJson["wsSpectrumPort"], "qint32", "");
    
    ::SWGSDRangel::setValue(&markers_display, pJson["markersDisplay"], "qint32", "");
    
    ::SWGSDRangel::setValue(&use_calibration, pJson["useCalibration"], "qint32", "");
    
    ::SWGSDRangel::setValue(&calibration_interp_mode, pJson["calibrationInterpMode"], "qint32", "");
    
    
    ::SWGSDRangel::setValue(&histogram_markers, pJson["histogramMarkers"], "QList", "SWGSpectrumHistogramMarker");
    
    ::SWGSDRangel::setValue(&waterfall_markers, pJson["waterfallMarkers"], "QList", "SWGSpectrumWaterfallMarker");
    
    ::SWGSDRangel::setValue(&annotation_markers, pJson["annotationMarkers"], "QList", "SWGSpectrumAnnotationMarker");
    
    ::SWGSDRangel::setValue(&calibration_points, pJson["calibrationPoints"], "QList", "SWGSpectrumCalibrationPoint");
}

QString
SWGGLSpectrum::asJson ()
{
    QJsonObject* obj = this->asJsonObject();

    QJsonDocument doc(*obj);
    QByteArray bytes = doc.toJson();
    delete obj;
    return QString(bytes);
}

QJsonObject*
SWGGLSpectrum::asJsonObject() {
    QJsonObject* obj = new QJsonObject();
    if(m_fft_size_isSet){
        obj->insert("fftSize", QJsonValue(fft_size));
    }
    if(m_fft_overlap_isSet){
        obj->insert("fftOverlap", QJsonValue(fft_overlap));
    }
    if(m_fft_window_isSet){
        obj->insert("fftWindow", QJsonValue(fft_window));
    }
    if(m_ref_level_isSet){
        obj->insert("refLevel", QJsonValue(ref_level));
    }
    if(m_power_range_isSet){
        obj->insert("powerRange", QJsonValue(power_range));
    }
    if(m_fps_period_ms_isSet){
        obj->insert("fpsPeriodMs", QJsonValue(fps_period_ms));
    }
    if(m_display_waterfall_isSet){
        obj->insert("displayWaterfall", QJsonValue(display_waterfall));
    }
    if(m_inverted_waterfall_isSet){
        obj->insert("invertedWaterfall", QJsonValue(inverted_waterfall));
    }
    if(m_display_max_hold_isSet){
        obj->insert("displayMaxHold", QJsonValue(display_max_hold));
    }
    if(m_display_histogram_isSet){
        obj->insert("displayHistogram", QJsonValue(display_histogram));
    }
    if(m_decay_isSet){
        obj->insert("decay", QJsonValue(decay));
    }
    if(m_display_grid_isSet){
        obj->insert("displayGrid", QJsonValue(display_grid));
    }
    if(m_display_grid_intensity_isSet){
        obj->insert("displayGridIntensity", QJsonValue(display_grid_intensity));
    }
    if(m_decay_divisor_isSet){
        obj->insert("decayDivisor", QJsonValue(decay_divisor));
    }
    if(m_histogram_stroke_isSet){
        obj->insert("histogramStroke", QJsonValue(histogram_stroke));
    }
    if(m_display_current_isSet){
        obj->insert("displayCurrent", QJsonValue(display_current));
    }
    if(m_display_trace_intensity_isSet){
        obj->insert("displayTraceIntensity", QJsonValue(display_trace_intensity));
    }
    if(m_waterfall_share_isSet){
        obj->insert("waterfallShare", QJsonValue(waterfall_share));
    }
    if(m_averaging_mode_isSet){
        obj->insert("averagingMode", QJsonValue(averaging_mode));
    }
    if(m_averaging_value_isSet){
        obj->insert("averagingValue", QJsonValue(averaging_value));
    }
    if(m_linear_isSet){
        obj->insert("linear", QJsonValue(linear));
    }
    if(m_ssb_isSet){
        obj->insert("ssb", QJsonValue(ssb));
    }
    if(m_usb_isSet){
        obj->insert("usb", QJsonValue(usb));
    }
    if(m_ws_spectrum_isSet){
        obj->insert("wsSpectrum", QJsonValue(ws_spectrum));
    }
    if(ws_spectrum_address != nullptr && *ws_spectrum_address != QString("")){
        toJsonValue(QString("wsSpectrumAddress"), ws_spectrum_address, obj, QString("QString"));
    }
    if(m_ws_spectrum_port_isSet){
        obj->insert("wsSpectrumPort", QJsonValue(ws_spectrum_port));
    }
    if(m_markers_display_isSet){
        obj->insert("markersDisplay", QJsonValue(markers_display));
    }
    if(m_use_calibration_isSet){
        obj->insert("useCalibration", QJsonValue(use_calibration));
    }
    if(m_calibration_interp_mode_isSet){
        obj->insert("calibrationInterpMode", QJsonValue(calibration_interp_mode));
    }
    if(histogram_markers && histogram_markers->size() > 0){
        toJsonArray((QList<void*>*)histogram_markers, obj, "histogramMarkers", "SWGSpectrumHistogramMarker");
    }
    if(waterfall_markers && waterfall_markers->size() > 0){
        toJsonArray((QList<void*>*)waterfall_markers, obj, "waterfallMarkers", "SWGSpectrumWaterfallMarker");
    }
    if(annotation_markers && annotation_markers->size() > 0){
        toJsonArray((QList<void*>*)annotation_markers, obj, "annotationMarkers", "SWGSpectrumAnnotationMarker");
    }
    if(calibration_points && calibration_points->size() > 0){
        toJsonArray((QList<void*>*)calibration_points, obj, "calibrationPoints", "SWGSpectrumCalibrationPoint");
    }

    return obj;
}

qint32
SWGGLSpectrum::getFftSize() {
    return fft_size;
}
void
SWGGLSpectrum::setFftSize(qint32 fft_size) {
    this->fft_size = fft_size;
    this->m_fft_size_isSet = true;
}

qint32
SWGGLSpectrum::getFftOverlap() {
    return fft_overlap;
}
void
SWGGLSpectrum::setFftOverlap(qint32 fft_overlap) {
    this->fft_overlap = fft_overlap;
    this->m_fft_overlap_isSet = true;
}

qint32
SWGGLSpectrum::getFftWindow() {
    return fft_window;
}
void
SWGGLSpectrum::setFftWindow(qint32 fft_window) {
    this->fft_window = fft_window;
    this->m_fft_window_isSet = true;
}

float
SWGGLSpectrum::getRefLevel() {
    return ref_level;
}
void
SWGGLSpectrum::setRefLevel(float ref_level) {
    this->ref_level = ref_level;
    this->m_ref_level_isSet = true;
}

float
SWGGLSpectrum::getPowerRange() {
    return power_range;
}
void
SWGGLSpectrum::setPowerRange(float power_range) {
    this->power_range = power_range;
    this->m_power_range_isSet = true;
}

qint32
SWGGLSpectrum::getFpsPeriodMs() {
    return fps_period_ms;
}
void
SWGGLSpectrum::setFpsPeriodMs(qint32 fps_period_ms) {
    this->fps_period_ms = fps_period_ms;
    this->m_fps_period_ms_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayWaterfall() {
    return display_waterfall;
}
void
SWGGLSpectrum::setDisplayWaterfall(qint32 display_waterfall) {
    this->display_waterfall = display_waterfall;
    this->m_display_waterfall_isSet = true;
}

qint32
SWGGLSpectrum::getInvertedWaterfall() {
    return inverted_waterfall;
}
void
SWGGLSpectrum::setInvertedWaterfall(qint32 inverted_waterfall) {
    this->inverted_waterfall = inverted_waterfall;
    this->m_inverted_waterfall_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayMaxHold() {
    return display_max_hold;
}
void
SWGGLSpectrum::setDisplayMaxHold(qint32 display_max_hold) {
    this->display_max_hold = display_max_hold;
    this->m_display_max_hold_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayHistogram() {
    return display_histogram;
}
void
SWGGLSpectrum::setDisplayHistogram(qint32 display_histogram) {
    this->display_histogram = display_histogram;
    this->m_display_histogram_isSet = true;
}

qint32
SWGGLSpectrum::getDecay() {
    return decay;
}
void
SWGGLSpectrum::setDecay(qint32 decay) {
    this->decay = decay;
    this->m_decay_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayGrid() {
    return display_grid;
}
void
SWGGLSpectrum::setDisplayGrid(qint32 display_grid) {
    this->display_grid = display_grid;
    this->m_display_grid_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayGridIntensity() {
    return display_grid_intensity;
}
void
SWGGLSpectrum::setDisplayGridIntensity(qint32 display_grid_intensity) {
    this->display_grid_intensity = display_grid_intensity;
    this->m_display_grid_intensity_isSet = true;
}

qint32
SWGGLSpectrum::getDecayDivisor() {
    return decay_divisor;
}
void
SWGGLSpectrum::setDecayDivisor(qint32 decay_divisor) {
    this->decay_divisor = decay_divisor;
    this->m_decay_divisor_isSet = true;
}

qint32
SWGGLSpectrum::getHistogramStroke() {
    return histogram_stroke;
}
void
SWGGLSpectrum::setHistogramStroke(qint32 histogram_stroke) {
    this->histogram_stroke = histogram_stroke;
    this->m_histogram_stroke_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayCurrent() {
    return display_current;
}
void
SWGGLSpectrum::setDisplayCurrent(qint32 display_current) {
    this->display_current = display_current;
    this->m_display_current_isSet = true;
}

qint32
SWGGLSpectrum::getDisplayTraceIntensity() {
    return display_trace_intensity;
}
void
SWGGLSpectrum::setDisplayTraceIntensity(qint32 display_trace_intensity) {
    this->display_trace_intensity = display_trace_intensity;
    this->m_display_trace_intensity_isSet = true;
}

float
SWGGLSpectrum::getWaterfallShare() {
    return waterfall_share;
}
void
SWGGLSpectrum::setWaterfallShare(float waterfall_share) {
    this->waterfall_share = waterfall_share;
    this->m_waterfall_share_isSet = true;
}

qint32
SWGGLSpectrum::getAveragingMode() {
    return averaging_mode;
}
void
SWGGLSpectrum::setAveragingMode(qint32 averaging_mode) {
    this->averaging_mode = averaging_mode;
    this->m_averaging_mode_isSet = true;
}

qint32
SWGGLSpectrum::getAveragingValue() {
    return averaging_value;
}
void
SWGGLSpectrum::setAveragingValue(qint32 averaging_value) {
    this->averaging_value = averaging_value;
    this->m_averaging_value_isSet = true;
}

qint32
SWGGLSpectrum::getLinear() {
    return linear;
}
void
SWGGLSpectrum::setLinear(qint32 linear) {
    this->linear = linear;
    this->m_linear_isSet = true;
}

qint32
SWGGLSpectrum::getSsb() {
    return ssb;
}
void
SWGGLSpectrum::setSsb(qint32 ssb) {
    this->ssb = ssb;
    this->m_ssb_isSet = true;
}

qint32
SWGGLSpectrum::getUsb() {
    return usb;
}
void
SWGGLSpectrum::setUsb(qint32 usb) {
    this->usb = usb;
    this->m_usb_isSet = true;
}

qint32
SWGGLSpectrum::getWsSpectrum() {
    return ws_spectrum;
}
void
SWGGLSpectrum::setWsSpectrum(qint32 ws_spectrum) {
    this->ws_spectrum = ws_spectrum;
    this->m_ws_spectrum_isSet = true;
}

QString*
SWGGLSpectrum::getWsSpectrumAddress() {
    return ws_spectrum_address;
}
void
SWGGLSpectrum::setWsSpectrumAddress(QString* ws_spectrum_address) {
    this->ws_spectrum_address = ws_spectrum_address;
    this->m_ws_spectrum_address_isSet = true;
}

qint32
SWGGLSpectrum::getWsSpectrumPort() {
    return ws_spectrum_port;
}
void
SWGGLSpectrum::setWsSpectrumPort(qint32 ws_spectrum_port) {
    this->ws_spectrum_port = ws_spectrum_port;
    this->m_ws_spectrum_port_isSet = true;
}

qint32
SWGGLSpectrum::getMarkersDisplay() {
    return markers_display;
}
void
SWGGLSpectrum::setMarkersDisplay(qint32 markers_display) {
    this->markers_display = markers_display;
    this->m_markers_display_isSet = true;
}

qint32
SWGGLSpectrum::getUseCalibration() {
    return use_calibration;
}
void
SWGGLSpectrum::setUseCalibration(qint32 use_calibration) {
    this->use_calibration = use_calibration;
    this->m_use_calibration_isSet = true;
}

qint32
SWGGLSpectrum::getCalibrationInterpMode() {
    return calibration_interp_mode;
}
void
SWGGLSpectrum::setCalibrationInterpMode(qint32 calibration_interp_mode) {
    this->calibration_interp_mode = calibration_interp_mode;
    this->m_calibration_interp_mode_isSet = true;
}

QList<SWGSpectrumHistogramMarker*>*
SWGGLSpectrum::getHistogramMarkers() {
    return histogram_markers;
}
void
SWGGLSpectrum::setHistogramMarkers(QList<SWGSpectrumHistogramMarker*>* histogram_markers) {
    this->histogram_markers = histogram_markers;
    this->m_histogram_markers_isSet = true;
}

QList<SWGSpectrumWaterfallMarker*>*
SWGGLSpectrum::getWaterfallMarkers() {
    return waterfall_markers;
}
void
SWGGLSpectrum::setWaterfallMarkers(QList<SWGSpectrumWaterfallMarker*>* waterfall_markers) {
    this->waterfall_markers = waterfall_markers;
    this->m_waterfall_markers_isSet = true;
}

QList<SWGSpectrumAnnotationMarker*>*
SWGGLSpectrum::getAnnotationMarkers() {
    return annotation_markers;
}
void
SWGGLSpectrum::setAnnotationMarkers(QList<SWGSpectrumAnnotationMarker*>* annotation_markers) {
    this->annotation_markers = annotation_markers;
    this->m_annotation_markers_isSet = true;
}

QList<SWGSpectrumCalibrationPoint*>*
SWGGLSpectrum::getCalibrationPoints() {
    return calibration_points;
}
void
SWGGLSpectrum::setCalibrationPoints(QList<SWGSpectrumCalibrationPoint*>* calibration_points) {
    this->calibration_points = calibration_points;
    this->m_calibration_points_isSet = true;
}


bool
SWGGLSpectrum::isSet(){
    bool isObjectUpdated = false;
    do{
        if(m_fft_size_isSet){
            isObjectUpdated = true; break;
        }
        if(m_fft_overlap_isSet){
            isObjectUpdated = true; break;
        }
        if(m_fft_window_isSet){
            isObjectUpdated = true; break;
        }
        if(m_ref_level_isSet){
            isObjectUpdated = true; break;
        }
        if(m_power_range_isSet){
            isObjectUpdated = true; break;
        }
        if(m_fps_period_ms_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_waterfall_isSet){
            isObjectUpdated = true; break;
        }
        if(m_inverted_waterfall_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_max_hold_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_histogram_isSet){
            isObjectUpdated = true; break;
        }
        if(m_decay_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_grid_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_grid_intensity_isSet){
            isObjectUpdated = true; break;
        }
        if(m_decay_divisor_isSet){
            isObjectUpdated = true; break;
        }
        if(m_histogram_stroke_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_current_isSet){
            isObjectUpdated = true; break;
        }
        if(m_display_trace_intensity_isSet){
            isObjectUpdated = true; break;
        }
        if(m_waterfall_share_isSet){
            isObjectUpdated = true; break;
        }
        if(m_averaging_mode_isSet){
            isObjectUpdated = true; break;
        }
        if(m_averaging_value_isSet){
            isObjectUpdated = true; break;
        }
        if(m_linear_isSet){
            isObjectUpdated = true; break;
        }
        if(m_ssb_isSet){
            isObjectUpdated = true; break;
        }
        if(m_usb_isSet){
            isObjectUpdated = true; break;
        }
        if(m_ws_spectrum_isSet){
            isObjectUpdated = true; break;
        }
        if(ws_spectrum_address && *ws_spectrum_address != QString("")){
            isObjectUpdated = true; break;
        }
        if(m_ws_spectrum_port_isSet){
            isObjectUpdated = true; break;
        }
        if(m_markers_display_isSet){
            isObjectUpdated = true; break;
        }
        if(m_use_calibration_isSet){
            isObjectUpdated = true; break;
        }
        if(m_calibration_interp_mode_isSet){
            isObjectUpdated = true; break;
        }
        if(histogram_markers && (histogram_markers->size() > 0)){
            isObjectUpdated = true; break;
        }
        if(waterfall_markers && (waterfall_markers->size() > 0)){
            isObjectUpdated = true; break;
        }
        if(annotation_markers && (annotation_markers->size() > 0)){
            isObjectUpdated = true; break;
        }
        if(calibration_points && (calibration_points->size() > 0)){
            isObjectUpdated = true; break;
        }
    }while(false);
    return isObjectUpdated;
}
}

