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

#pragma once

#include "converters.h"

namespace Quotient {
/// Identification information for a user
struct UserIdentifier {
    /// The type of identification.  See `Identifier types`_ for supported
    /// values and additional property descriptions.
    QString type;

    /// Identification information for a user
    QVariantHash additionalProperties;
};

template <>
struct JsonObjectConverter<UserIdentifier> {
    static void dumpTo(QJsonObject& jo, const UserIdentifier& pod)
    {
        fillJson(jo, pod.additionalProperties);
        addParam<>(jo, QStringLiteral("type"), pod.type);
    }
    static void fillFrom(QJsonObject jo, UserIdentifier& pod)
    {
        fromJson(jo.take("type"_ls), pod.type);
        fromJson(jo, pod.additionalProperties);
    }
};

} // namespace Quotient