6 #ifndef __ADMIN_DELETE_NODE_H__
7 #define __ADMIN_DELETE_NODE_H__
22 struct AdminDeleteNodeRequest
30 AdminDeleteNodeRequest() :
32 authorization(std::string()),
33 options(std::map<std::string, std::string>())
47 AdminDeleteNodeRequest(
const int32_t rank_,
const std::string& authorization_,
const std::map<std::string, std::string>& options_):
49 authorization( authorization_ ),
59 std::string authorization;
60 std::map<std::string, std::string> options;
70 template<>
struct codec_traits<gpudb::AdminDeleteNodeRequest>
72 static void encode(Encoder& e,
const gpudb::AdminDeleteNodeRequest& v)
74 ::avro::encode(e, v.rank);
75 ::avro::encode(e, v.authorization);
76 ::avro::encode(e, v.options);
79 static void decode(Decoder& d, gpudb::AdminDeleteNodeRequest& v)
81 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
83 const std::vector<size_t> fo = rd->fieldOrder();
85 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
90 ::avro::decode(d, v.rank);
94 ::avro::decode(d, v.authorization);
98 ::avro::decode(d, v.options);
108 ::avro::decode(d, v.rank);
109 ::avro::decode(d, v.authorization);
110 ::avro::decode(d, v.options);
129 struct AdminDeleteNodeResponse
137 AdminDeleteNodeResponse() :
139 message(std::vector<std::string>())
148 std::vector<std::string> message;
158 template<>
struct codec_traits<gpudb::AdminDeleteNodeResponse>
160 static void encode(Encoder& e,
const gpudb::AdminDeleteNodeResponse& v)
162 ::avro::encode(e, v.rank);
163 ::avro::encode(e, v.message);
166 static void decode(Decoder& d, gpudb::AdminDeleteNodeResponse& v)
168 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
170 const std::vector<size_t> fo = rd->fieldOrder();
172 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
177 ::avro::decode(d, v.rank);
181 ::avro::decode(d, v.message);
191 ::avro::decode(d, v.rank);
192 ::avro::decode(d, v.message);