GPUdb C++ API  Version 7.2.2.4
create_datasink.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 __CREATE_DATASINK_H__
7 #define __CREATE_DATASINK_H__
8 
9 namespace gpudb
10 {
21  {
26  name(std::string()),
27  destination(std::string()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
306  CreateDatasinkRequest(const std::string& name_, const std::string& destination_, const std::map<std::string, std::string>& options_):
307  name( name_ ),
308  destination( destination_ ),
309  options( options_ )
310  {
311  }
312 
316  std::string name;
317 
325  std::string destination;
326 
505  std::map<std::string, std::string> options;
506  };
507 } // end namespace gpudb
508 
509 namespace avro
510 {
511  template<> struct codec_traits<gpudb::CreateDatasinkRequest>
512  {
513  static void encode(Encoder& e, const gpudb::CreateDatasinkRequest& v)
514  {
515  ::avro::encode(e, v.name);
516  ::avro::encode(e, v.destination);
517  ::avro::encode(e, v.options);
518  }
519 
520  static void decode(Decoder& d, gpudb::CreateDatasinkRequest& v)
521  {
522  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
523  {
524  const std::vector<size_t> fo = rd->fieldOrder();
525 
526  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
527  {
528  switch (*it)
529  {
530  case 0:
531  ::avro::decode(d, v.name);
532  break;
533 
534  case 1:
535  ::avro::decode(d, v.destination);
536  break;
537 
538  case 2:
539  ::avro::decode(d, v.options);
540  break;
541 
542  default:
543  break;
544  }
545  }
546  }
547  else
548  {
549  ::avro::decode(d, v.name);
550  ::avro::decode(d, v.destination);
551  ::avro::decode(d, v.options);
552  }
553  }
554  };
555 } // end namespace avro
556 
557 namespace gpudb
558 {
565  {
570  name(std::string()),
571  info(std::map<std::string, std::string>())
572  {
573  }
574 
578  std::string name;
579 
583  std::map<std::string, std::string> info;
584  };
585 } // end namespace gpudb
586 
587 namespace avro
588 {
589  template<> struct codec_traits<gpudb::CreateDatasinkResponse>
590  {
591  static void encode(Encoder& e, const gpudb::CreateDatasinkResponse& v)
592  {
593  ::avro::encode(e, v.name);
594  ::avro::encode(e, v.info);
595  }
596 
597  static void decode(Decoder& d, gpudb::CreateDatasinkResponse& v)
598  {
599  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
600  {
601  const std::vector<size_t> fo = rd->fieldOrder();
602 
603  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
604  {
605  switch (*it)
606  {
607  case 0:
608  ::avro::decode(d, v.name);
609  break;
610 
611  case 1:
612  ::avro::decode(d, v.info);
613  break;
614 
615  default:
616  break;
617  }
618  }
619  }
620  else
621  {
622  ::avro::decode(d, v.name);
623  ::avro::decode(d, v.info);
624  }
625  }
626  };
627 } // end namespace avro
628 
629 #endif // __CREATE_DATASINK_H__
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.
std::string name
Name of the data sink to be created.
A set of parameters for GPUdb::createDatasink.
A set of results returned by GPUdb::createDatasink.
std::string name
Value of name.
std::string destination
Destination for the output data in format 'storage_provider_type://path[:port]'.
CreateDatasinkRequest()
Constructs a CreateDatasinkRequest object with default parameters.
std::map< std::string, std::string > info
Additional information.
CreateDatasinkResponse()
Constructs a CreateDatasinkResponse object with default parameters.
std::map< std::string, std::string > options
Optional parameters.