GPUdb C++ API  Version 7.2.2.4
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 
143  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_):
144  principal( principal_ ),
145  object( object_ ),
146  objectType( objectType_ ),
147  permission( permission_ ),
148  options( options_ )
149  {
150  }
151 
156  std::string principal;
157 
162  std::string object;
163 
194  std::string objectType;
195 
231  std::string permission;
232 
242  std::map<std::string, std::string> options;
243  };
244 } // end namespace gpudb
245 
246 namespace avro
247 {
248  template<> struct codec_traits<gpudb::RevokePermissionRequest>
249  {
250  static void encode(Encoder& e, const gpudb::RevokePermissionRequest& v)
251  {
252  ::avro::encode(e, v.principal);
253  ::avro::encode(e, v.object);
254  ::avro::encode(e, v.objectType);
255  ::avro::encode(e, v.permission);
256  ::avro::encode(e, v.options);
257  }
258 
259  static void decode(Decoder& d, gpudb::RevokePermissionRequest& v)
260  {
261  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
262  {
263  const std::vector<size_t> fo = rd->fieldOrder();
264 
265  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
266  {
267  switch (*it)
268  {
269  case 0:
270  ::avro::decode(d, v.principal);
271  break;
272 
273  case 1:
274  ::avro::decode(d, v.object);
275  break;
276 
277  case 2:
278  ::avro::decode(d, v.objectType);
279  break;
280 
281  case 3:
282  ::avro::decode(d, v.permission);
283  break;
284 
285  case 4:
286  ::avro::decode(d, v.options);
287  break;
288 
289  default:
290  break;
291  }
292  }
293  }
294  else
295  {
296  ::avro::decode(d, v.principal);
297  ::avro::decode(d, v.object);
298  ::avro::decode(d, v.objectType);
299  ::avro::decode(d, v.permission);
300  ::avro::decode(d, v.options);
301  }
302  }
303  };
304 } // end namespace avro
305 
306 namespace gpudb
307 {
314  {
320  principal(std::string()),
321  object(std::string()),
322  objectType(std::string()),
323  permission(std::string()),
324  info(std::map<std::string, std::string>())
325  {
326  }
327 
331  std::string principal;
332 
336  std::string object;
337 
342  std::string objectType;
343 
348  std::string permission;
349 
353  std::map<std::string, std::string> info;
354  };
355 } // end namespace gpudb
356 
357 namespace avro
358 {
359  template<> struct codec_traits<gpudb::RevokePermissionResponse>
360  {
361  static void encode(Encoder& e, const gpudb::RevokePermissionResponse& v)
362  {
363  ::avro::encode(e, v.principal);
364  ::avro::encode(e, v.object);
365  ::avro::encode(e, v.objectType);
366  ::avro::encode(e, v.permission);
367  ::avro::encode(e, v.info);
368  }
369 
370  static void decode(Decoder& d, gpudb::RevokePermissionResponse& v)
371  {
372  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
373  {
374  const std::vector<size_t> fo = rd->fieldOrder();
375 
376  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
377  {
378  switch (*it)
379  {
380  case 0:
381  ::avro::decode(d, v.principal);
382  break;
383 
384  case 1:
385  ::avro::decode(d, v.object);
386  break;
387 
388  case 2:
389  ::avro::decode(d, v.objectType);
390  break;
391 
392  case 3:
393  ::avro::decode(d, v.permission);
394  break;
395 
396  case 4:
397  ::avro::decode(d, v.info);
398  break;
399 
400  default:
401  break;
402  }
403  }
404  }
405  else
406  {
407  ::avro::decode(d, v.principal);
408  ::avro::decode(d, v.object);
409  ::avro::decode(d, v.objectType);
410  ::avro::decode(d, v.permission);
411  ::avro::decode(d, v.info);
412  }
413  }
414  };
415 } // end namespace avro
416 
417 #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.