package org.jboss.da.rest.reports.model;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import java.util.List;

import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

/**
 *
 * @author Honza Brázdil <janinko.g@gmail.com>
 */
@XmlRootElement(name = "report")
@XmlAccessorType(XmlAccessType.FIELD)
@RequiredArgsConstructor
public class GAVRequest {

    @Getter
    @NonNull
    @XmlElement(required = true, name = "group_id")
    private final String groupId;

    @Getter
    @NonNull
    @XmlElement(required = true, name = "artifact_id")
    private final String artifactId;

    @Getter
    @NonNull
    @XmlElement(required = true, name = "version")
    private final String version;

    @Getter
    @NonNull
    @XmlElement(required = true, name = "products")
    private final List<Product> products;
}

@@ -35,16 +35,118 @@
 model;%0A%0A
+import org.codehaus.jackson.annotate.JsonCreator;%0Aimport org.codehaus.jackson.annotate.JsonProperty;%0A%0A
 import j
@@ -181,24 +181,24 @@
 AccessType;%0A
-
 import javax
@@ -402,47 +402,8 @@
 ull;
-%0Aimport lombok.RequiredArgsConstructor;
 %0A%0A/*
@@ -533,33 +533,8 @@
 LD)%0A
-@RequiredArgsConstructor%0A
 publ
@@ -554,16 +554,403 @@
 equest %7B
+%0A%0A    @JsonCreator%0A    public GAVRequest(@JsonProperty(%22groupId%22) String groupId,%0A            @JsonProperty(%22artifactId%22) String artifactId, @JsonProperty(%22version%22) String version,%0A            @JsonProperty(%22products%22) List%3CProduct%3E products) %7B%0A        this.groupId = groupId;%0A        this.artifactId = artifactId;%0A        this.version = version;%0A        this.products = products;%0A    %7D
 %0A%0A    @G

Fix GAVRequest constructor so Jackson recognize it