libkazv
directory.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
3  */
4 
5 #pragma once
6 
7 #include "basejob.hpp"
8 
9 
10 namespace Kazv::Api {
11 
15 class SetRoomAliasJob : public BaseJob {
16 public:
17 
18 
19 
20 class JobResponse : public Response
21 {
22 
23 public:
25  bool success() const;
26 
27 };
28  static constexpr auto needsAuth() {
29  return true
30  ;
31  }
32 
33 
34 // Construction/destruction
35 
44  explicit SetRoomAliasJob(std::string serverUrl
45  , std::string _accessToken
46  ,
47  std::string roomAlias , std::string roomId
48  );
49 
50 
52  );
53 
54  static BaseJob::Body buildBody(std::string roomAlias, std::string roomId);
55 
56 
57 
58 
59 
62  };
64  }
65  namespace nlohmann
66  {
67  using namespace Kazv;
68  using namespace Kazv::Api;
69 
70  }
71 
72  namespace Kazv::Api
73  {
74 
83 class GetRoomIdByAliasJob : public BaseJob {
84 public:
85 
86 
87 
88 class JobResponse : public Response
89 {
90 
91 public:
93  bool success() const;
94 
95  // Result properties
96 
97 
98 
99 
101 std::optional<std::string> roomId() const;
102 
103 
105 immer::array<std::string> servers() const;
106 
107 };
108  static constexpr auto needsAuth() {
109  return
110  false;
111  }
112 
113 
114 // Construction/destruction
115 
121  explicit GetRoomIdByAliasJob(std::string serverUrl
122 
123  ,
124  std::string roomAlias
125  );
126 
127 
128  static BaseJob::Query buildQuery(
129  );
130 
131  static BaseJob::Body buildBody(std::string roomAlias);
132 
133 
134 
135 
136 
137  GetRoomIdByAliasJob withData(JsonWrap j) &&;
138  GetRoomIdByAliasJob withData(JsonWrap j) const &;
139  };
141  }
142  namespace nlohmann
143  {
144  using namespace Kazv;
145  using namespace Kazv::Api;
146 
147  }
148 
149  namespace Kazv::Api
150  {
151 
166 class DeleteRoomAliasJob : public BaseJob {
167 public:
168 
169 
170 
171 class JobResponse : public Response
172 {
173 
174 public:
176  bool success() const;
177 
178 };
179  static constexpr auto needsAuth() {
180  return true
181  ;
182  }
183 
184 
185 // Construction/destruction
186 
192  explicit DeleteRoomAliasJob(std::string serverUrl
193  , std::string _accessToken
194  ,
195  std::string roomAlias
196  );
197 
198 
199  static BaseJob::Query buildQuery(
200  );
201 
202  static BaseJob::Body buildBody(std::string roomAlias);
203 
204 
205 
206 
207 
208  DeleteRoomAliasJob withData(JsonWrap j) &&;
209  DeleteRoomAliasJob withData(JsonWrap j) const &;
210  };
212  }
213  namespace nlohmann
214  {
215  using namespace Kazv;
216  using namespace Kazv::Api;
217 
218  }
219 
220  namespace Kazv::Api
221  {
222 
242 class GetLocalAliasesJob : public BaseJob {
243 public:
244 
245 
246 
247 class JobResponse : public Response
248 {
249 
250 public:
252  bool success() const;
253 
254  // Result properties
255 
256 
257 
258 
260 immer::array<std::string> aliases() const;
261 
262 };
263  static constexpr auto needsAuth() {
264  return true
265  ;
266  }
267 
268 
269 // Construction/destruction
270 
276  explicit GetLocalAliasesJob(std::string serverUrl
277  , std::string _accessToken
278  ,
279  std::string roomId
280  );
281 
282 
283  static BaseJob::Query buildQuery(
284  );
285 
286  static BaseJob::Body buildBody(std::string roomId);
287 
288 
289 
290 
291 
292  GetLocalAliasesJob withData(JsonWrap j) &&;
293  GetLocalAliasesJob withData(JsonWrap j) const &;
294  };
296  }
297  namespace nlohmann
298  {
299  using namespace Kazv;
300  using namespace Kazv::Api;
301 
302  }
303 
304  namespace Kazv::Api
305  {
306 
307 } // namespace Kazv::Api
Definition: directory.hpp:172
Remove a mapping of room alias to room ID.
Definition: directory.hpp:166
static constexpr auto needsAuth()
Definition: directory.hpp:179
Definition: directory.hpp:248
Get a list of local aliases on a given room.
Definition: directory.hpp:242
static constexpr auto needsAuth()
Definition: directory.hpp:263
Get the room ID corresponding to this room alias.
Definition: directory.hpp:83
static constexpr auto needsAuth()
Definition: directory.hpp:108
Definition: directory.hpp:21
bool success() const
Definition: directory.cpp:76
JobResponse(Response r)
Definition: directory.cpp:73
Create a new mapping from room alias to room ID.
Definition: directory.hpp:15
static constexpr auto needsAuth()
Definition: directory.hpp:28
SetRoomAliasJob withData(JsonWrap j) &&
Definition: directory.cpp:59
static BaseJob::Body buildBody(std::string roomAlias, std::string roomId)
Definition: directory.cpp:21
SetRoomAliasJob(std::string serverUrl, std::string _accessToken, std::string roomAlias, std::string roomId)
Create a new mapping from room alias to room ID.
Definition: directory.cpp:39
static BaseJob::Query buildQuery()
Definition: directory.cpp:13
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
Definition: jsonwrap.hpp:23
Definition: location.hpp:10
Definition: location.hpp:10
Definition: location.hpp:27
Definition: basejob.hpp:50