// 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 "zwavenodeaddednotificationparams.h"

namespace nymea::api {

ZWaveNodeAddedNotificationParams ZWaveNodeAddedNotificationParams::fromJson(const QJsonObject &object) {
    ZWaveNodeAddedNotificationParams value;
    if (object.contains(QStringLiteral("networkUuid"))) {
        value.networkUuid = QUuid((object.value(QStringLiteral("networkUuid"))).toString());
    }
    if (object.contains(QStringLiteral("node"))) {
        value.node = ZWaveNode::fromJson((object.value(QStringLiteral("node"))).toObject());
    }
    return value;
}

QJsonObject ZWaveNodeAddedNotificationParams::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("networkUuid"), QJsonValue((networkUuid).toString()));
    object.insert(QStringLiteral("node"), QJsonValue((node).toJson()));
    return object;
}

} // namespace nymea::api
