GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
has_permission.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __HAS_PERMISSION_H__
7 #define __HAS_PERMISSION_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  principal(std::string()),
28  object(std::string()),
29  objectType(std::string()),
30  permission(std::string()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
117  HasPermissionRequest(const std::string& principal_, const std::string& object_, const std::string& objectType_, const std::string& permission_, const std::map<std::string, std::string>& options_):
118  principal( principal_ ),
119  object( object_ ),
120  objectType( objectType_ ),
121  permission( permission_ ),
122  options( options_ )
123  {
124  }
125 
126  std::string principal;
127  std::string object;
128  std::string objectType;
129  std::string permission;
130  std::map<std::string, std::string> options;
131  };
132 }
133 
134 namespace avro
135 {
136  template<> struct codec_traits<gpudb::HasPermissionRequest>
137  {
138  static void encode(Encoder& e, const gpudb::HasPermissionRequest& v)
139  {
140  ::avro::encode(e, v.principal);
141  ::avro::encode(e, v.object);
142  ::avro::encode(e, v.objectType);
143  ::avro::encode(e, v.permission);
144  ::avro::encode(e, v.options);
145  }
146 
147  static void decode(Decoder& d, gpudb::HasPermissionRequest& v)
148  {
149  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
150  {
151  const std::vector<size_t> fo = rd->fieldOrder();
152 
153  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
154  {
155  switch (*it)
156  {
157  case 0:
158  ::avro::decode(d, v.principal);
159  break;
160 
161  case 1:
162  ::avro::decode(d, v.object);
163  break;
164 
165  case 2:
166  ::avro::decode(d, v.objectType);
167  break;
168 
169  case 3:
170  ::avro::decode(d, v.permission);
171  break;
172 
173  case 4:
174  ::avro::decode(d, v.options);
175  break;
176 
177  default:
178  break;
179  }
180  }
181  }
182  else
183  {
184  ::avro::decode(d, v.principal);
185  ::avro::decode(d, v.object);
186  ::avro::decode(d, v.objectType);
187  ::avro::decode(d, v.permission);
188  ::avro::decode(d, v.options);
189  }
190  }
191  };
192 }
193 
194 namespace gpudb
195 {
196 
205  {
206 
212  principal(std::string()),
213  object(std::string()),
214  objectType(std::string()),
215  permission(std::string()),
216  hasPermission(bool()),
217  filters(std::map<std::string, std::string>()),
218  info(std::map<std::string, std::string>())
219  {
220  }
221 
222  std::string principal;
223  std::string object;
224  std::string objectType;
225  std::string permission;
227  std::map<std::string, std::string> filters;
228  std::map<std::string, std::string> info;
229  };
230 }
231 
232 namespace avro
233 {
234  template<> struct codec_traits<gpudb::HasPermissionResponse>
235  {
236  static void encode(Encoder& e, const gpudb::HasPermissionResponse& v)
237  {
238  ::avro::encode(e, v.principal);
239  ::avro::encode(e, v.object);
240  ::avro::encode(e, v.objectType);
241  ::avro::encode(e, v.permission);
242  ::avro::encode(e, v.hasPermission);
243  ::avro::encode(e, v.filters);
244  ::avro::encode(e, v.info);
245  }
246 
247  static void decode(Decoder& d, gpudb::HasPermissionResponse& v)
248  {
249  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
250  {
251  const std::vector<size_t> fo = rd->fieldOrder();
252 
253  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
254  {
255  switch (*it)
256  {
257  case 0:
258  ::avro::decode(d, v.principal);
259  break;
260 
261  case 1:
262  ::avro::decode(d, v.object);
263  break;
264 
265  case 2:
266  ::avro::decode(d, v.objectType);
267  break;
268 
269  case 3:
270  ::avro::decode(d, v.permission);
271  break;
272 
273  case 4:
274  ::avro::decode(d, v.hasPermission);
275  break;
276 
277  case 5:
278  ::avro::decode(d, v.filters);
279  break;
280 
281  case 6:
282  ::avro::decode(d, v.info);
283  break;
284 
285  default:
286  break;
287  }
288  }
289  }
290  else
291  {
292  ::avro::decode(d, v.principal);
293  ::avro::decode(d, v.object);
294  ::avro::decode(d, v.objectType);
295  ::avro::decode(d, v.permission);
296  ::avro::decode(d, v.hasPermission);
297  ::avro::decode(d, v.filters);
298  ::avro::decode(d, v.info);
299  }
300  }
301  };
302 }
303 
304 #endif
HasPermissionRequest()
Constructs a HasPermissionRequest object with default parameter values.
HasPermissionResponse()
Constructs a HasPermissionResponse object with default parameter values.
HasPermissionRequest(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 HasPermissionRequest object with the specified parameters.
A set of input parameters for const.
A set of output parameters for const.
std::map< std::string, std::string > info
std::map< std::string, std::string > filters
std::map< std::string, std::string > options