GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
admin_add_ranks.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 __ADMIN_ADD_RANKS_H__
7 #define __ADMIN_ADD_RANKS_H__
8 
9 namespace gpudb
10 {
11 
47  {
48 
54  hosts(std::vector<std::string>()),
55  configParams(std::vector<std::map<std::string, std::string> >()),
56  options(std::map<std::string, std::string>())
57  {
58  }
59 
134  AdminAddRanksRequest(const std::vector<std::string>& hosts_, const std::vector<std::map<std::string, std::string> >& configParams_, const std::map<std::string, std::string>& options_):
135  hosts( hosts_ ),
136  configParams( configParams_ ),
137  options( options_ )
138  {
139  }
140 
141  std::vector<std::string> hosts;
142  std::vector<std::map<std::string, std::string> > configParams;
143  std::map<std::string, std::string> options;
144  };
145 }
146 
147 namespace avro
148 {
149  template<> struct codec_traits<gpudb::AdminAddRanksRequest>
150  {
151  static void encode(Encoder& e, const gpudb::AdminAddRanksRequest& v)
152  {
153  ::avro::encode(e, v.hosts);
154  ::avro::encode(e, v.configParams);
155  ::avro::encode(e, v.options);
156  }
157 
158  static void decode(Decoder& d, gpudb::AdminAddRanksRequest& 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.hosts);
170  break;
171 
172  case 1:
173  ::avro::decode(d, v.configParams);
174  break;
175 
176  case 2:
177  ::avro::decode(d, v.options);
178  break;
179 
180  default:
181  break;
182  }
183  }
184  }
185  else
186  {
187  ::avro::decode(d, v.hosts);
188  ::avro::decode(d, v.configParams);
189  ::avro::decode(d, v.options);
190  }
191  }
192  };
193 }
194 
195 namespace gpudb
196 {
197 
233  {
234 
240  addedRanks(std::vector<std::string>()),
241  info(std::map<std::string, std::string>())
242  {
243  }
244 
245  std::vector<std::string> addedRanks;
246  std::map<std::string, std::string> info;
247  };
248 }
249 
250 namespace avro
251 {
252  template<> struct codec_traits<gpudb::AdminAddRanksResponse>
253  {
254  static void encode(Encoder& e, const gpudb::AdminAddRanksResponse& v)
255  {
256  ::avro::encode(e, v.addedRanks);
257  ::avro::encode(e, v.info);
258  }
259 
260  static void decode(Decoder& d, gpudb::AdminAddRanksResponse& v)
261  {
262  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
263  {
264  const std::vector<size_t> fo = rd->fieldOrder();
265 
266  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
267  {
268  switch (*it)
269  {
270  case 0:
271  ::avro::decode(d, v.addedRanks);
272  break;
273 
274  case 1:
275  ::avro::decode(d, v.info);
276  break;
277 
278  default:
279  break;
280  }
281  }
282  }
283  else
284  {
285  ::avro::decode(d, v.addedRanks);
286  ::avro::decode(d, v.info);
287  }
288  }
289  };
290 }
291 
292 #endif
AdminAddRanksRequest(const std::vector< std::string > &hosts_, const std::vector< std::map< std::string, std::string > > &configParams_, const std::map< std::string, std::string > &options_)
Constructs an AdminAddRanksRequest object with the specified parameters.
std::map< std::string, std::string > options
A set of output parameters for const.
std::map< std::string, std::string > info
std::vector< std::string > addedRanks
AdminAddRanksRequest()
Constructs an AdminAddRanksRequest object with default parameter values.
AdminAddRanksResponse()
Constructs an AdminAddRanksResponse object with default parameter values.
A set of input parameters for const.
std::vector< std::string > hosts
std::vector< std::map< std::string, std::string > > configParams