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