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 
164  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_):
165  principal( principal_ ),
166  object( object_ ),
167  objectType( objectType_ ),
168  permission( permission_ ),
169  options( options_ )
170  {
171  }
172 
177  std::string principal;
178 
183  std::string object;
184 
215  std::string objectType;
216 
250  std::string permission;
251 
277  std::map<std::string, std::string> options;
278  };
279 } // end namespace gpudb
280 
281 namespace avro
282 {
283  template<> struct codec_traits<gpudb::GrantPermissionRequest>
284  {
285  static void encode(Encoder& e, const gpudb::GrantPermissionRequest& v)
286  {
287  ::avro::encode(e, v.principal);
288  ::avro::encode(e, v.object);
289  ::avro::encode(e, v.objectType);
290  ::avro::encode(e, v.permission);
291  ::avro::encode(e, v.options);
292  }
293 
294  static void decode(Decoder& d, gpudb::GrantPermissionRequest& v)
295  {
296  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
297  {
298  const std::vector<size_t> fo = rd->fieldOrder();
299 
300  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
301  {
302  switch (*it)
303  {
304  case 0:
305  ::avro::decode(d, v.principal);
306  break;
307 
308  case 1:
309  ::avro::decode(d, v.object);
310  break;
311 
312  case 2:
313  ::avro::decode(d, v.objectType);
314  break;
315 
316  case 3:
317  ::avro::decode(d, v.permission);
318  break;
319 
320  case 4:
321  ::avro::decode(d, v.options);
322  break;
323 
324  default:
325  break;
326  }
327  }
328  }
329  else
330  {
331  ::avro::decode(d, v.principal);
332  ::avro::decode(d, v.object);
333  ::avro::decode(d, v.objectType);
334  ::avro::decode(d, v.permission);
335  ::avro::decode(d, v.options);
336  }
337  }
338  };
339 } // end namespace avro
340 
341 namespace gpudb
342 {
349  {
354  principal(std::string()),
355  object(std::string()),
356  objectType(std::string()),
357  permission(std::string()),
358  info(std::map<std::string, std::string>())
359  {
360  }
361 
365  std::string principal;
366 
370  std::string object;
371 
376  std::string objectType;
377 
382  std::string permission;
383 
387  std::map<std::string, std::string> info;
388  };
389 } // end namespace gpudb
390 
391 namespace avro
392 {
393  template<> struct codec_traits<gpudb::GrantPermissionResponse>
394  {
395  static void encode(Encoder& e, const gpudb::GrantPermissionResponse& v)
396  {
397  ::avro::encode(e, v.principal);
398  ::avro::encode(e, v.object);
399  ::avro::encode(e, v.objectType);
400  ::avro::encode(e, v.permission);
401  ::avro::encode(e, v.info);
402  }
403 
404  static void decode(Decoder& d, gpudb::GrantPermissionResponse& v)
405  {
406  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
407  {
408  const std::vector<size_t> fo = rd->fieldOrder();
409 
410  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
411  {
412  switch (*it)
413  {
414  case 0:
415  ::avro::decode(d, v.principal);
416  break;
417 
418  case 1:
419  ::avro::decode(d, v.object);
420  break;
421 
422  case 2:
423  ::avro::decode(d, v.objectType);
424  break;
425 
426  case 3:
427  ::avro::decode(d, v.permission);
428  break;
429 
430  case 4:
431  ::avro::decode(d, v.info);
432  break;
433 
434  default:
435  break;
436  }
437  }
438  }
439  else
440  {
441  ::avro::decode(d, v.principal);
442  ::avro::decode(d, v.object);
443  ::avro::decode(d, v.objectType);
444  ::avro::decode(d, v.permission);
445  ::avro::decode(d, v.info);
446  }
447  }
448  };
449 } // end namespace avro
450 
451 #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.