GPUdb C++ API  Version 7.2.2.4
get_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 __GET_JOB_H__
7 #define __GET_JOB_H__
8 
9 namespace gpudb
10 {
21  {
26  jobId(int64_t()),
27  options(std::map<std::string, std::string>())
28  {
29  }
30 
44  GetJobRequest(const int64_t jobId_, const std::map<std::string, std::string>& options_):
45  jobId( jobId_ ),
46  options( options_ )
47  {
48  }
49 
54  int64_t jobId;
55 
64  std::map<std::string, std::string> options;
65  };
66 } // end namespace gpudb
67 
68 namespace avro
69 {
70  template<> struct codec_traits<gpudb::GetJobRequest>
71  {
72  static void encode(Encoder& e, const gpudb::GetJobRequest& v)
73  {
74  ::avro::encode(e, v.jobId);
75  ::avro::encode(e, v.options);
76  }
77 
78  static void decode(Decoder& d, gpudb::GetJobRequest& v)
79  {
80  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
81  {
82  const std::vector<size_t> fo = rd->fieldOrder();
83 
84  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
85  {
86  switch (*it)
87  {
88  case 0:
89  ::avro::decode(d, v.jobId);
90  break;
91 
92  case 1:
93  ::avro::decode(d, v.options);
94  break;
95 
96  default:
97  break;
98  }
99  }
100  }
101  else
102  {
103  ::avro::decode(d, v.jobId);
104  ::avro::decode(d, v.options);
105  }
106  }
107  };
108 } // end namespace avro
109 
110 namespace gpudb
111 {
117  {
122  endpoint(std::string()),
123  jobStatus(std::string()),
124  running(bool()),
125  progress(int32_t()),
126  successful(bool()),
127  responseEncoding(std::string()),
128  jobResponse(std::vector<uint8_t>()),
129  jobResponseStr(std::string()),
130  statusMap(std::map<std::string, std::string>()),
131  info(std::map<std::string, std::string>())
132  {
133  }
134 
139  std::string endpoint;
140 
158  std::string jobStatus;
159 
163  bool running;
164 
168  int32_t progress;
169 
174 
186  std::string responseEncoding;
187 
193  std::vector<uint8_t> jobResponse;
194 
200  std::string jobResponseStr;
201 
211  std::map<std::string, std::string> statusMap;
212 
216  std::map<std::string, std::string> info;
217  };
218 } // end namespace gpudb
219 
220 namespace avro
221 {
222  template<> struct codec_traits<gpudb::GetJobResponse>
223  {
224  static void encode(Encoder& e, const gpudb::GetJobResponse& v)
225  {
226  ::avro::encode(e, v.endpoint);
227  ::avro::encode(e, v.jobStatus);
228  ::avro::encode(e, v.running);
229  ::avro::encode(e, v.progress);
230  ::avro::encode(e, v.successful);
231  ::avro::encode(e, v.responseEncoding);
232  ::avro::encode(e, v.jobResponse);
233  ::avro::encode(e, v.jobResponseStr);
234  ::avro::encode(e, v.statusMap);
235  ::avro::encode(e, v.info);
236  }
237 
238  static void decode(Decoder& d, gpudb::GetJobResponse& v)
239  {
240  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
241  {
242  const std::vector<size_t> fo = rd->fieldOrder();
243 
244  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
245  {
246  switch (*it)
247  {
248  case 0:
249  ::avro::decode(d, v.endpoint);
250  break;
251 
252  case 1:
253  ::avro::decode(d, v.jobStatus);
254  break;
255 
256  case 2:
257  ::avro::decode(d, v.running);
258  break;
259 
260  case 3:
261  ::avro::decode(d, v.progress);
262  break;
263 
264  case 4:
265  ::avro::decode(d, v.successful);
266  break;
267 
268  case 5:
269  ::avro::decode(d, v.responseEncoding);
270  break;
271 
272  case 6:
273  ::avro::decode(d, v.jobResponse);
274  break;
275 
276  case 7:
277  ::avro::decode(d, v.jobResponseStr);
278  break;
279 
280  case 8:
281  ::avro::decode(d, v.statusMap);
282  break;
283 
284  case 9:
285  ::avro::decode(d, v.info);
286  break;
287 
288  default:
289  break;
290  }
291  }
292  }
293  else
294  {
295  ::avro::decode(d, v.endpoint);
296  ::avro::decode(d, v.jobStatus);
297  ::avro::decode(d, v.running);
298  ::avro::decode(d, v.progress);
299  ::avro::decode(d, v.successful);
300  ::avro::decode(d, v.responseEncoding);
301  ::avro::decode(d, v.jobResponse);
302  ::avro::decode(d, v.jobResponseStr);
303  ::avro::decode(d, v.statusMap);
304  ::avro::decode(d, v.info);
305  }
306  }
307  };
308 } // end namespace avro
309 
310 #endif // __GET_JOB_H__
GetJobRequest()
Constructs a GetJobRequest object with default parameters.
Definition: get_job.h:25
std::string jobResponseStr
The json-encoded response of the job.
Definition: get_job.h:200
std::string endpoint
The endpoint which is being executed asynchronously.
Definition: get_job.h:139
std::string jobStatus
Status of the submitted job.
Definition: get_job.h:158
std::string responseEncoding
The encoding of the job result (contained in jobResponse or jobResponseStr.
Definition: get_job.h:186
std::map< std::string, std::string > options
Optional parameters.
Definition: get_job.h:64
GetJobRequest(const int64_t jobId_, const std::map< std::string, std::string > &options_)
Constructs a GetJobRequest object with the specified parameters.
Definition: get_job.h:44
bool running
True if the end point is still executing.
Definition: get_job.h:163
int32_t progress
Approximate percentage of the job completed.
Definition: get_job.h:168
std::vector< uint8_t > jobResponse
The binary-encoded response of the job.
Definition: get_job.h:193
bool successful
True if the job execution completed and no errors were encountered.
Definition: get_job.h:173
std::map< std::string, std::string > info
Additional information.
Definition: get_job.h:216
std::map< std::string, std::string > statusMap
Map of various status strings for the executed job.
Definition: get_job.h:211
A set of parameters for GPUdb::getJob.
Definition: get_job.h:20
GetJobResponse()
Constructs a GetJobResponse object with default parameters.
Definition: get_job.h:121
int64_t jobId
A unique identifier for the job whose status and result is to be fetched.
Definition: get_job.h:54
A set of results returned by GPUdb::getJob.
Definition: get_job.h:116