namespace dgs.PlanNode;

enum Kind : uint8 {
  SOURCE         = 0,
  VERTEX_SAMPLER = 1,
  EDGE_SAMPLER   = 2,
}

enum ObjectType : uint8 {
  VERTEX = 0,
  EDGE = 1,
}

table ChildLink {
  node:uint32;
  src_output:uint8;
  dst_input:uint8;
}

table Param {
  key:string;
  value:uint8;
}

table PropertyFilter {
  weighted:bool = true;
  labeled:bool = true;
  attributed:bool = true;
}

namespace dgs;

table PlanNodeRep {
  id:uint32;
  kind:dgs.PlanNode.Kind;
  type:dgs.PlanNode.ObjectType;
  links:[dgs.PlanNode.ChildLink];
  params:[dgs.PlanNode.Param];
  filter:dgs.PlanNode.PropertyFilter;
}

root_type PlanNodeRep;