 
 public enum Content {
     public struct File: CustomStringConvertible {
-        public enum ContentType: String {
-            case file
-            case dir
-            case symlink
-            case submodule
+        public enum ContentType {
+            case file(size: Int)
+            case directory
+            case symlink(target: String)
+            case submodule(url: String)
         }
 
         /// The type of content
-        public let type: ContentType
-
-        /// Path to actual content when content is a symlink
-        public let target: String?
-
-        /// Size when content is a file
-        public let size: Int
+        public let content: ContentType
 
         /// Name of the file
         public let name: String


    case file(File)
    case directory([File])
}

extension Content: Hashable {

    }
}

extension Content.File: ResourceType {
    public static func decode(_ j: JSON) -> Decoded<Content.File> {
        let f = curry(Content.File.init)

        return f
            <^> Content.File.ContentType.decode(j)
            <*> j <| "name"
            <*> j <| "path"
            <*> j <| "sha"
