GPUdb C++ API  Version 7.2.2.4
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 
121  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_):
122  name( name_ ),
123  tierAttributes( tierAttributes_ ),
124  ranking( ranking_ ),
125  adjoiningResourceGroup( adjoiningResourceGroup_ ),
126  options( options_ )
127  {
128  }
129 
135  std::string name;
136 
152  std::map<std::string, std::map<std::string, std::string> > tierAttributes;
153 
173  std::string ranking;
174 
182 
205  std::map<std::string, std::string> options;
206  };
207 } // end namespace gpudb
208 
209 namespace avro
210 {
211  template<> struct codec_traits<gpudb::CreateResourceGroupRequest>
212  {
213  static void encode(Encoder& e, const gpudb::CreateResourceGroupRequest& v)
214  {
215  ::avro::encode(e, v.name);
216  ::avro::encode(e, v.tierAttributes);
217  ::avro::encode(e, v.ranking);
218  ::avro::encode(e, v.adjoiningResourceGroup);
219  ::avro::encode(e, v.options);
220  }
221 
222  static void decode(Decoder& d, gpudb::CreateResourceGroupRequest& v)
223  {
224  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
225  {
226  const std::vector<size_t> fo = rd->fieldOrder();
227 
228  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
229  {
230  switch (*it)
231  {
232  case 0:
233  ::avro::decode(d, v.name);
234  break;
235 
236  case 1:
237  ::avro::decode(d, v.tierAttributes);
238  break;
239 
240  case 2:
241  ::avro::decode(d, v.ranking);
242  break;
243 
244  case 3:
245  ::avro::decode(d, v.adjoiningResourceGroup);
246  break;
247 
248  case 4:
249  ::avro::decode(d, v.options);
250  break;
251 
252  default:
253  break;
254  }
255  }
256  }
257  else
258  {
259  ::avro::decode(d, v.name);
260  ::avro::decode(d, v.tierAttributes);
261  ::avro::decode(d, v.ranking);
262  ::avro::decode(d, v.adjoiningResourceGroup);
263  ::avro::decode(d, v.options);
264  }
265  }
266  };
267 } // end namespace avro
268 
269 namespace gpudb
270 {
277  {
283  name(std::string()),
284  info(std::map<std::string, std::string>())
285  {
286  }
287 
291  std::string name;
292 
296  std::map<std::string, std::string> info;
297  };
298 } // end namespace gpudb
299 
300 namespace avro
301 {
302  template<> struct codec_traits<gpudb::CreateResourceGroupResponse>
303  {
304  static void encode(Encoder& e, const gpudb::CreateResourceGroupResponse& v)
305  {
306  ::avro::encode(e, v.name);
307  ::avro::encode(e, v.info);
308  }
309 
310  static void decode(Decoder& d, gpudb::CreateResourceGroupResponse& v)
311  {
312  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
313  {
314  const std::vector<size_t> fo = rd->fieldOrder();
315 
316  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
317  {
318  switch (*it)
319  {
320  case 0:
321  ::avro::decode(d, v.name);
322  break;
323 
324  case 1:
325  ::avro::decode(d, v.info);
326  break;
327 
328  default:
329  break;
330  }
331  }
332  }
333  else
334  {
335  ::avro::decode(d, v.name);
336  ::avro::decode(d, v.info);
337  }
338  }
339  };
340 } // end namespace avro
341 
342 #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...