GPUdb C++ API  Version 7.0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_type.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_TYPE_H__
7 #define __CREATE_TYPE_H__
8 
9 namespace gpudb
10 {
11 
58  {
59 
64  typeDefinition(std::string()),
65  label(std::string()),
66  properties(std::map<std::string, std::vector<std::string> >()),
67  options(std::map<std::string, std::string>())
68  {
69  }
70 
273  CreateTypeRequest(const std::string& typeDefinition_, const std::string& label_, const std::map<std::string, std::vector<std::string> >& properties_, const std::map<std::string, std::string>& options_):
274  typeDefinition( typeDefinition_ ),
275  label( label_ ),
276  properties( properties_ ),
277  options( options_ )
278  {
279  }
280 
281  std::string typeDefinition;
282  std::string label;
283  std::map<std::string, std::vector<std::string> > properties;
284  std::map<std::string, std::string> options;
285  };
286 }
287 
288 namespace avro
289 {
290  template<> struct codec_traits<gpudb::CreateTypeRequest>
291  {
292  static void encode(Encoder& e, const gpudb::CreateTypeRequest& v)
293  {
294  ::avro::encode(e, v.typeDefinition);
295  ::avro::encode(e, v.label);
296  ::avro::encode(e, v.properties);
297  ::avro::encode(e, v.options);
298  }
299 
300  static void decode(Decoder& d, gpudb::CreateTypeRequest& v)
301  {
302  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
303  {
304  const std::vector<size_t> fo = rd->fieldOrder();
305 
306  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
307  {
308  switch (*it)
309  {
310  case 0:
311  ::avro::decode(d, v.typeDefinition);
312  break;
313 
314  case 1:
315  ::avro::decode(d, v.label);
316  break;
317 
318  case 2:
319  ::avro::decode(d, v.properties);
320  break;
321 
322  case 3:
323  ::avro::decode(d, v.options);
324  break;
325 
326  default:
327  break;
328  }
329  }
330  }
331  else
332  {
333  ::avro::decode(d, v.typeDefinition);
334  ::avro::decode(d, v.label);
335  ::avro::decode(d, v.properties);
336  ::avro::decode(d, v.options);
337  }
338  }
339  };
340 }
341 
342 namespace gpudb
343 {
344 
391  {
392 
398  typeId(std::string()),
399  typeDefinition(std::string()),
400  label(std::string()),
401  properties(std::map<std::string, std::vector<std::string> >()),
402  info(std::map<std::string, std::string>())
403  {
404  }
405 
406  std::string typeId;
407  std::string typeDefinition;
408  std::string label;
409  std::map<std::string, std::vector<std::string> > properties;
410  std::map<std::string, std::string> info;
411  };
412 }
413 
414 namespace avro
415 {
416  template<> struct codec_traits<gpudb::CreateTypeResponse>
417  {
418  static void encode(Encoder& e, const gpudb::CreateTypeResponse& v)
419  {
420  ::avro::encode(e, v.typeId);
421  ::avro::encode(e, v.typeDefinition);
422  ::avro::encode(e, v.label);
423  ::avro::encode(e, v.properties);
424  ::avro::encode(e, v.info);
425  }
426 
427  static void decode(Decoder& d, gpudb::CreateTypeResponse& v)
428  {
429  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
430  {
431  const std::vector<size_t> fo = rd->fieldOrder();
432 
433  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
434  {
435  switch (*it)
436  {
437  case 0:
438  ::avro::decode(d, v.typeId);
439  break;
440 
441  case 1:
442  ::avro::decode(d, v.typeDefinition);
443  break;
444 
445  case 2:
446  ::avro::decode(d, v.label);
447  break;
448 
449  case 3:
450  ::avro::decode(d, v.properties);
451  break;
452 
453  case 4:
454  ::avro::decode(d, v.info);
455  break;
456 
457  default:
458  break;
459  }
460  }
461  }
462  else
463  {
464  ::avro::decode(d, v.typeId);
465  ::avro::decode(d, v.typeDefinition);
466  ::avro::decode(d, v.label);
467  ::avro::decode(d, v.properties);
468  ::avro::decode(d, v.info);
469  }
470  }
471  };
472 }
473 
474 #endif
std::map< std::string, std::vector< std::string > > properties
Definition: create_type.h:283
std::string typeDefinition
Definition: create_type.h:281
std::map< std::string, std::string > info
Definition: create_type.h:410
CreateTypeRequest(const std::string &typeDefinition_, const std::string &label_, const std::map< std::string, std::vector< std::string > > &properties_, const std::map< std::string, std::string > &options_)
Constructs a CreateTypeRequest object with the specified parameters.
Definition: create_type.h:273
A set of input parameters for const.
Definition: create_type.h:57
A set of output parameters for const.
Definition: create_type.h:390
CreateTypeRequest()
Constructs a CreateTypeRequest object with default parameter values.
Definition: create_type.h:63
std::map< std::string, std::string > options
Definition: create_type.h:284
CreateTypeResponse()
Constructs a CreateTypeResponse object with default parameter values.
Definition: create_type.h:397
std::map< std::string, std::vector< std::string > > properties
Definition: create_type.h:409