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 
160  GetGraphEntitiesRequest(const std::string& graphName_, const int64_t offset_, const int64_t limit_, const std::map<std::string, std::string>& options_):
161  graphName( graphName_ ),
162  offset( offset_ ),
163  limit( limit_ ),
164  options( options_ )
165  {
166  }
167 
171  std::string graphName;
172 
177  int64_t offset;
178 
187  int64_t limit;
188 
265  std::map<std::string, std::string> options;
266  };
267 } // end namespace gpudb
268 
269 namespace avro
270 {
271  template<> struct codec_traits<gpudb::GetGraphEntitiesRequest>
272  {
273  static void encode(Encoder& e, const gpudb::GetGraphEntitiesRequest& v)
274  {
275  ::avro::encode(e, v.graphName);
276  ::avro::encode(e, v.offset);
277  ::avro::encode(e, v.limit);
278  ::avro::encode(e, v.options);
279  }
280 
281  static void decode(Decoder& d, gpudb::GetGraphEntitiesRequest& v)
282  {
283  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
284  {
285  const std::vector<size_t> fo = rd->fieldOrder();
286 
287  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
288  {
289  switch (*it)
290  {
291  case 0:
292  ::avro::decode(d, v.graphName);
293  break;
294 
295  case 1:
296  ::avro::decode(d, v.offset);
297  break;
298 
299  case 2:
300  ::avro::decode(d, v.limit);
301  break;
302 
303  case 3:
304  ::avro::decode(d, v.options);
305  break;
306 
307  default:
308  break;
309  }
310  }
311  }
312  else
313  {
314  ::avro::decode(d, v.graphName);
315  ::avro::decode(d, v.offset);
316  ::avro::decode(d, v.limit);
317  ::avro::decode(d, v.options);
318  }
319  }
320  };
321 } // end namespace avro
322 
323 namespace gpudb
324 {
331  {
337  result(bool()),
338  entitiesInt(std::vector<int64_t>()),
339  entitiesString(std::vector<std::string>()),
340  entitiesDouble(std::vector<double>()),
341  entitiesWeight(std::vector<float>()),
342  labels(std::vector<std::string>()),
343  info(std::map<std::string, std::string>())
344  {
345  }
346 
350  bool result;
351 
365  std::vector<int64_t> entitiesInt;
366 
378  std::vector<std::string> entitiesString;
379 
393  std::vector<double> entitiesDouble;
394 
405  std::vector<float> entitiesWeight;
406 
412  std::vector<std::string> labels;
413 
438  std::map<std::string, std::string> info;
439  };
440 } // end namespace gpudb
441 
442 namespace avro
443 {
444  template<> struct codec_traits<gpudb::GetGraphEntitiesResponse>
445  {
446  static void encode(Encoder& e, const gpudb::GetGraphEntitiesResponse& v)
447  {
448  ::avro::encode(e, v.result);
449  ::avro::encode(e, v.entitiesInt);
450  ::avro::encode(e, v.entitiesString);
451  ::avro::encode(e, v.entitiesDouble);
452  ::avro::encode(e, v.entitiesWeight);
453  ::avro::encode(e, v.labels);
454  ::avro::encode(e, v.info);
455  }
456 
457  static void decode(Decoder& d, gpudb::GetGraphEntitiesResponse& v)
458  {
459  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
460  {
461  const std::vector<size_t> fo = rd->fieldOrder();
462 
463  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
464  {
465  switch (*it)
466  {
467  case 0:
468  ::avro::decode(d, v.result);
469  break;
470 
471  case 1:
472  ::avro::decode(d, v.entitiesInt);
473  break;
474 
475  case 2:
476  ::avro::decode(d, v.entitiesString);
477  break;
478 
479  case 3:
480  ::avro::decode(d, v.entitiesDouble);
481  break;
482 
483  case 4:
484  ::avro::decode(d, v.entitiesWeight);
485  break;
486 
487  case 5:
488  ::avro::decode(d, v.labels);
489  break;
490 
491  case 6:
492  ::avro::decode(d, v.info);
493  break;
494 
495  default:
496  break;
497  }
498  }
499  }
500  else
501  {
502  ::avro::decode(d, v.result);
503  ::avro::decode(d, v.entitiesInt);
504  ::avro::decode(d, v.entitiesString);
505  ::avro::decode(d, v.entitiesDouble);
506  ::avro::decode(d, v.entitiesWeight);
507  ::avro::decode(d, v.labels);
508  ::avro::decode(d, v.info);
509  }
510  }
511  };
512 } // end namespace avro
513 
514 #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< double > entitiesDouble
Compact double-packed payload for WKT (geo/XY) graphs.
std::vector< std::string > entitiesString
Flat array of entity data for name-identifier (string) graphs only.
GetGraphEntitiesResponse()
Constructs a GetGraphEntitiesResponse object with default parameters.
std::map< std::string, std::string > info
Additional information map.
std::vector< float > entitiesWeight
Per-edge weight values, populated only when the request option 'include_weights' is 'true' and option...
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.