// SPDX-License-Identifier: GPL-3.0-or-later

// This file is auto-generated by scripts/generate_nymea_api.py
// Any changes made here will be lost when the files are regenerated.
// Do not edit manually.

#include "configurationbasicconfigurationchangednotificationparamsbasicconfigurationlocation.h"

namespace nymea::api {

ConfigurationBasicConfigurationChangedNotificationParamsBasicConfigurationLocation ConfigurationBasicConfigurationChangedNotificationParamsBasicConfigurationLocation::fromJson(const QJsonObject &object) {
    ConfigurationBasicConfigurationChangedNotificationParamsBasicConfigurationLocation value;
    if (object.contains(QStringLiteral("latitude"))) {
        value.latitude = (object.value(QStringLiteral("latitude"))).toDouble();
    }
    if (object.contains(QStringLiteral("longitude"))) {
        value.longitude = (object.value(QStringLiteral("longitude"))).toDouble();
    }
    if (object.contains(QStringLiteral("name"))) {
        value.name = (object.value(QStringLiteral("name"))).toString();
    }
    return value;
}

QJsonObject ConfigurationBasicConfigurationChangedNotificationParamsBasicConfigurationLocation::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("latitude"), QJsonValue(latitude));
    object.insert(QStringLiteral("longitude"), QJsonValue(longitude));
    object.insert(QStringLiteral("name"), QJsonValue(name));
    return object;
}

} // namespace nymea::api
