GPUdb C++ API  Version 7.2.3.0
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 
167  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_):
168  principal( principal_ ),
169  object( object_ ),
170  objectType( objectType_ ),
171  permission( permission_ ),
172  options( options_ )
173  {
174  }
175 
180  std::string principal;
181 
186  std::string object;
187 
218  std::string objectType;
219 
255  std::string permission;
256 
282  std::map<std::string, std::string> options;
283  };
284 } // end namespace gpudb
285 
286 namespace avro
287 {
288  template<> struct codec_traits<gpudb::GrantPermissionRequest>
289  {
290  static void encode(Encoder& e, const gpudb::GrantPermissionRequest& v)
291  {
292  ::avro::encode(e, v.principal);
293  ::avro::encode(e, v.object);
294  ::avro::encode(e, v.objectType);
295  ::avro::encode(e, v.permission);
296  ::avro::encode(e, v.options);
297  }
298 
299  static void decode(Decoder& d, gpudb::GrantPermissionRequest& v)
300  {
301  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
302  {
303  const std::vector<size_t> fo = rd->fieldOrder();
304 
305  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
306  {
307  switch (*it)
308  {
309  case 0:
310  ::avro::decode(d, v.principal);
311  break;
312 
313  case 1:
314  ::avro::decode(d, v.object);
315  break;
316 
317  case 2:
318  ::avro::decode(d, v.objectType);
319  break;
320 
321  case 3:
322  ::avro::decode(d, v.permission);
323  break;
324 
325  case 4:
326  ::avro::decode(d, v.options);
327  break;
328 
329  default:
330  break;
331  }
332  }
333  }
334  else
335  {
336  ::avro::decode(d, v.principal);
337  ::avro::decode(d, v.object);
338  ::avro::decode(d, v.objectType);
339  ::avro::decode(d, v.permission);
340  ::avro::decode(d, v.options);
341  }
342  }
343  };
344 } // end namespace avro
345 
346 namespace gpudb
347 {
354  {
359  principal(std::string()),
360  object(std::string()),
361  objectType(std::string()),
362  permission(std::string()),
363  info(std::map<std::string, std::string>())
364  {
365  }
366 
370  std::string principal;
371 
375  std::string object;
376 
381  std::string objectType;
382 
387  std::string permission;
388 
392  std::map<std::string, std::string> info;
393  };
394 } // end namespace gpudb
395 
396 namespace avro
397 {
398  template<> struct codec_traits<gpudb::GrantPermissionResponse>
399  {
400  static void encode(Encoder& e, const gpudb::GrantPermissionResponse& v)
401  {
402  ::avro::encode(e, v.principal);
403  ::avro::encode(e, v.object);
404  ::avro::encode(e, v.objectType);
405  ::avro::encode(e, v.permission);
406  ::avro::encode(e, v.info);
407  }
408 
409  static void decode(Decoder& d, gpudb::GrantPermissionResponse& v)
410  {
411  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
412  {
413  const std::vector<size_t> fo = rd->fieldOrder();
414 
415  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
416  {
417  switch (*it)
418  {
419  case 0:
420  ::avro::decode(d, v.principal);
421  break;
422 
423  case 1:
424  ::avro::decode(d, v.object);
425  break;
426 
427  case 2:
428  ::avro::decode(d, v.objectType);
429  break;
430 
431  case 3:
432  ::avro::decode(d, v.permission);
433  break;
434 
435  case 4:
436  ::avro::decode(d, v.info);
437  break;
438 
439  default:
440  break;
441  }
442  }
443  }
444  else
445  {
446  ::avro::decode(d, v.principal);
447  ::avro::decode(d, v.object);
448  ::avro::decode(d, v.objectType);
449  ::avro::decode(d, v.permission);
450  ::avro::decode(d, v.info);
451  }
452  }
453  };
454 } // end namespace avro
455 
456 #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.