GPUdb C++ API  Version 7.2.2.4
grant_permission.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 __GRANT_PERMISSION_H__
7 #define __GRANT_PERMISSION_H__
8 
9 namespace gpudb
10 {
19  {
24  principal(std::string()),
25  object(std::string()),
26  objectType(std::string()),
27  permission(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
160  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_):
161  principal( principal_ ),
162  object( object_ ),
163  objectType( objectType_ ),
164  permission( permission_ ),
165  options( options_ )
166  {
167  }
168 
173  std::string principal;
174 
179  std::string object;
180 
211  std::string objectType;
212 
243  std::string permission;
244 
270  std::map<std::string, std::string> options;
271  };
272 } // end namespace gpudb
273 
274 namespace avro
275 {
276  template<> struct codec_traits<gpudb::GrantPermissionRequest>
277  {
278  static void encode(Encoder& e, const gpudb::GrantPermissionRequest& v)
279  {
280  ::avro::encode(e, v.principal);
281  ::avro::encode(e, v.object);
282  ::avro::encode(e, v.objectType);
283  ::avro::encode(e, v.permission);
284  ::avro::encode(e, v.options);
285  }
286 
287  static void decode(Decoder& d, gpudb::GrantPermissionRequest& v)
288  {
289  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
290  {
291  const std::vector<size_t> fo = rd->fieldOrder();
292 
293  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
294  {
295  switch (*it)
296  {
297  case 0:
298  ::avro::decode(d, v.principal);
299  break;
300 
301  case 1:
302  ::avro::decode(d, v.object);
303  break;
304 
305  case 2:
306  ::avro::decode(d, v.objectType);
307  break;
308 
309  case 3:
310  ::avro::decode(d, v.permission);
311  break;
312 
313  case 4:
314  ::avro::decode(d, v.options);
315  break;
316 
317  default:
318  break;
319  }
320  }
321  }
322  else
323  {
324  ::avro::decode(d, v.principal);
325  ::avro::decode(d, v.object);
326  ::avro::decode(d, v.objectType);
327  ::avro::decode(d, v.permission);
328  ::avro::decode(d, v.options);
329  }
330  }
331  };
332 } // end namespace avro
333 
334 namespace gpudb
335 {
342  {
347  principal(std::string()),
348  object(std::string()),
349  objectType(std::string()),
350  permission(std::string()),
351  info(std::map<std::string, std::string>())
352  {
353  }
354 
358  std::string principal;
359 
363  std::string object;
364 
369  std::string objectType;
370 
375  std::string permission;
376 
380  std::map<std::string, std::string> info;
381  };
382 } // end namespace gpudb
383 
384 namespace avro
385 {
386  template<> struct codec_traits<gpudb::GrantPermissionResponse>
387  {
388  static void encode(Encoder& e, const gpudb::GrantPermissionResponse& v)
389  {
390  ::avro::encode(e, v.principal);
391  ::avro::encode(e, v.object);
392  ::avro::encode(e, v.objectType);
393  ::avro::encode(e, v.permission);
394  ::avro::encode(e, v.info);
395  }
396 
397  static void decode(Decoder& d, gpudb::GrantPermissionResponse& v)
398  {
399  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
400  {
401  const std::vector<size_t> fo = rd->fieldOrder();
402 
403  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
404  {
405  switch (*it)
406  {
407  case 0:
408  ::avro::decode(d, v.principal);
409  break;
410 
411  case 1:
412  ::avro::decode(d, v.object);
413  break;
414 
415  case 2:
416  ::avro::decode(d, v.objectType);
417  break;
418 
419  case 3:
420  ::avro::decode(d, v.permission);
421  break;
422 
423  case 4:
424  ::avro::decode(d, v.info);
425  break;
426 
427  default:
428  break;
429  }
430  }
431  }
432  else
433  {
434  ::avro::decode(d, v.principal);
435  ::avro::decode(d, v.object);
436  ::avro::decode(d, v.objectType);
437  ::avro::decode(d, v.permission);
438  ::avro::decode(d, v.info);
439  }
440  }
441  };
442 } // end namespace avro
443 
444 #endif // __GRANT_PERMISSION_H__
std::string permission
Value of permission.
GrantPermissionRequest()
Constructs a GrantPermissionRequest object with default parameters.
A set of parameters for GPUdb::grantPermission.
std::map< std::string, std::string > options
Optional parameters.
std::map< std::string, std::string > info
Additional information.
std::string object
Value of object.
std::string principal
Name of the user or role for which the permission is being granted.
A set of results returned by GPUdb::grantPermission.
GrantPermissionResponse()
Constructs a GrantPermissionResponse object with default parameters.
std::string object
Name of object permission is being granted to.
std::string objectType
Value of objectType.
std::string principal
Value of principal.
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.
std::string objectType
The type of object being granted to.
std::string permission
Permission being granted.