GPUdb C++ API  Version 6.2.0.3
create_proc.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 __CREATE_PROC_H__
7 #define __CREATE_PROC_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  procName(std::string()),
29  executionMode(std::string()),
30  files(std::map<std::string, std::vector<uint8_t> >()),
31  command(std::string()),
32  args(std::vector<std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
95  CreateProcRequest(const std::string& procName_, const std::string& executionMode_, const std::map<std::string, std::vector<uint8_t> >& files_, const std::string& command_, const std::vector<std::string>& args_, const std::map<std::string, std::string>& options_):
96  procName( procName_ ),
97  executionMode( executionMode_ ),
98  files( files_ ),
99  command( command_ ),
100  args( args_ ),
101  options( options_ )
102  {
103  }
104 
105  std::string procName;
106  std::string executionMode;
107  std::map<std::string, std::vector<uint8_t> > files;
108  std::string command;
109  std::vector<std::string> args;
110  std::map<std::string, std::string> options;
111  };
112 }
113 
114 namespace avro
115 {
116  template<> struct codec_traits<gpudb::CreateProcRequest>
117  {
118  static void encode(Encoder& e, const gpudb::CreateProcRequest& v)
119  {
120  ::avro::encode(e, v.procName);
121  ::avro::encode(e, v.executionMode);
122  ::avro::encode(e, v.files);
123  ::avro::encode(e, v.command);
124  ::avro::encode(e, v.args);
125  ::avro::encode(e, v.options);
126  }
127 
128  static void decode(Decoder& d, gpudb::CreateProcRequest& v)
129  {
130  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
131  {
132  const std::vector<size_t> fo = rd->fieldOrder();
133 
134  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
135  {
136  switch (*it)
137  {
138  case 0:
139  ::avro::decode(d, v.procName);
140  break;
141 
142  case 1:
143  ::avro::decode(d, v.executionMode);
144  break;
145 
146  case 2:
147  ::avro::decode(d, v.files);
148  break;
149 
150  case 3:
151  ::avro::decode(d, v.command);
152  break;
153 
154  case 4:
155  ::avro::decode(d, v.args);
156  break;
157 
158  case 5:
159  ::avro::decode(d, v.options);
160  break;
161 
162  default:
163  break;
164  }
165  }
166  }
167  else
168  {
169  ::avro::decode(d, v.procName);
170  ::avro::decode(d, v.executionMode);
171  ::avro::decode(d, v.files);
172  ::avro::decode(d, v.command);
173  ::avro::decode(d, v.args);
174  ::avro::decode(d, v.options);
175  }
176  }
177  };
178 }
179 
180 namespace gpudb
181 {
182 
193  {
194 
200  procName(std::string())
201  {
202  }
203 
204  std::string procName;
205  };
206 }
207 
208 namespace avro
209 {
210  template<> struct codec_traits<gpudb::CreateProcResponse>
211  {
212  static void encode(Encoder& e, const gpudb::CreateProcResponse& v)
213  {
214  ::avro::encode(e, v.procName);
215  }
216 
217  static void decode(Decoder& d, gpudb::CreateProcResponse& v)
218  {
219  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
220  {
221  const std::vector<size_t> fo = rd->fieldOrder();
222 
223  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
224  {
225  switch (*it)
226  {
227  case 0:
228  ::avro::decode(d, v.procName);
229  break;
230 
231  default:
232  break;
233  }
234  }
235  }
236  else
237  {
238  ::avro::decode(d, v.procName);
239  }
240  }
241  };
242 }
243 
244 #endif
std::map< std::string, std::vector< uint8_t > > files
Definition: create_proc.h:107
CreateProcResponse()
Constructs a CreateProcResponse object with default parameter values.
Definition: create_proc.h:199
std::vector< std::string > args
Definition: create_proc.h:109
CreateProcRequest()
Constructs a CreateProcRequest object with default parameter values.
Definition: create_proc.h:27
A set of output parameters for createProc(const CreateProcRequest&) const.
Definition: create_proc.h:192
CreateProcRequest(const std::string &procName_, const std::string &executionMode_, const std::map< std::string, std::vector< uint8_t > > &files_, const std::string &command_, const std::vector< std::string > &args_, const std::map< std::string, std::string > &options_)
Constructs a CreateProcRequest object with the specified parameters.
Definition: create_proc.h:95
std::map< std::string, std::string > options
Definition: create_proc.h:110
A set of input parameters for createProc(const CreateProcRequest&) const.
Definition: create_proc.h:21