GPUdb C++ API  Version 7.2.2.4
show_resource_groups.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 __SHOW_RESOURCE_GROUPS_H__
7 #define __SHOW_RESOURCE_GROUPS_H__
8 
9 namespace gpudb
10 {
20  {
26  names(std::vector<std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
102  ShowResourceGroupsRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
103  names( names_ ),
104  options( options_ )
105  {
106  }
107 
112  std::vector<std::string> names;
113 
161  std::map<std::string, std::string> options;
162  };
163 } // end namespace gpudb
164 
165 namespace avro
166 {
167  template<> struct codec_traits<gpudb::ShowResourceGroupsRequest>
168  {
169  static void encode(Encoder& e, const gpudb::ShowResourceGroupsRequest& v)
170  {
171  ::avro::encode(e, v.names);
172  ::avro::encode(e, v.options);
173  }
174 
175  static void decode(Decoder& d, gpudb::ShowResourceGroupsRequest& v)
176  {
177  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
178  {
179  const std::vector<size_t> fo = rd->fieldOrder();
180 
181  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
182  {
183  switch (*it)
184  {
185  case 0:
186  ::avro::decode(d, v.names);
187  break;
188 
189  case 1:
190  ::avro::decode(d, v.options);
191  break;
192 
193  default:
194  break;
195  }
196  }
197  }
198  else
199  {
200  ::avro::decode(d, v.names);
201  ::avro::decode(d, v.options);
202  }
203  }
204  };
205 } // end namespace avro
206 
207 namespace gpudb
208 {
215  {
221  groups(std::vector<std::map<std::string, std::string> >()),
222  rankUsage(std::map<std::string, std::string>()),
223  info(std::map<std::string, std::string>())
224  {
225  }
226 
230  std::vector<std::map<std::string, std::string> > groups;
231 
237  std::map<std::string, std::string> rankUsage;
238 
242  std::map<std::string, std::string> info;
243  };
244 } // end namespace gpudb
245 
246 namespace avro
247 {
248  template<> struct codec_traits<gpudb::ShowResourceGroupsResponse>
249  {
250  static void encode(Encoder& e, const gpudb::ShowResourceGroupsResponse& v)
251  {
252  ::avro::encode(e, v.groups);
253  ::avro::encode(e, v.rankUsage);
254  ::avro::encode(e, v.info);
255  }
256 
257  static void decode(Decoder& d, gpudb::ShowResourceGroupsResponse& v)
258  {
259  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
260  {
261  const std::vector<size_t> fo = rd->fieldOrder();
262 
263  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
264  {
265  switch (*it)
266  {
267  case 0:
268  ::avro::decode(d, v.groups);
269  break;
270 
271  case 1:
272  ::avro::decode(d, v.rankUsage);
273  break;
274 
275  case 2:
276  ::avro::decode(d, v.info);
277  break;
278 
279  default:
280  break;
281  }
282  }
283  }
284  else
285  {
286  ::avro::decode(d, v.groups);
287  ::avro::decode(d, v.rankUsage);
288  ::avro::decode(d, v.info);
289  }
290  }
291  };
292 } // end namespace avro
293 
294 #endif // __SHOW_RESOURCE_GROUPS_H__
std::map< std::string, std::string > info
Additional information.
std::vector< std::map< std::string, std::string > > groups
Map of resource group information.
A set of results returned by GPUdb::showResourceGroups.
std::vector< std::string > names
List of names of groups to be shown.
ShowResourceGroupsResponse()
Constructs a ShowResourceGroupsResponse object with default parameters.
std::map< std::string, std::string > rankUsage
Tier usage across ranks.
ShowResourceGroupsRequest()
Constructs a ShowResourceGroupsRequest object with default parameters.
A set of parameters for GPUdb::showResourceGroups.
ShowResourceGroupsRequest(const std::vector< std::string > &names_, const std::map< std::string, std::string > &options_)
Constructs a ShowResourceGroupsRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.