GPUdb C++ API  Version 7.2.2.4
alter_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 __ALTER_DATASOURCE_H__
7 #define __ALTER_DATASOURCE_H__
8 
9 namespace gpudb
10 {
20  {
25  name(std::string()),
26  datasourceUpdatesMap(std::map<std::string, std::string>()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
389  AlterDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& datasourceUpdatesMap_, const std::map<std::string, std::string>& options_):
390  name( name_ ),
391  datasourceUpdatesMap( datasourceUpdatesMap_ ),
392  options( options_ )
393  {
394  }
395 
400  std::string name;
401 
604  std::map<std::string, std::string> datasourceUpdatesMap;
605 
609  std::map<std::string, std::string> options;
610  };
611 } // end namespace gpudb
612 
613 namespace avro
614 {
615  template<> struct codec_traits<gpudb::AlterDatasourceRequest>
616  {
617  static void encode(Encoder& e, const gpudb::AlterDatasourceRequest& v)
618  {
619  ::avro::encode(e, v.name);
620  ::avro::encode(e, v.datasourceUpdatesMap);
621  ::avro::encode(e, v.options);
622  }
623 
624  static void decode(Decoder& d, gpudb::AlterDatasourceRequest& v)
625  {
626  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
627  {
628  const std::vector<size_t> fo = rd->fieldOrder();
629 
630  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
631  {
632  switch (*it)
633  {
634  case 0:
635  ::avro::decode(d, v.name);
636  break;
637 
638  case 1:
639  ::avro::decode(d, v.datasourceUpdatesMap);
640  break;
641 
642  case 2:
643  ::avro::decode(d, v.options);
644  break;
645 
646  default:
647  break;
648  }
649  }
650  }
651  else
652  {
653  ::avro::decode(d, v.name);
654  ::avro::decode(d, v.datasourceUpdatesMap);
655  ::avro::decode(d, v.options);
656  }
657  }
658  };
659 } // end namespace avro
660 
661 namespace gpudb
662 {
669  {
675  updatedPropertiesMap(std::map<std::string, std::string>()),
676  info(std::map<std::string, std::string>())
677  {
678  }
679 
683  std::map<std::string, std::string> updatedPropertiesMap;
684 
688  std::map<std::string, std::string> info;
689  };
690 } // end namespace gpudb
691 
692 namespace avro
693 {
694  template<> struct codec_traits<gpudb::AlterDatasourceResponse>
695  {
696  static void encode(Encoder& e, const gpudb::AlterDatasourceResponse& v)
697  {
698  ::avro::encode(e, v.updatedPropertiesMap);
699  ::avro::encode(e, v.info);
700  }
701 
702  static void decode(Decoder& d, gpudb::AlterDatasourceResponse& v)
703  {
704  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
705  {
706  const std::vector<size_t> fo = rd->fieldOrder();
707 
708  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
709  {
710  switch (*it)
711  {
712  case 0:
713  ::avro::decode(d, v.updatedPropertiesMap);
714  break;
715 
716  case 1:
717  ::avro::decode(d, v.info);
718  break;
719 
720  default:
721  break;
722  }
723  }
724  }
725  else
726  {
727  ::avro::decode(d, v.updatedPropertiesMap);
728  ::avro::decode(d, v.info);
729  }
730  }
731  };
732 } // end namespace avro
733 
734 #endif // __ALTER_DATASOURCE_H__
A set of parameters for GPUdb::alterDatasource.
std::map< std::string, std::string > datasourceUpdatesMap
Map containing the properties of the data source to be updated.
std::string name
Name of the data source to be altered.
A set of results returned by GPUdb::alterDatasource.
std::map< std::string, std::string > updatedPropertiesMap
Map of values updated.
std::map< std::string, std::string > options
Optional parameters.
std::map< std::string, std::string > info
Additional information.
AlterDatasourceRequest()
Constructs an AlterDatasourceRequest object with default parameters.
AlterDatasourceRequest(const std::string &name_, const std::map< std::string, std::string > &datasourceUpdatesMap_, const std::map< std::string, std::string > &options_)
Constructs an AlterDatasourceRequest object with the specified parameters.
AlterDatasourceResponse()
Constructs an AlterDatasourceResponse object with default parameters.