GPUdb C++ API  Version 6.2.0.3
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 
69  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_):
70  endpoint( endpoint_ ),
71  requestEncoding( requestEncoding_ ),
72  data( data_ ),
73  dataStr( dataStr_ ),
74  options( options_ )
75  {
76  }
77 
78  std::string endpoint;
79  std::string requestEncoding;
80  std::vector<uint8_t> data;
81  std::string dataStr;
82  std::map<std::string, std::string> options;
83  };
84 }
85 
86 namespace avro
87 {
88  template<> struct codec_traits<gpudb::CreateJobRequest>
89  {
90  static void encode(Encoder& e, const gpudb::CreateJobRequest& v)
91  {
92  ::avro::encode(e, v.endpoint);
93  ::avro::encode(e, v.requestEncoding);
94  ::avro::encode(e, v.data);
95  ::avro::encode(e, v.dataStr);
96  ::avro::encode(e, v.options);
97  }
98 
99  static void decode(Decoder& d, gpudb::CreateJobRequest& v)
100  {
101  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
102  {
103  const std::vector<size_t> fo = rd->fieldOrder();
104 
105  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
106  {
107  switch (*it)
108  {
109  case 0:
110  ::avro::decode(d, v.endpoint);
111  break;
112 
113  case 1:
114  ::avro::decode(d, v.requestEncoding);
115  break;
116 
117  case 2:
118  ::avro::decode(d, v.data);
119  break;
120 
121  case 3:
122  ::avro::decode(d, v.dataStr);
123  break;
124 
125  case 4:
126  ::avro::decode(d, v.options);
127  break;
128 
129  default:
130  break;
131  }
132  }
133  }
134  else
135  {
136  ::avro::decode(d, v.endpoint);
137  ::avro::decode(d, v.requestEncoding);
138  ::avro::decode(d, v.data);
139  ::avro::decode(d, v.dataStr);
140  ::avro::decode(d, v.options);
141  }
142  }
143  };
144 }
145 
146 namespace gpudb
147 {
148 
159  {
160 
165  jobId(int32_t())
166  {
167  }
168 
169  int32_t jobId;
170  };
171 }
172 
173 namespace avro
174 {
175  template<> struct codec_traits<gpudb::CreateJobResponse>
176  {
177  static void encode(Encoder& e, const gpudb::CreateJobResponse& v)
178  {
179  ::avro::encode(e, v.jobId);
180  }
181 
182  static void decode(Decoder& d, gpudb::CreateJobResponse& v)
183  {
184  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
185  {
186  const std::vector<size_t> fo = rd->fieldOrder();
187 
188  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
189  {
190  switch (*it)
191  {
192  case 0:
193  ::avro::decode(d, v.jobId);
194  break;
195 
196  default:
197  break;
198  }
199  }
200  }
201  else
202  {
203  ::avro::decode(d, v.jobId);
204  }
205  }
206  };
207 }
208 
209 #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:69
A set of input parameters for createJob(const CreateJobRequest&) const.
Definition: create_job.h:21
CreateJobResponse()
Constructs a CreateJobResponse object with default parameter values.
Definition: create_job.h:164
std::string requestEncoding
Definition: create_job.h:79
CreateJobRequest()
Constructs a CreateJobRequest object with default parameter values.
Definition: create_job.h:27
std::string endpoint
Definition: create_job.h:78
std::map< std::string, std::string > options
Definition: create_job.h:82
std::vector< uint8_t > data
Definition: create_job.h:80
A set of output parameters for createJob(const CreateJobRequest&) const.
Definition: create_job.h:158