/****************************************************************************** * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN */ #include "protocol.h" using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const FieldType& pod) { QJsonObject _json; addParam(_json, QStringLiteral("regexp"), pod.regexp); addParam(_json, QStringLiteral("placeholder"), pod.placeholder); return _json; } FieldType FromJson::operator()(const QJsonValue& jv) { const auto& _json = jv.toObject(); FieldType result; result.regexp = fromJson(_json.value("regexp"_ls)); result.placeholder = fromJson(_json.value("placeholder"_ls)); return result; } QJsonObject QMatrixClient::toJson(const FieldTypes& pod) { QJsonObject _json; addParam(_json, QStringLiteral("fieldname"), pod.fieldname); return _json; } FieldTypes FromJson::operator()(const QJsonValue& jv) { const auto& _json = jv.toObject(); FieldTypes result; result.fieldname = fromJson(_json.value("fieldname"_ls)); return result; } QJsonObject QMatrixClient::toJson(const ThirdPartyProtocol& pod) { QJsonObject _json; addParam(_json, QStringLiteral("user_fields"), pod.userFields); addParam(_json, QStringLiteral("location_fields"), pod.locationFields); addParam(_json, QStringLiteral("icon"), pod.icon); addParam(_json, QStringLiteral("field_types"), pod.fieldTypes); addParam(_json, QStringLiteral("instances"), pod.instances); return _json; } ThirdPartyProtocol FromJson::operator()(const QJsonValue& jv) { const auto& _json = jv.toObject(); ThirdPartyProtocol result; result.userFields = fromJson(_json.value("user_fields"_ls)); result.locationFields = fromJson(_json.value("location_fields"_ls)); result.icon = fromJson(_json.value("icon"_ls)); result.fieldTypes = fromJson(_json.value("field_types"_ls)); result.instances = fromJson>(_json.value("instances"_ls)); return result; }