GPUdb C++ API  Version 7.2.2.4
grant_permission_table.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_TABLE_H__
7 #define __GRANT_PERMISSION_TABLE_H__
8 
9 namespace gpudb
10 {
19  {
25  name(std::string()),
26  permission(std::string()),
27  tableName(std::string()),
28  filterExpression(std::string()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
87  GrantPermissionTableRequest(const std::string& name_, const std::string& permission_, const std::string& tableName_, const std::string& filterExpression_, const std::map<std::string, std::string>& options_):
88  name( name_ ),
89  permission( permission_ ),
90  tableName( tableName_ ),
91  filterExpression( filterExpression_ ),
92  options( options_ )
93  {
94  }
95 
100  std::string name;
101 
123  std::string permission;
124 
133  std::string tableName;
134 
139  std::string filterExpression;
140 
150  std::map<std::string, std::string> options;
151  };
152 } // end namespace gpudb
153 
154 namespace avro
155 {
156  template<> struct codec_traits<gpudb::GrantPermissionTableRequest>
157  {
158  static void encode(Encoder& e, const gpudb::GrantPermissionTableRequest& v)
159  {
160  ::avro::encode(e, v.name);
161  ::avro::encode(e, v.permission);
162  ::avro::encode(e, v.tableName);
163  ::avro::encode(e, v.filterExpression);
164  ::avro::encode(e, v.options);
165  }
166 
167  static void decode(Decoder& d, gpudb::GrantPermissionTableRequest& v)
168  {
169  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
170  {
171  const std::vector<size_t> fo = rd->fieldOrder();
172 
173  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
174  {
175  switch (*it)
176  {
177  case 0:
178  ::avro::decode(d, v.name);
179  break;
180 
181  case 1:
182  ::avro::decode(d, v.permission);
183  break;
184 
185  case 2:
186  ::avro::decode(d, v.tableName);
187  break;
188 
189  case 3:
190  ::avro::decode(d, v.filterExpression);
191  break;
192 
193  case 4:
194  ::avro::decode(d, v.options);
195  break;
196 
197  default:
198  break;
199  }
200  }
201  }
202  else
203  {
204  ::avro::decode(d, v.name);
205  ::avro::decode(d, v.permission);
206  ::avro::decode(d, v.tableName);
207  ::avro::decode(d, v.filterExpression);
208  ::avro::decode(d, v.options);
209  }
210  }
211  };
212 } // end namespace avro
213 
214 namespace gpudb
215 {
222  {
228  name(std::string()),
229  permission(std::string()),
230  tableName(std::string()),
231  filterExpression(std::string()),
232  info(std::map<std::string, std::string>())
233  {
234  }
235 
239  std::string name;
240 
245  std::string permission;
246 
251  std::string tableName;
252 
257  std::string filterExpression;
258 
262  std::map<std::string, std::string> info;
263  };
264 } // end namespace gpudb
265 
266 namespace avro
267 {
268  template<> struct codec_traits<gpudb::GrantPermissionTableResponse>
269  {
270  static void encode(Encoder& e, const gpudb::GrantPermissionTableResponse& v)
271  {
272  ::avro::encode(e, v.name);
273  ::avro::encode(e, v.permission);
274  ::avro::encode(e, v.tableName);
275  ::avro::encode(e, v.filterExpression);
276  ::avro::encode(e, v.info);
277  }
278 
279  static void decode(Decoder& d, gpudb::GrantPermissionTableResponse& v)
280  {
281  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
282  {
283  const std::vector<size_t> fo = rd->fieldOrder();
284 
285  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
286  {
287  switch (*it)
288  {
289  case 0:
290  ::avro::decode(d, v.name);
291  break;
292 
293  case 1:
294  ::avro::decode(d, v.permission);
295  break;
296 
297  case 2:
298  ::avro::decode(d, v.tableName);
299  break;
300 
301  case 3:
302  ::avro::decode(d, v.filterExpression);
303  break;
304 
305  case 4:
306  ::avro::decode(d, v.info);
307  break;
308 
309  default:
310  break;
311  }
312  }
313  }
314  else
315  {
316  ::avro::decode(d, v.name);
317  ::avro::decode(d, v.permission);
318  ::avro::decode(d, v.tableName);
319  ::avro::decode(d, v.filterExpression);
320  ::avro::decode(d, v.info);
321  }
322  }
323  };
324 } // end namespace avro
325 
326 #endif // __GRANT_PERMISSION_TABLE_H__
std::string filterExpression
Optional filter expression to apply to this grant.
GrantPermissionTableRequest()
Constructs a GrantPermissionTableRequest object with default parameters.
std::map< std::string, std::string > info
Additional information.
std::string name
Name of the user or role to which the permission will be granted.
A set of results returned by GPUdb::grantPermissionTable.
GrantPermissionTableRequest(const std::string &name_, const std::string &permission_, const std::string &tableName_, const std::string &filterExpression_, const std::map< std::string, std::string > &options_)
Constructs a GrantPermissionTableRequest object with the specified parameters.
std::map< std::string, std::string > options
Optional parameters.
std::string filterExpression
Value of filterExpression.
GrantPermissionTableResponse()
Constructs a GrantPermissionTableResponse object with default parameters.
std::string tableName
Name of the table to which the permission grants access, in [ schema_name. ]table_name format,...
std::string tableName
Value of tableName.
std::string permission
Permission to grant to the user or role.
A set of parameters for GPUdb::grantPermissionTable.
std::string permission
Value of permission.