// Path: src/main/java/com/github/mkopylec/errorest/configuration/ErrorestProperties.java
// public enum ResponseBodyFormat {
//     WITHOUT_DESCRIPTIONS, FULL
// }
// 
// Path: src/main/java/com/github/mkopylec/errorest/logging/ErrorsLoggingList.java
// public class ErrorsLoggingList extends ArrayList<Error> {
// 
//     public ErrorsLoggingList() {
//         super(1);
//     }
// 
//     public ErrorsLoggingList(Collection<? extends Error> c) {
//         super(c);
//     }
// 
//     @Override
//     public String toString() {
//         return stream().map(Error::toString).collect(joining(" | "));
//     }
// }


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.github.mkopylec.errorest.configuration.ErrorestProperties.ResponseBodyFormat;
import com.github.mkopylec.errorest.logging.ErrorsLoggingList;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import java.util.List;
import static java.util.Collections.emptyList;
import static org.springframework.util.Assert.hasText;
package com.github.mkopylec.errorest.response;




@JacksonXmlRootElement(localName = "body")
public class Errors {

    public static final String EMPTY_ERRORS_ID = "N/A";

    protected final String id;
    @JacksonXmlProperty(localName = "error")
    @JacksonXmlElementWrapper(localName = "errors")
    protected final List<Error> errors;

    @JsonCreator
    public Errors(
            @JsonProperty("id") @JacksonXmlProperty(localName = "id") String id,
            @JsonProperty("errors") @JacksonXmlProperty(localName = "Jackson bug workaround") List<Error> errors
    ) {
        hasText(id, "Empty errors ID");
        this.id = id;
// Path: src/main/java/com/github/mkopylec/errorest/configuration/ErrorestProperties.java
// public enum ResponseBodyFormat {
//     WITHOUT_DESCRIPTIONS, FULL
// }
// 
// Path: src/main/java/com/github/mkopylec/errorest/logging/ErrorsLoggingList.java
// public class ErrorsLoggingList extends ArrayList<Error> {
// 
//     public ErrorsLoggingList() {
//         super(1);
//     }
// 
//     public ErrorsLoggingList(Collection<? extends Error> c) {
//         super(c);
//     }
// 
//     @Override
//     public String toString() {
//         return stream().map(Error::toString).collect(joining(" | "));
//     }
// }


// Path: src/main/java/com/github/mkopylec/errorest/response/Errors.java
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import com.github.mkopylec.errorest.configuration.ErrorestProperties.ResponseBodyFormat;
import com.github.mkopylec.errorest.logging.ErrorsLoggingList;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import java.util.List;
import static java.util.Collections.emptyList;
import static org.springframework.util.Assert.hasText;

package com.github.mkopylec.errorest.response;




@JacksonXmlRootElement(localName = "body")
public class Errors {

    public static final String EMPTY_ERRORS_ID = "N/A";

    protected final String id;
    @JacksonXmlProperty(localName = "error")
    @JacksonXmlElementWrapper(localName = "errors")
    protected final List<Error> errors;

    @JsonCreator
    public Errors(
            @JsonProperty("id") @JacksonXmlProperty(localName = "id") String id,
            @JsonProperty("errors") @JacksonXmlProperty(localName = "Jackson bug workaround") List<Error> errors
    ) {
        hasText(id, "Empty errors ID");
        this.id = id;
        this.errors = errors == null ? new ErrorsLoggingList() : new ErrorsLoggingList(errors);