class RestResult extends BaseFailingOrSucceedingResult<T, RestFailure> {

    public static <T> RestResult<List<T>> aggregate(final List<RestResult<T>> input) {
        return BaseFailingOrSucceedingResult.aggregate(
                input,
                (f1, f2) -> new RestFailure(combineLists(f1.getErrors(), f2.getErrors())),
                restSuccess(emptyList()));
    }

    public  RestResult(RestResult<T> original);
    public  RestResult(Either<RestFailure, T> result, HttpStatus successfulStatusCode);

}