blob: b8595ec65bf7caae86e33e80298d20ff268e7979 (
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
|
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#include "push_condition.h"
using namespace QMatrixClient;
QJsonObject QMatrixClient::toJson(const PushCondition& pod)
{
QJsonObject _json;
addParam<>(_json, "kind", pod.kind);
addParam<IfNotEmpty>(_json, "key", pod.key);
addParam<IfNotEmpty>(_json, "pattern", pod.pattern);
addParam<IfNotEmpty>(_json, "is", pod.is);
return _json;
}
PushCondition FromJson<PushCondition>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
PushCondition result;
result.kind =
fromJson<QString>(_json.value("kind"));
result.key =
fromJson<QString>(_json.value("key"));
result.pattern =
fromJson<QString>(_json.value("pattern"));
result.is =
fromJson<QString>(_json.value("is"));
return result;
}
|