/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "push_rule.h" using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const SetTweakAction& pod) { QJsonObject _json = toJson(pod.additionalProperties); addParam<>(_json, QStringLiteral("set_tweak"), pod.setTweak); return _json; } SetTweakAction FromJson::operator()(const QJsonValue& jv) { auto _json = jv.toObject(); SetTweakAction result; result.setTweak = fromJson(_json.take("set_tweak"_ls)); result.additionalProperties = fromJson(_json); return result; } 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; }