GPUdb C++ API  Version 7.1.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
create_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 __CREATE_JOB_H__
7 #define __CREATE_JOB_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  endpoint(std::string()),
29  requestEncoding(std::string()),
30  data(std::vector<uint8_t>()),
31  dataStr(std::string()),
32  options(std::map<std::string, std::string>())
33  {
34  }
35 
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 
91  std::string endpoint;
92  std::string requestEncoding;
93  std::vector<uint8_t> data;
94  std::string dataStr;
95  std::map<std::string, std::string> options;
96  };
97 }
98 
99 namespace avro
100 {
101  template<> struct codec_traits<gpudb::CreateJobRequest>
102  {
103  static void encode(Encoder& e, const gpudb::CreateJobRequest& v)
104  {
105  ::avro::encode(e, v.endpoint);
106  ::avro::encode(e, v.requestEncoding);
107  ::avro::encode(e, v.data);
108  ::avro::encode(e, v.dataStr);
109  ::avro::encode(e, v.options);
110  }
111 
112  static void decode(Decoder& d, gpudb::CreateJobRequest& v)
113  {
114  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
115  {
116  const std::vector<size_t> fo = rd->fieldOrder();
117 
118  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
119  {
120  switch (*it)
121  {
122  case 0:
123  ::avro::decode(d, v.endpoint);
124  break;
125 
126  case 1:
127  ::avro::decode(d, v.requestEncoding);
128  break;
129 
130  case 2:
131  ::avro::decode(d, v.data);
132  break;
133 
134  case 3:
135  ::avro::decode(d, v.dataStr);
136  break;
137 
138  case 4:
139  ::avro::decode(d, v.options);
140  break;
141 
142  default:
143  break;
144  }
145  }
146  }
147  else
148  {
149  ::avro::decode(d, v.endpoint);
150  ::avro::decode(d, v.requestEncoding);
151  ::avro::decode(d, v.data);
152  ::avro::decode(d, v.dataStr);
153  ::avro::decode(d, v.options);
154  }
155  }
156  };
157 }
158 
159 namespace gpudb
160 {
161 
172  {
173 
178  jobId(int64_t()),
179  info(std::map<std::string, std::string>())
180  {
181  }
182 
183  int64_t jobId;
184  std::map<std::string, std::string> info;
185  };
186 }
187 
188 namespace avro
189 {
190  template<> struct codec_traits<gpudb::CreateJobResponse>
191  {
192  static void encode(Encoder& e, const gpudb::CreateJobResponse& v)
193  {
194  ::avro::encode(e, v.jobId);
195  ::avro::encode(e, v.info);
196  }
197 
198  static void decode(Decoder& d, gpudb::CreateJobResponse& v)
199  {
200  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
201  {
202  const std::vector<size_t> fo = rd->fieldOrder();
203 
204  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
205  {
206  switch (*it)
207  {
208  case 0:
209  ::avro::decode(d, v.jobId);
210  break;
211 
212  case 1:
213  ::avro::decode(d, v.info);
214  break;
215 
216  default:
217  break;
218  }
219  }
220  }
221  else
222  {
223  ::avro::decode(d, v.jobId);
224  ::avro::decode(d, v.info);
225  }
226  }
227  };
228 }
229 
230 #endif
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 input parameters for const.
Definition: create_job.h:21
CreateJobResponse()
Constructs a CreateJobResponse object with default parameter values.
Definition: create_job.h:177
std::map< std::string, std::string > info
Definition: create_job.h:184
std::string requestEncoding
Definition: create_job.h:92
CreateJobRequest()
Constructs a CreateJobRequest object with default parameter values.
Definition: create_job.h:27
std::string endpoint
Definition: create_job.h:91
std::map< std::string, std::string > options
Definition: create_job.h:95
std::vector< uint8_t > data
Definition: create_job.h:93
A set of output parameters for const.
Definition: create_job.h:171