6 #ifndef __SHOW_MODEL_H__
7 #define __SHOW_MODEL_H__
18 struct ShowModelRequest
26 modelNames(std::vector<std::string>()),
27 options(std::map<std::string, std::string>())
39 ShowModelRequest(
const std::vector<std::string>& modelNames_,
const std::map<std::string, std::string>& options_):
40 modelNames( modelNames_ ),
45 std::vector<std::string> modelNames;
46 std::map<std::string, std::string> options;
56 template<>
struct codec_traits<gpudb::ShowModelRequest>
58 static void encode(Encoder& e,
const gpudb::ShowModelRequest& v)
60 ::avro::encode(e, v.modelNames);
61 ::avro::encode(e, v.options);
64 static void decode(Decoder& d, gpudb::ShowModelRequest& v)
66 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
68 const std::vector<size_t> fo = rd->fieldOrder();
70 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
75 ::avro::decode(d, v.modelNames);
79 ::avro::decode(d, v.options);
89 ::avro::decode(d, v.modelNames);
90 ::avro::decode(d, v.options);
105 struct ShowModelResponse
112 ShowModelResponse() :
113 modelNames(std::vector<std::string>()),
114 entityIds(std::vector<int32_t>()),
115 inputSchemas(std::vector<std::string>()),
116 outputSchemas(std::vector<std::string>()),
117 registryList(std::vector<std::string>()),
118 containerList(std::vector<std::string>()),
119 runFunctionList(std::vector<std::string>()),
120 deployments(std::vector<std::string>()),
121 info(std::map<std::string, std::string>())
125 std::vector<std::string> modelNames;
126 std::vector<int32_t> entityIds;
127 std::vector<std::string> inputSchemas;
128 std::vector<std::string> outputSchemas;
129 std::vector<std::string> registryList;
130 std::vector<std::string> containerList;
131 std::vector<std::string> runFunctionList;
132 std::vector<std::string> deployments;
133 std::map<std::string, std::string> info;
143 template<>
struct codec_traits<gpudb::ShowModelResponse>
145 static void encode(Encoder& e,
const gpudb::ShowModelResponse& v)
147 ::avro::encode(e, v.modelNames);
148 ::avro::encode(e, v.entityIds);
149 ::avro::encode(e, v.inputSchemas);
150 ::avro::encode(e, v.outputSchemas);
151 ::avro::encode(e, v.registryList);
152 ::avro::encode(e, v.containerList);
153 ::avro::encode(e, v.runFunctionList);
154 ::avro::encode(e, v.deployments);
155 ::avro::encode(e, v.info);
158 static void decode(Decoder& d, gpudb::ShowModelResponse& v)
160 if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
162 const std::vector<size_t> fo = rd->fieldOrder();
164 for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
169 ::avro::decode(d, v.modelNames);
173 ::avro::decode(d, v.entityIds);
177 ::avro::decode(d, v.inputSchemas);
181 ::avro::decode(d, v.outputSchemas);
185 ::avro::decode(d, v.registryList);
189 ::avro::decode(d, v.containerList);
193 ::avro::decode(d, v.runFunctionList);
197 ::avro::decode(d, v.deployments);
201 ::avro::decode(d, v.info);
211 ::avro::decode(d, v.modelNames);
212 ::avro::decode(d, v.entityIds);
213 ::avro::decode(d, v.inputSchemas);
214 ::avro::decode(d, v.outputSchemas);
215 ::avro::decode(d, v.registryList);
216 ::avro::decode(d, v.containerList);
217 ::avro::decode(d, v.runFunctionList);
218 ::avro::decode(d, v.deployments);
219 ::avro::decode(d, v.info);