blob: c424f68605df54e2a5007b02afe5c47017cfae0b (
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, QStringLiteral("content"), pod.content);
addParam<IfNotEmpty>(_json, QStringLiteral("override"), pod.override);
addParam<IfNotEmpty>(_json, QStringLiteral("room"), pod.room);
addParam<IfNotEmpty>(_json, QStringLiteral("sender"), pod.sender);
addParam<IfNotEmpty>(_json, QStringLiteral("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"_ls));
result.override =
fromJson<QVector<PushRule>>(_json.value("override"_ls));
result.room =
fromJson<QVector<PushRule>>(_json.value("room"_ls));
result.sender =
fromJson<QVector<PushRule>>(_json.value("sender"_ls));
result.underride =
fromJson<QVector<PushRule>>(_json.value("underride"_ls));
return result;
}
|