GPUdb C++ API  Version 7.2.3.0
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 
329  CreateDatasinkRequest(const std::string& name_, const std::string& destination_, const std::map<std::string, std::string>& options_):
330  name( name_ ),
331  destination( destination_ ),
332  options( options_ )
333  {
334  }
335 
339  std::string name;
340 
348  std::string destination;
349 
543  std::map<std::string, std::string> options;
544  };
545 } // end namespace gpudb
546 
547 namespace avro
548 {
549  template<> struct codec_traits<gpudb::CreateDatasinkRequest>
550  {
551  static void encode(Encoder& e, const gpudb::CreateDatasinkRequest& v)
552  {
553  ::avro::encode(e, v.name);
554  ::avro::encode(e, v.destination);
555  ::avro::encode(e, v.options);
556  }
557 
558  static void decode(Decoder& d, gpudb::CreateDatasinkRequest& v)
559  {
560  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
561  {
562  const std::vector<size_t> fo = rd->fieldOrder();
563 
564  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
565  {
566  switch (*it)
567  {
568  case 0:
569  ::avro::decode(d, v.name);
570  break;
571 
572  case 1:
573  ::avro::decode(d, v.destination);
574  break;
575 
576  case 2:
577  ::avro::decode(d, v.options);
578  break;
579 
580  default:
581  break;
582  }
583  }
584  }
585  else
586  {
587  ::avro::decode(d, v.name);
588  ::avro::decode(d, v.destination);
589  ::avro::decode(d, v.options);
590  }
591  }
592  };
593 } // end namespace avro
594 
595 namespace gpudb
596 {
603  {
608  name(std::string()),
609  info(std::map<std::string, std::string>())
610  {
611  }
612 
616  std::string name;
617 
621  std::map<std::string, std::string> info;
622  };
623 } // end namespace gpudb
624 
625 namespace avro
626 {
627  template<> struct codec_traits<gpudb::CreateDatasinkResponse>
628  {
629  static void encode(Encoder& e, const gpudb::CreateDatasinkResponse& v)
630  {
631  ::avro::encode(e, v.name);
632  ::avro::encode(e, v.info);
633  }
634 
635  static void decode(Decoder& d, gpudb::CreateDatasinkResponse& v)
636  {
637  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
638  {
639  const std::vector<size_t> fo = rd->fieldOrder();
640 
641  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
642  {
643  switch (*it)
644  {
645  case 0:
646  ::avro::decode(d, v.name);
647  break;
648 
649  case 1:
650  ::avro::decode(d, v.info);
651  break;
652 
653  default:
654  break;
655  }
656  }
657  }
658  else
659  {
660  ::avro::decode(d, v.name);
661  ::avro::decode(d, v.info);
662  }
663  }
664  };
665 } // end namespace avro
666 
667 #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.