GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_datasink.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_DATASINK_H__
7 #define __CREATE_DATASINK_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  name(std::string()),
30  destination(std::string()),
31  options(std::map<std::string, std::string>())
32  {
33  }
34 
218  CreateDatasinkRequest(const std::string& name_, const std::string& destination_, const std::map<std::string, std::string>& options_):
219  name( name_ ),
220  destination( destination_ ),
221  options( options_ )
222  {
223  }
224 
225  std::string name;
226  std::string destination;
227  std::map<std::string, std::string> options;
228  };
229 }
230 
231 namespace avro
232 {
233  template<> struct codec_traits<gpudb::CreateDatasinkRequest>
234  {
235  static void encode(Encoder& e, const gpudb::CreateDatasinkRequest& v)
236  {
237  ::avro::encode(e, v.name);
238  ::avro::encode(e, v.destination);
239  ::avro::encode(e, v.options);
240  }
241 
242  static void decode(Decoder& d, gpudb::CreateDatasinkRequest& v)
243  {
244  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
245  {
246  const std::vector<size_t> fo = rd->fieldOrder();
247 
248  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
249  {
250  switch (*it)
251  {
252  case 0:
253  ::avro::decode(d, v.name);
254  break;
255 
256  case 1:
257  ::avro::decode(d, v.destination);
258  break;
259 
260  case 2:
261  ::avro::decode(d, v.options);
262  break;
263 
264  default:
265  break;
266  }
267  }
268  }
269  else
270  {
271  ::avro::decode(d, v.name);
272  ::avro::decode(d, v.destination);
273  ::avro::decode(d, v.options);
274  }
275  }
276  };
277 }
278 
279 namespace gpudb
280 {
281 
292  {
293 
299  name(std::string()),
300  info(std::map<std::string, std::string>())
301  {
302  }
303 
304  std::string name;
305  std::map<std::string, std::string> info;
306  };
307 }
308 
309 namespace avro
310 {
311  template<> struct codec_traits<gpudb::CreateDatasinkResponse>
312  {
313  static void encode(Encoder& e, const gpudb::CreateDatasinkResponse& v)
314  {
315  ::avro::encode(e, v.name);
316  ::avro::encode(e, v.info);
317  }
318 
319  static void decode(Decoder& d, gpudb::CreateDatasinkResponse& v)
320  {
321  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
322  {
323  const std::vector<size_t> fo = rd->fieldOrder();
324 
325  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
326  {
327  switch (*it)
328  {
329  case 0:
330  ::avro::decode(d, v.name);
331  break;
332 
333  case 1:
334  ::avro::decode(d, v.info);
335  break;
336 
337  default:
338  break;
339  }
340  }
341  }
342  else
343  {
344  ::avro::decode(d, v.name);
345  ::avro::decode(d, v.info);
346  }
347  }
348  };
349 }
350 
351 #endif
CreateDatasinkRequest(const std::string &name_, const std::string &destination_, const std::map< std::string, std::string > &options_)
Constructs a CreateDatasinkRequest object with the specified parameters.
A set of input parameters for const.
A set of output parameters for const.
CreateDatasinkRequest()
Constructs a CreateDatasinkRequest object with default parameter values.
std::map< std::string, std::string > info
CreateDatasinkResponse()
Constructs a CreateDatasinkResponse object with default parameter values.
std::map< std::string, std::string > options