GPUdb C++ API  Version 7.2.2.4
create_job.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 __CREATE_JOB_H__
7 #define __CREATE_JOB_H__
8 
9 namespace gpudb
10 {
21  {
26  endpoint(std::string()),
27  requestEncoding(std::string()),
28  data(std::vector<uint8_t>()),
29  dataStr(std::string()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
92  CreateJobRequest(const std::string& endpoint_, const std::string& requestEncoding_, const std::vector<uint8_t>& data_, const std::string& dataStr_, const std::map<std::string, std::string>& options_):
93  endpoint( endpoint_ ),
94  requestEncoding( requestEncoding_ ),
95  data( data_ ),
96  dataStr( dataStr_ ),
97  options( options_ )
98  {
99  }
100 
104  std::string endpoint;
105 
117  std::string requestEncoding;
118 
128  std::vector<uint8_t> data;
129 
138  std::string dataStr;
139 
157  std::map<std::string, std::string> options;
158  };
159 } // end namespace gpudb
160 
161 namespace avro
162 {
163  template<> struct codec_traits<gpudb::CreateJobRequest>
164  {
165  static void encode(Encoder& e, const gpudb::CreateJobRequest& v)
166  {
167  ::avro::encode(e, v.endpoint);
168  ::avro::encode(e, v.requestEncoding);
169  ::avro::encode(e, v.data);
170  ::avro::encode(e, v.dataStr);
171  ::avro::encode(e, v.options);
172  }
173 
174  static void decode(Decoder& d, gpudb::CreateJobRequest& v)
175  {
176  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
177  {
178  const std::vector<size_t> fo = rd->fieldOrder();
179 
180  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
181  {
182  switch (*it)
183  {
184  case 0:
185  ::avro::decode(d, v.endpoint);
186  break;
187 
188  case 1:
189  ::avro::decode(d, v.requestEncoding);
190  break;
191 
192  case 2:
193  ::avro::decode(d, v.data);
194  break;
195 
196  case 3:
197  ::avro::decode(d, v.dataStr);
198  break;
199 
200  case 4:
201  ::avro::decode(d, v.options);
202  break;
203 
204  default:
205  break;
206  }
207  }
208  }
209  else
210  {
211  ::avro::decode(d, v.endpoint);
212  ::avro::decode(d, v.requestEncoding);
213  ::avro::decode(d, v.data);
214  ::avro::decode(d, v.dataStr);
215  ::avro::decode(d, v.options);
216  }
217  }
218  };
219 } // end namespace avro
220 
221 namespace gpudb
222 {
228  {
233  jobId(int64_t()),
234  info(std::map<std::string, std::string>())
235  {
236  }
237 
241  int64_t jobId;
242 
253  std::map<std::string, std::string> info;
254  };
255 } // end namespace gpudb
256 
257 namespace avro
258 {
259  template<> struct codec_traits<gpudb::CreateJobResponse>
260  {
261  static void encode(Encoder& e, const gpudb::CreateJobResponse& v)
262  {
263  ::avro::encode(e, v.jobId);
264  ::avro::encode(e, v.info);
265  }
266 
267  static void decode(Decoder& d, gpudb::CreateJobResponse& v)
268  {
269  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
270  {
271  const std::vector<size_t> fo = rd->fieldOrder();
272 
273  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
274  {
275  switch (*it)
276  {
277  case 0:
278  ::avro::decode(d, v.jobId);
279  break;
280 
281  case 1:
282  ::avro::decode(d, v.info);
283  break;
284 
285  default:
286  break;
287  }
288  }
289  }
290  else
291  {
292  ::avro::decode(d, v.jobId);
293  ::avro::decode(d, v.info);
294  }
295  }
296  };
297 } // end namespace avro
298 
299 #endif // __CREATE_JOB_H__
std::string dataStr
JSON-encoded payload for the job to be run asynchronously.
Definition: create_job.h:138
CreateJobRequest(const std::string &endpoint_, const std::string &requestEncoding_, const std::vector< uint8_t > &data_, const std::string &dataStr_, const std::map< std::string, std::string > &options_)
Constructs a CreateJobRequest object with the specified parameters.
Definition: create_job.h:92
A set of parameters for GPUdb::createJob.
Definition: create_job.h:20
CreateJobResponse()
Constructs a CreateJobResponse object with default parameters.
Definition: create_job.h:232
std::map< std::string, std::string > info
Additional information.
Definition: create_job.h:253
int64_t jobId
An identifier for the job created by this call.
Definition: create_job.h:241
std::string requestEncoding
The encoding of the request payload for the job.
Definition: create_job.h:117
CreateJobRequest()
Constructs a CreateJobRequest object with default parameters.
Definition: create_job.h:25
std::string endpoint
Indicates which endpoint to execute, e.g. '/alter/table'.
Definition: create_job.h:104
std::map< std::string, std::string > options
Optional parameters.
Definition: create_job.h:157
std::vector< uint8_t > data
Binary-encoded payload for the job to be run asynchronously.
Definition: create_job.h:128
A set of results returned by GPUdb::createJob.
Definition: create_job.h:227