GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
show_resource_groups.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb 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 {
11 
20  {
21 
27  names(std::vector<std::string>()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
75  ShowResourceGroupsRequest(const std::vector<std::string>& names_, const std::map<std::string, std::string>& options_):
76  names( names_ ),
77  options( options_ )
78  {
79  }
80 
81  std::vector<std::string> names;
82  std::map<std::string, std::string> options;
83  };
84 }
85 
86 namespace avro
87 {
88  template<> struct codec_traits<gpudb::ShowResourceGroupsRequest>
89  {
90  static void encode(Encoder& e, const gpudb::ShowResourceGroupsRequest& v)
91  {
92  ::avro::encode(e, v.names);
93  ::avro::encode(e, v.options);
94  }
95 
96  static void decode(Decoder& d, gpudb::ShowResourceGroupsRequest& v)
97  {
98  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
99  {
100  const std::vector<size_t> fo = rd->fieldOrder();
101 
102  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
103  {
104  switch (*it)
105  {
106  case 0:
107  ::avro::decode(d, v.names);
108  break;
109 
110  case 1:
111  ::avro::decode(d, v.options);
112  break;
113 
114  default:
115  break;
116  }
117  }
118  }
119  else
120  {
121  ::avro::decode(d, v.names);
122  ::avro::decode(d, v.options);
123  }
124  }
125  };
126 }
127 
128 namespace gpudb
129 {
130 
139  {
140 
146  groups(std::vector<std::map<std::string, std::string> >()),
147  rankUsage(std::map<std::string, std::string>()),
148  info(std::map<std::string, std::string>())
149  {
150  }
151 
152  std::vector<std::map<std::string, std::string> > groups;
153  std::map<std::string, std::string> rankUsage;
154  std::map<std::string, std::string> info;
155  };
156 }
157 
158 namespace avro
159 {
160  template<> struct codec_traits<gpudb::ShowResourceGroupsResponse>
161  {
162  static void encode(Encoder& e, const gpudb::ShowResourceGroupsResponse& v)
163  {
164  ::avro::encode(e, v.groups);
165  ::avro::encode(e, v.rankUsage);
166  ::avro::encode(e, v.info);
167  }
168 
169  static void decode(Decoder& d, gpudb::ShowResourceGroupsResponse& v)
170  {
171  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
172  {
173  const std::vector<size_t> fo = rd->fieldOrder();
174 
175  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
176  {
177  switch (*it)
178  {
179  case 0:
180  ::avro::decode(d, v.groups);
181  break;
182 
183  case 1:
184  ::avro::decode(d, v.rankUsage);
185  break;
186 
187  case 2:
188  ::avro::decode(d, v.info);
189  break;
190 
191  default:
192  break;
193  }
194  }
195  }
196  else
197  {
198  ::avro::decode(d, v.groups);
199  ::avro::decode(d, v.rankUsage);
200  ::avro::decode(d, v.info);
201  }
202  }
203  };
204 }
205 
206 #endif
std::map< std::string, std::string > info
std::vector< std::map< std::string, std::string > > groups
A set of output parameters for const.
std::vector< std::string > names
ShowResourceGroupsResponse()
Constructs a ShowResourceGroupsResponse object with default parameter values.
std::map< std::string, std::string > rankUsage
ShowResourceGroupsRequest()
Constructs a ShowResourceGroupsRequest object with default parameter values.
A set of input parameters for const.
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