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

namespace nymea::api {

ScriptsScriptAddedNotificationParams ScriptsScriptAddedNotificationParams::fromJson(const QJsonObject &object) {
    ScriptsScriptAddedNotificationParams value;
    if (object.contains(QStringLiteral("script"))) {
        value.script = Script::fromJson((object.value(QStringLiteral("script"))).toObject());
    }
    return value;
}

QJsonObject ScriptsScriptAddedNotificationParams::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("script"), QJsonValue((script).toJson()));
    return object;
}

} // namespace nymea::api
