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

#include "user_identifier.h"

using namespace QMatrixClient;

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

UserIdentifier FromJson<UserIdentifier>::operator()(const QJsonValue& jv)
{
    auto _json = jv.toObject();
    UserIdentifier result;
    result.type =
        fromJson<QString>(_json.take("type"_ls));
    
    result.additionalProperties = fromJson<QVariantHash>(_json);
    return result;
}