/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "push_rule.h" using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const PushRule& pod) { QJsonObject _json; addParam<>(_json, QStringLiteral("actions"), pod.actions); addParam<>(_json, QStringLiteral("default"), pod.isDefault); addParam<>(_json, QStringLiteral("enabled"), pod.enabled); addParam<>(_json, QStringLiteral("rule_id"), pod.ruleId); addParam(_json, QStringLiteral("conditions"), pod.conditions); addParam(_json, QStringLiteral("pattern"), pod.pattern); return _json; } PushRule FromJson::operator()(const QJsonValue& jv) { const auto& _json = jv.toObject(); PushRule result; result.actions = fromJson>(_json.value("actions"_ls)); result.isDefault = fromJson(_json.value("default"_ls)); result.enabled = fromJson(_json.value("enabled"_ls)); result.ruleId = fromJson(_json.value("rule_id"_ls)); result.conditions = fromJson>(_json.value("conditions"_ls)); result.pattern = fromJson(_json.value("pattern"_ls)); return result; }