/****************************************************************************** * 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, "actions", pod.actions); addParam<>(_json, "default", pod.isDefault); addParam<>(_json, "enabled", pod.enabled); addParam<>(_json, "rule_id", pod.ruleId); addParam(_json, "conditions", pod.conditions); addParam(_json, "pattern", pod.pattern); return _json; } PushRule FromJson::operator()(const QJsonValue& jv) { const auto& _json = jv.toObject(); PushRule result; result.actions = fromJson>(_json.value("actions")); result.isDefault = fromJson(_json.value("default")); result.enabled = fromJson(_json.value("enabled")); result.ruleId = fromJson(_json.value("rule_id")); result.conditions = fromJson>(_json.value("conditions")); result.pattern = fromJson(_json.value("pattern")); return result; }