libkazv
event_batch.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 "types.hpp"
8 
9 
10 namespace Kazv::Api {
11 
12 struct EventBatch
13 {
14 
17 };
18 
19 }
20 namespace nlohmann
21 {
22 using namespace Kazv;
23 using namespace Kazv::Api;
24 template<>
25 struct adl_serializer<EventBatch> {
26  static void to_json(json& jo, const EventBatch &pod)
27  {
28  if (! jo.is_object()) { jo = json::object(); }
29 
30 
31 
32  addToJsonIfNeeded(jo, "events"s, pod.events);
33  }
34  static void from_json(const json &jo, EventBatch& result)
35  {
36 
37  if (jo.contains("events"s)) {
38  result.events = jo.at("events"s);
39  }
40 
41  }
42 };
43  }
44 
45  namespace Kazv::Api
46  {
47 } // namespace Kazv::Api
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
immer::flex_vector< Event > EventList
Definition: types.hpp:107
Definition: location.hpp:27
Definition: event_batch.hpp:13
EventList events
List of events.
Definition: event_batch.hpp:16
static void to_json(json &jo, const EventBatch &pod)
Definition: event_batch.hpp:26
static void from_json(const json &jo, EventBatch &result)
Definition: event_batch.hpp:34