Build map of nodeName -> ResourceClass for gracl hierarchy
NOTE: unfortunately we need to duplicate this function for subjects
due to limitations of the way type parameters are handled
See: https://github.com/Microsoft/TypeScript/issues/4890
Build map of nodeName -> SubjectClass for gracl hierarchy
NOTE: this is a duplicate of buildResourceHierachy that
is necessary for reasons explained above due to limitations
in the type system.
Class for building Resource/Subject class hierarchy based on schema