GPUdb C++ API  Version 7.2.2.4
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 
338  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_):
339  name( name_ ),
340  location( location_ ),
341  userName( userName_ ),
342  password( password_ ),
343  options( options_ )
344  {
345  }
346 
350  std::string name;
351 
359  std::string location;
360 
364  std::string userName;
365 
369  std::string password;
370 
573  std::map<std::string, std::string> options;
574  };
575 } // end namespace gpudb
576 
577 namespace avro
578 {
579  template<> struct codec_traits<gpudb::CreateDatasourceRequest>
580  {
581  static void encode(Encoder& e, const gpudb::CreateDatasourceRequest& v)
582  {
583  ::avro::encode(e, v.name);
584  ::avro::encode(e, v.location);
585  ::avro::encode(e, v.userName);
586  ::avro::encode(e, v.password);
587  ::avro::encode(e, v.options);
588  }
589 
590  static void decode(Decoder& d, gpudb::CreateDatasourceRequest& v)
591  {
592  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
593  {
594  const std::vector<size_t> fo = rd->fieldOrder();
595 
596  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
597  {
598  switch (*it)
599  {
600  case 0:
601  ::avro::decode(d, v.name);
602  break;
603 
604  case 1:
605  ::avro::decode(d, v.location);
606  break;
607 
608  case 2:
609  ::avro::decode(d, v.userName);
610  break;
611 
612  case 3:
613  ::avro::decode(d, v.password);
614  break;
615 
616  case 4:
617  ::avro::decode(d, v.options);
618  break;
619 
620  default:
621  break;
622  }
623  }
624  }
625  else
626  {
627  ::avro::decode(d, v.name);
628  ::avro::decode(d, v.location);
629  ::avro::decode(d, v.userName);
630  ::avro::decode(d, v.password);
631  ::avro::decode(d, v.options);
632  }
633  }
634  };
635 } // end namespace avro
636 
637 namespace gpudb
638 {
645  {
651  name(std::string()),
652  info(std::map<std::string, std::string>())
653  {
654  }
655 
659  std::string name;
660 
664  std::map<std::string, std::string> info;
665  };
666 } // end namespace gpudb
667 
668 namespace avro
669 {
670  template<> struct codec_traits<gpudb::CreateDatasourceResponse>
671  {
672  static void encode(Encoder& e, const gpudb::CreateDatasourceResponse& v)
673  {
674  ::avro::encode(e, v.name);
675  ::avro::encode(e, v.info);
676  }
677 
678  static void decode(Decoder& d, gpudb::CreateDatasourceResponse& v)
679  {
680  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
681  {
682  const std::vector<size_t> fo = rd->fieldOrder();
683 
684  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
685  {
686  switch (*it)
687  {
688  case 0:
689  ::avro::decode(d, v.name);
690  break;
691 
692  case 1:
693  ::avro::decode(d, v.info);
694  break;
695 
696  default:
697  break;
698  }
699  }
700  }
701  else
702  {
703  ::avro::decode(d, v.name);
704  ::avro::decode(d, v.info);
705  }
706  }
707  };
708 } // end namespace avro
709 
710 #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.