/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "push_rule.h" using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const PushRule& pod) { QJsonObject _json; addToJson<>(_json, "actions", pod.actions); addToJson<>(_json, "default", pod.isDefault); addToJson<>(_json, "enabled", pod.enabled); addToJson<>(_json, "rule_id", pod.ruleId); addToJson(_json, "conditions", pod.conditions); addToJson(_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; }