package com.atlassian.stash.internal.web.maintenance;

import com.atlassian.stash.internal.maintenance.MaintenanceTaskStatus;
import com.atlassian.stash.internal.rest.RestProgress;

import java.util.LinkedHashMap;

class RestMaintenanceTaskStatus extends LinkedHashMap<String, Object> {
    public RestMaintenanceTaskStatus(MaintenanceTaskStatus task) {
        put("id", task.getId());
        put("progress", new RestProgress(task.getProgress()));
        put("state", task.getState());
        put("type", task.getType());
    }
}
