1 | /****************************************************************************** |
2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
3 | */ |
4 | |
5 | #pragma once |
6 | |
7 | #include <Quotient/converters.h> |
8 | |
9 | namespace Quotient { |
10 | |
11 | struct ThirdPartyLocation { |
12 | /// An alias for a matrix room. |
13 | QString alias; |
14 | |
15 | /// The protocol ID that the third-party location is a part of. |
16 | QString protocol; |
17 | |
18 | /// Information used to identify this third-party location. |
19 | QJsonObject fields; |
20 | }; |
21 | |
22 | template <> |
23 | struct JsonObjectConverter<ThirdPartyLocation> { |
24 | static void dumpTo(QJsonObject& jo, const ThirdPartyLocation& pod) |
25 | { |
26 | addParam<>(container&: jo, QStringLiteral("alias" ), value: pod.alias); |
27 | addParam<>(container&: jo, QStringLiteral("protocol" ), value: pod.protocol); |
28 | addParam<>(container&: jo, QStringLiteral("fields" ), value: pod.fields); |
29 | } |
30 | static void fillFrom(const QJsonObject& jo, ThirdPartyLocation& pod) |
31 | { |
32 | fillFromJson(jv: jo.value(key: "alias"_ls ), pod&: pod.alias); |
33 | fillFromJson(jv: jo.value(key: "protocol"_ls ), pod&: pod.protocol); |
34 | fillFromJson(jv: jo.value(key: "fields"_ls ), pod&: pod.fields); |
35 | } |
36 | }; |
37 | |
38 | } // namespace Quotient |
39 | |