package eu.dnetlib.usagestats.sushilite;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

public class Report {
    private String created = "";
    private String version = "";
    private String name = "";

    private final Vendor vendor = new Vendor();

    private final Customer customer;

    /*
    public Report(String created, String name, String version, String requestor, String beginDate, String endDate,
                  String repositoryIdentifier, String itemIdentifier, String itemDataType, String granularity, List<ReportItem> reportItems) {
    */
    public Report(String created, String name, String version, String requestor, List<ReportItem> reportItems) {
        this.created = created;
        this.version = version;
        this.name = name + ":" + version;
        this.customer = new Customer(requestor, reportItems);
    }

    @JsonProperty("@Created")
    public String getCreated() {
        return created;
    }

    @JsonProperty("@Version")
    public String getVersion() {
        return version;
    }

    @JsonProperty("@Name")
    public String getName() {
        return name;
    }

    @JsonProperty("Vendor")
    public Vendor getVendor() {
        return vendor;
    }

    @JsonProperty("Customer")
    public Customer getCustomer() {
        return customer;
    }
}
