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

#include "user_identifier.h"

using namespace QMatrixClient;

QJsonObject QMatrixClient::toJson(const UserIdentifier& pod)
{
    QJsonObject jo = toJson(pod.additionalProperties);
    addParam<>(jo, QStringLiteral("type"), pod.type);
    return jo;
}

UserIdentifier FromJsonObject<UserIdentifier>::operator()(QJsonObject jo) const
{
    UserIdentifier result;
    result.type =
        fromJson<QString>(jo.take("type"_ls));

    result.additionalProperties = fromJson<QVariantHash>(jo);
    return result;
}