GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grant_permission.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 __GRANT_PERMISSION_H__
7 #define __GRANT_PERMISSION_H__
8 
9 namespace gpudb
10 {
11 
19  {
20 
26  principal(std::string()),
27  object(std::string()),
28  objectType(std::string()),
29  permission(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
126  GrantPermissionRequest(const std::string& principal_, const std::string& object_, const std::string& objectType_, const std::string& permission_, const std::map<std::string, std::string>& options_):
127  principal( principal_ ),
128  object( object_ ),
129  objectType( objectType_ ),
130  permission( permission_ ),
131  options( options_ )
132  {
133  }
134 
135  std::string principal;
136  std::string object;
137  std::string objectType;
138  std::string permission;
139  std::map<std::string, std::string> options;
140  };
141 }
142 
143 namespace avro
144 {
145  template<> struct codec_traits<gpudb::GrantPermissionRequest>
146  {
147  static void encode(Encoder& e, const gpudb::GrantPermissionRequest& v)
148  {
149  ::avro::encode(e, v.principal);
150  ::avro::encode(e, v.object);
151  ::avro::encode(e, v.objectType);
152  ::avro::encode(e, v.permission);
153  ::avro::encode(e, v.options);
154  }
155 
156  static void decode(Decoder& d, gpudb::GrantPermissionRequest& v)
157  {
158  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
159  {
160  const std::vector<size_t> fo = rd->fieldOrder();
161 
162  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
163  {
164  switch (*it)
165  {
166  case 0:
167  ::avro::decode(d, v.principal);
168  break;
169 
170  case 1:
171  ::avro::decode(d, v.object);
172  break;
173 
174  case 2:
175  ::avro::decode(d, v.objectType);
176  break;
177 
178  case 3:
179  ::avro::decode(d, v.permission);
180  break;
181 
182  case 4:
183  ::avro::decode(d, v.options);
184  break;
185 
186  default:
187  break;
188  }
189  }
190  }
191  else
192  {
193  ::avro::decode(d, v.principal);
194  ::avro::decode(d, v.object);
195  ::avro::decode(d, v.objectType);
196  ::avro::decode(d, v.permission);
197  ::avro::decode(d, v.options);
198  }
199  }
200  };
201 }
202 
203 namespace gpudb
204 {
205 
213  {
214 
220  principal(std::string()),
221  object(std::string()),
222  objectType(std::string()),
223  permission(std::string()),
224  info(std::map<std::string, std::string>())
225  {
226  }
227 
228  std::string principal;
229  std::string object;
230  std::string objectType;
231  std::string permission;
232  std::map<std::string, std::string> info;
233  };
234 }
235 
236 namespace avro
237 {
238  template<> struct codec_traits<gpudb::GrantPermissionResponse>
239  {
240  static void encode(Encoder& e, const gpudb::GrantPermissionResponse& v)
241  {
242  ::avro::encode(e, v.principal);
243  ::avro::encode(e, v.object);
244  ::avro::encode(e, v.objectType);
245  ::avro::encode(e, v.permission);
246  ::avro::encode(e, v.info);
247  }
248 
249  static void decode(Decoder& d, gpudb::GrantPermissionResponse& v)
250  {
251  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
252  {
253  const std::vector<size_t> fo = rd->fieldOrder();
254 
255  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
256  {
257  switch (*it)
258  {
259  case 0:
260  ::avro::decode(d, v.principal);
261  break;
262 
263  case 1:
264  ::avro::decode(d, v.object);
265  break;
266 
267  case 2:
268  ::avro::decode(d, v.objectType);
269  break;
270 
271  case 3:
272  ::avro::decode(d, v.permission);
273  break;
274 
275  case 4:
276  ::avro::decode(d, v.info);
277  break;
278 
279  default:
280  break;
281  }
282  }
283  }
284  else
285  {
286  ::avro::decode(d, v.principal);
287  ::avro::decode(d, v.object);
288  ::avro::decode(d, v.objectType);
289  ::avro::decode(d, v.permission);
290  ::avro::decode(d, v.info);
291  }
292  }
293  };
294 }
295 
296 #endif
GrantPermissionRequest()
Constructs a GrantPermissionRequest object with default parameter values.
A set of input parameters for const.
std::map< std::string, std::string > options
std::map< std::string, std::string > info
A set of output parameters for const.
GrantPermissionResponse()
Constructs a GrantPermissionResponse object with default parameter values.
GrantPermissionRequest(const std::string &principal_, const std::string &object_, const std::string &objectType_, const std::string &permission_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionRequest object with the specified parameters.