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 
169  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_):
170  principal( principal_ ),
171  object( object_ ),
172  objectType( objectType_ ),
173  permission( permission_ ),
174  options( options_ )
175  {
176  }
177 
182  std::string principal;
183 
188  std::string object;
189 
222  std::string objectType;
223 
259  std::string permission;
260 
286  std::map<std::string, std::string> options;
287  };
288 } // end namespace gpudb
289 
290 namespace avro
291 {
292  template<> struct codec_traits<gpudb::GrantPermissionRequest>
293  {
294  static void encode(Encoder& e, const gpudb::GrantPermissionRequest& v)
295  {
296  ::avro::encode(e, v.principal);
297  ::avro::encode(e, v.object);
298  ::avro::encode(e, v.objectType);
299  ::avro::encode(e, v.permission);
300  ::avro::encode(e, v.options);
301  }
302 
303  static void decode(Decoder& d, gpudb::GrantPermissionRequest& v)
304  {
305  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
306  {
307  const std::vector<size_t> fo = rd->fieldOrder();
308 
309  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
310  {
311  switch (*it)
312  {
313  case 0:
314  ::avro::decode(d, v.principal);
315  break;
316 
317  case 1:
318  ::avro::decode(d, v.object);
319  break;
320 
321  case 2:
322  ::avro::decode(d, v.objectType);
323  break;
324 
325  case 3:
326  ::avro::decode(d, v.permission);
327  break;
328 
329  case 4:
330  ::avro::decode(d, v.options);
331  break;
332 
333  default:
334  break;
335  }
336  }
337  }
338  else
339  {
340  ::avro::decode(d, v.principal);
341  ::avro::decode(d, v.object);
342  ::avro::decode(d, v.objectType);
343  ::avro::decode(d, v.permission);
344  ::avro::decode(d, v.options);
345  }
346  }
347  };
348 } // end namespace avro
349 
350 namespace gpudb
351 {
358  {
363  principal(std::string()),
364  object(std::string()),
365  objectType(std::string()),
366  permission(std::string()),
367  info(std::map<std::string, std::string>())
368  {
369  }
370 
374  std::string principal;
375 
379  std::string object;
380 
385  std::string objectType;
386 
391  std::string permission;
392 
396  std::map<std::string, std::string> info;
397  };
398 } // end namespace gpudb
399 
400 namespace avro
401 {
402  template<> struct codec_traits<gpudb::GrantPermissionResponse>
403  {
404  static void encode(Encoder& e, const gpudb::GrantPermissionResponse& v)
405  {
406  ::avro::encode(e, v.principal);
407  ::avro::encode(e, v.object);
408  ::avro::encode(e, v.objectType);
409  ::avro::encode(e, v.permission);
410  ::avro::encode(e, v.info);
411  }
412 
413  static void decode(Decoder& d, gpudb::GrantPermissionResponse& v)
414  {
415  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
416  {
417  const std::vector<size_t> fo = rd->fieldOrder();
418 
419  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
420  {
421  switch (*it)
422  {
423  case 0:
424  ::avro::decode(d, v.principal);
425  break;
426 
427  case 1:
428  ::avro::decode(d, v.object);
429  break;
430 
431  case 2:
432  ::avro::decode(d, v.objectType);
433  break;
434 
435  case 3:
436  ::avro::decode(d, v.permission);
437  break;
438 
439  case 4:
440  ::avro::decode(d, v.info);
441  break;
442 
443  default:
444  break;
445  }
446  }
447  }
448  else
449  {
450  ::avro::decode(d, v.principal);
451  ::avro::decode(d, v.object);
452  ::avro::decode(d, v.objectType);
453  ::avro::decode(d, v.permission);
454  ::avro::decode(d, v.info);
455  }
456  }
457  };
458 } // end namespace avro
459 
460 #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.