package com.atlassian.bitbucket.rest.content;

import com.atlassian.bitbucket.rest.RestMapEntity;
import com.atlassian.bitbucket.rest.util.RestPage;
import com.atlassian.bitbucket.rest.util.RestDocUtils;
import org.codehaus.jackson.map.annotate.JsonSerialize;

@JsonSerialize
public class RestDirectoryRevision extends RestMapEntity {

    public RestDirectoryRevision(RestPath path, String revision, RestPage<RestContentTreeNode> children) {
        put("path", path);
        put("revision", revision);
        put("children", children);
    }

    // REST Documentation Examples

    // TODO This isn't currently used - waiting on multiple examples in Jersey
    public static final RestDirectoryRevision EXAMPLE = new RestDirectoryRevision(RestPath.EXAMPLE, "",
            RestDocUtils.<RestContentTreeNode>pageOf(RestDirectory.EXAMPLE, RestFile.EXAMPLE, RestSubmodule.EXAMPLE));
}
