class ListOffsetRequest extends AbstractRequest {

    public static List<ListOffsetTopic> toListOffsetTopics(Map<TopicPartition, ListOffsetPartition> timestampsToSearch) {
        Map<String, ListOffsetTopic> topics = new HashMap<>();
        for (Map.Entry<TopicPartition, ListOffsetPartition> entry : timestampsToSearch.entrySet()) {
            TopicPartition tp = entry.getKey();
            ListOffsetTopic topic = topics.computeIfAbsent(tp.topic(), k -> new ListOffsetTopic().setName(tp.topic()));
            topic.partitions().add(entry.getValue());
        }
        return new ArrayList<>(topics.values());
    }

    private  ListOffsetRequest(short version, ListOffsetRequestData data);
    public  ListOffsetRequest(Struct struct, short version);

}