GPUdb C++ API  Version 7.2.2.4
create_trigger_by_area.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_TRIGGER_BY_AREA_H__
7 #define __CREATE_TRIGGER_BY_AREA_H__
8 
9 namespace gpudb
10 {
36  {
42  requestId(std::string()),
43  tableNames(std::vector<std::string>()),
44  xColumnName(std::string()),
45  xVector(std::vector<double>()),
46  yColumnName(std::string()),
47  yVector(std::vector<double>()),
48  options(std::map<std::string, std::string>())
49  {
50  }
51 
82  CreateTriggerByAreaRequest(const std::string& requestId_, const std::vector<std::string>& tableNames_, const std::string& xColumnName_, const std::vector<double>& xVector_, const std::string& yColumnName_, const std::vector<double>& yVector_, const std::map<std::string, std::string>& options_):
83  requestId( requestId_ ),
84  tableNames( tableNames_ ),
85  xColumnName( xColumnName_ ),
86  xVector( xVector_ ),
87  yColumnName( yColumnName_ ),
88  yVector( yVector_ ),
89  options( options_ )
90  {
91  }
92 
97  std::string requestId;
98 
105  std::vector<std::string> tableNames;
106 
111  std::string xColumnName;
112 
118  std::vector<double> xVector;
119 
124  std::string yColumnName;
125 
131  std::vector<double> yVector;
132 
136  std::map<std::string, std::string> options;
137  };
138 } // end namespace gpudb
139 
140 namespace avro
141 {
142  template<> struct codec_traits<gpudb::CreateTriggerByAreaRequest>
143  {
144  static void encode(Encoder& e, const gpudb::CreateTriggerByAreaRequest& v)
145  {
146  ::avro::encode(e, v.requestId);
147  ::avro::encode(e, v.tableNames);
148  ::avro::encode(e, v.xColumnName);
149  ::avro::encode(e, v.xVector);
150  ::avro::encode(e, v.yColumnName);
151  ::avro::encode(e, v.yVector);
152  ::avro::encode(e, v.options);
153  }
154 
155  static void decode(Decoder& d, gpudb::CreateTriggerByAreaRequest& v)
156  {
157  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
158  {
159  const std::vector<size_t> fo = rd->fieldOrder();
160 
161  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
162  {
163  switch (*it)
164  {
165  case 0:
166  ::avro::decode(d, v.requestId);
167  break;
168 
169  case 1:
170  ::avro::decode(d, v.tableNames);
171  break;
172 
173  case 2:
174  ::avro::decode(d, v.xColumnName);
175  break;
176 
177  case 3:
178  ::avro::decode(d, v.xVector);
179  break;
180 
181  case 4:
182  ::avro::decode(d, v.yColumnName);
183  break;
184 
185  case 5:
186  ::avro::decode(d, v.yVector);
187  break;
188 
189  case 6:
190  ::avro::decode(d, v.options);
191  break;
192 
193  default:
194  break;
195  }
196  }
197  }
198  else
199  {
200  ::avro::decode(d, v.requestId);
201  ::avro::decode(d, v.tableNames);
202  ::avro::decode(d, v.xColumnName);
203  ::avro::decode(d, v.xVector);
204  ::avro::decode(d, v.yColumnName);
205  ::avro::decode(d, v.yVector);
206  ::avro::decode(d, v.options);
207  }
208  }
209  };
210 } // end namespace avro
211 
212 namespace gpudb
213 {
220  {
226  triggerId(std::string()),
227  info(std::map<std::string, std::string>())
228  {
229  }
230 
235  std::string triggerId;
236 
240  std::map<std::string, std::string> info;
241  };
242 } // end namespace gpudb
243 
244 namespace avro
245 {
246  template<> struct codec_traits<gpudb::CreateTriggerByAreaResponse>
247  {
248  static void encode(Encoder& e, const gpudb::CreateTriggerByAreaResponse& v)
249  {
250  ::avro::encode(e, v.triggerId);
251  ::avro::encode(e, v.info);
252  }
253 
254  static void decode(Decoder& d, gpudb::CreateTriggerByAreaResponse& v)
255  {
256  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
257  {
258  const std::vector<size_t> fo = rd->fieldOrder();
259 
260  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
261  {
262  switch (*it)
263  {
264  case 0:
265  ::avro::decode(d, v.triggerId);
266  break;
267 
268  case 1:
269  ::avro::decode(d, v.info);
270  break;
271 
272  default:
273  break;
274  }
275  }
276  }
277  else
278  {
279  ::avro::decode(d, v.triggerId);
280  ::avro::decode(d, v.info);
281  }
282  }
283  };
284 } // end namespace avro
285 
286 #endif // __CREATE_TRIGGER_BY_AREA_H__
std::string yColumnName
Name of a second numeric column on which the trigger is activated.
std::string triggerId
Value of requestId.
CreateTriggerByAreaResponse()
Constructs a CreateTriggerByAreaResponse object with default parameters.
std::map< std::string, std::string > options
Optional parameters.
A set of results returned by GPUdb::createTriggerByArea.
CreateTriggerByAreaRequest()
Constructs a CreateTriggerByAreaRequest object with default parameters.
std::string xColumnName
Name of a numeric column on which the trigger is activated.
std::vector< double > yVector
The respective coordinate values for the region on which the trigger is activated.
std::vector< double > xVector
The respective coordinate values for the region on which the trigger is activated.
std::string requestId
User-created ID for the trigger.
std::vector< std::string > tableNames
Names of the tables on which the trigger will be activated and maintained, each in [ schema_name....
A set of parameters for GPUdb::createTriggerByArea.
CreateTriggerByAreaRequest(const std::string &requestId_, const std::vector< std::string > &tableNames_, const std::string &xColumnName_, const std::vector< double > &xVector_, const std::string &yColumnName_, const std::vector< double > &yVector_, const std::map< std::string, std::string > &options_)
Constructs a CreateTriggerByAreaRequest object with the specified parameters.
std::map< std::string, std::string > info
Additional information.