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 
150  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_):
151  principal( principal_ ),
152  object( object_ ),
153  objectType( objectType_ ),
154  permission( permission_ ),
155  options( options_ )
156  {
157  }
158 
163  std::string principal;
164 
169  std::string object;
170 
203  std::string objectType;
204 
242  std::string permission;
243 
253  std::map<std::string, std::string> options;
254  };
255 } // end namespace gpudb
256 
257 namespace avro
258 {
259  template<> struct codec_traits<gpudb::RevokePermissionRequest>
260  {
261  static void encode(Encoder& e, const gpudb::RevokePermissionRequest& v)
262  {
263  ::avro::encode(e, v.principal);
264  ::avro::encode(e, v.object);
265  ::avro::encode(e, v.objectType);
266  ::avro::encode(e, v.permission);
267  ::avro::encode(e, v.options);
268  }
269 
270  static void decode(Decoder& d, gpudb::RevokePermissionRequest& v)
271  {
272  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
273  {
274  const std::vector<size_t> fo = rd->fieldOrder();
275 
276  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
277  {
278  switch (*it)
279  {
280  case 0:
281  ::avro::decode(d, v.principal);
282  break;
283 
284  case 1:
285  ::avro::decode(d, v.object);
286  break;
287 
288  case 2:
289  ::avro::decode(d, v.objectType);
290  break;
291 
292  case 3:
293  ::avro::decode(d, v.permission);
294  break;
295 
296  case 4:
297  ::avro::decode(d, v.options);
298  break;
299 
300  default:
301  break;
302  }
303  }
304  }
305  else
306  {
307  ::avro::decode(d, v.principal);
308  ::avro::decode(d, v.object);
309  ::avro::decode(d, v.objectType);
310  ::avro::decode(d, v.permission);
311  ::avro::decode(d, v.options);
312  }
313  }
314  };
315 } // end namespace avro
316 
317 namespace gpudb
318 {
325  {
331  principal(std::string()),
332  object(std::string()),
333  objectType(std::string()),
334  permission(std::string()),
335  info(std::map<std::string, std::string>())
336  {
337  }
338 
342  std::string principal;
343 
347  std::string object;
348 
353  std::string objectType;
354 
359  std::string permission;
360 
364  std::map<std::string, std::string> info;
365  };
366 } // end namespace gpudb
367 
368 namespace avro
369 {
370  template<> struct codec_traits<gpudb::RevokePermissionResponse>
371  {
372  static void encode(Encoder& e, const gpudb::RevokePermissionResponse& v)
373  {
374  ::avro::encode(e, v.principal);
375  ::avro::encode(e, v.object);
376  ::avro::encode(e, v.objectType);
377  ::avro::encode(e, v.permission);
378  ::avro::encode(e, v.info);
379  }
380 
381  static void decode(Decoder& d, gpudb::RevokePermissionResponse& v)
382  {
383  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
384  {
385  const std::vector<size_t> fo = rd->fieldOrder();
386 
387  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
388  {
389  switch (*it)
390  {
391  case 0:
392  ::avro::decode(d, v.principal);
393  break;
394 
395  case 1:
396  ::avro::decode(d, v.object);
397  break;
398 
399  case 2:
400  ::avro::decode(d, v.objectType);
401  break;
402 
403  case 3:
404  ::avro::decode(d, v.permission);
405  break;
406 
407  case 4:
408  ::avro::decode(d, v.info);
409  break;
410 
411  default:
412  break;
413  }
414  }
415  }
416  else
417  {
418  ::avro::decode(d, v.principal);
419  ::avro::decode(d, v.object);
420  ::avro::decode(d, v.objectType);
421  ::avro::decode(d, v.permission);
422  ::avro::decode(d, v.info);
423  }
424  }
425  };
426 } // end namespace avro
427 
428 #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.