GPUdb C++ API  Version 7.2.3.0
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 
430  AlterDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& datasourceUpdatesMap_, const std::map<std::string, std::string>& options_):
431  name( name_ ),
432  datasourceUpdatesMap( datasourceUpdatesMap_ ),
433  options( options_ )
434  {
435  }
436 
441  std::string name;
442 
668  std::map<std::string, std::string> datasourceUpdatesMap;
669 
673  std::map<std::string, std::string> options;
674  };
675 } // end namespace gpudb
676 
677 namespace avro
678 {
679  template<> struct codec_traits<gpudb::AlterDatasourceRequest>
680  {
681  static void encode(Encoder& e, const gpudb::AlterDatasourceRequest& v)
682  {
683  ::avro::encode(e, v.name);
684  ::avro::encode(e, v.datasourceUpdatesMap);
685  ::avro::encode(e, v.options);
686  }
687 
688  static void decode(Decoder& d, gpudb::AlterDatasourceRequest& v)
689  {
690  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
691  {
692  const std::vector<size_t> fo = rd->fieldOrder();
693 
694  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
695  {
696  switch (*it)
697  {
698  case 0:
699  ::avro::decode(d, v.name);
700  break;
701 
702  case 1:
703  ::avro::decode(d, v.datasourceUpdatesMap);
704  break;
705 
706  case 2:
707  ::avro::decode(d, v.options);
708  break;
709 
710  default:
711  break;
712  }
713  }
714  }
715  else
716  {
717  ::avro::decode(d, v.name);
718  ::avro::decode(d, v.datasourceUpdatesMap);
719  ::avro::decode(d, v.options);
720  }
721  }
722  };
723 } // end namespace avro
724 
725 namespace gpudb
726 {
733  {
739  updatedPropertiesMap(std::map<std::string, std::string>()),
740  info(std::map<std::string, std::string>())
741  {
742  }
743 
747  std::map<std::string, std::string> updatedPropertiesMap;
748 
752  std::map<std::string, std::string> info;
753  };
754 } // end namespace gpudb
755 
756 namespace avro
757 {
758  template<> struct codec_traits<gpudb::AlterDatasourceResponse>
759  {
760  static void encode(Encoder& e, const gpudb::AlterDatasourceResponse& v)
761  {
762  ::avro::encode(e, v.updatedPropertiesMap);
763  ::avro::encode(e, v.info);
764  }
765 
766  static void decode(Decoder& d, gpudb::AlterDatasourceResponse& v)
767  {
768  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
769  {
770  const std::vector<size_t> fo = rd->fieldOrder();
771 
772  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
773  {
774  switch (*it)
775  {
776  case 0:
777  ::avro::decode(d, v.updatedPropertiesMap);
778  break;
779 
780  case 1:
781  ::avro::decode(d, v.info);
782  break;
783 
784  default:
785  break;
786  }
787  }
788  }
789  else
790  {
791  ::avro::decode(d, v.updatedPropertiesMap);
792  ::avro::decode(d, v.info);
793  }
794  }
795  };
796 } // end namespace avro
797 
798 #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.