GPUdb C++ API  Version 7.2.2.4
show_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 __SHOW_DATASOURCE_H__
7 #define __SHOW_DATASOURCE_H__
8 
9 namespace gpudb
10 {
21  {
26  name(std::string()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
43  ShowDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& options_):
44  name( name_ ),
45  options( options_ )
46  {
47  }
48 
54  std::string name;
55 
59  std::map<std::string, std::string> options;
60  };
61 } // end namespace gpudb
62 
63 namespace avro
64 {
65  template<> struct codec_traits<gpudb::ShowDatasourceRequest>
66  {
67  static void encode(Encoder& e, const gpudb::ShowDatasourceRequest& v)
68  {
69  ::avro::encode(e, v.name);
70  ::avro::encode(e, v.options);
71  }
72 
73  static void decode(Decoder& d, gpudb::ShowDatasourceRequest& v)
74  {
75  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
76  {
77  const std::vector<size_t> fo = rd->fieldOrder();
78 
79  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
80  {
81  switch (*it)
82  {
83  case 0:
84  ::avro::decode(d, v.name);
85  break;
86 
87  case 1:
88  ::avro::decode(d, v.options);
89  break;
90 
91  default:
92  break;
93  }
94  }
95  }
96  else
97  {
98  ::avro::decode(d, v.name);
99  ::avro::decode(d, v.options);
100  }
101  }
102  };
103 } // end namespace avro
104 
105 namespace gpudb
106 {
113  {
118  datasourceNames(std::vector<std::string>()),
119  storageProviderTypes(std::vector<std::string>()),
120  additionalInfo(std::vector<std::map<std::string, std::string> >()),
121  info(std::map<std::string, std::string>())
122  {
123  }
124 
128  std::vector<std::string> datasourceNames;
129 
141  std::vector<std::string> storageProviderTypes;
142 
164  std::vector<std::map<std::string, std::string> > additionalInfo;
165 
169  std::map<std::string, std::string> info;
170  };
171 } // end namespace gpudb
172 
173 namespace avro
174 {
175  template<> struct codec_traits<gpudb::ShowDatasourceResponse>
176  {
177  static void encode(Encoder& e, const gpudb::ShowDatasourceResponse& v)
178  {
179  ::avro::encode(e, v.datasourceNames);
180  ::avro::encode(e, v.storageProviderTypes);
181  ::avro::encode(e, v.additionalInfo);
182  ::avro::encode(e, v.info);
183  }
184 
185  static void decode(Decoder& d, gpudb::ShowDatasourceResponse& v)
186  {
187  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
188  {
189  const std::vector<size_t> fo = rd->fieldOrder();
190 
191  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
192  {
193  switch (*it)
194  {
195  case 0:
196  ::avro::decode(d, v.datasourceNames);
197  break;
198 
199  case 1:
200  ::avro::decode(d, v.storageProviderTypes);
201  break;
202 
203  case 2:
204  ::avro::decode(d, v.additionalInfo);
205  break;
206 
207  case 3:
208  ::avro::decode(d, v.info);
209  break;
210 
211  default:
212  break;
213  }
214  }
215  }
216  else
217  {
218  ::avro::decode(d, v.datasourceNames);
219  ::avro::decode(d, v.storageProviderTypes);
220  ::avro::decode(d, v.additionalInfo);
221  ::avro::decode(d, v.info);
222  }
223  }
224  };
225 } // end namespace avro
226 
227 #endif // __SHOW_DATASOURCE_H__
std::vector< std::map< std::string, std::string > > additionalInfo
Additional information about the respective data sources in datasourceNames.
ShowDatasourceResponse()
Constructs a ShowDatasourceResponse object with default parameters.
std::vector< std::string > storageProviderTypes
The storage provider type of the data sources named in datasourceNames.
ShowDatasourceRequest(const std::string &name_, const std::map< std::string, std::string > &options_)
Constructs a ShowDatasourceRequest object with the specified parameters.
std::string name
Name of the data source for which to retrieve information.
std::map< std::string, std::string > info
Additional information.
std::vector< std::string > datasourceNames
The data source names.
ShowDatasourceRequest()
Constructs a ShowDatasourceRequest object with default parameters.
A set of parameters for GPUdb::showDatasource.
A set of results returned by GPUdb::showDatasource.
std::map< std::string, std::string > options
Optional parameters.