package ee.shy.core;

import ee.shy.storage.Hash;

/**
 * Class representing an item in a {@link Tree}: a file or another {@link Tree}.
 */
public class TreeItem {
    /**
     * Tree item type (<code>file</code> or <code>tree</code>).
     */
    private final String type;

    /**
     * Tree item hash.
     */
    private final Hash hash;

    public TreeItem(String type, Hash hash) {
        this.type = type;
        this.hash = hash;
    }
}

@@ -15,16 +15,67 @@
 .core;%0A%0A
+import com.google.gson.annotations.SerializedName;%0A
 import e
@@ -94,16 +94,16 @@
 e.Hash;%0A
-
 %0A/**%0A * 
@@ -208,16 +208,278 @@
 eItem %7B%0A
+    /**%0A     * Enum of all item types.%0A     */%0A    public enum Type %7B%0A        /**%0A         * File item.%0A         */%0A        @SerializedName(%22file%22)%0A        FILE,%0A%0A        /**%0A         * Tree item.%0A         */%0A        @SerializedName(%22tree%22)%0A        TREE,%0A    %7D%0A%0A
     /**%0A
@@ -568,22 +568,20 @@
 e final 
-String
+Type
  type;%0A%0A
@@ -673,14 +673,12 @@
 tem(
-String
+Type
  typ

Use enum for TreeItem type