GPUdb C++ API  Version 7.2.2.4
modify_graph.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 __MODIFY_GRAPH_H__
7 #define __MODIFY_GRAPH_H__
8 
9 namespace gpudb
10 {
26  {
31  graphName(std::string()),
32  nodes(std::vector<std::string>()),
33  edges(std::vector<std::string>()),
34  weights(std::vector<std::string>()),
35  restrictions(std::vector<std::string>()),
36  options(std::map<std::string, std::string>())
37  {
38  }
39 
360  ModifyGraphRequest(const std::string& graphName_, const std::vector<std::string>& nodes_, const std::vector<std::string>& edges_, const std::vector<std::string>& weights_, const std::vector<std::string>& restrictions_, const std::map<std::string, std::string>& options_):
361  graphName( graphName_ ),
362  nodes( nodes_ ),
363  edges( edges_ ),
364  weights( weights_ ),
365  restrictions( restrictions_ ),
366  options( options_ )
367  {
368  }
369 
373  std::string graphName;
374 
394  std::vector<std::string> nodes;
395 
415  std::vector<std::string> edges;
416 
436  std::vector<std::string> weights;
437 
457  std::vector<std::string> restrictions;
458 
609  std::map<std::string, std::string> options;
610  };
611 } // end namespace gpudb
612 
613 namespace avro
614 {
615  template<> struct codec_traits<gpudb::ModifyGraphRequest>
616  {
617  static void encode(Encoder& e, const gpudb::ModifyGraphRequest& v)
618  {
619  ::avro::encode(e, v.graphName);
620  ::avro::encode(e, v.nodes);
621  ::avro::encode(e, v.edges);
622  ::avro::encode(e, v.weights);
623  ::avro::encode(e, v.restrictions);
624  ::avro::encode(e, v.options);
625  }
626 
627  static void decode(Decoder& d, gpudb::ModifyGraphRequest& v)
628  {
629  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
630  {
631  const std::vector<size_t> fo = rd->fieldOrder();
632 
633  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
634  {
635  switch (*it)
636  {
637  case 0:
638  ::avro::decode(d, v.graphName);
639  break;
640 
641  case 1:
642  ::avro::decode(d, v.nodes);
643  break;
644 
645  case 2:
646  ::avro::decode(d, v.edges);
647  break;
648 
649  case 3:
650  ::avro::decode(d, v.weights);
651  break;
652 
653  case 4:
654  ::avro::decode(d, v.restrictions);
655  break;
656 
657  case 5:
658  ::avro::decode(d, v.options);
659  break;
660 
661  default:
662  break;
663  }
664  }
665  }
666  else
667  {
668  ::avro::decode(d, v.graphName);
669  ::avro::decode(d, v.nodes);
670  ::avro::decode(d, v.edges);
671  ::avro::decode(d, v.weights);
672  ::avro::decode(d, v.restrictions);
673  ::avro::decode(d, v.options);
674  }
675  }
676  };
677 } // end namespace avro
678 
679 namespace gpudb
680 {
687  {
692  result(bool()),
693  numNodes(int64_t()),
694  numEdges(int64_t()),
695  edgesIds(std::vector<int64_t>()),
696  info(std::map<std::string, std::string>())
697  {
698  }
699 
703  bool result;
704 
708  int64_t numNodes;
709 
713  int64_t numEdges;
714 
720  std::vector<int64_t> edgesIds;
721 
725  std::map<std::string, std::string> info;
726  };
727 } // end namespace gpudb
728 
729 namespace avro
730 {
731  template<> struct codec_traits<gpudb::ModifyGraphResponse>
732  {
733  static void encode(Encoder& e, const gpudb::ModifyGraphResponse& v)
734  {
735  ::avro::encode(e, v.result);
736  ::avro::encode(e, v.numNodes);
737  ::avro::encode(e, v.numEdges);
738  ::avro::encode(e, v.edgesIds);
739  ::avro::encode(e, v.info);
740  }
741 
742  static void decode(Decoder& d, gpudb::ModifyGraphResponse& v)
743  {
744  if (::avro::ResolvingDecoder *rd = dynamic_cast< ::avro::ResolvingDecoder*>(&d))
745  {
746  const std::vector<size_t> fo = rd->fieldOrder();
747 
748  for (std::vector<size_t>::const_iterator it = fo.begin(); it != fo.end(); ++it)
749  {
750  switch (*it)
751  {
752  case 0:
753  ::avro::decode(d, v.result);
754  break;
755 
756  case 1:
757  ::avro::decode(d, v.numNodes);
758  break;
759 
760  case 2:
761  ::avro::decode(d, v.numEdges);
762  break;
763 
764  case 3:
765  ::avro::decode(d, v.edgesIds);
766  break;
767 
768  case 4:
769  ::avro::decode(d, v.info);
770  break;
771 
772  default:
773  break;
774  }
775  }
776  }
777  else
778  {
779  ::avro::decode(d, v.result);
780  ::avro::decode(d, v.numNodes);
781  ::avro::decode(d, v.numEdges);
782  ::avro::decode(d, v.edgesIds);
783  ::avro::decode(d, v.info);
784  }
785  }
786  };
787 } // end namespace avro
788 
789 #endif // __MODIFY_GRAPH_H__
std::vector< std::string > edges
Edges with which to update existing edges in graph specified by graphName.
Definition: modify_graph.h:415
std::vector< std::string > nodes
Nodes with which to update existing nodes in graph specified by graphName.
Definition: modify_graph.h:394
A set of parameters for GPUdb::modifyGraph.
Definition: modify_graph.h:25
A set of results returned by GPUdb::modifyGraph.
Definition: modify_graph.h:686
bool result
Indicates a successful modification on all servers.
Definition: modify_graph.h:703
std::vector< std::string > restrictions
Restrictions with which to update existing restrictions in graph specified by graphName.
Definition: modify_graph.h:457
std::string graphName
Name of the graph resource to modify.
Definition: modify_graph.h:373
int64_t numEdges
Total number of edges in the graph.
Definition: modify_graph.h:713
ModifyGraphResponse()
Constructs a ModifyGraphResponse object with default parameters.
Definition: modify_graph.h:691
std::vector< std::string > weights
Weights with which to update existing weights in graph specified by graphName.
Definition: modify_graph.h:436
ModifyGraphRequest(const std::string &graphName_, const std::vector< std::string > &nodes_, const std::vector< std::string > &edges_, const std::vector< std::string > &weights_, const std::vector< std::string > &restrictions_, const std::map< std::string, std::string > &options_)
Constructs a ModifyGraphRequest object with the specified parameters.
Definition: modify_graph.h:360
std::map< std::string, std::string > options
Optional parameters.
Definition: modify_graph.h:609
int64_t numNodes
Total number of nodes in the graph.
Definition: modify_graph.h:708
ModifyGraphRequest()
Constructs a ModifyGraphRequest object with default parameters.
Definition: modify_graph.h:30
std::map< std::string, std::string > info
Additional information.
Definition: modify_graph.h:725
std::vector< int64_t > edgesIds
Edges given as pairs of node indices.
Definition: modify_graph.h:720