GPUdb C++ API  Version 5.2.0.0
create_trigger_by_area.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_TRIGGER_BY_AREA_H__
7 #define __CREATE_TRIGGER_BY_AREA_H__
8 
9 namespace gpudb
10 {
11 
35  {
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 
77  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):
78  requestId(requestId),
79  tableNames(tableNames),
80  xColumnName(xColumnName),
81  xVector(xVector),
82  yColumnName(yColumnName),
83  yVector(yVector),
84  options(options)
85  {
86  }
87 
88  std::string requestId;
89  std::vector<std::string> tableNames;
90  std::string xColumnName;
91  std::vector<double> xVector;
92  std::string yColumnName;
93  std::vector<double> yVector;
94  std::map<std::string, std::string> options;
95  };
96 }
97 
98 namespace avro
99 {
100  template<> struct codec_traits<gpudb::CreateTriggerByAreaRequest>
101  {
102  static void encode(Encoder& e, const gpudb::CreateTriggerByAreaRequest& v)
103  {
104  ::avro::encode(e, v.requestId);
105  ::avro::encode(e, v.tableNames);
106  ::avro::encode(e, v.xColumnName);
107  ::avro::encode(e, v.xVector);
108  ::avro::encode(e, v.yColumnName);
109  ::avro::encode(e, v.yVector);
110  ::avro::encode(e, v.options);
111  }
112 
113  static void decode(Decoder& d, gpudb::CreateTriggerByAreaRequest& v)
114  {
115  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
116  {
117  const std::vector<size_t> fo = rd->fieldOrder();
118 
119  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
120  {
121  switch (*it)
122  {
123  case 0:
124  ::avro::decode(d, v.requestId);
125  break;
126 
127  case 1:
128  ::avro::decode(d, v.tableNames);
129  break;
130 
131  case 2:
132  ::avro::decode(d, v.xColumnName);
133  break;
134 
135  case 3:
136  ::avro::decode(d, v.xVector);
137  break;
138 
139  case 4:
140  ::avro::decode(d, v.yColumnName);
141  break;
142 
143  case 5:
144  ::avro::decode(d, v.yVector);
145  break;
146 
147  case 6:
148  ::avro::decode(d, v.options);
149  break;
150 
151  default:
152  break;
153  }
154  }
155  }
156  else
157  {
158  ::avro::decode(d, v.requestId);
159  ::avro::decode(d, v.tableNames);
160  ::avro::decode(d, v.xColumnName);
161  ::avro::decode(d, v.xVector);
162  ::avro::decode(d, v.yColumnName);
163  ::avro::decode(d, v.yVector);
164  ::avro::decode(d, v.options);
165  }
166  }
167  };
168 }
169 
170 namespace gpudb
171 {
172 
196  {
197 
203  triggerId(std::string())
204  {
205  }
206 
207  std::string triggerId;
208  };
209 }
210 
211 namespace avro
212 {
213  template<> struct codec_traits<gpudb::CreateTriggerByAreaResponse>
214  {
215  static void encode(Encoder& e, const gpudb::CreateTriggerByAreaResponse& v)
216  {
217  ::avro::encode(e, v.triggerId);
218  }
219 
220  static void decode(Decoder& d, gpudb::CreateTriggerByAreaResponse& v)
221  {
222  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
223  {
224  const std::vector<size_t> fo = rd->fieldOrder();
225 
226  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
227  {
228  switch (*it)
229  {
230  case 0:
231  ::avro::decode(d, v.triggerId);
232  break;
233 
234  default:
235  break;
236  }
237  }
238  }
239  else
240  {
241  ::avro::decode(d, v.triggerId);
242  }
243  }
244  };
245 }
246 
247 #endif
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.
CreateTriggerByAreaResponse()
Constructs a CreateTriggerByAreaResponse object with default parameter values.
std::map< std::string, std::string > options
A set of output parameters for createTriggerByArea(const CreateTriggerByAreaRequest&) const...
CreateTriggerByAreaRequest()
Constructs a CreateTriggerByAreaRequest object with default parameter values.
std::vector< std::string > tableNames
A set of input parameters for createTriggerByArea(const CreateTriggerByAreaRequest&) const...