Line data Source code
1 : #pragma once
2 :
3 : #include <prefixdb/api/add.hpp>
4 : #include <prefixdb/api/fields_json.hpp>
5 : #include <prefixdb/api/common_status_json.hpp>
6 : #include <wfc/json.hpp>
7 :
8 : namespace wamba { namespace prefixdb {
9 :
10 : namespace request
11 : {
12 : struct add_json
13 : {
14 0 : JSON_NAME(prefix)
15 : JSON_NAME(force)
16 0 : JSON_NAME(nores)
17 0 : JSON_NAME(noval)
18 0 : JSON_NAME(sync)
19 0 : JSON_NAME(update)
20 0 : JSON_NAME(snapshot)
21 :
22 : typedef wfc::json::object<
23 : add,
24 : wfc::json::member_list<
25 : wfc::json::member<n_prefix, add, std::string, &add::prefix>,
26 : wfc::json::member<n_sync, add, bool, &add::sync>,
27 : wfc::json::member<n_nores, add, bool, &add::nores>,
28 : wfc::json::member<n_noval, add, bool, &add::noval>,
29 : wfc::json::member<n_snapshot, add, size_t, &add::snapshot>,
30 : wfc::json::member<n_update, add, field_list_t, &add::fields, fields_list_json>
31 : >
32 : > type;
33 : typedef type::target target;
34 : typedef type::serializer serializer;
35 : typedef type::member_list member_list;
36 : };
37 : }
38 :
39 : namespace response
40 : {
41 : struct add_json
42 : {
43 0 : JSON_NAME(prefix)
44 0 : JSON_NAME(status)
45 0 : JSON_NAME(fields)
46 :
47 : typedef wfc::json::object<
48 : add,
49 : wfc::json::member_list<
50 : wfc::json::member<n_prefix, add, std::string, &add::prefix>,
51 : wfc::json::member<n_fields, add, field_list_t, &add::fields, fields_list_json>,
52 : wfc::json::member<n_status, add, common_status, &add::status, common_status_json>
53 : >
54 : > type;
55 : typedef type::target target;
56 : typedef type::serializer serializer;
57 : typedef type::member_list member_list;
58 : };
59 : }
60 :
61 : }}
62 :
63 :
|