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 
401  AlterDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& datasourceUpdatesMap_, const std::map<std::string, std::string>& options_):
402  name( name_ ),
403  datasourceUpdatesMap( datasourceUpdatesMap_ ),
404  options( options_ )
405  {
406  }
407 
412  std::string name;
413 
624  std::map<std::string, std::string> datasourceUpdatesMap;
625 
629  std::map<std::string, std::string> options;
630  };
631 } // end namespace gpudb
632 
633 namespace avro
634 {
635  template<> struct codec_traits<gpudb::AlterDatasourceRequest>
636  {
637  static void encode(Encoder& e, const gpudb::AlterDatasourceRequest& v)
638  {
639  ::avro::encode(e, v.name);
640  ::avro::encode(e, v.datasourceUpdatesMap);
641  ::avro::encode(e, v.options);
642  }
643 
644  static void decode(Decoder& d, gpudb::AlterDatasourceRequest& v)
645  {
646  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
647  {
648  const std::vector<size_t> fo = rd->fieldOrder();
649 
650  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
651  {
652  switch (*it)
653  {
654  case 0:
655  ::avro::decode(d, v.name);
656  break;
657 
658  case 1:
659  ::avro::decode(d, v.datasourceUpdatesMap);
660  break;
661 
662  case 2:
663  ::avro::decode(d, v.options);
664  break;
665 
666  default:
667  break;
668  }
669  }
670  }
671  else
672  {
673  ::avro::decode(d, v.name);
674  ::avro::decode(d, v.datasourceUpdatesMap);
675  ::avro::decode(d, v.options);
676  }
677  }
678  };
679 } // end namespace avro
680 
681 namespace gpudb
682 {
689  {
695  updatedPropertiesMap(std::map<std::string, std::string>()),
696  info(std::map<std::string, std::string>())
697  {
698  }
699 
703  std::map<std::string, std::string> updatedPropertiesMap;
704 
708  std::map<std::string, std::string> info;
709  };
710 } // end namespace gpudb
711 
712 namespace avro
713 {
714  template<> struct codec_traits<gpudb::AlterDatasourceResponse>
715  {
716  static void encode(Encoder& e, const gpudb::AlterDatasourceResponse& v)
717  {
718  ::avro::encode(e, v.updatedPropertiesMap);
719  ::avro::encode(e, v.info);
720  }
721 
722  static void decode(Decoder& d, gpudb::AlterDatasourceResponse& v)
723  {
724  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
725  {
726  const std::vector<size_t> fo = rd->fieldOrder();
727 
728  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
729  {
730  switch (*it)
731  {
732  case 0:
733  ::avro::decode(d, v.updatedPropertiesMap);
734  break;
735 
736  case 1:
737  ::avro::decode(d, v.info);
738  break;
739 
740  default:
741  break;
742  }
743  }
744  }
745  else
746  {
747  ::avro::decode(d, v.updatedPropertiesMap);
748  ::avro::decode(d, v.info);
749  }
750  }
751  };
752 } // end namespace avro
753 
754 #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.