GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
drop_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 __DROP_DATASOURCE_H__
7 #define __DROP_DATASOURCE_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
29  name(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
43  DropDatasourceRequest(const std::string& name_, const std::map<std::string, std::string>& options_):
44  name( name_ ),
45  options( options_ )
46  {
47  }
48 
49  std::string name;
50  std::map<std::string, std::string> options;
51  };
52 }
53 
54 namespace avro
55 {
56  template<> struct codec_traits<gpudb::DropDatasourceRequest>
57  {
58  static void encode(Encoder& e, const gpudb::DropDatasourceRequest& v)
59  {
60  ::avro::encode(e, v.name);
61  ::avro::encode(e, v.options);
62  }
63 
64  static void decode(Decoder& d, gpudb::DropDatasourceRequest& v)
65  {
66  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
67  {
68  const std::vector<size_t> fo = rd->fieldOrder();
69 
70  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
71  {
72  switch (*it)
73  {
74  case 0:
75  ::avro::decode(d, v.name);
76  break;
77 
78  case 1:
79  ::avro::decode(d, v.options);
80  break;
81 
82  default:
83  break;
84  }
85  }
86  }
87  else
88  {
89  ::avro::decode(d, v.name);
90  ::avro::decode(d, v.options);
91  }
92  }
93  };
94 }
95 
96 namespace gpudb
97 {
98 
109  {
110 
116  name(std::string()),
117  info(std::map<std::string, std::string>())
118  {
119  }
120 
121  std::string name;
122  std::map<std::string, std::string> info;
123  };
124 }
125 
126 namespace avro
127 {
128  template<> struct codec_traits<gpudb::DropDatasourceResponse>
129  {
130  static void encode(Encoder& e, const gpudb::DropDatasourceResponse& v)
131  {
132  ::avro::encode(e, v.name);
133  ::avro::encode(e, v.info);
134  }
135 
136  static void decode(Decoder& d, gpudb::DropDatasourceResponse& v)
137  {
138  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
139  {
140  const std::vector<size_t> fo = rd->fieldOrder();
141 
142  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
143  {
144  switch (*it)
145  {
146  case 0:
147  ::avro::decode(d, v.name);
148  break;
149 
150  case 1:
151  ::avro::decode(d, v.info);
152  break;
153 
154  default:
155  break;
156  }
157  }
158  }
159  else
160  {
161  ::avro::decode(d, v.name);
162  ::avro::decode(d, v.info);
163  }
164  }
165  };
166 }
167 
168 #endif
std::map< std::string, std::string > options
DropDatasourceRequest()
Constructs a DropDatasourceRequest object with default parameter values.
DropDatasourceResponse()
Constructs a DropDatasourceResponse object with default parameter values.
A set of output parameters for const.
A set of input parameters for const.
std::map< std::string, std::string > info
DropDatasourceRequest(const std::string &name_, const std::map< std::string, std::string > &options_)
Constructs a DropDatasourceRequest object with the specified parameters.