Line data Source code
1 : #pragma once
2 :
3 : #include <prefixdb/api/create_snapshot.hpp>
4 : #include <prefixdb/api/common_status_json.hpp>
5 : #include <wfc/json.hpp>
6 :
7 : namespace wamba { namespace prefixdb {
8 :
9 : namespace request
10 : {
11 : struct create_snapshot_json
12 : {
13 0 : JSON_NAME(prefix)
14 0 : JSON_NAME(release_timeout_s)
15 :
16 :
17 : typedef wfc::json::object<
18 : create_snapshot,
19 : wfc::json::member_list<
20 : wfc::json::member<n_prefix, create_snapshot, std::string, &create_snapshot::prefix >,
21 : wfc::json::member<n_release_timeout_s, create_snapshot, time_t, &create_snapshot::release_timeout_s >
22 : >
23 : > type;
24 : typedef type::target target;
25 : typedef type::serializer serializer;
26 : typedef type::member_list member_list;
27 : };
28 : }
29 :
30 : namespace response
31 : {
32 : struct create_snapshot_json
33 : {
34 0 : JSON_NAME(prefix)
35 0 : JSON_NAME(status)
36 0 : JSON_NAME(snapshot)
37 0 : JSON_NAME(last_seq)
38 :
39 : typedef wfc::json::object<
40 : create_snapshot,
41 : wfc::json::member_list<
42 : wfc::json::member<n_prefix, create_snapshot, std::string, &create_snapshot::prefix >,
43 : wfc::json::member<n_snapshot, create_snapshot, size_t, &create_snapshot::snapshot >,
44 : wfc::json::member<n_last_seq, create_snapshot, size_t, &create_snapshot::last_seq >,
45 : wfc::json::member<n_status, create_snapshot, common_status, &create_snapshot::status, common_status_json>
46 : >
47 : > type;
48 : typedef type::target target;
49 : typedef type::serializer serializer;
50 : typedef type::member_list member_list;
51 : };
52 : }
53 :
54 : }}
|