GPUdb C++ API  Version 7.2.2.4
show_model.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __SHOW_MODEL_H__
7 #define __SHOW_MODEL_H__
8 
9 namespace gpudb
10 {
12  struct ShowModelRequest
13  {
14  ShowModelRequest() :
15  modelNames(std::vector<std::string>()),
16  options(std::map<std::string, std::string>())
17  {
18  }
19 
20  ShowModelRequest(const std::vector<std::string>& modelNames_, const std::map<std::string, std::string>& options_):
21  modelNames( modelNames_ ),
22  options( options_ )
23  {
24  }
25 
26  std::vector<std::string> modelNames;
27  std::map<std::string, std::string> options;
28  };
29 } // end namespace gpudb
30 
31 namespace avro
32 {
33  template<> struct codec_traits<gpudb::ShowModelRequest>
34  {
35  static void encode(Encoder& e, const gpudb::ShowModelRequest& v)
36  {
37  ::avro::encode(e, v.modelNames);
38  ::avro::encode(e, v.options);
39  }
40 
41  static void decode(Decoder& d, gpudb::ShowModelRequest& v)
42  {
43  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
44  {
45  const std::vector<size_t> fo = rd->fieldOrder();
46 
47  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
48  {
49  switch (*it)
50  {
51  case 0:
52  ::avro::decode(d, v.modelNames);
53  break;
54 
55  case 1:
56  ::avro::decode(d, v.options);
57  break;
58 
59  default:
60  break;
61  }
62  }
63  }
64  else
65  {
66  ::avro::decode(d, v.modelNames);
67  ::avro::decode(d, v.options);
68  }
69  }
70  };
71 } // end namespace avro
72 
73 namespace gpudb
74 {
76  struct ShowModelResponse
77  {
78  ShowModelResponse() :
79  modelNames(std::vector<std::string>()),
80  entityIds(std::vector<int32_t>()),
81  inputSchemas(std::vector<std::string>()),
82  outputSchemas(std::vector<std::string>()),
83  registryList(std::vector<std::string>()),
84  containerList(std::vector<std::string>()),
85  runFunctionList(std::vector<std::string>()),
86  deployments(std::vector<std::string>()),
87  options(std::vector<std::map<std::string, std::string> >()),
88  info(std::map<std::string, std::string>())
89  {
90  }
91 
92  std::vector<std::string> modelNames;
93  std::vector<int32_t> entityIds;
94  std::vector<std::string> inputSchemas;
95  std::vector<std::string> outputSchemas;
96  std::vector<std::string> registryList;
97  std::vector<std::string> containerList;
98  std::vector<std::string> runFunctionList;
99  std::vector<std::string> deployments;
100  std::vector<std::map<std::string, std::string> > options;
101  std::map<std::string, std::string> info;
102  };
103 } // end namespace gpudb
104 
105 namespace avro
106 {
107  template<> struct codec_traits<gpudb::ShowModelResponse>
108  {
109  static void encode(Encoder& e, const gpudb::ShowModelResponse& v)
110  {
111  ::avro::encode(e, v.modelNames);
112  ::avro::encode(e, v.entityIds);
113  ::avro::encode(e, v.inputSchemas);
114  ::avro::encode(e, v.outputSchemas);
115  ::avro::encode(e, v.registryList);
116  ::avro::encode(e, v.containerList);
117  ::avro::encode(e, v.runFunctionList);
118  ::avro::encode(e, v.deployments);
119  ::avro::encode(e, v.options);
120  ::avro::encode(e, v.info);
121  }
122 
123  static void decode(Decoder& d, gpudb::ShowModelResponse& v)
124  {
125  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
126  {
127  const std::vector<size_t> fo = rd->fieldOrder();
128 
129  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
130  {
131  switch (*it)
132  {
133  case 0:
134  ::avro::decode(d, v.modelNames);
135  break;
136 
137  case 1:
138  ::avro::decode(d, v.entityIds);
139  break;
140 
141  case 2:
142  ::avro::decode(d, v.inputSchemas);
143  break;
144 
145  case 3:
146  ::avro::decode(d, v.outputSchemas);
147  break;
148 
149  case 4:
150  ::avro::decode(d, v.registryList);
151  break;
152 
153  case 5:
154  ::avro::decode(d, v.containerList);
155  break;
156 
157  case 6:
158  ::avro::decode(d, v.runFunctionList);
159  break;
160 
161  case 7:
162  ::avro::decode(d, v.deployments);
163  break;
164 
165  case 8:
166  ::avro::decode(d, v.options);
167  break;
168 
169  case 9:
170  ::avro::decode(d, v.info);
171  break;
172 
173  default:
174  break;
175  }
176  }
177  }
178  else
179  {
180  ::avro::decode(d, v.modelNames);
181  ::avro::decode(d, v.entityIds);
182  ::avro::decode(d, v.inputSchemas);
183  ::avro::decode(d, v.outputSchemas);
184  ::avro::decode(d, v.registryList);
185  ::avro::decode(d, v.containerList);
186  ::avro::decode(d, v.runFunctionList);
187  ::avro::decode(d, v.deployments);
188  ::avro::decode(d, v.options);
189  ::avro::decode(d, v.info);
190  }
191  }
192  };
193 } // end namespace avro
194 
195 #endif // __SHOW_MODEL_H__