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

#include "auth_data.h"

using namespace QMatrixClient;

void JsonObjectConverter<AuthenticationData>::dumpTo(
        QJsonObject& jo, const AuthenticationData& pod)
{
    fillJson(jo, pod.authInfo);
    addParam<>(jo, QStringLiteral("type"), pod.type);
    addParam<IfNotEmpty>(jo, QStringLiteral("session"), pod.session);
}

void JsonObjectConverter<AuthenticationData>::fillFrom(
        QJsonObject jo, AuthenticationData& result)
{
    fromJson(jo.take("type"_ls), result.type);
    fromJson(jo.take("session"_ls), result.session);

    fromJson(jo, result.authInfo);
}