GPUdb C++ API  Version 7.2.3.0
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 
186  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_):
187  name( name_ ),
188  tierAttributes( tierAttributes_ ),
189  ranking( ranking_ ),
190  adjoiningResourceGroup( adjoiningResourceGroup_ ),
191  options( options_ )
192  {
193  }
194 
200  std::string name;
201 
220  std::map<std::string, std::map<std::string, std::string> > tierAttributes;
221 
249  std::string ranking;
250 
258 
314  std::map<std::string, std::string> options;
315  };
316 } // end namespace gpudb
317 
318 namespace avro
319 {
320  template<> struct codec_traits<gpudb::AlterResourceGroupRequest>
321  {
322  static void encode(Encoder& e, const gpudb::AlterResourceGroupRequest& v)
323  {
324  ::avro::encode(e, v.name);
325  ::avro::encode(e, v.tierAttributes);
326  ::avro::encode(e, v.ranking);
327  ::avro::encode(e, v.adjoiningResourceGroup);
328  ::avro::encode(e, v.options);
329  }
330 
331  static void decode(Decoder& d, gpudb::AlterResourceGroupRequest& v)
332  {
333  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
334  {
335  const std::vector<size_t> fo = rd->fieldOrder();
336 
337  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
338  {
339  switch (*it)
340  {
341  case 0:
342  ::avro::decode(d, v.name);
343  break;
344 
345  case 1:
346  ::avro::decode(d, v.tierAttributes);
347  break;
348 
349  case 2:
350  ::avro::decode(d, v.ranking);
351  break;
352 
353  case 3:
354  ::avro::decode(d, v.adjoiningResourceGroup);
355  break;
356 
357  case 4:
358  ::avro::decode(d, v.options);
359  break;
360 
361  default:
362  break;
363  }
364  }
365  }
366  else
367  {
368  ::avro::decode(d, v.name);
369  ::avro::decode(d, v.tierAttributes);
370  ::avro::decode(d, v.ranking);
371  ::avro::decode(d, v.adjoiningResourceGroup);
372  ::avro::decode(d, v.options);
373  }
374  }
375  };
376 } // end namespace avro
377 
378 namespace gpudb
379 {
386  {
392  name(std::string()),
393  info(std::map<std::string, std::string>())
394  {
395  }
396 
400  std::string name;
401 
405  std::map<std::string, std::string> info;
406  };
407 } // end namespace gpudb
408 
409 namespace avro
410 {
411  template<> struct codec_traits<gpudb::AlterResourceGroupResponse>
412  {
413  static void encode(Encoder& e, const gpudb::AlterResourceGroupResponse& v)
414  {
415  ::avro::encode(e, v.name);
416  ::avro::encode(e, v.info);
417  }
418 
419  static void decode(Decoder& d, gpudb::AlterResourceGroupResponse& v)
420  {
421  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
422  {
423  const std::vector<size_t> fo = rd->fieldOrder();
424 
425  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
426  {
427  switch (*it)
428  {
429  case 0:
430  ::avro::decode(d, v.name);
431  break;
432 
433  case 1:
434  ::avro::decode(d, v.info);
435  break;
436 
437  default:
438  break;
439  }
440  }
441  }
442  else
443  {
444  ::avro::decode(d, v.name);
445  ::avro::decode(d, v.info);
446  }
447  }
448  };
449 } // end namespace avro
450 
451 #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.