// Path: src/main/java/de/jeha/s3srv/xml/InstantXmlAdapter.java
// public class InstantXmlAdapter extends XmlAdapter<String, Instant> {
// 
//     private final DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT;
// 
//     @Override
//     public Instant unmarshal(String value) throws Exception {
//         return value != null ? formatter.parse(value, Instant::from) : null;
//     }
// 
//     @Override
//     public String marshal(Instant value) throws Exception {
//         return value != null ? formatter.format(value) : null;
//     }
// 
// }


import de.jeha.s3srv.xml.InstantXmlAdapter;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;

    @XmlElement(name = "CommonPrefixes")
    private List<CommonPrefix> commonPrefixes = new ArrayList<>();

    public ListBucketResult() {
    }

    public ListBucketResult(String name, Integer keyCount, Integer maxKeys, List<ContentsEntry> objects) {
        this.name = name;
        this.keyCount = keyCount;
        this.maxKeys = maxKeys;
        this.objects = objects;
    }

    public ListBucketResult(String name, Integer keyCount, Integer maxKeys, List<ContentsEntry> objects, List<CommonPrefix> commonPrefixes) {
        this.name = name;
        this.keyCount = keyCount;
        this.maxKeys = maxKeys;
        this.objects = objects;
        this.commonPrefixes = commonPrefixes;
    }

    public static class ContentsEntry {

        private static final String STORAGE_CLASS_STANDARD = "STANDARD";
        private static final String STORAGE_CLASS_REDUCED_REDUNDANCY = "REDUCED_REDUNDANCY";

        @XmlElement(name = "Key")
        private String key;

// Path: src/main/java/de/jeha/s3srv/xml/InstantXmlAdapter.java
// public class InstantXmlAdapter extends XmlAdapter<String, Instant> {
// 
//     private final DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT;
// 
//     @Override
//     public Instant unmarshal(String value) throws Exception {
//         return value != null ? formatter.parse(value, Instant::from) : null;
//     }
// 
//     @Override
//     public String marshal(Instant value) throws Exception {
//         return value != null ? formatter.format(value) : null;
//     }
// 
// }


// Path: src/main/java/de/jeha/s3srv/api/ListBucketResult.java
import de.jeha.s3srv.xml.InstantXmlAdapter;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;


    @XmlElement(name = "CommonPrefixes")
    private List<CommonPrefix> commonPrefixes = new ArrayList<>();

    public ListBucketResult() {
    }

    public ListBucketResult(String name, Integer keyCount, Integer maxKeys, List<ContentsEntry> objects) {
        this.name = name;
        this.keyCount = keyCount;
        this.maxKeys = maxKeys;
        this.objects = objects;
    }

    public ListBucketResult(String name, Integer keyCount, Integer maxKeys, List<ContentsEntry> objects, List<CommonPrefix> commonPrefixes) {
        this.name = name;
        this.keyCount = keyCount;
        this.maxKeys = maxKeys;
        this.objects = objects;
        this.commonPrefixes = commonPrefixes;
    }

    public static class ContentsEntry {

        private static final String STORAGE_CLASS_STANDARD = "STANDARD";
        private static final String STORAGE_CLASS_REDUCED_REDUNDANCY = "REDUCED_REDUNDANCY";

        @XmlElement(name = "Key")
        private String key;

        @XmlJavaTypeAdapter(InstantXmlAdapter.class)