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

namespace nymea::api {

ModbusRtuSerialPortAddedNotificationParams ModbusRtuSerialPortAddedNotificationParams::fromJson(const QJsonObject &object) {
    ModbusRtuSerialPortAddedNotificationParams value;
    if (object.contains(QStringLiteral("serialPort"))) {
        value.serialPort = SerialPort::fromJson((object.value(QStringLiteral("serialPort"))).toObject());
    }
    return value;
}

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

} // namespace nymea::api
