| 1 | /****************************************************************************** |
| 2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
| 3 | */ |
| 4 | |
| 5 | #include "create_room.h" |
| 6 | |
| 7 | using namespace Quotient; |
| 8 | |
| 9 | CreateRoomJob::CreateRoomJob(const QString& visibility, |
| 10 | const QString& roomAliasName, const QString& name, |
| 11 | const QString& topic, const QStringList& invite, |
| 12 | const QVector<Invite3pid>& invite3pid, |
| 13 | const QString& roomVersion, |
| 14 | const QJsonObject& creationContent, |
| 15 | const QVector<StateEvent>& initialState, |
| 16 | const QString& preset, Omittable<bool> isDirect, |
| 17 | const QJsonObject& powerLevelContentOverride) |
| 18 | : BaseJob(HttpVerb::Post, QStringLiteral("CreateRoomJob" ), |
| 19 | makePath(parts: "/_matrix/client/v3" , parts: "/createRoom" )) |
| 20 | { |
| 21 | QJsonObject _dataJson; |
| 22 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("visibility" ), value: visibility); |
| 23 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("room_alias_name" ), |
| 24 | value: roomAliasName); |
| 25 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("name" ), value: name); |
| 26 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("topic" ), value: topic); |
| 27 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("invite" ), value: invite); |
| 28 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("invite_3pid" ), value: invite3pid); |
| 29 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("room_version" ), value: roomVersion); |
| 30 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("creation_content" ), |
| 31 | value: creationContent); |
| 32 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("initial_state" ), |
| 33 | value: initialState); |
| 34 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("preset" ), value: preset); |
| 35 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("is_direct" ), value&: isDirect); |
| 36 | addParam<IfNotEmpty>(container&: _dataJson, |
| 37 | QStringLiteral("power_level_content_override" ), |
| 38 | value: powerLevelContentOverride); |
| 39 | setRequestData({ _dataJson }); |
| 40 | addExpectedKey(key: "room_id" ); |
| 41 | } |
| 42 | |