GPUdb C++ API  Version 7.2.3.0
revoke_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 __REVOKE_PERMISSION_H__
7 #define __REVOKE_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 
147  RevokePermissionRequest(const std::string& principal_, const std::string& object_, const std::string& objectType_, const std::string& permission_, const std::map<std::string, std::string>& options_):
148  principal( principal_ ),
149  object( object_ ),
150  objectType( objectType_ ),
151  permission( permission_ ),
152  options( options_ )
153  {
154  }
155 
160  std::string principal;
161 
166  std::string object;
167 
198  std::string objectType;
199 
237  std::string permission;
238 
248  std::map<std::string, std::string> options;
249  };
250 } // end namespace gpudb
251 
252 namespace avro
253 {
254  template<> struct codec_traits<gpudb::RevokePermissionRequest>
255  {
256  static void encode(Encoder& e, const gpudb::RevokePermissionRequest& v)
257  {
258  ::avro::encode(e, v.principal);
259  ::avro::encode(e, v.object);
260  ::avro::encode(e, v.objectType);
261  ::avro::encode(e, v.permission);
262  ::avro::encode(e, v.options);
263  }
264 
265  static void decode(Decoder& d, gpudb::RevokePermissionRequest& v)
266  {
267  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
268  {
269  const std::vector<size_t> fo = rd->fieldOrder();
270 
271  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
272  {
273  switch (*it)
274  {
275  case 0:
276  ::avro::decode(d, v.principal);
277  break;
278 
279  case 1:
280  ::avro::decode(d, v.object);
281  break;
282 
283  case 2:
284  ::avro::decode(d, v.objectType);
285  break;
286 
287  case 3:
288  ::avro::decode(d, v.permission);
289  break;
290 
291  case 4:
292  ::avro::decode(d, v.options);
293  break;
294 
295  default:
296  break;
297  }
298  }
299  }
300  else
301  {
302  ::avro::decode(d, v.principal);
303  ::avro::decode(d, v.object);
304  ::avro::decode(d, v.objectType);
305  ::avro::decode(d, v.permission);
306  ::avro::decode(d, v.options);
307  }
308  }
309  };
310 } // end namespace avro
311 
312 namespace gpudb
313 {
320  {
326  principal(std::string()),
327  object(std::string()),
328  objectType(std::string()),
329  permission(std::string()),
330  info(std::map<std::string, std::string>())
331  {
332  }
333 
337  std::string principal;
338 
342  std::string object;
343 
348  std::string objectType;
349 
354  std::string permission;
355 
359  std::map<std::string, std::string> info;
360  };
361 } // end namespace gpudb
362 
363 namespace avro
364 {
365  template<> struct codec_traits<gpudb::RevokePermissionResponse>
366  {
367  static void encode(Encoder& e, const gpudb::RevokePermissionResponse& v)
368  {
369  ::avro::encode(e, v.principal);
370  ::avro::encode(e, v.object);
371  ::avro::encode(e, v.objectType);
372  ::avro::encode(e, v.permission);
373  ::avro::encode(e, v.info);
374  }
375 
376  static void decode(Decoder& d, gpudb::RevokePermissionResponse& v)
377  {
378  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
379  {
380  const std::vector<size_t> fo = rd->fieldOrder();
381 
382  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
383  {
384  switch (*it)
385  {
386  case 0:
387  ::avro::decode(d, v.principal);
388  break;
389 
390  case 1:
391  ::avro::decode(d, v.object);
392  break;
393 
394  case 2:
395  ::avro::decode(d, v.objectType);
396  break;
397 
398  case 3:
399  ::avro::decode(d, v.permission);
400  break;
401 
402  case 4:
403  ::avro::decode(d, v.info);
404  break;
405 
406  default:
407  break;
408  }
409  }
410  }
411  else
412  {
413  ::avro::decode(d, v.principal);
414  ::avro::decode(d, v.object);
415  ::avro::decode(d, v.objectType);
416  ::avro::decode(d, v.permission);
417  ::avro::decode(d, v.info);
418  }
419  }
420  };
421 } // end namespace avro
422 
423 #endif // __REVOKE_PERMISSION_H__
std::string objectType
The type of object being revoked.
std::map< std::string, std::string > info
Additional information.
RevokePermissionRequest(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 RevokePermissionRequest object with the specified parameters.
RevokePermissionRequest()
Constructs a RevokePermissionRequest object with default parameters.
A set of results returned by GPUdb::revokePermission.
std::string principal
Value of principal.
std::string object
Name of object permission is being revoked from.
std::string object
Value of object.
std::map< std::string, std::string > options
Optional parameters.
RevokePermissionResponse()
Constructs a RevokePermissionResponse object with default parameters.
std::string permission
Permission being revoked.
std::string permission
Value of permission.
std::string objectType
Value of objectType.
std::string principal
Name of the user or role for which the permission is being revoked.
A set of parameters for GPUdb::revokePermission.