hydra-pg-0.18.0: src/main/haskell/Hydra/Pg/Graphviz/Dot.hs
-- Note: this is an automatically generated file. Do not edit.
-- | A model from the Graphviz DOT graph description language. Based on the grammar at https://graphviz.org/doc/info/lang.html
module Hydra.Pg.Graphviz.Dot where
import qualified Hydra.Core.Model as Model
import Prelude hiding (Enum, Ordering, decodeFloat, encodeFloat, fail, lines, map, pure, sum, unlines)
import qualified Data.Scientific as Sci
import Data.Void
-- | A Graphviz DOT attribute list: one or more comma/semicolon-separated lists of key-value pairs
newtype AttrList =
AttrList {
unAttrList :: [[EqualityPair]]}
deriving (Eq, Ord, Read, Show)
_AttrList = Model.Name "hydra.pg.graphviz.dot.AttrList"
-- | A Graphviz DOT attribute statement applying default attributes to graph, node, or edge elements
data AttrStmt =
AttrStmt {
attrStmtType :: AttrType,
attrStmtAttributes :: AttrList}
deriving (Eq, Ord, Read, Show)
_AttrStmt = Model.Name "hydra.pg.graphviz.dot.AttrStmt"
_AttrStmt_type = Model.Name "type"
_AttrStmt_attributes = Model.Name "attributes"
-- | The target of a Graphviz DOT attribute statement: graph, node, or edge
data AttrType =
AttrTypeGraph |
AttrTypeNode |
AttrTypeEdge
deriving (Eq, Ord, Read, Show)
_AttrType = Model.Name "hydra.pg.graphviz.dot.AttrType"
_AttrType_graph = Model.Name "graph"
_AttrType_node = Model.Name "node"
_AttrType_edge = Model.Name "edge"
-- | A Graphviz DOT compass point, used to select a specific side of a node for edge attachment
data CompassPt =
CompassPtN |
CompassPtNe |
CompassPtE |
CompassPtSe |
CompassPtS |
CompassPtSw |
CompassPtW |
CompassPtNw |
CompassPtC |
CompassPtNone
deriving (Eq, Ord, Read, Show)
_CompassPt = Model.Name "hydra.pg.graphviz.dot.CompassPt"
_CompassPt_n = Model.Name "n"
_CompassPt_ne = Model.Name "ne"
_CompassPt_e = Model.Name "e"
_CompassPt_se = Model.Name "se"
_CompassPt_s = Model.Name "s"
_CompassPt_sw = Model.Name "sw"
_CompassPt_w = Model.Name "w"
_CompassPt_nw = Model.Name "nw"
_CompassPt_c = Model.Name "c"
_CompassPt_none = Model.Name "none"
-- | A Graphviz DOT edge statement connecting a chain of nodes or subgraphs
data EdgeStmt =
EdgeStmt {
edgeStmtLeft :: NodeOrSubgraph,
edgeStmtRight :: [NodeOrSubgraph],
edgeStmtAttributes :: (Maybe AttrList)}
deriving (Eq, Ord, Read, Show)
_EdgeStmt = Model.Name "hydra.pg.graphviz.dot.EdgeStmt"
_EdgeStmt_left = Model.Name "left"
_EdgeStmt_right = Model.Name "right"
_EdgeStmt_attributes = Model.Name "attributes"
-- | A Graphviz DOT key = value pair
data EqualityPair =
EqualityPair {
equalityPairLeft :: Id,
equalityPairRight :: Id}
deriving (Eq, Ord, Read, Show)
_EqualityPair = Model.Name "hydra.pg.graphviz.dot.EqualityPair"
_EqualityPair_left = Model.Name "left"
_EqualityPair_right = Model.Name "right"
-- | A Graphviz DOT graph: an optionally strict, optionally directed graph with an optional ID and a list of statements
data Graph =
Graph {
graphStrict :: Bool,
graphDirected :: Bool,
graphId :: (Maybe Id),
graphStatements :: [Stmt]}
deriving (Eq, Ord, Read, Show)
_Graph = Model.Name "hydra.pg.graphviz.dot.Graph"
_Graph_strict = Model.Name "strict"
_Graph_directed = Model.Name "directed"
_Graph_id = Model.Name "id"
_Graph_statements = Model.Name "statements"
-- | A Graphviz DOT identifier
newtype Id =
Id {
unId :: String}
deriving (Eq, Ord, Read, Show)
_Id = Model.Name "hydra.pg.graphviz.dot.Id"
-- | A Graphviz DOT node identifier, with an optional port
data NodeId =
NodeId {
nodeIdId :: Id,
nodeIdPort :: (Maybe Port)}
deriving (Eq, Ord, Read, Show)
_NodeId = Model.Name "hydra.pg.graphviz.dot.NodeId"
_NodeId_id = Model.Name "id"
_NodeId_port = Model.Name "port"
-- | A Graphviz DOT node or subgraph, as an edge endpoint
data NodeOrSubgraph =
NodeOrSubgraphNode NodeId |
NodeOrSubgraphSubgraph Subgraph
deriving (Eq, Ord, Read, Show)
_NodeOrSubgraph = Model.Name "hydra.pg.graphviz.dot.NodeOrSubgraph"
_NodeOrSubgraph_node = Model.Name "node"
_NodeOrSubgraph_subgraph = Model.Name "subgraph"
-- | A Graphviz DOT node statement, with an optional attribute list
data NodeStmt =
NodeStmt {
nodeStmtId :: NodeId,
nodeStmtAttributes :: (Maybe AttrList)}
deriving (Eq, Ord, Read, Show)
_NodeStmt = Model.Name "hydra.pg.graphviz.dot.NodeStmt"
_NodeStmt_id = Model.Name "id"
_NodeStmt_attributes = Model.Name "attributes"
-- | A Graphviz DOT port: an optional identifier and/or compass point specifying an edge attachment point
data Port =
Port {
portId :: (Maybe Id),
portPosition :: (Maybe CompassPt)}
deriving (Eq, Ord, Read, Show)
_Port = Model.Name "hydra.pg.graphviz.dot.Port"
_Port_id = Model.Name "id"
_Port_position = Model.Name "position"
-- | A Graphviz DOT statement: a node, edge, attribute, equality, or subgraph statement
data Stmt =
StmtNode NodeStmt |
StmtEdge EdgeStmt |
StmtAttr AttrStmt |
StmtEquals EqualityPair |
StmtSubgraph Subgraph
deriving (Eq, Ord, Read, Show)
_Stmt = Model.Name "hydra.pg.graphviz.dot.Stmt"
_Stmt_node = Model.Name "node"
_Stmt_edge = Model.Name "edge"
_Stmt_attr = Model.Name "attr"
_Stmt_equals = Model.Name "equals"
_Stmt_subgraph = Model.Name "subgraph"
-- | A Graphviz DOT subgraph, with an optional ID and a list of statements
data Subgraph =
Subgraph {
subgraphSubgraphId :: (Maybe SubgraphId),
subgraphStatements :: [Stmt]}
deriving (Eq, Ord, Read, Show)
_Subgraph = Model.Name "hydra.pg.graphviz.dot.Subgraph"
_Subgraph_subgraphId = Model.Name "subgraphId"
_Subgraph_statements = Model.Name "statements"
-- | The optional identifier of a Graphviz DOT subgraph
newtype SubgraphId =
SubgraphId {
unSubgraphId :: (Maybe Id)}
deriving (Eq, Ord, Read, Show)
_SubgraphId = Model.Name "hydra.pg.graphviz.dot.SubgraphId"