package com.collabnet.ctf.events.custom.events;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Create Tracker REST entity
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class TrackerEntityRequest {

    private String name;
    private String title;
    private String description;
    private String icon;
    private String trackerUnitId;
    private boolean autosumForeignChildren;

    @JsonCreator
    public TrackerEntityRequest(
            @JsonProperty("name") String name,
            @JsonProperty("title") String title,
            @JsonProperty("description") String description,
            @JsonProperty("icon") String icon,
            @JsonProperty("trackerUnitId") String trackerUnitId,
            @JsonProperty("autosumForeignChildren") boolean autosumForeignChildren) {
        this.name = name;
        this.title = title;
        this.description = description;
        this.icon = icon;
        this.trackerUnitId = trackerUnitId;
        this.autosumForeignChildren = autosumForeignChildren;
    }

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

    @JsonProperty("title")
    public String getTitle() {
        return title;
    }

    @JsonProperty("description")
    public String getDescription() {
        return description;
    }

    @JsonProperty("icon")
    public String getIcon() {
        return icon;
    }

    @JsonProperty("trackerUnitId")
    public String getTrackerUnitId() {
        return trackerUnitId;
    }

    @JsonProperty("autosumForeignChildren")
    public boolean isAutosumForeignChildren() {
        return autosumForeignChildren;
    }
}
