package co.trackin.client.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;

import java.util.ArrayList;
import java.util.List;


/**
 *
 **/
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(description = "")
public class Line {

    private String comments = null;
    private String description = null;
    private String label = null;
    private List<Pick> picks = new ArrayList<Pick>();
    private Double price = null;
    private Integer quantity = null;
    private Double vat = null;
    private String idPartner = null;
    private Double total = null;


    /**
     **/
    @ApiModelProperty(required = false, value = "")
    @JsonProperty("comments")
    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }


    /**
     **/
    @ApiModelProperty(required = false, value = "")
    @JsonProperty("description")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }


    /**
     * Line name (ex: 'Hamburger', 'Orange juice' or '1L of rocket fuel')
     */
    @ApiModelProperty(required = false, value = "Line name (ex: 'Hamburger', 'Orange juice' or '1L of rocket fuel')")
    @JsonProperty("label")
    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }


    /**
     **/
    @ApiModelProperty(required = false, value = "")
    @JsonProperty("picks")
    public List<Pick> getPicks() {
        return picks;
    }

    public void setPicks(List<Pick> picks) {
        this.picks = picks;
    }


    /**
     *
     **/
    @ApiModelProperty(required = false, value = "")
    @JsonProperty("price")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }


    /**
     * Minimum value is 1
     */
    @ApiModelProperty(required = false, value = "Minimum value is 1")
    @JsonProperty("quantity")
    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }


    /**
     * Taxes rate (0 if not applicable)
     */
    @ApiModelProperty(required = false, value = "Taxes rate (0 if not applicable)")
    @JsonProperty("vat")
    public Double getVat() {
        return vat;
    }

    public void setVat(Double vat) {
        this.vat = vat;
    }


    /**
     * Id in your database, or in the client's P.O.S (depends on the usage you make of it)
     */
    @ApiModelProperty(required = false, value = "Id in your database, or in the client's P.O.S (depends on the usage you make of it)")
    @JsonProperty("idPartner")
    public String getIdPartner() {
        return idPartner;
    }

    public void setIdPartner(String idPartner) {
        this.idPartner = idPartner;
    }


    /**
     **/
    @ApiModelProperty(required = false, value = "")
    @JsonProperty("total")
    public Double getTotal() {
        return total;
    }

    public void setTotal(Double total) {
        this.total = total;
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class LineVM {\n");

        sb.append("  comments: ").append(comments).append("\n");
        sb.append("  description: ").append(description).append("\n");
        sb.append("  label: ").append(label).append("\n");
        sb.append("  picks: ").append(picks).append("\n");
        sb.append("  price: ").append(price).append("\n");
        sb.append("  quantity: ").append(quantity).append("\n");
        sb.append("  vat: ").append(vat).append("\n");
        sb.append("  idPartner: ").append(idPartner).append("\n");
        sb.append("  total: ").append(total).append("\n");
        sb.append("}\n");
        return sb.toString();
    }
}

@@ -134,16 +134,56 @@
 operty;%0A
+import com.sun.istack.internal.NotNull;%0A
 import c
@@ -537,23 +537,16 @@
 ng label
- = null
 ;%0A    pr
@@ -617,23 +617,16 @@
 le price
- = null
 ;%0A    pr
@@ -631,23 +631,19 @@
 private 
-I
+i
 nt
-eger
  quantit
@@ -643,23 +643,16 @@
 quantity
- = null
 ;%0A    pr
@@ -670,20 +670,26 @@
 e vat = 
-null
+(double) 0
 ;%0A    pr
@@ -754,16 +754,189 @@
 null;%0A%0A%0A
+    public Line(String label, Double price, int quantity)%7B%0A        this.label=label;%0A        this.price = price;%0A        this.quantity = quantity;%0A    %7D%0A%0A    Line()%7B%0A    %7D%0A%0A
     /**%0A
@@ -1755,84 +1755,8 @@
  %7D%0A%0A
-    public void setLabel(String label) %7B%0A        this.label = label;%0A    %7D%0A%0A
 %0A   
@@ -2160,84 +2160,8 @@
  %7D%0A%0A
-    public void setPrice(Double price) %7B%0A        this.price = price;%0A    %7D%0A%0A
 %0A   
@@ -2370,97 +2370,8 @@
  %7D%0A%0A
-    public void setQuantity(Integer quantity) %7B%0A        this.quantity = quantity;%0A    %7D%0A%0A
 %0A   
@@ -3251,84 +3251,8 @@
  %7D%0A%0A
-    public void setTotal(Double total) %7B%0A        this.total = total;%0A    %7D%0A%0A
 %0A   

Change Line default constructor + do not use null values