6 #ifndef __DROP_MODEL_H__ 7 #define __DROP_MODEL_H__ 12 struct DropModelRequest
15 modelName(std::string()),
16 options(std::map<std::string, std::string>())
20 DropModelRequest(
const std::string& modelName_,
const std::map<std::string, std::string>& options_):
21 modelName( modelName_ ),
26 std::string modelName;
27 std::map<std::string, std::string> options;
33 template<>
struct codec_traits<
gpudb::DropModelRequest>
35 static void encode(Encoder& e,
const gpudb::DropModelRequest& v)
37 ::avro::encode(e, v.modelName);
38 ::avro::encode(e, v.options);
41 static void decode(Decoder& d, gpudb::DropModelRequest& v)
43 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
45 const std::vector<size_t> fo = rd->fieldOrder();
47 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
52 ::avro::decode(d, v.modelName);
56 ::avro::decode(d, v.options);
66 ::avro::decode(d, v.modelName);
67 ::avro::decode(d, v.options);
76 struct DropModelResponse
79 modelName(std::string()),
80 info(std::map<std::string, std::string>())
84 std::string modelName;
85 std::map<std::string, std::string> info;
91 template<>
struct codec_traits<
gpudb::DropModelResponse>
93 static void encode(Encoder& e,
const gpudb::DropModelResponse& v)
95 ::avro::encode(e, v.modelName);
96 ::avro::encode(e, v.info);
99 static void decode(Decoder& d, gpudb::DropModelResponse& v)
101 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
103 const std::vector<size_t> fo = rd->fieldOrder();
105 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
110 ::avro::decode(d, v.modelName);
114 ::avro::decode(d, v.info);
124 ::avro::decode(d, v.modelName);
125 ::avro::decode(d, v.info);
131 #endif // __DROP_MODEL_H__