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

namespace nymea::api {

JSONRPCIntrospectResponse JSONRPCIntrospectResponse::fromJson(const QJsonObject &object) {
    JSONRPCIntrospectResponse value;
    if (object.contains(QStringLiteral("methods"))) {
        value.methods = (object.value(QStringLiteral("methods"))).toObject();
    }
    if (object.contains(QStringLiteral("notifications"))) {
        value.notifications = (object.value(QStringLiteral("notifications"))).toObject();
    }
    if (object.contains(QStringLiteral("types"))) {
        value.types = (object.value(QStringLiteral("types"))).toObject();
    }
    return value;
}

QJsonObject JSONRPCIntrospectResponse::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("methods"), QJsonValue(methods));
    object.insert(QStringLiteral("notifications"), QJsonValue(notifications));
    object.insert(QStringLiteral("types"), QJsonValue(types));
    return object;
}

} // namespace nymea::api
