GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alter_model.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_MODEL_H__
7 #define __ALTER_MODEL_H__
8 
9 namespace gpudb
10 {
11 
18  struct AlterModelRequest
19  {
20 
26  AlterModelRequest() :
27  modelName(std::string()),
28  action(std::string()),
29  value(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
51  AlterModelRequest(const std::string& modelName_, const std::string& action_, const std::string& value_, const std::map<std::string, std::string>& options_):
52  modelName( modelName_ ),
53  action( action_ ),
54  value( value_ ),
55  options( options_ )
56  {
57  }
58 
59  std::string modelName;
60  std::string action;
61  std::string value;
62  std::map<std::string, std::string> options;
63  };
64 }
65 
70 namespace avro
71 {
72  template<> struct codec_traits<gpudb::AlterModelRequest>
73  {
74  static void encode(Encoder& e, const gpudb::AlterModelRequest& v)
75  {
76  ::avro::encode(e, v.modelName);
77  ::avro::encode(e, v.action);
78  ::avro::encode(e, v.value);
79  ::avro::encode(e, v.options);
80  }
81 
82  static void decode(Decoder& d, gpudb::AlterModelRequest& v)
83  {
84  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
85  {
86  const std::vector<size_t> fo = rd->fieldOrder();
87 
88  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
89  {
90  switch (*it)
91  {
92  case 0:
93  ::avro::decode(d, v.modelName);
94  break;
95 
96  case 1:
97  ::avro::decode(d, v.action);
98  break;
99 
100  case 2:
101  ::avro::decode(d, v.value);
102  break;
103 
104  case 3:
105  ::avro::decode(d, v.options);
106  break;
107 
108  default:
109  break;
110  }
111  }
112  }
113  else
114  {
115  ::avro::decode(d, v.modelName);
116  ::avro::decode(d, v.action);
117  ::avro::decode(d, v.value);
118  ::avro::decode(d, v.options);
119  }
120  }
121  };
122 }
123 
124 namespace gpudb
125 {
126 
133  struct AlterModelResponse
134  {
135 
141  AlterModelResponse() :
142  modelName(std::string()),
143  action(std::string()),
144  value(std::string()),
145  info(std::map<std::string, std::string>())
146  {
147  }
148 
149  std::string modelName;
150  std::string action;
151  std::string value;
152  std::map<std::string, std::string> info;
153  };
154 }
155 
160 namespace avro
161 {
162  template<> struct codec_traits<gpudb::AlterModelResponse>
163  {
164  static void encode(Encoder& e, const gpudb::AlterModelResponse& v)
165  {
166  ::avro::encode(e, v.modelName);
167  ::avro::encode(e, v.action);
168  ::avro::encode(e, v.value);
169  ::avro::encode(e, v.info);
170  }
171 
172  static void decode(Decoder& d, gpudb::AlterModelResponse& v)
173  {
174  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
175  {
176  const std::vector<size_t> fo = rd->fieldOrder();
177 
178  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
179  {
180  switch (*it)
181  {
182  case 0:
183  ::avro::decode(d, v.modelName);
184  break;
185 
186  case 1:
187  ::avro::decode(d, v.action);
188  break;
189 
190  case 2:
191  ::avro::decode(d, v.value);
192  break;
193 
194  case 3:
195  ::avro::decode(d, v.info);
196  break;
197 
198  default:
199  break;
200  }
201  }
202  }
203  else
204  {
205  ::avro::decode(d, v.modelName);
206  ::avro::decode(d, v.action);
207  ::avro::decode(d, v.value);
208  ::avro::decode(d, v.info);
209  }
210  }
211  };
212 }
213 
214 #endif