libkazv
Loading...
Searching...
No Matches
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
10namespace Kazv::Api {
11
18
19}
20namespace nlohmann
21{
22using namespace Kazv;
23using namespace Kazv::Api;
24template<>
25struct 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
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 state_event_batch.hpp:13
EventList events
List of events.
Definition state_event_batch.hpp:16
static void from_json(const json &jo, StateEventBatch &result)
Definition state_event_batch.hpp:34
static void to_json(json &jo, const StateEventBatch &pod)
Definition state_event_batch.hpp:26