GPUdb C++ API  Version 7.2.3.0
create_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 __CREATE_RESOURCE_GROUP_H__
7 #define __CREATE_RESOURCE_GROUP_H__
8 
9 namespace gpudb
10 {
19  {
25  name(std::string()),
26  tierAttributes(std::map<std::string, std::map<std::string, std::string> >()),
27  ranking(std::string()),
28  adjoiningResourceGroup(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
131  CreateResourceGroupRequest(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_):
132  name( name_ ),
133  tierAttributes( tierAttributes_ ),
134  ranking( ranking_ ),
135  adjoiningResourceGroup( adjoiningResourceGroup_ ),
136  options( options_ )
137  {
138  }
139 
145  std::string name;
146 
165  std::map<std::string, std::map<std::string, std::string> > tierAttributes;
166 
188  std::string ranking;
189 
197 
222  std::map<std::string, std::string> options;
223  };
224 } // end namespace gpudb
225 
226 namespace avro
227 {
228  template<> struct codec_traits<gpudb::CreateResourceGroupRequest>
229  {
230  static void encode(Encoder& e, const gpudb::CreateResourceGroupRequest& v)
231  {
232  ::avro::encode(e, v.name);
233  ::avro::encode(e, v.tierAttributes);
234  ::avro::encode(e, v.ranking);
235  ::avro::encode(e, v.adjoiningResourceGroup);
236  ::avro::encode(e, v.options);
237  }
238 
239  static void decode(Decoder& d, gpudb::CreateResourceGroupRequest& v)
240  {
241  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
242  {
243  const std::vector<size_t> fo = rd->fieldOrder();
244 
245  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
246  {
247  switch (*it)
248  {
249  case 0:
250  ::avro::decode(d, v.name);
251  break;
252 
253  case 1:
254  ::avro::decode(d, v.tierAttributes);
255  break;
256 
257  case 2:
258  ::avro::decode(d, v.ranking);
259  break;
260 
261  case 3:
262  ::avro::decode(d, v.adjoiningResourceGroup);
263  break;
264 
265  case 4:
266  ::avro::decode(d, v.options);
267  break;
268 
269  default:
270  break;
271  }
272  }
273  }
274  else
275  {
276  ::avro::decode(d, v.name);
277  ::avro::decode(d, v.tierAttributes);
278  ::avro::decode(d, v.ranking);
279  ::avro::decode(d, v.adjoiningResourceGroup);
280  ::avro::decode(d, v.options);
281  }
282  }
283  };
284 } // end namespace avro
285 
286 namespace gpudb
287 {
294  {
300  name(std::string()),
301  info(std::map<std::string, std::string>())
302  {
303  }
304 
308  std::string name;
309 
313  std::map<std::string, std::string> info;
314  };
315 } // end namespace gpudb
316 
317 namespace avro
318 {
319  template<> struct codec_traits<gpudb::CreateResourceGroupResponse>
320  {
321  static void encode(Encoder& e, const gpudb::CreateResourceGroupResponse& v)
322  {
323  ::avro::encode(e, v.name);
324  ::avro::encode(e, v.info);
325  }
326 
327  static void decode(Decoder& d, gpudb::CreateResourceGroupResponse& v)
328  {
329  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
330  {
331  const std::vector<size_t> fo = rd->fieldOrder();
332 
333  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
334  {
335  switch (*it)
336  {
337  case 0:
338  ::avro::decode(d, v.name);
339  break;
340 
341  case 1:
342  ::avro::decode(d, v.info);
343  break;
344 
345  default:
346  break;
347  }
348  }
349  }
350  else
351  {
352  ::avro::decode(d, v.name);
353  ::avro::decode(d, v.info);
354  }
355  }
356  };
357 } // end namespace avro
358 
359 #endif // __CREATE_RESOURCE_GROUP_H__
CreateResourceGroupResponse()
Constructs a CreateResourceGroupResponse object with default parameters.
std::map< std::string, std::string > info
Additional information.
A set of results returned by GPUdb::createResourceGroup.
std::map< std::string, std::map< std::string, std::string > > tierAttributes
Optional map containing tier names and their respective attribute group limits.
CreateResourceGroupRequest(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 a CreateResourceGroupRequest 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...
CreateResourceGroupRequest()
Constructs a CreateResourceGroupRequest object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
std::string name
Name of the group to be created.
A set of parameters for GPUdb::createResourceGroup.
std::string ranking
Indicates the relative ranking among existing resource groups where this new resource group will be p...