GPUdb C++ API  Version 7.2.2.4
admin_remove_ranks.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 __ADMIN_REMOVE_RANKS_H__
7 #define __ADMIN_REMOVE_RANKS_H__
8 
9 namespace gpudb
10 {
38  {
44  ranks(std::vector<std::string>()),
45  options(std::map<std::string, std::string>())
46  {
47  }
48 
136  AdminRemoveRanksRequest(const std::vector<std::string>& ranks_, const std::map<std::string, std::string>& options_):
137  ranks( ranks_ ),
138  options( options_ )
139  {
140  }
141 
153  std::vector<std::string> ranks;
154 
206  std::map<std::string, std::string> options;
207  };
208 } // end namespace gpudb
209 
210 namespace avro
211 {
212  template<> struct codec_traits<gpudb::AdminRemoveRanksRequest>
213  {
214  static void encode(Encoder& e, const gpudb::AdminRemoveRanksRequest& v)
215  {
216  ::avro::encode(e, v.ranks);
217  ::avro::encode(e, v.options);
218  }
219 
220  static void decode(Decoder& d, gpudb::AdminRemoveRanksRequest& v)
221  {
222  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
223  {
224  const std::vector<size_t> fo = rd->fieldOrder();
225 
226  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
227  {
228  switch (*it)
229  {
230  case 0:
231  ::avro::decode(d, v.ranks);
232  break;
233 
234  case 1:
235  ::avro::decode(d, v.options);
236  break;
237 
238  default:
239  break;
240  }
241  }
242  }
243  else
244  {
245  ::avro::decode(d, v.ranks);
246  ::avro::decode(d, v.options);
247  }
248  }
249  };
250 } // end namespace avro
251 
252 namespace gpudb
253 {
260  {
266  removedRanks(std::vector<std::string>()),
267  info(std::map<std::string, std::string>())
268  {
269  }
270 
275  std::vector<std::string> removedRanks;
276 
280  std::map<std::string, std::string> info;
281  };
282 } // end namespace gpudb
283 
284 namespace avro
285 {
286  template<> struct codec_traits<gpudb::AdminRemoveRanksResponse>
287  {
288  static void encode(Encoder& e, const gpudb::AdminRemoveRanksResponse& v)
289  {
290  ::avro::encode(e, v.removedRanks);
291  ::avro::encode(e, v.info);
292  }
293 
294  static void decode(Decoder& d, gpudb::AdminRemoveRanksResponse& v)
295  {
296  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
297  {
298  const std::vector<size_t> fo = rd->fieldOrder();
299 
300  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
301  {
302  switch (*it)
303  {
304  case 0:
305  ::avro::decode(d, v.removedRanks);
306  break;
307 
308  case 1:
309  ::avro::decode(d, v.info);
310  break;
311 
312  default:
313  break;
314  }
315  }
316  }
317  else
318  {
319  ::avro::decode(d, v.removedRanks);
320  ::avro::decode(d, v.info);
321  }
322  }
323  };
324 } // end namespace avro
325 
326 #endif // __ADMIN_REMOVE_RANKS_H__
AdminRemoveRanksResponse()
Constructs an AdminRemoveRanksResponse object with default parameters.
AdminRemoveRanksRequest(const std::vector< std::string > &ranks_, const std::map< std::string, std::string > &options_)
Constructs an AdminRemoveRanksRequest object with the specified parameters.
std::vector< std::string > removedRanks
The number assigned to each rank removed from the cluster.
std::vector< std::string > ranks
Each array value designates one or more ranks to remove from the cluster.
A set of parameters for GPUdb::adminRemoveRanks.
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::adminRemoveRanks.
std::map< std::string, std::string > info
Additional information.
AdminRemoveRanksRequest()
Constructs an AdminRemoveRanksRequest object with default parameters.