GPUdb C++ API  Version 6.1.0.0
create_proc.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_PROC_H__
7 #define __CREATE_PROC_H__
8 
9 namespace gpudb
10 {
11 
22  {
23 
28  procName(std::string()),
29  executionMode(std::string()),
30  files(std::map<std::string, std::vector<uint8_t> >()),
31  command(std::string()),
32  args(std::vector<std::string>()),
33  options(std::map<std::string, std::string>())
34  {
35  }
36 
87  CreateProcRequest(const std::string& procName_, const std::string& executionMode_, const std::map<std::string, std::vector<uint8_t> >& files_, const std::string& command_, const std::vector<std::string>& args_, const std::map<std::string, std::string>& options_):
88  procName( procName_ ),
89  executionMode( executionMode_ ),
90  files( files_ ),
91  command( command_ ),
92  args( args_ ),
93  options( options_ )
94  {
95  }
96 
97  std::string procName;
98  std::string executionMode;
99  std::map<std::string, std::vector<uint8_t> > files;
100  std::string command;
101  std::vector<std::string> args;
102  std::map<std::string, std::string> options;
103  };
104 }
105 
106 namespace avro
107 {
108  template<> struct codec_traits<gpudb::CreateProcRequest>
109  {
110  static void encode(Encoder& e, const gpudb::CreateProcRequest& v)
111  {
112  ::avro::encode(e, v.procName);
113  ::avro::encode(e, v.executionMode);
114  ::avro::encode(e, v.files);
115  ::avro::encode(e, v.command);
116  ::avro::encode(e, v.args);
117  ::avro::encode(e, v.options);
118  }
119 
120  static void decode(Decoder& d, gpudb::CreateProcRequest& v)
121  {
122  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
123  {
124  const std::vector<size_t> fo = rd->fieldOrder();
125 
126  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
127  {
128  switch (*it)
129  {
130  case 0:
131  ::avro::decode(d, v.procName);
132  break;
133 
134  case 1:
135  ::avro::decode(d, v.executionMode);
136  break;
137 
138  case 2:
139  ::avro::decode(d, v.files);
140  break;
141 
142  case 3:
143  ::avro::decode(d, v.command);
144  break;
145 
146  case 4:
147  ::avro::decode(d, v.args);
148  break;
149 
150  case 5:
151  ::avro::decode(d, v.options);
152  break;
153 
154  default:
155  break;
156  }
157  }
158  }
159  else
160  {
161  ::avro::decode(d, v.procName);
162  ::avro::decode(d, v.executionMode);
163  ::avro::decode(d, v.files);
164  ::avro::decode(d, v.command);
165  ::avro::decode(d, v.args);
166  ::avro::decode(d, v.options);
167  }
168  }
169  };
170 }
171 
172 namespace gpudb
173 {
174 
185  {
186 
192  procName(std::string())
193  {
194  }
195 
196  std::string procName;
197  };
198 }
199 
200 namespace avro
201 {
202  template<> struct codec_traits<gpudb::CreateProcResponse>
203  {
204  static void encode(Encoder& e, const gpudb::CreateProcResponse& v)
205  {
206  ::avro::encode(e, v.procName);
207  }
208 
209  static void decode(Decoder& d, gpudb::CreateProcResponse& v)
210  {
211  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
212  {
213  const std::vector<size_t> fo = rd->fieldOrder();
214 
215  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
216  {
217  switch (*it)
218  {
219  case 0:
220  ::avro::decode(d, v.procName);
221  break;
222 
223  default:
224  break;
225  }
226  }
227  }
228  else
229  {
230  ::avro::decode(d, v.procName);
231  }
232  }
233  };
234 }
235 
236 #endif
std::map< std::string, std::vector< uint8_t > > files
Definition: create_proc.h:99
CreateProcResponse()
Constructs a CreateProcResponse object with default parameter values.
Definition: create_proc.h:191
std::vector< std::string > args
Definition: create_proc.h:101
CreateProcRequest()
Constructs a CreateProcRequest object with default parameter values.
Definition: create_proc.h:27
std::string executionMode
Definition: create_proc.h:98
A set of output parameters for createProc(const CreateProcRequest&) const.
Definition: create_proc.h:184
CreateProcRequest(const std::string &procName_, const std::string &executionMode_, const std::map< std::string, std::vector< uint8_t > > &files_, const std::string &command_, const std::vector< std::string > &args_, const std::map< std::string, std::string > &options_)
Constructs a CreateProcRequest object with the specified parameters.
Definition: create_proc.h:87
std::map< std::string, std::string > options
Definition: create_proc.h:102
A set of input parameters for createProc(const CreateProcRequest&) const.
Definition: create_proc.h:21