GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
get_job.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 __GET_JOB_H__
7 #define __GET_JOB_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  jobId(int64_t()),
29  options(std::map<std::string, std::string>())
30  {
31  }
32 
45  GetJobRequest(const int64_t jobId_, const std::map<std::string, std::string>& options_):
46  jobId( jobId_ ),
47  options( options_ )
48  {
49  }
50 
51  int64_t jobId;
52  std::map<std::string, std::string> options;
53  };
54 }
55 
56 namespace avro
57 {
58  template<> struct codec_traits<gpudb::GetJobRequest>
59  {
60  static void encode(Encoder& e, const gpudb::GetJobRequest& v)
61  {
62  ::avro::encode(e, v.jobId);
63  ::avro::encode(e, v.options);
64  }
65 
66  static void decode(Decoder& d, gpudb::GetJobRequest& v)
67  {
68  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
69  {
70  const std::vector<size_t> fo = rd->fieldOrder();
71 
72  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
73  {
74  switch (*it)
75  {
76  case 0:
77  ::avro::decode(d, v.jobId);
78  break;
79 
80  case 1:
81  ::avro::decode(d, v.options);
82  break;
83 
84  default:
85  break;
86  }
87  }
88  }
89  else
90  {
91  ::avro::decode(d, v.jobId);
92  ::avro::decode(d, v.options);
93  }
94  }
95  };
96 }
97 
98 namespace gpudb
99 {
100 
111  {
112 
117  endpoint(std::string()),
118  jobStatus(std::string()),
119  running(bool()),
120  progress(int32_t()),
121  successful(bool()),
122  responseEncoding(std::string()),
123  jobResponse(std::vector<uint8_t>()),
124  jobResponseStr(std::string()),
125  statusMap(std::map<std::string, std::string>()),
126  info(std::map<std::string, std::string>())
127  {
128  }
129 
130  std::string endpoint;
131  std::string jobStatus;
132  bool running;
133  int32_t progress;
135  std::string responseEncoding;
136  std::vector<uint8_t> jobResponse;
137  std::string jobResponseStr;
138  std::map<std::string, std::string> statusMap;
139  std::map<std::string, std::string> info;
140  };
141 }
142 
143 namespace avro
144 {
145  template<> struct codec_traits<gpudb::GetJobResponse>
146  {
147  static void encode(Encoder& e, const gpudb::GetJobResponse& v)
148  {
149  ::avro::encode(e, v.endpoint);
150  ::avro::encode(e, v.jobStatus);
151  ::avro::encode(e, v.running);
152  ::avro::encode(e, v.progress);
153  ::avro::encode(e, v.successful);
154  ::avro::encode(e, v.responseEncoding);
155  ::avro::encode(e, v.jobResponse);
156  ::avro::encode(e, v.jobResponseStr);
157  ::avro::encode(e, v.statusMap);
158  ::avro::encode(e, v.info);
159  }
160 
161  static void decode(Decoder& d, gpudb::GetJobResponse& v)
162  {
163  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
164  {
165  const std::vector<size_t> fo = rd->fieldOrder();
166 
167  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
168  {
169  switch (*it)
170  {
171  case 0:
172  ::avro::decode(d, v.endpoint);
173  break;
174 
175  case 1:
176  ::avro::decode(d, v.jobStatus);
177  break;
178 
179  case 2:
180  ::avro::decode(d, v.running);
181  break;
182 
183  case 3:
184  ::avro::decode(d, v.progress);
185  break;
186 
187  case 4:
188  ::avro::decode(d, v.successful);
189  break;
190 
191  case 5:
192  ::avro::decode(d, v.responseEncoding);
193  break;
194 
195  case 6:
196  ::avro::decode(d, v.jobResponse);
197  break;
198 
199  case 7:
200  ::avro::decode(d, v.jobResponseStr);
201  break;
202 
203  case 8:
204  ::avro::decode(d, v.statusMap);
205  break;
206 
207  case 9:
208  ::avro::decode(d, v.info);
209  break;
210 
211  default:
212  break;
213  }
214  }
215  }
216  else
217  {
218  ::avro::decode(d, v.endpoint);
219  ::avro::decode(d, v.jobStatus);
220  ::avro::decode(d, v.running);
221  ::avro::decode(d, v.progress);
222  ::avro::decode(d, v.successful);
223  ::avro::decode(d, v.responseEncoding);
224  ::avro::decode(d, v.jobResponse);
225  ::avro::decode(d, v.jobResponseStr);
226  ::avro::decode(d, v.statusMap);
227  ::avro::decode(d, v.info);
228  }
229  }
230  };
231 }
232 
233 #endif
GetJobRequest()
Constructs a GetJobRequest object with default parameter values.
Definition: get_job.h:27
std::string jobResponseStr
Definition: get_job.h:137
std::string endpoint
Definition: get_job.h:130
std::string jobStatus
Definition: get_job.h:131
std::string responseEncoding
Definition: get_job.h:135
std::map< std::string, std::string > options
Definition: get_job.h:52
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:45
std::vector< uint8_t > jobResponse
Definition: get_job.h:136
std::map< std::string, std::string > info
Definition: get_job.h:139
std::map< std::string, std::string > statusMap
Definition: get_job.h:138
A set of input parameters for const.
Definition: get_job.h:21
GetJobResponse()
Constructs a GetJobResponse object with default parameter values.
Definition: get_job.h:116
A set of output parameters for const.
Definition: get_job.h:110