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 
328  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_):
329  name( name_ ),
330  location( location_ ),
331  userName( userName_ ),
332  password( password_ ),
333  options( options_ )
334  {
335  }
336 
340  std::string name;
341 
349  std::string location;
350 
354  std::string userName;
355 
359  std::string password;
360 
555  std::map<std::string, std::string> options;
556  };
557 } // end namespace gpudb
558 
559 namespace avro
560 {
561  template<> struct codec_traits<gpudb::CreateDatasourceRequest>
562  {
563  static void encode(Encoder& e, const gpudb::CreateDatasourceRequest& v)
564  {
565  ::avro::encode(e, v.name);
566  ::avro::encode(e, v.location);
567  ::avro::encode(e, v.userName);
568  ::avro::encode(e, v.password);
569  ::avro::encode(e, v.options);
570  }
571 
572  static void decode(Decoder& d, gpudb::CreateDatasourceRequest& v)
573  {
574  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
575  {
576  const std::vector<size_t> fo = rd->fieldOrder();
577 
578  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
579  {
580  switch (*it)
581  {
582  case 0:
583  ::avro::decode(d, v.name);
584  break;
585 
586  case 1:
587  ::avro::decode(d, v.location);
588  break;
589 
590  case 2:
591  ::avro::decode(d, v.userName);
592  break;
593 
594  case 3:
595  ::avro::decode(d, v.password);
596  break;
597 
598  case 4:
599  ::avro::decode(d, v.options);
600  break;
601 
602  default:
603  break;
604  }
605  }
606  }
607  else
608  {
609  ::avro::decode(d, v.name);
610  ::avro::decode(d, v.location);
611  ::avro::decode(d, v.userName);
612  ::avro::decode(d, v.password);
613  ::avro::decode(d, v.options);
614  }
615  }
616  };
617 } // end namespace avro
618 
619 namespace gpudb
620 {
627  {
633  name(std::string()),
634  info(std::map<std::string, std::string>())
635  {
636  }
637 
641  std::string name;
642 
646  std::map<std::string, std::string> info;
647  };
648 } // end namespace gpudb
649 
650 namespace avro
651 {
652  template<> struct codec_traits<gpudb::CreateDatasourceResponse>
653  {
654  static void encode(Encoder& e, const gpudb::CreateDatasourceResponse& v)
655  {
656  ::avro::encode(e, v.name);
657  ::avro::encode(e, v.info);
658  }
659 
660  static void decode(Decoder& d, gpudb::CreateDatasourceResponse& v)
661  {
662  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
663  {
664  const std::vector<size_t> fo = rd->fieldOrder();
665 
666  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
667  {
668  switch (*it)
669  {
670  case 0:
671  ::avro::decode(d, v.name);
672  break;
673 
674  case 1:
675  ::avro::decode(d, v.info);
676  break;
677 
678  default:
679  break;
680  }
681  }
682  }
683  else
684  {
685  ::avro::decode(d, v.name);
686  ::avro::decode(d, v.info);
687  }
688  }
689  };
690 } // end namespace avro
691 
692 #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.