GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
download_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 __DOWNLOAD_FILES_H__
7 #define __DOWNLOAD_FILES_H__
8 
9 namespace gpudb
10 {
11 
20  {
21 
27  fileNames(std::vector<std::string>()),
28  readOffsets(std::vector<int64_t>()),
29  readLengths(std::vector<int64_t>()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
80  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_):
81  fileNames( fileNames_ ),
82  readOffsets( readOffsets_ ),
83  readLengths( readLengths_ ),
84  options( options_ )
85  {
86  }
87 
88  std::vector<std::string> fileNames;
89  std::vector<int64_t> readOffsets;
90  std::vector<int64_t> readLengths;
91  std::map<std::string, std::string> options;
92  };
93 }
94 
95 namespace avro
96 {
97  template<> struct codec_traits<gpudb::DownloadFilesRequest>
98  {
99  static void encode(Encoder& e, const gpudb::DownloadFilesRequest& v)
100  {
101  ::avro::encode(e, v.fileNames);
102  ::avro::encode(e, v.readOffsets);
103  ::avro::encode(e, v.readLengths);
104  ::avro::encode(e, v.options);
105  }
106 
107  static void decode(Decoder& d, gpudb::DownloadFilesRequest& v)
108  {
109  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
110  {
111  const std::vector<size_t> fo = rd->fieldOrder();
112 
113  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
114  {
115  switch (*it)
116  {
117  case 0:
118  ::avro::decode(d, v.fileNames);
119  break;
120 
121  case 1:
122  ::avro::decode(d, v.readOffsets);
123  break;
124 
125  case 2:
126  ::avro::decode(d, v.readLengths);
127  break;
128 
129  case 3:
130  ::avro::decode(d, v.options);
131  break;
132 
133  default:
134  break;
135  }
136  }
137  }
138  else
139  {
140  ::avro::decode(d, v.fileNames);
141  ::avro::decode(d, v.readOffsets);
142  ::avro::decode(d, v.readLengths);
143  ::avro::decode(d, v.options);
144  }
145  }
146  };
147 }
148 
149 namespace gpudb
150 {
151 
160  {
161 
167  fileNames(std::vector<std::string>()),
168  fileData(std::vector<std::vector<uint8_t> >()),
169  info(std::map<std::string, std::string>())
170  {
171  }
172 
173  std::vector<std::string> fileNames;
174  std::vector<std::vector<uint8_t> > fileData;
175  std::map<std::string, std::string> info;
176  };
177 }
178 
179 namespace avro
180 {
181  template<> struct codec_traits<gpudb::DownloadFilesResponse>
182  {
183  static void encode(Encoder& e, const gpudb::DownloadFilesResponse& v)
184  {
185  ::avro::encode(e, v.fileNames);
186  ::avro::encode(e, v.fileData);
187  ::avro::encode(e, v.info);
188  }
189 
190  static void decode(Decoder& d, gpudb::DownloadFilesResponse& v)
191  {
192  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
193  {
194  const std::vector<size_t> fo = rd->fieldOrder();
195 
196  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
197  {
198  switch (*it)
199  {
200  case 0:
201  ::avro::decode(d, v.fileNames);
202  break;
203 
204  case 1:
205  ::avro::decode(d, v.fileData);
206  break;
207 
208  case 2:
209  ::avro::decode(d, v.info);
210  break;
211 
212  default:
213  break;
214  }
215  }
216  }
217  else
218  {
219  ::avro::decode(d, v.fileNames);
220  ::avro::decode(d, v.fileData);
221  ::avro::decode(d, v.info);
222  }
223  }
224  };
225 }
226 
227 #endif
DownloadFilesResponse()
Constructs a DownloadFilesResponse object with default parameter values.
std::map< std::string, std::string > options
DownloadFilesRequest()
Constructs a DownloadFilesRequest object with default parameter values.
std::vector< std::string > fileNames
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 input parameters for const.
A set of output parameters for const.
std::map< std::string, std::string > info
std::vector< std::vector< uint8_t > > fileData
std::vector< int64_t > readOffsets
std::vector< std::string > fileNames
std::vector< int64_t > readLengths