aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/push_ruleset.cpp
blob: 6f48d27b39c1388bd2b98078a8365e8a4d935147 (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
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#include "push_ruleset.h"

using namespace QMatrixClient;

void JsonObjectConverter<PushRuleset>::dumpTo(QJsonObject& jo,
                                              const PushRuleset& pod)
{
    addParam<IfNotEmpty>(jo, QStringLiteral("content"), pod.content);
    addParam<IfNotEmpty>(jo, QStringLiteral("override"), pod.override);
    addParam<IfNotEmpty>(jo, QStringLiteral("room"), pod.room);
    addParam<IfNotEmpty>(jo, QStringLiteral("sender"), pod.sender);
    addParam<IfNotEmpty>(jo, QStringLiteral("underride"), pod.underride);
}

void JsonObjectConverter<PushRuleset>::fillFrom(const QJsonObject& jo,
                                                PushRuleset& result)
{
    fromJson(jo.value("content"_ls), result.content);
    fromJson(jo.value("override"_ls), result.override);
    fromJson(jo.value("room"_ls), result.room);
    fromJson(jo.value("sender"_ls), result.sender);
    fromJson(jo.value("underride"_ls), result.underride);
}