GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_datasource.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 __CREATE_DATASOURCE_H__
7 #define __CREATE_DATASOURCE_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  name(std::string()),
30  location(std::string()),
31  userName(std::string()),
32  password(std::string()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
238  CreateDatasourceRequest(const std::string& name_, const std::string& location_, const std::string& userName_, const std::string& password_, const std::map<std::string, std::string>& options_):
239  name( name_ ),
240  location( location_ ),
241  userName( userName_ ),
242  password( password_ ),
243  options( options_ )
244  {
245  }
246 
247  std::string name;
248  std::string location;
249  std::string userName;
250  std::string password;
251  std::map<std::string, std::string> options;
252  };
253 }
254 
255 namespace avro
256 {
257  template<> struct codec_traits<gpudb::CreateDatasourceRequest>
258  {
259  static void encode(Encoder& e, const gpudb::CreateDatasourceRequest& v)
260  {
261  ::avro::encode(e, v.name);
262  ::avro::encode(e, v.location);
263  ::avro::encode(e, v.userName);
264  ::avro::encode(e, v.password);
265  ::avro::encode(e, v.options);
266  }
267 
268  static void decode(Decoder& d, gpudb::CreateDatasourceRequest& v)
269  {
270  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
271  {
272  const std::vector<size_t> fo = rd->fieldOrder();
273 
274  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
275  {
276  switch (*it)
277  {
278  case 0:
279  ::avro::decode(d, v.name);
280  break;
281 
282  case 1:
283  ::avro::decode(d, v.location);
284  break;
285 
286  case 2:
287  ::avro::decode(d, v.userName);
288  break;
289 
290  case 3:
291  ::avro::decode(d, v.password);
292  break;
293 
294  case 4:
295  ::avro::decode(d, v.options);
296  break;
297 
298  default:
299  break;
300  }
301  }
302  }
303  else
304  {
305  ::avro::decode(d, v.name);
306  ::avro::decode(d, v.location);
307  ::avro::decode(d, v.userName);
308  ::avro::decode(d, v.password);
309  ::avro::decode(d, v.options);
310  }
311  }
312  };
313 }
314 
315 namespace gpudb
316 {
317 
328  {
329 
335  name(std::string()),
336  info(std::map<std::string, std::string>())
337  {
338  }
339 
340  std::string name;
341  std::map<std::string, std::string> info;
342  };
343 }
344 
345 namespace avro
346 {
347  template<> struct codec_traits<gpudb::CreateDatasourceResponse>
348  {
349  static void encode(Encoder& e, const gpudb::CreateDatasourceResponse& v)
350  {
351  ::avro::encode(e, v.name);
352  ::avro::encode(e, v.info);
353  }
354 
355  static void decode(Decoder& d, gpudb::CreateDatasourceResponse& v)
356  {
357  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
358  {
359  const std::vector<size_t> fo = rd->fieldOrder();
360 
361  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
362  {
363  switch (*it)
364  {
365  case 0:
366  ::avro::decode(d, v.name);
367  break;
368 
369  case 1:
370  ::avro::decode(d, v.info);
371  break;
372 
373  default:
374  break;
375  }
376  }
377  }
378  else
379  {
380  ::avro::decode(d, v.name);
381  ::avro::decode(d, v.info);
382  }
383  }
384  };
385 }
386 
387 #endif
A set of input parameters for const.
A set of output parameters for const.
std::map< std::string, std::string > info
CreateDatasourceRequest()
Constructs a CreateDatasourceRequest object with default parameter values.
CreateDatasourceRequest(const std::string &name_, const std::string &location_, const std::string &userName_, const std::string &password_, const std::map< std::string, std::string > &options_)
Constructs a CreateDatasourceRequest object with the specified parameters.
std::map< std::string, std::string > options
CreateDatasourceResponse()
Constructs a CreateDatasourceResponse object with default parameter values.