GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
show_model.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __SHOW_MODEL_H__
7 #define __SHOW_MODEL_H__
8 
9 namespace gpudb
10 {
11 
18  struct ShowModelRequest
19  {
20 
25  ShowModelRequest() :
26  modelNames(std::vector<std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
39  ShowModelRequest(const std::vector<std::string>& modelNames_, const std::map<std::string, std::string>& options_):
40  modelNames( modelNames_ ),
41  options( options_ )
42  {
43  }
44 
45  std::vector<std::string> modelNames;
46  std::map<std::string, std::string> options;
47  };
48 }
49 
54 namespace avro
55 {
56  template<> struct codec_traits<gpudb::ShowModelRequest>
57  {
58  static void encode(Encoder& e, const gpudb::ShowModelRequest& v)
59  {
60  ::avro::encode(e, v.modelNames);
61  ::avro::encode(e, v.options);
62  }
63 
64  static void decode(Decoder& d, gpudb::ShowModelRequest& v)
65  {
66  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
67  {
68  const std::vector<size_t> fo = rd->fieldOrder();
69 
70  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
71  {
72  switch (*it)
73  {
74  case 0:
75  ::avro::decode(d, v.modelNames);
76  break;
77 
78  case 1:
79  ::avro::decode(d, v.options);
80  break;
81 
82  default:
83  break;
84  }
85  }
86  }
87  else
88  {
89  ::avro::decode(d, v.modelNames);
90  ::avro::decode(d, v.options);
91  }
92  }
93  };
94 }
95 
96 namespace gpudb
97 {
98 
105  struct ShowModelResponse
106  {
107 
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>())
122  {
123  }
124 
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;
134  };
135 }
136 
141 namespace avro
142 {
143  template<> struct codec_traits<gpudb::ShowModelResponse>
144  {
145  static void encode(Encoder& e, const gpudb::ShowModelResponse& v)
146  {
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);
156  }
157 
158  static void decode(Decoder& d, gpudb::ShowModelResponse& v)
159  {
160  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
161  {
162  const std::vector<size_t> fo = rd->fieldOrder();
163 
164  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
165  {
166  switch (*it)
167  {
168  case 0:
169  ::avro::decode(d, v.modelNames);
170  break;
171 
172  case 1:
173  ::avro::decode(d, v.entityIds);
174  break;
175 
176  case 2:
177  ::avro::decode(d, v.inputSchemas);
178  break;
179 
180  case 3:
181  ::avro::decode(d, v.outputSchemas);
182  break;
183 
184  case 4:
185  ::avro::decode(d, v.registryList);
186  break;
187 
188  case 5:
189  ::avro::decode(d, v.containerList);
190  break;
191 
192  case 6:
193  ::avro::decode(d, v.runFunctionList);
194  break;
195 
196  case 7:
197  ::avro::decode(d, v.deployments);
198  break;
199 
200  case 8:
201  ::avro::decode(d, v.info);
202  break;
203 
204  default:
205  break;
206  }
207  }
208  }
209  else
210  {
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);
220  }
221  }
222  };
223 }
224 
225 #endif