GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_datasource.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the GPUdb schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __ALTER_DATASOURCE_H__
7 #define __ALTER_DATASOURCE_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  name(std::string()),
28  datasourceUpdatesMap(std::map<std::string, std::string>()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
234  AlterDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& datasourceUpdatesMap_, const std::map<std::string, std::string>& options_):
235  name( name_ ),
236  datasourceUpdatesMap( datasourceUpdatesMap_ ),
237  options( options_ )
238  {
239  }
240 
241  std::string name;
242  std::map<std::string, std::string> datasourceUpdatesMap;
243  std::map<std::string, std::string> options;
244  };
245 }
246 
247 namespace avro
248 {
249  template<> struct codec_traits<gpudb::AlterDatasourceRequest>
250  {
251  static void encode(Encoder& e, const gpudb::AlterDatasourceRequest& v)
252  {
253  ::avro::encode(e, v.name);
254  ::avro::encode(e, v.datasourceUpdatesMap);
255  ::avro::encode(e, v.options);
256  }
257 
258  static void decode(Decoder& d, gpudb::AlterDatasourceRequest& v)
259  {
260  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
261  {
262  const std::vector<size_t> fo = rd->fieldOrder();
263 
264  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
265  {
266  switch (*it)
267  {
268  case 0:
269  ::avro::decode(d, v.name);
270  break;
271 
272  case 1:
273  ::avro::decode(d, v.datasourceUpdatesMap);
274  break;
275 
276  case 2:
277  ::avro::decode(d, v.options);
278  break;
279 
280  default:
281  break;
282  }
283  }
284  }
285  else
286  {
287  ::avro::decode(d, v.name);
288  ::avro::decode(d, v.datasourceUpdatesMap);
289  ::avro::decode(d, v.options);
290  }
291  }
292  };
293 }
294 
295 namespace gpudb
296 {
297 
306  {
307 
313  updatedPropertiesMap(std::map<std::string, std::string>()),
314  info(std::map<std::string, std::string>())
315  {
316  }
317 
318  std::map<std::string, std::string> updatedPropertiesMap;
319  std::map<std::string, std::string> info;
320  };
321 }
322 
323 namespace avro
324 {
325  template<> struct codec_traits<gpudb::AlterDatasourceResponse>
326  {
327  static void encode(Encoder& e, const gpudb::AlterDatasourceResponse& v)
328  {
329  ::avro::encode(e, v.updatedPropertiesMap);
330  ::avro::encode(e, v.info);
331  }
332 
333  static void decode(Decoder& d, gpudb::AlterDatasourceResponse& v)
334  {
335  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
336  {
337  const std::vector<size_t> fo = rd->fieldOrder();
338 
339  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
340  {
341  switch (*it)
342  {
343  case 0:
344  ::avro::decode(d, v.updatedPropertiesMap);
345  break;
346 
347  case 1:
348  ::avro::decode(d, v.info);
349  break;
350 
351  default:
352  break;
353  }
354  }
355  }
356  else
357  {
358  ::avro::decode(d, v.updatedPropertiesMap);
359  ::avro::decode(d, v.info);
360  }
361  }
362  };
363 }
364 
365 #endif
A set of input parameters for const.
std::map< std::string, std::string > datasourceUpdatesMap
A set of output parameters for const.
std::map< std::string, std::string > updatedPropertiesMap
std::map< std::string, std::string > options
std::map< std::string, std::string > info
AlterDatasourceRequest()
Constructs an AlterDatasourceRequest object with default parameter values.
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 parameter values.