| 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 ThirdPartyUser { |
| 12 | /// A Matrix User ID represting a third-party user. |
| 13 | QString userid; |
| 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<ThirdPartyUser> { |
| 24 | static void dumpTo(QJsonObject& jo, const ThirdPartyUser& pod) |
| 25 | { |
| 26 | addParam<>(container&: jo, QStringLiteral("userid" ), value: pod.userid); |
| 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, ThirdPartyUser& pod) |
| 31 | { |
| 32 | fillFromJson(jv: jo.value(key: "userid"_ls ), pod&: pod.userid); |
| 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 | |