class AlterReplicaLogDirsRequest extends AbstractRequest {

    @Override
    public AlterReplicaLogDirsResponse getErrorResponse(int throttleTimeMs, Throwable e) {
        AlterReplicaLogDirsResponseData data = new AlterReplicaLogDirsResponseData();
        data.setResults(this.data.dirs().stream().flatMap(alterDir ->
            alterDir.topics().stream().map(topic ->
                new AlterReplicaLogDirTopicResult()
                    .setTopicName(topic.name())
                    .setPartitions(topic.partitions().stream().map(partitionId ->
                        new AlterReplicaLogDirsResponseData.AlterReplicaLogDirPartitionResult()
                            .setErrorCode(Errors.forException(e).code())
                            .setPartitionIndex(partitionId)).collect(Collectors.toList())))).collect(Collectors.toList()));
        return new AlterReplicaLogDirsResponse(data.setThrottleTimeMs(throttleTimeMs));
    }

    public  AlterReplicaLogDirsRequest(Struct struct, short version);
    public  AlterReplicaLogDirsRequest(AlterReplicaLogDirsRequestData data, short version);

}