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 | /// Used by clients to discover homeserver information. |
11 | struct HomeserverInformation { |
12 | /// The base URL for the homeserver for client-server connections. |
13 | QUrl baseUrl; |
14 | }; |
15 | |
16 | template <> |
17 | struct JsonObjectConverter<HomeserverInformation> { |
18 | static void dumpTo(QJsonObject& jo, const HomeserverInformation& pod) |
19 | { |
20 | addParam<>(container&: jo, QStringLiteral("base_url" ), value: pod.baseUrl); |
21 | } |
22 | static void fillFrom(const QJsonObject& jo, HomeserverInformation& pod) |
23 | { |
24 | fillFromJson(jv: jo.value(key: "base_url"_ls ), pod&: pod.baseUrl); |
25 | } |
26 | }; |
27 | |
28 | } // namespace Quotient |
29 | |