GPUdb C++ API  Version 7.2.2.4
upload_files_fromurl.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_FROMURL_H__
7 #define __UPLOAD_FILES_FROMURL_H__
8 
9 namespace gpudb
10 {
33  {
39  fileNames(std::vector<std::string>()),
40  urls(std::vector<std::string>()),
41  options(std::map<std::string, std::string>())
42  {
43  }
44 
62  UploadFilesFromurlRequest(const std::vector<std::string>& fileNames_, const std::vector<std::string>& urls_, const std::map<std::string, std::string>& options_):
63  fileNames( fileNames_ ),
64  urls( urls_ ),
65  options( options_ )
66  {
67  }
68 
76  std::vector<std::string> fileNames;
77 
81  std::vector<std::string> urls;
82 
86  std::map<std::string, std::string> options;
87  };
88 } // end namespace gpudb
89 
90 namespace avro
91 {
92  template<> struct codec_traits<gpudb::UploadFilesFromurlRequest>
93  {
94  static void encode(Encoder& e, const gpudb::UploadFilesFromurlRequest& v)
95  {
96  ::avro::encode(e, v.fileNames);
97  ::avro::encode(e, v.urls);
98  ::avro::encode(e, v.options);
99  }
100 
101  static void decode(Decoder& d, gpudb::UploadFilesFromurlRequest& v)
102  {
103  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
104  {
105  const std::vector<size_t> fo = rd->fieldOrder();
106 
107  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
108  {
109  switch (*it)
110  {
111  case 0:
112  ::avro::decode(d, v.fileNames);
113  break;
114 
115  case 1:
116  ::avro::decode(d, v.urls);
117  break;
118 
119  case 2:
120  ::avro::decode(d, v.options);
121  break;
122 
123  default:
124  break;
125  }
126  }
127  }
128  else
129  {
130  ::avro::decode(d, v.fileNames);
131  ::avro::decode(d, v.urls);
132  ::avro::decode(d, v.options);
133  }
134  }
135  };
136 } // end namespace avro
137 
138 namespace gpudb
139 {
146  {
152  successfulFileNames(std::vector<std::string>()),
153  successfulUrls(std::vector<std::string>()),
154  info(std::map<std::string, std::string>())
155  {
156  }
157 
162  std::vector<std::string> successfulFileNames;
163 
168  std::vector<std::string> successfulUrls;
169 
173  std::map<std::string, std::string> info;
174  };
175 } // end namespace gpudb
176 
177 namespace avro
178 {
179  template<> struct codec_traits<gpudb::UploadFilesFromurlResponse>
180  {
181  static void encode(Encoder& e, const gpudb::UploadFilesFromurlResponse& v)
182  {
183  ::avro::encode(e, v.successfulFileNames);
184  ::avro::encode(e, v.successfulUrls);
185  ::avro::encode(e, v.info);
186  }
187 
188  static void decode(Decoder& d, gpudb::UploadFilesFromurlResponse& v)
189  {
190  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
191  {
192  const std::vector<size_t> fo = rd->fieldOrder();
193 
194  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
195  {
196  switch (*it)
197  {
198  case 0:
199  ::avro::decode(d, v.successfulFileNames);
200  break;
201 
202  case 1:
203  ::avro::decode(d, v.successfulUrls);
204  break;
205 
206  case 2:
207  ::avro::decode(d, v.info);
208  break;
209 
210  default:
211  break;
212  }
213  }
214  }
215  else
216  {
217  ::avro::decode(d, v.successfulFileNames);
218  ::avro::decode(d, v.successfulUrls);
219  ::avro::decode(d, v.info);
220  }
221  }
222  };
223 } // end namespace avro
224 
225 #endif // __UPLOAD_FILES_FROMURL_H__
std::vector< std::string > fileNames
An array of full file name paths to be used for the files uploaded to KiFS.
UploadFilesFromurlRequest(const std::vector< std::string > &fileNames_, const std::vector< std::string > &urls_, const std::map< std::string, std::string > &options_)
Constructs an UploadFilesFromurlRequest object with the specified parameters.
std::vector< std::string > successfulUrls
List of urls that were successfully uploaded.
std::map< std::string, std::string > info
Additional information.
UploadFilesFromurlResponse()
Constructs an UploadFilesFromurlResponse object with default parameters.
UploadFilesFromurlRequest()
Constructs an UploadFilesFromurlRequest object with default parameters.
std::vector< std::string > urls
List of URLs to upload, for each respective file in fileNames.
A set of results returned by GPUdb::uploadFilesFromurl.
std::vector< std::string > successfulFileNames
List of fileNames that were successfully uploaded.
A set of parameters for GPUdb::uploadFilesFromurl.
std::map< std::string, std::string > options
Optional parameters.