blob: ca2bbc0df662898e691029789b8b6cb0aa58b1bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include "push_ruleset.h"
using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const PushRuleset& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, "content", pod.content);
addParam<IfNotEmpty>(_json, "override", pod.override);
addParam<IfNotEmpty>(_json, "room", pod.room);
addParam<IfNotEmpty>(_json, "sender", pod.sender);
addParam<IfNotEmpty>(_json, "underride", pod.underride);
return _json;
}
PushRuleset FromJson<PushRuleset>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
PushRuleset result;
result.content =
fromJson<QVector<PushRule>>(_json.value("content"));
result.override =
fromJson<QVector<PushRule>>(_json.value("override"));
result.room =
fromJson<QVector<PushRule>>(_json.value("room"));
result.sender =
fromJson<QVector<PushRule>>(_json.value("sender"));
result.underride =
fromJson<QVector<PushRule>>(_json.value("underride"));
return result;
}
|