class StopReplicaResponse extends AbstractResponse {

    @Override
    public Map<Errors, Integer> errorCounts() {
        if (data.errorCode() != Errors.NONE.code())
            // Minor optimization since the top-level error applies to all partitions
            return Collections.singletonMap(error(), data.partitionErrors().size());
        return errorCounts(data.partitionErrors().stream().map(p -> Errors.forCode(p.errorCode())));
    }

    public  StopReplicaResponse(StopReplicaResponseData data);
    public  StopReplicaResponse(Struct struct, short version);

}