GPUdb C++ API  Version 7.2.3.0
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 
82  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_):
83  endpoint( endpoint_ ),
84  requestEncoding( requestEncoding_ ),
85  data( data_ ),
86  dataStr( dataStr_ ),
87  options( options_ )
88  {
89  }
90 
94  std::string endpoint;
95 
107  std::string requestEncoding;
108 
118  std::vector<uint8_t> data;
119 
128  std::string dataStr;
129 
140  std::map<std::string, std::string> options;
141  };
142 } // end namespace gpudb
143 
144 namespace avro
145 {
146  template<> struct codec_traits<gpudb::CreateJobRequest>
147  {
148  static void encode(Encoder& e, const gpudb::CreateJobRequest& v)
149  {
150  ::avro::encode(e, v.endpoint);
151  ::avro::encode(e, v.requestEncoding);
152  ::avro::encode(e, v.data);
153  ::avro::encode(e, v.dataStr);
154  ::avro::encode(e, v.options);
155  }
156 
157  static void decode(Decoder& d, gpudb::CreateJobRequest& v)
158  {
159  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
160  {
161  const std::vector<size_t> fo = rd->fieldOrder();
162 
163  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
164  {
165  switch (*it)
166  {
167  case 0:
168  ::avro::decode(d, v.endpoint);
169  break;
170 
171  case 1:
172  ::avro::decode(d, v.requestEncoding);
173  break;
174 
175  case 2:
176  ::avro::decode(d, v.data);
177  break;
178 
179  case 3:
180  ::avro::decode(d, v.dataStr);
181  break;
182 
183  case 4:
184  ::avro::decode(d, v.options);
185  break;
186 
187  default:
188  break;
189  }
190  }
191  }
192  else
193  {
194  ::avro::decode(d, v.endpoint);
195  ::avro::decode(d, v.requestEncoding);
196  ::avro::decode(d, v.data);
197  ::avro::decode(d, v.dataStr);
198  ::avro::decode(d, v.options);
199  }
200  }
201  };
202 } // end namespace avro
203 
204 namespace gpudb
205 {
211  {
216  jobId(int64_t()),
217  info(std::map<std::string, std::string>())
218  {
219  }
220 
224  int64_t jobId;
225 
238  std::map<std::string, std::string> info;
239  };
240 } // end namespace gpudb
241 
242 namespace avro
243 {
244  template<> struct codec_traits<gpudb::CreateJobResponse>
245  {
246  static void encode(Encoder& e, const gpudb::CreateJobResponse& v)
247  {
248  ::avro::encode(e, v.jobId);
249  ::avro::encode(e, v.info);
250  }
251 
252  static void decode(Decoder& d, gpudb::CreateJobResponse& v)
253  {
254  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
255  {
256  const std::vector<size_t> fo = rd->fieldOrder();
257 
258  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
259  {
260  switch (*it)
261  {
262  case 0:
263  ::avro::decode(d, v.jobId);
264  break;
265 
266  case 1:
267  ::avro::decode(d, v.info);
268  break;
269 
270  default:
271  break;
272  }
273  }
274  }
275  else
276  {
277  ::avro::decode(d, v.jobId);
278  ::avro::decode(d, v.info);
279  }
280  }
281  };
282 } // end namespace avro
283 
284 #endif // __CREATE_JOB_H__
std::string dataStr
JSON-encoded payload for the job to be run asynchronously.
Definition: create_job.h:128
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:82
A set of parameters for GPUdb::createJob.
Definition: create_job.h:20
CreateJobResponse()
Constructs a CreateJobResponse object with default parameters.
Definition: create_job.h:215
std::map< std::string, std::string > info
Additional information.
Definition: create_job.h:238
int64_t jobId
An identifier for the job created by this call.
Definition: create_job.h:224
std::string requestEncoding
The encoding of the request payload for the job.
Definition: create_job.h:107
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:94
std::map< std::string, std::string > options
Optional parameters.
Definition: create_job.h:140
std::vector< uint8_t > data
Binary-encoded payload for the job to be run asynchronously.
Definition: create_job.h:118
A set of results returned by GPUdb::createJob.
Definition: create_job.h:210