libkazv
state_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 #include "event.hpp"
9 
10 namespace Kazv::Api {
11 
12 struct StateEventBatch
13 {
14 
17 };
18 
19 }
20 namespace nlohmann
21 {
22 using namespace Kazv;
23 using namespace Kazv::Api;
24 template<>
25 struct adl_serializer<StateEventBatch> {
26  static void to_json(json& jo, const StateEventBatch &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, StateEventBatch& 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
nlohmann::adl_serializer< StateEventBatch >::to_json
static void to_json(json &jo, const StateEventBatch &pod)
Definition: state_event_batch.hpp:26
types.hpp
Kazv::Api::StateEventBatch
Definition: state_event_batch.hpp:14
nlohmann
Definition: location.hpp:26
event.hpp
Kazv
Definition: location.hpp:10
Kazv::json
nlohmann::json json
Definition: jsonwrap.hpp:20
Kazv::Api
Definition: location.hpp:10
nlohmann::adl_serializer< StateEventBatch >::from_json
static void from_json(const json &jo, StateEventBatch &result)
Definition: state_event_batch.hpp:34
Kazv::addToJsonIfNeeded
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
Kazv::Api::StateEventBatch::events
EventList events
List of events.
Definition: state_event_batch.hpp:20
Kazv::EventList
immer::flex_vector< Event > EventList
Definition: types.hpp:107