GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_resource_group.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 __CREATE_RESOURCE_GROUP_H__
7 #define __CREATE_RESOURCE_GROUP_H__
8 
9 namespace gpudb
10 {
11 
19  {
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 
98  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_):
99  name( name_ ),
100  tierAttributes( tierAttributes_ ),
101  ranking( ranking_ ),
102  adjoiningResourceGroup( adjoiningResourceGroup_ ),
103  options( options_ )
104  {
105  }
106 
107  std::string name;
108  std::map<std::string, std::map<std::string, std::string> > tierAttributes;
109  std::string ranking;
111  std::map<std::string, std::string> options;
112  };
113 }
114 
115 namespace avro
116 {
117  template<> struct codec_traits<gpudb::CreateResourceGroupRequest>
118  {
119  static void encode(Encoder& e, const gpudb::CreateResourceGroupRequest& v)
120  {
121  ::avro::encode(e, v.name);
122  ::avro::encode(e, v.tierAttributes);
123  ::avro::encode(e, v.ranking);
124  ::avro::encode(e, v.adjoiningResourceGroup);
125  ::avro::encode(e, v.options);
126  }
127 
128  static void decode(Decoder& d, gpudb::CreateResourceGroupRequest& v)
129  {
130  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
131  {
132  const std::vector<size_t> fo = rd->fieldOrder();
133 
134  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
135  {
136  switch (*it)
137  {
138  case 0:
139  ::avro::decode(d, v.name);
140  break;
141 
142  case 1:
143  ::avro::decode(d, v.tierAttributes);
144  break;
145 
146  case 2:
147  ::avro::decode(d, v.ranking);
148  break;
149 
150  case 3:
151  ::avro::decode(d, v.adjoiningResourceGroup);
152  break;
153 
154  case 4:
155  ::avro::decode(d, v.options);
156  break;
157 
158  default:
159  break;
160  }
161  }
162  }
163  else
164  {
165  ::avro::decode(d, v.name);
166  ::avro::decode(d, v.tierAttributes);
167  ::avro::decode(d, v.ranking);
168  ::avro::decode(d, v.adjoiningResourceGroup);
169  ::avro::decode(d, v.options);
170  }
171  }
172  };
173 }
174 
175 namespace gpudb
176 {
177 
185  {
186 
192  name(std::string()),
193  info(std::map<std::string, std::string>())
194  {
195  }
196 
197  std::string name;
198  std::map<std::string, std::string> info;
199  };
200 }
201 
202 namespace avro
203 {
204  template<> struct codec_traits<gpudb::CreateResourceGroupResponse>
205  {
206  static void encode(Encoder& e, const gpudb::CreateResourceGroupResponse& v)
207  {
208  ::avro::encode(e, v.name);
209  ::avro::encode(e, v.info);
210  }
211 
212  static void decode(Decoder& d, gpudb::CreateResourceGroupResponse& v)
213  {
214  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
215  {
216  const std::vector<size_t> fo = rd->fieldOrder();
217 
218  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
219  {
220  switch (*it)
221  {
222  case 0:
223  ::avro::decode(d, v.name);
224  break;
225 
226  case 1:
227  ::avro::decode(d, v.info);
228  break;
229 
230  default:
231  break;
232  }
233  }
234  }
235  else
236  {
237  ::avro::decode(d, v.name);
238  ::avro::decode(d, v.info);
239  }
240  }
241  };
242 }
243 
244 #endif
CreateResourceGroupResponse()
Constructs a CreateResourceGroupResponse object with default parameter values.
std::map< std::string, std::string > info
A set of output parameters for const.
std::map< std::string, std::map< std::string, std::string > > tierAttributes
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.
CreateResourceGroupRequest()
Constructs a CreateResourceGroupRequest object with default parameter values.
std::map< std::string, std::string > options
A set of input parameters for const.