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 
139  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_):
140  principal( principal_ ),
141  object( object_ ),
142  objectType( objectType_ ),
143  permission( permission_ ),
144  options( options_ )
145  {
146  }
147 
152  std::string principal;
153 
158  std::string object;
159 
190  std::string objectType;
191 
224  std::string permission;
225 
235  std::map<std::string, std::string> options;
236  };
237 } // end namespace gpudb
238 
239 namespace avro
240 {
241  template<> struct codec_traits<gpudb::RevokePermissionRequest>
242  {
243  static void encode(Encoder& e, const gpudb::RevokePermissionRequest& v)
244  {
245  ::avro::encode(e, v.principal);
246  ::avro::encode(e, v.object);
247  ::avro::encode(e, v.objectType);
248  ::avro::encode(e, v.permission);
249  ::avro::encode(e, v.options);
250  }
251 
252  static void decode(Decoder& d, gpudb::RevokePermissionRequest& v)
253  {
254  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
255  {
256  const std::vector<size_t> fo = rd->fieldOrder();
257 
258  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
259  {
260  switch (*it)
261  {
262  case 0:
263  ::avro::decode(d, v.principal);
264  break;
265 
266  case 1:
267  ::avro::decode(d, v.object);
268  break;
269 
270  case 2:
271  ::avro::decode(d, v.objectType);
272  break;
273 
274  case 3:
275  ::avro::decode(d, v.permission);
276  break;
277 
278  case 4:
279  ::avro::decode(d, v.options);
280  break;
281 
282  default:
283  break;
284  }
285  }
286  }
287  else
288  {
289  ::avro::decode(d, v.principal);
290  ::avro::decode(d, v.object);
291  ::avro::decode(d, v.objectType);
292  ::avro::decode(d, v.permission);
293  ::avro::decode(d, v.options);
294  }
295  }
296  };
297 } // end namespace avro
298 
299 namespace gpudb
300 {
307  {
313  principal(std::string()),
314  object(std::string()),
315  objectType(std::string()),
316  permission(std::string()),
317  info(std::map<std::string, std::string>())
318  {
319  }
320 
324  std::string principal;
325 
329  std::string object;
330 
335  std::string objectType;
336 
341  std::string permission;
342 
346  std::map<std::string, std::string> info;
347  };
348 } // end namespace gpudb
349 
350 namespace avro
351 {
352  template<> struct codec_traits<gpudb::RevokePermissionResponse>
353  {
354  static void encode(Encoder& e, const gpudb::RevokePermissionResponse& v)
355  {
356  ::avro::encode(e, v.principal);
357  ::avro::encode(e, v.object);
358  ::avro::encode(e, v.objectType);
359  ::avro::encode(e, v.permission);
360  ::avro::encode(e, v.info);
361  }
362 
363  static void decode(Decoder& d, gpudb::RevokePermissionResponse& v)
364  {
365  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
366  {
367  const std::vector<size_t> fo = rd->fieldOrder();
368 
369  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
370  {
371  switch (*it)
372  {
373  case 0:
374  ::avro::decode(d, v.principal);
375  break;
376 
377  case 1:
378  ::avro::decode(d, v.object);
379  break;
380 
381  case 2:
382  ::avro::decode(d, v.objectType);
383  break;
384 
385  case 3:
386  ::avro::decode(d, v.permission);
387  break;
388 
389  case 4:
390  ::avro::decode(d, v.info);
391  break;
392 
393  default:
394  break;
395  }
396  }
397  }
398  else
399  {
400  ::avro::decode(d, v.principal);
401  ::avro::decode(d, v.object);
402  ::avro::decode(d, v.objectType);
403  ::avro::decode(d, v.permission);
404  ::avro::decode(d, v.info);
405  }
406  }
407  };
408 } // end namespace avro
409 
410 #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.