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

namespace nymea::api {

RulesRemoveRuleResponse RulesRemoveRuleResponse::fromJson(const QJsonObject &object) {
    RulesRemoveRuleResponse value;
    if (object.contains(QStringLiteral("ruleError"))) {
        value.ruleError = parseRuleError(object.value(QStringLiteral("ruleError")));
    }
    return value;
}

QJsonObject RulesRemoveRuleResponse::toJson() const {
    QJsonObject object;
    object.insert(QStringLiteral("ruleError"), QJsonValue(toString(ruleError)));
    return object;
}

} // namespace nymea::api
