GPUdb C++ API  Version 7.2.2.4
download_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 __DOWNLOAD_FILES_H__
7 #define __DOWNLOAD_FILES_H__
8 
9 namespace gpudb
10 {
20  {
25  fileNames(std::vector<std::string>()),
26  readOffsets(std::vector<int64_t>()),
27  readLengths(std::vector<int64_t>()),
28  options(std::map<std::string, std::string>())
29  {
30  }
31 
84  DownloadFilesRequest(const std::vector<std::string>& fileNames_, const std::vector<int64_t>& readOffsets_, const std::vector<int64_t>& readLengths_, const std::map<std::string, std::string>& options_):
85  fileNames( fileNames_ ),
86  readOffsets( readOffsets_ ),
87  readLengths( readLengths_ ),
88  options( options_ )
89  {
90  }
91 
100  std::vector<std::string> fileNames;
101 
108  std::vector<int64_t> readOffsets;
109 
116  std::vector<int64_t> readLengths;
117 
140  std::map<std::string, std::string> options;
141  };
142 } // end namespace gpudb
143 
144 namespace avro
145 {
146  template<> struct codec_traits<gpudb::DownloadFilesRequest>
147  {
148  static void encode(Encoder& e, const gpudb::DownloadFilesRequest& v)
149  {
150  ::avro::encode(e, v.fileNames);
151  ::avro::encode(e, v.readOffsets);
152  ::avro::encode(e, v.readLengths);
153  ::avro::encode(e, v.options);
154  }
155 
156  static void decode(Decoder& d, gpudb::DownloadFilesRequest& v)
157  {
158  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
159  {
160  const std::vector<size_t> fo = rd->fieldOrder();
161 
162  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
163  {
164  switch (*it)
165  {
166  case 0:
167  ::avro::decode(d, v.fileNames);
168  break;
169 
170  case 1:
171  ::avro::decode(d, v.readOffsets);
172  break;
173 
174  case 2:
175  ::avro::decode(d, v.readLengths);
176  break;
177 
178  case 3:
179  ::avro::decode(d, v.options);
180  break;
181 
182  default:
183  break;
184  }
185  }
186  }
187  else
188  {
189  ::avro::decode(d, v.fileNames);
190  ::avro::decode(d, v.readOffsets);
191  ::avro::decode(d, v.readLengths);
192  ::avro::decode(d, v.options);
193  }
194  }
195  };
196 } // end namespace avro
197 
198 namespace gpudb
199 {
206  {
211  fileNames(std::vector<std::string>()),
212  fileData(std::vector<std::vector<uint8_t> >()),
213  info(std::map<std::string, std::string>())
214  {
215  }
216 
220  std::vector<std::string> fileNames;
221 
225  std::vector<std::vector<uint8_t> > fileData;
226 
230  std::map<std::string, std::string> info;
231  };
232 } // end namespace gpudb
233 
234 namespace avro
235 {
236  template<> struct codec_traits<gpudb::DownloadFilesResponse>
237  {
238  static void encode(Encoder& e, const gpudb::DownloadFilesResponse& v)
239  {
240  ::avro::encode(e, v.fileNames);
241  ::avro::encode(e, v.fileData);
242  ::avro::encode(e, v.info);
243  }
244 
245  static void decode(Decoder& d, gpudb::DownloadFilesResponse& v)
246  {
247  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
248  {
249  const std::vector<size_t> fo = rd->fieldOrder();
250 
251  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
252  {
253  switch (*it)
254  {
255  case 0:
256  ::avro::decode(d, v.fileNames);
257  break;
258 
259  case 1:
260  ::avro::decode(d, v.fileData);
261  break;
262 
263  case 2:
264  ::avro::decode(d, v.info);
265  break;
266 
267  default:
268  break;
269  }
270  }
271  }
272  else
273  {
274  ::avro::decode(d, v.fileNames);
275  ::avro::decode(d, v.fileData);
276  ::avro::decode(d, v.info);
277  }
278  }
279  };
280 } // end namespace avro
281 
282 #endif // __DOWNLOAD_FILES_H__
DownloadFilesResponse()
Constructs a DownloadFilesResponse object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
DownloadFilesRequest()
Constructs a DownloadFilesRequest object with default parameters.
std::vector< std::string > fileNames
An array of the file names to download from KiFS.
DownloadFilesRequest(const std::vector< std::string > &fileNames_, const std::vector< int64_t > &readOffsets_, const std::vector< int64_t > &readLengths_, const std::map< std::string, std::string > &options_)
Constructs a DownloadFilesRequest object with the specified parameters.
A set of parameters for GPUdb::downloadFiles.
A set of results returned by GPUdb::downloadFiles.
std::map< std::string, std::string > info
Additional information.
std::vector< std::vector< uint8_t > > fileData
Data for the respective downloaded files listed in fileNames.
std::vector< int64_t > readOffsets
An array of starting byte offsets from which to read each respective file in fileNames.
std::vector< std::string > fileNames
Names of the files downloaded from KiFS.
std::vector< int64_t > readLengths
Array of number of bytes to read from each respective file in fileNames.