GPUdb C++ API  Version 7.2.3.0
get_graph_entities.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 __GET_GRAPH_ENTITIES_H__
7 #define __GET_GRAPH_ENTITIES_H__
8 
9 namespace gpudb
10 {
22  {
27  graphName(std::string()),
28  offset(int64_t()),
29  limit(int64_t()),
30  options(std::map<std::string, std::string>())
31  {
32  }
33 
82  GetGraphEntitiesRequest(const std::string& graphName_, const int64_t offset_, const int64_t limit_, const std::map<std::string, std::string>& options_):
83  graphName( graphName_ ),
84  offset( offset_ ),
85  limit( limit_ ),
86  options( options_ )
87  {
88  }
89 
93  std::string graphName;
94 
99  int64_t offset;
100 
109  int64_t limit;
110 
135  std::map<std::string, std::string> options;
136  };
137 } // end namespace gpudb
138 
139 namespace avro
140 {
141  template<> struct codec_traits<gpudb::GetGraphEntitiesRequest>
142  {
143  static void encode(Encoder& e, const gpudb::GetGraphEntitiesRequest& v)
144  {
145  ::avro::encode(e, v.graphName);
146  ::avro::encode(e, v.offset);
147  ::avro::encode(e, v.limit);
148  ::avro::encode(e, v.options);
149  }
150 
151  static void decode(Decoder& d, gpudb::GetGraphEntitiesRequest& v)
152  {
153  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
154  {
155  const std::vector<size_t> fo = rd->fieldOrder();
156 
157  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
158  {
159  switch (*it)
160  {
161  case 0:
162  ::avro::decode(d, v.graphName);
163  break;
164 
165  case 1:
166  ::avro::decode(d, v.offset);
167  break;
168 
169  case 2:
170  ::avro::decode(d, v.limit);
171  break;
172 
173  case 3:
174  ::avro::decode(d, v.options);
175  break;
176 
177  default:
178  break;
179  }
180  }
181  }
182  else
183  {
184  ::avro::decode(d, v.graphName);
185  ::avro::decode(d, v.offset);
186  ::avro::decode(d, v.limit);
187  ::avro::decode(d, v.options);
188  }
189  }
190  };
191 } // end namespace avro
192 
193 namespace gpudb
194 {
201  {
207  result(bool()),
208  entitiesInt(std::vector<int64_t>()),
209  entitiesString(std::vector<std::string>()),
210  labels(std::vector<std::string>()),
211  info(std::map<std::string, std::string>())
212  {
213  }
214 
218  bool result;
219 
228  std::vector<int64_t> entitiesInt;
229 
242  std::vector<std::string> entitiesString;
243 
249  std::vector<std::string> labels;
250 
261  std::map<std::string, std::string> info;
262  };
263 } // end namespace gpudb
264 
265 namespace avro
266 {
267  template<> struct codec_traits<gpudb::GetGraphEntitiesResponse>
268  {
269  static void encode(Encoder& e, const gpudb::GetGraphEntitiesResponse& v)
270  {
271  ::avro::encode(e, v.result);
272  ::avro::encode(e, v.entitiesInt);
273  ::avro::encode(e, v.entitiesString);
274  ::avro::encode(e, v.labels);
275  ::avro::encode(e, v.info);
276  }
277 
278  static void decode(Decoder& d, gpudb::GetGraphEntitiesResponse& v)
279  {
280  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
281  {
282  const std::vector<size_t> fo = rd->fieldOrder();
283 
284  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
285  {
286  switch (*it)
287  {
288  case 0:
289  ::avro::decode(d, v.result);
290  break;
291 
292  case 1:
293  ::avro::decode(d, v.entitiesInt);
294  break;
295 
296  case 2:
297  ::avro::decode(d, v.entitiesString);
298  break;
299 
300  case 3:
301  ::avro::decode(d, v.labels);
302  break;
303 
304  case 4:
305  ::avro::decode(d, v.info);
306  break;
307 
308  default:
309  break;
310  }
311  }
312  }
313  else
314  {
315  ::avro::decode(d, v.result);
316  ::avro::decode(d, v.entitiesInt);
317  ::avro::decode(d, v.entitiesString);
318  ::avro::decode(d, v.labels);
319  ::avro::decode(d, v.info);
320  }
321  }
322  };
323 } // end namespace avro
324 
325 #endif // __GET_GRAPH_ENTITIES_H__
GetGraphEntitiesRequest(const std::string &graphName_, const int64_t offset_, const int64_t limit_, const std::map< std::string, std::string > &options_)
Constructs a GetGraphEntitiesRequest object with the specified parameters.
std::string graphName
Name of the graph from which to retrieve entities.
std::vector< std::string > entitiesString
Flat array of entity data for name-identifier or WKT-identifier (geo/XY) graphs with a repeating stri...
GetGraphEntitiesResponse()
Constructs a GetGraphEntitiesResponse object with default parameters.
std::map< std::string, std::string > info
Additional information map.
std::map< std::string, std::string > options
Optional parameters.
std::vector< std::string > labels
Array of distinct label strings.
GetGraphEntitiesRequest()
Constructs a GetGraphEntitiesRequest object with default parameters.
std::vector< int64_t > entitiesInt
Flat array of entity data for integer-identifier graphs with a repeating stride.
bool result
Indicates a successful retrieval.
int64_t offset
Starting index of the entities to retrieve (0-based).
int64_t limit
Number of entities to retrieve starting from offset.
A set of parameters for GPUdb::getGraphEntities.
A set of results returned by GPUdb::getGraphEntities.