GPUdb C++ API  Version 7.2.3.0
create_datasource.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_DATASOURCE_H__
7 #define __CREATE_DATASOURCE_H__
8 
9 namespace gpudb
10 {
21  {
26  name(std::string()),
27  location(std::string()),
28  userName(std::string()),
29  password(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
361  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_):
362  name( name_ ),
363  location( location_ ),
364  userName( userName_ ),
365  password( password_ ),
366  options( options_ )
367  {
368  }
369 
373  std::string name;
374 
382  std::string location;
383 
387  std::string userName;
388 
392  std::string password;
393 
611  std::map<std::string, std::string> options;
612  };
613 } // end namespace gpudb
614 
615 namespace avro
616 {
617  template<> struct codec_traits<gpudb::CreateDatasourceRequest>
618  {
619  static void encode(Encoder& e, const gpudb::CreateDatasourceRequest& v)
620  {
621  ::avro::encode(e, v.name);
622  ::avro::encode(e, v.location);
623  ::avro::encode(e, v.userName);
624  ::avro::encode(e, v.password);
625  ::avro::encode(e, v.options);
626  }
627 
628  static void decode(Decoder& d, gpudb::CreateDatasourceRequest& v)
629  {
630  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
631  {
632  const std::vector<size_t> fo = rd->fieldOrder();
633 
634  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
635  {
636  switch (*it)
637  {
638  case 0:
639  ::avro::decode(d, v.name);
640  break;
641 
642  case 1:
643  ::avro::decode(d, v.location);
644  break;
645 
646  case 2:
647  ::avro::decode(d, v.userName);
648  break;
649 
650  case 3:
651  ::avro::decode(d, v.password);
652  break;
653 
654  case 4:
655  ::avro::decode(d, v.options);
656  break;
657 
658  default:
659  break;
660  }
661  }
662  }
663  else
664  {
665  ::avro::decode(d, v.name);
666  ::avro::decode(d, v.location);
667  ::avro::decode(d, v.userName);
668  ::avro::decode(d, v.password);
669  ::avro::decode(d, v.options);
670  }
671  }
672  };
673 } // end namespace avro
674 
675 namespace gpudb
676 {
683  {
689  name(std::string()),
690  info(std::map<std::string, std::string>())
691  {
692  }
693 
697  std::string name;
698 
702  std::map<std::string, std::string> info;
703  };
704 } // end namespace gpudb
705 
706 namespace avro
707 {
708  template<> struct codec_traits<gpudb::CreateDatasourceResponse>
709  {
710  static void encode(Encoder& e, const gpudb::CreateDatasourceResponse& v)
711  {
712  ::avro::encode(e, v.name);
713  ::avro::encode(e, v.info);
714  }
715 
716  static void decode(Decoder& d, gpudb::CreateDatasourceResponse& v)
717  {
718  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
719  {
720  const std::vector<size_t> fo = rd->fieldOrder();
721 
722  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
723  {
724  switch (*it)
725  {
726  case 0:
727  ::avro::decode(d, v.name);
728  break;
729 
730  case 1:
731  ::avro::decode(d, v.info);
732  break;
733 
734  default:
735  break;
736  }
737  }
738  }
739  else
740  {
741  ::avro::decode(d, v.name);
742  ::avro::decode(d, v.info);
743  }
744  }
745  };
746 } // end namespace avro
747 
748 #endif // __CREATE_DATASOURCE_H__
A set of parameters for GPUdb::createDatasource.
A set of results returned by GPUdb::createDatasource.
std::map< std::string, std::string > info
Additional information.
std::string location
Location of the remote storage in 'storage_provider_type://[storage_path[:storage_port]]' format.
CreateDatasourceRequest()
Constructs a CreateDatasourceRequest object with default parameters.
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
Optional parameters.
std::string userName
Name of the remote system user; may be an empty string.
std::string name
Value of name.
CreateDatasourceResponse()
Constructs a CreateDatasourceResponse object with default parameters.
std::string password
Password for the remote system user; may be an empty string.
std::string name
Name of the data source to be created.