GPUdb C++ API  Version 7.2.2.4
upload_files.h
Go to the documentation of this file.
1 /*
2  * This file was autogenerated by the Kinetica schema processor.
3  *
4  * DO NOT EDIT DIRECTLY.
5  */
6 #ifndef __UPLOAD_FILES_H__
7 #define __UPLOAD_FILES_H__
8 
9 namespace gpudb
10 {
75  {
80  fileNames(std::vector<std::string>()),
81  fileData(std::vector<std::vector<uint8_t> >()),
82  options(std::map<std::string, std::string>())
83  {
84  }
85 
194  UploadFilesRequest(const std::vector<std::string>& fileNames_, const std::vector<std::vector<uint8_t> >& fileData_, const std::map<std::string, std::string>& options_):
195  fileNames( fileNames_ ),
196  fileData( fileData_ ),
197  options( options_ )
198  {
199  }
200 
208  std::vector<std::string> fileNames;
209 
214  std::vector<std::vector<uint8_t> > fileData;
215 
282  std::map<std::string, std::string> options;
283  };
284 } // end namespace gpudb
285 
286 namespace avro
287 {
288  template<> struct codec_traits<gpudb::UploadFilesRequest>
289  {
290  static void encode(Encoder& e, const gpudb::UploadFilesRequest& v)
291  {
292  ::avro::encode(e, v.fileNames);
293  ::avro::encode(e, v.fileData);
294  ::avro::encode(e, v.options);
295  }
296 
297  static void decode(Decoder& d, gpudb::UploadFilesRequest& v)
298  {
299  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
300  {
301  const std::vector<size_t> fo = rd->fieldOrder();
302 
303  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
304  {
305  switch (*it)
306  {
307  case 0:
308  ::avro::decode(d, v.fileNames);
309  break;
310 
311  case 1:
312  ::avro::decode(d, v.fileData);
313  break;
314 
315  case 2:
316  ::avro::decode(d, v.options);
317  break;
318 
319  default:
320  break;
321  }
322  }
323  }
324  else
325  {
326  ::avro::decode(d, v.fileNames);
327  ::avro::decode(d, v.fileData);
328  ::avro::decode(d, v.options);
329  }
330  }
331  };
332 } // end namespace avro
333 
334 namespace gpudb
335 {
342  {
347  info(std::map<std::string, std::string>())
348  {
349  }
350 
354  std::map<std::string, std::string> info;
355  };
356 } // end namespace gpudb
357 
358 namespace avro
359 {
360  template<> struct codec_traits<gpudb::UploadFilesResponse>
361  {
362  static void encode(Encoder& e, const gpudb::UploadFilesResponse& v)
363  {
364  ::avro::encode(e, v.info);
365  }
366 
367  static void decode(Decoder& d, gpudb::UploadFilesResponse& v)
368  {
369  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
370  {
371  const std::vector<size_t> fo = rd->fieldOrder();
372 
373  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
374  {
375  switch (*it)
376  {
377  case 0:
378  ::avro::decode(d, v.info);
379  break;
380 
381  default:
382  break;
383  }
384  }
385  }
386  else
387  {
388  ::avro::decode(d, v.info);
389  }
390  }
391  };
392 } // end namespace avro
393 
394 #endif // __UPLOAD_FILES_H__
std::vector< std::string > fileNames
An array of full file name paths to be used for the files uploaded to KiFS.
Definition: upload_files.h:208
UploadFilesRequest()
Constructs an UploadFilesRequest object with default parameters.
Definition: upload_files.h:79
A set of results returned by GPUdb::uploadFiles.
Definition: upload_files.h:341
std::map< std::string, std::string > info
Additional information.
Definition: upload_files.h:354
std::map< std::string, std::string > options
Optional parameters.
Definition: upload_files.h:282
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:194
A set of parameters for GPUdb::uploadFiles.
Definition: upload_files.h:74
std::vector< std::vector< uint8_t > > fileData
File data for the files being uploaded, for the respective files in fileNames.
Definition: upload_files.h:214
UploadFilesResponse()
Constructs an UploadFilesResponse object with default parameters.
Definition: upload_files.h:346