GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
upload_files.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 __UPLOAD_FILES_H__
7 #define __UPLOAD_FILES_H__
8 
9 namespace gpudb
10 {
11 
85  {
86 
92  fileNames(std::vector<std::string>()),
93  fileData(std::vector<std::vector<uint8_t> >()),
94  options(std::map<std::string, std::string>())
95  {
96  }
97 
173  UploadFilesRequest(const std::vector<std::string>& fileNames_, const std::vector<std::vector<uint8_t> >& fileData_, const std::map<std::string, std::string>& options_):
174  fileNames( fileNames_ ),
175  fileData( fileData_ ),
176  options( options_ )
177  {
178  }
179 
180  std::vector<std::string> fileNames;
181  std::vector<std::vector<uint8_t> > fileData;
182  std::map<std::string, std::string> options;
183  };
184 }
185 
186 namespace avro
187 {
188  template<> struct codec_traits<gpudb::UploadFilesRequest>
189  {
190  static void encode(Encoder& e, const gpudb::UploadFilesRequest& v)
191  {
192  ::avro::encode(e, v.fileNames);
193  ::avro::encode(e, v.fileData);
194  ::avro::encode(e, v.options);
195  }
196 
197  static void decode(Decoder& d, gpudb::UploadFilesRequest& v)
198  {
199  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
200  {
201  const std::vector<size_t> fo = rd->fieldOrder();
202 
203  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
204  {
205  switch (*it)
206  {
207  case 0:
208  ::avro::decode(d, v.fileNames);
209  break;
210 
211  case 1:
212  ::avro::decode(d, v.fileData);
213  break;
214 
215  case 2:
216  ::avro::decode(d, v.options);
217  break;
218 
219  default:
220  break;
221  }
222  }
223  }
224  else
225  {
226  ::avro::decode(d, v.fileNames);
227  ::avro::decode(d, v.fileData);
228  ::avro::decode(d, v.options);
229  }
230  }
231  };
232 }
233 
234 namespace gpudb
235 {
236 
310  {
311 
317  info(std::map<std::string, std::string>())
318  {
319  }
320 
321  std::map<std::string, std::string> info;
322  };
323 }
324 
325 namespace avro
326 {
327  template<> struct codec_traits<gpudb::UploadFilesResponse>
328  {
329  static void encode(Encoder& e, const gpudb::UploadFilesResponse& v)
330  {
331  ::avro::encode(e, v.info);
332  }
333 
334  static void decode(Decoder& d, gpudb::UploadFilesResponse& v)
335  {
336  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
337  {
338  const std::vector<size_t> fo = rd->fieldOrder();
339 
340  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
341  {
342  switch (*it)
343  {
344  case 0:
345  ::avro::decode(d, v.info);
346  break;
347 
348  default:
349  break;
350  }
351  }
352  }
353  else
354  {
355  ::avro::decode(d, v.info);
356  }
357  }
358  };
359 }
360 
361 #endif
std::vector< std::string > fileNames
Definition: upload_files.h:180
UploadFilesRequest()
Constructs an UploadFilesRequest object with default parameter values.
Definition: upload_files.h:91
A set of output parameters for const.
Definition: upload_files.h:309
std::map< std::string, std::string > info
Definition: upload_files.h:321
std::map< std::string, std::string > options
Definition: upload_files.h:182
UploadFilesRequest(const std::vector< std::string > &fileNames_, const std::vector< std::vector< uint8_t > > &fileData_, const std::map< std::string, std::string > &options_)
Constructs an UploadFilesRequest object with the specified parameters.
Definition: upload_files.h:173
A set of input parameters for const.
Definition: upload_files.h:84
std::vector< std::vector< uint8_t > > fileData
Definition: upload_files.h:181
UploadFilesResponse()
Constructs an UploadFilesResponse object with default parameter values.
Definition: upload_files.h:316