libkazv
relations.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 
24 class GetRelatingEventsJob : public BaseJob {
25 public:
26 
27 
28 
29 class JobResponse : public Response
30 {
31 
32 public:
34  bool success() const;
35 
36  // Result properties
37 
38 
39 
40 
42 EventList chunk() const;
43 
44 
47 std::optional<std::string> nextBatch() const;
48 
49 
52 std::optional<std::string> prevBatch() const;
53 
54 };
55  static constexpr auto needsAuth() {
56  return true
57  ;
58  }
59 
60 
61 // Construction/destruction
62 
92  explicit GetRelatingEventsJob(std::string serverUrl
93  , std::string _accessToken
94  ,
95  std::string roomId , std::string eventId , std::optional<std::string> from = std::nullopt, std::optional<std::string> to = std::nullopt, std::optional<int> limit = std::nullopt
96  );
97 
98 
100  std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
101 
102  static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
103 
104 
105 
106 
107 
110  };
112  }
113  namespace nlohmann
114  {
115  using namespace Kazv;
116  using namespace Kazv::Api;
117 
118  }
119 
120  namespace Kazv::Api
121  {
122 
137 public:
138 
139 
140 
141 class JobResponse : public Response
142 {
143 
144 public:
146  bool success() const;
147 
148  // Result properties
149 
150 
151 
152 
156 EventList chunk() const;
157 
158 
161 std::optional<std::string> nextBatch() const;
162 
163 
166 std::optional<std::string> prevBatch() const;
167 
168 };
169  static constexpr auto needsAuth() {
170  return true
171  ;
172  }
173 
174 
175 // Construction/destruction
176 
209  explicit GetRelatingEventsWithRelTypeJob(std::string serverUrl
210  , std::string _accessToken
211  ,
212  std::string roomId , std::string eventId , std::string relType , std::optional<std::string> from = std::nullopt, std::optional<std::string> to = std::nullopt, std::optional<int> limit = std::nullopt
213  );
214 
215 
216  static BaseJob::Query buildQuery(
217  std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
218 
219  static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::string relType, std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
220 
221 
222 
223 
224 
226  GetRelatingEventsWithRelTypeJob withData(JsonWrap j) const &;
227  };
229  }
230  namespace nlohmann
231  {
232  using namespace Kazv;
233  using namespace Kazv::Api;
234 
235  }
236 
237  namespace Kazv::Api
238  {
239 
254 public:
255 
256 
257 
258 class JobResponse : public Response
259 {
260 
261 public:
263  bool success() const;
264 
265  // Result properties
266 
267 
268 
269 
273 EventList chunk() const;
274 
275 
278 std::optional<std::string> nextBatch() const;
279 
280 
283 std::optional<std::string> prevBatch() const;
284 
285 };
286  static constexpr auto needsAuth() {
287  return true
288  ;
289  }
290 
291 
292 // Construction/destruction
293 
332  explicit GetRelatingEventsWithRelTypeAndEventTypeJob(std::string serverUrl
333  , std::string _accessToken
334  ,
335  std::string roomId , std::string eventId , std::string relType , std::string eventType , std::optional<std::string> from = std::nullopt, std::optional<std::string> to = std::nullopt, std::optional<int> limit = std::nullopt
336  );
337 
338 
339  static BaseJob::Query buildQuery(
340  std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
341 
342  static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::string relType, std::string eventType, std::optional<std::string> from, std::optional<std::string> to, std::optional<int> limit);
343 
344 
345 
346 
347 
350  };
352  }
353  namespace nlohmann
354  {
355  using namespace Kazv;
356  using namespace Kazv::Api;
357 
358  }
359 
360  namespace Kazv::Api
361  {
362 
363 } // namespace Kazv::Api
std::optional< std::string > nextBatch() const
An opaque string representing a pagination token.
Definition: relations.cpp:97
bool success() const
Definition: relations.cpp:75
JobResponse(Response r)
Definition: relations.cpp:72
std::optional< std::string > prevBatch() const
An opaque string representing a pagination token.
Definition: relations.cpp:108
EventList chunk() const
The child events of the requested event, ordered topologically most-recent first.
Definition: relations.cpp:86
Get the child events for a given parent event.
Definition: relations.hpp:24
GetRelatingEventsJob(std::string serverUrl, std::string _accessToken, std::string roomId, std::string eventId, std::optional< std::string > from=std::nullopt, std::optional< std::string > to=std::nullopt, std::optional< int > limit=std::nullopt)
Get the child events for a given parent event.
Definition: relations.cpp:38
static constexpr auto needsAuth()
Definition: relations.hpp:55
static BaseJob::Body buildBody(std::string roomId, std::string eventId, std::optional< std::string > from, std::optional< std::string > to, std::optional< int > limit)
Definition: relations.cpp:26
static BaseJob::Query buildQuery(std::optional< std::string > from, std::optional< std::string > to, std::optional< int > limit)
Definition: relations.cpp:13
GetRelatingEventsJob withData(JsonWrap j) &&
Definition: relations.cpp:58
Get the child events for a given parent event, with a given relType and eventType.
Definition: relations.hpp:253
static constexpr auto needsAuth()
Definition: relations.hpp:286
Get the child events for a given parent event, with a given relType.
Definition: relations.hpp:136
static constexpr auto needsAuth()
Definition: relations.hpp:169
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
immer::flex_vector< Event > EventList
Definition: types.hpp:107
Definition: location.hpp:27
Definition: basejob.hpp:50