| 1 | /****************************************************************************** |
| 2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
| 3 | */ |
| 4 | |
| 5 | #include "space_hierarchy.h" |
| 6 | |
| 7 | using namespace Quotient; |
| 8 | |
| 9 | auto queryToGetSpaceHierarchy(Omittable<bool> suggestedOnly, |
| 10 | Omittable<int> limit, Omittable<int> maxDepth, |
| 11 | const QString& from) |
| 12 | { |
| 13 | QUrlQuery _q; |
| 14 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("suggested_only" ), value&: suggestedOnly); |
| 15 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("limit" ), value&: limit); |
| 16 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("max_depth" ), value&: maxDepth); |
| 17 | addParam<IfNotEmpty>(container&: _q, QStringLiteral("from" ), value: from); |
| 18 | return _q; |
| 19 | } |
| 20 | |
| 21 | QUrl GetSpaceHierarchyJob::makeRequestUrl(QUrl baseUrl, const QString& roomId, |
| 22 | Omittable<bool> suggestedOnly, |
| 23 | Omittable<int> limit, |
| 24 | Omittable<int> maxDepth, |
| 25 | const QString& from) |
| 26 | { |
| 27 | return BaseJob::makeRequestUrl( |
| 28 | baseUrl: std::move(baseUrl), |
| 29 | encodedPath: makePath(parts: "/_matrix/client/v1" , parts: "/rooms/" , parts: roomId, parts: "/hierarchy" ), |
| 30 | query: queryToGetSpaceHierarchy(suggestedOnly, limit, maxDepth, from)); |
| 31 | } |
| 32 | |
| 33 | GetSpaceHierarchyJob::GetSpaceHierarchyJob(const QString& roomId, |
| 34 | Omittable<bool> suggestedOnly, |
| 35 | Omittable<int> limit, |
| 36 | Omittable<int> maxDepth, |
| 37 | const QString& from) |
| 38 | : BaseJob(HttpVerb::Get, QStringLiteral("GetSpaceHierarchyJob" ), |
| 39 | makePath(parts: "/_matrix/client/v1" , parts: "/rooms/" , parts: roomId, parts: "/hierarchy" ), |
| 40 | queryToGetSpaceHierarchy(suggestedOnly, limit, maxDepth, from)) |
| 41 | { |
| 42 | addExpectedKey(key: "rooms" ); |
| 43 | } |
| 44 | |