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

namespace nymea::api {

IntegrationsEditThingParams IntegrationsEditThingParams::fromJson(const QJsonObject &object) {
    IntegrationsEditThingParams value;
    if (object.contains(QStringLiteral("name"))) {
        value.name = (object.value(QStringLiteral("name"))).toString();
    }
    if (object.contains(QStringLiteral("thingId"))) {
        value.thingId = QUuid((object.value(QStringLiteral("thingId"))).toString());
    }
    return value;
}

QJsonObject IntegrationsEditThingParams::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("name"), QJsonValue(name));
    object.insert(QStringLiteral("thingId"), QJsonValue((thingId).toString()));
    return object;
}

} // namespace nymea::api
