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

namespace nymea::api {

JSONRPCHelloParams JSONRPCHelloParams::fromJson(const QJsonObject &object) {
    JSONRPCHelloParams value;
    if (object.contains(QStringLiteral("locale"))) {
        value.locale = (object.value(QStringLiteral("locale"))).toString();
    }
    return value;
}

QJsonObject JSONRPCHelloParams::toJson() const {
    QJsonObject object;
    if (locale.has_value()) {
        object.insert(QStringLiteral("locale"), QJsonValue(*locale));
    }
    return object;
}

} // namespace nymea::api
