GPUdb C++ API  Version 7.2.2.4
alter_resource_group.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 __ALTER_RESOURCE_GROUP_H__
7 #define __ALTER_RESOURCE_GROUP_H__
8 
9 namespace gpudb
10 {
20  {
26  name(std::string()),
27  tierAttributes(std::map<std::string, std::map<std::string, std::string> >()),
28  ranking(std::string()),
29  adjoiningResourceGroup(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
175  AlterResourceGroupRequest(const std::string& name_, const std::map<std::string, std::map<std::string, std::string> >& tierAttributes_, const std::string& ranking_, const std::string& adjoiningResourceGroup_, const std::map<std::string, std::string>& options_):
176  name( name_ ),
177  tierAttributes( tierAttributes_ ),
178  ranking( ranking_ ),
179  adjoiningResourceGroup( adjoiningResourceGroup_ ),
180  options( options_ )
181  {
182  }
183 
189  std::string name;
190 
206  std::map<std::string, std::map<std::string, std::string> > tierAttributes;
207 
232  std::string ranking;
233 
241 
295  std::map<std::string, std::string> options;
296  };
297 } // end namespace gpudb
298 
299 namespace avro
300 {
301  template<> struct codec_traits<gpudb::AlterResourceGroupRequest>
302  {
303  static void encode(Encoder& e, const gpudb::AlterResourceGroupRequest& v)
304  {
305  ::avro::encode(e, v.name);
306  ::avro::encode(e, v.tierAttributes);
307  ::avro::encode(e, v.ranking);
308  ::avro::encode(e, v.adjoiningResourceGroup);
309  ::avro::encode(e, v.options);
310  }
311 
312  static void decode(Decoder& d, gpudb::AlterResourceGroupRequest& v)
313  {
314  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
315  {
316  const std::vector<size_t> fo = rd->fieldOrder();
317 
318  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
319  {
320  switch (*it)
321  {
322  case 0:
323  ::avro::decode(d, v.name);
324  break;
325 
326  case 1:
327  ::avro::decode(d, v.tierAttributes);
328  break;
329 
330  case 2:
331  ::avro::decode(d, v.ranking);
332  break;
333 
334  case 3:
335  ::avro::decode(d, v.adjoiningResourceGroup);
336  break;
337 
338  case 4:
339  ::avro::decode(d, v.options);
340  break;
341 
342  default:
343  break;
344  }
345  }
346  }
347  else
348  {
349  ::avro::decode(d, v.name);
350  ::avro::decode(d, v.tierAttributes);
351  ::avro::decode(d, v.ranking);
352  ::avro::decode(d, v.adjoiningResourceGroup);
353  ::avro::decode(d, v.options);
354  }
355  }
356  };
357 } // end namespace avro
358 
359 namespace gpudb
360 {
367  {
373  name(std::string()),
374  info(std::map<std::string, std::string>())
375  {
376  }
377 
381  std::string name;
382 
386  std::map<std::string, std::string> info;
387  };
388 } // end namespace gpudb
389 
390 namespace avro
391 {
392  template<> struct codec_traits<gpudb::AlterResourceGroupResponse>
393  {
394  static void encode(Encoder& e, const gpudb::AlterResourceGroupResponse& v)
395  {
396  ::avro::encode(e, v.name);
397  ::avro::encode(e, v.info);
398  }
399 
400  static void decode(Decoder& d, gpudb::AlterResourceGroupResponse& v)
401  {
402  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
403  {
404  const std::vector<size_t> fo = rd->fieldOrder();
405 
406  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
407  {
408  switch (*it)
409  {
410  case 0:
411  ::avro::decode(d, v.name);
412  break;
413 
414  case 1:
415  ::avro::decode(d, v.info);
416  break;
417 
418  default:
419  break;
420  }
421  }
422  }
423  else
424  {
425  ::avro::decode(d, v.name);
426  ::avro::decode(d, v.info);
427  }
428  }
429  };
430 } // end namespace avro
431 
432 #endif // __ALTER_RESOURCE_GROUP_H__
std::map< std::string, std::map< std::string, std::string > > tierAttributes
Optional map containing tier names and their respective attribute group limits.
std::string name
Name of the group to be altered.
AlterResourceGroupRequest()
Constructs an AlterResourceGroupRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
AlterResourceGroupResponse()
Constructs an AlterResourceGroupResponse object with default parameters.
AlterResourceGroupRequest(const std::string &name_, const std::map< std::string, std::map< std::string, std::string > > &tierAttributes_, const std::string &ranking_, const std::string &adjoiningResourceGroup_, const std::map< std::string, std::string > &options_)
Constructs an AlterResourceGroupRequest object with the specified parameters.
std::string adjoiningResourceGroup
If ranking is before or after, this field indicates the resource group before or after which the curr...
A set of parameters for GPUdb::alterResourceGroup.
std::string ranking
If the resource group ranking is to be updated, this indicates the relative ranking among existing re...
std::map< std::string, std::string > info
Additional information.
A set of results returned by GPUdb::alterResourceGroup.