| 1 | /****************************************************************************** |
| 2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
| 3 | */ |
| 4 | |
| 5 | #include "administrative_contact.h" |
| 6 | |
| 7 | using namespace Quotient; |
| 8 | |
| 9 | QUrl GetAccount3PIDsJob::makeRequestUrl(QUrl baseUrl) |
| 10 | { |
| 11 | return BaseJob::makeRequestUrl( |
| 12 | baseUrl: std::move(baseUrl), encodedPath: makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid" )); |
| 13 | } |
| 14 | |
| 15 | GetAccount3PIDsJob::GetAccount3PIDsJob() |
| 16 | : BaseJob(HttpVerb::Get, QStringLiteral("GetAccount3PIDsJob" ), |
| 17 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid" )) |
| 18 | {} |
| 19 | |
| 20 | Post3PIDsJob::Post3PIDsJob(const ThreePidCredentials& threePidCreds) |
| 21 | : BaseJob(HttpVerb::Post, QStringLiteral("Post3PIDsJob" ), |
| 22 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid" )) |
| 23 | { |
| 24 | QJsonObject _dataJson; |
| 25 | addParam<>(container&: _dataJson, QStringLiteral("three_pid_creds" ), value: threePidCreds); |
| 26 | setRequestData({ _dataJson }); |
| 27 | } |
| 28 | |
| 29 | Add3PIDJob::Add3PIDJob(const QString& clientSecret, const QString& sid, |
| 30 | const Omittable<AuthenticationData>& auth) |
| 31 | : BaseJob(HttpVerb::Post, QStringLiteral("Add3PIDJob" ), |
| 32 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid/add" )) |
| 33 | { |
| 34 | QJsonObject _dataJson; |
| 35 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("auth" ), value: auth); |
| 36 | addParam<>(container&: _dataJson, QStringLiteral("client_secret" ), value: clientSecret); |
| 37 | addParam<>(container&: _dataJson, QStringLiteral("sid" ), value: sid); |
| 38 | setRequestData({ _dataJson }); |
| 39 | } |
| 40 | |
| 41 | Bind3PIDJob::Bind3PIDJob(const QString& clientSecret, const QString& idServer, |
| 42 | const QString& idAccessToken, const QString& sid) |
| 43 | : BaseJob(HttpVerb::Post, QStringLiteral("Bind3PIDJob" ), |
| 44 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid/bind" )) |
| 45 | { |
| 46 | QJsonObject _dataJson; |
| 47 | addParam<>(container&: _dataJson, QStringLiteral("client_secret" ), value: clientSecret); |
| 48 | addParam<>(container&: _dataJson, QStringLiteral("id_server" ), value: idServer); |
| 49 | addParam<>(container&: _dataJson, QStringLiteral("id_access_token" ), value: idAccessToken); |
| 50 | addParam<>(container&: _dataJson, QStringLiteral("sid" ), value: sid); |
| 51 | setRequestData({ _dataJson }); |
| 52 | } |
| 53 | |
| 54 | Delete3pidFromAccountJob::Delete3pidFromAccountJob(const QString& medium, |
| 55 | const QString& address, |
| 56 | const QString& idServer) |
| 57 | : BaseJob(HttpVerb::Post, QStringLiteral("Delete3pidFromAccountJob" ), |
| 58 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid/delete" )) |
| 59 | { |
| 60 | QJsonObject _dataJson; |
| 61 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("id_server" ), value: idServer); |
| 62 | addParam<>(container&: _dataJson, QStringLiteral("medium" ), value: medium); |
| 63 | addParam<>(container&: _dataJson, QStringLiteral("address" ), value: address); |
| 64 | setRequestData({ _dataJson }); |
| 65 | addExpectedKey(key: "id_server_unbind_result" ); |
| 66 | } |
| 67 | |
| 68 | Unbind3pidFromAccountJob::Unbind3pidFromAccountJob(const QString& medium, |
| 69 | const QString& address, |
| 70 | const QString& idServer) |
| 71 | : BaseJob(HttpVerb::Post, QStringLiteral("Unbind3pidFromAccountJob" ), |
| 72 | makePath(parts: "/_matrix/client/v3" , parts: "/account/3pid/unbind" )) |
| 73 | { |
| 74 | QJsonObject _dataJson; |
| 75 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("id_server" ), value: idServer); |
| 76 | addParam<>(container&: _dataJson, QStringLiteral("medium" ), value: medium); |
| 77 | addParam<>(container&: _dataJson, QStringLiteral("address" ), value: address); |
| 78 | setRequestData({ _dataJson }); |
| 79 | addExpectedKey(key: "id_server_unbind_result" ); |
| 80 | } |
| 81 | |
| 82 | RequestTokenTo3PIDEmailJob::RequestTokenTo3PIDEmailJob( |
| 83 | const EmailValidationData& body) |
| 84 | : BaseJob(HttpVerb::Post, QStringLiteral("RequestTokenTo3PIDEmailJob" ), |
| 85 | makePath(parts: "/_matrix/client/v3" , |
| 86 | parts: "/account/3pid/email/requestToken" ), |
| 87 | false) |
| 88 | { |
| 89 | setRequestData({ toJson(pod: body) }); |
| 90 | } |
| 91 | |
| 92 | RequestTokenTo3PIDMSISDNJob::RequestTokenTo3PIDMSISDNJob( |
| 93 | const MsisdnValidationData& body) |
| 94 | : BaseJob(HttpVerb::Post, QStringLiteral("RequestTokenTo3PIDMSISDNJob" ), |
| 95 | makePath(parts: "/_matrix/client/v3" , |
| 96 | parts: "/account/3pid/msisdn/requestToken" ), |
| 97 | false) |
| 98 | { |
| 99 | setRequestData({ toJson(pod: body) }); |
| 100 | } |
| 101 | |