com.geotab.model.entity.group.Defect Maven / Gradle / Ivy
package com.geotab.model.entity.group;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.geotab.model.drawing.Color;
import com.geotab.model.enumeration.DefectSeverity;
import java.util.List;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* Represents a Defect entity. This defines the one to one relationship between a {@link
* DefectSeverity} and {@link Group}
*/
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class Defect extends Group {
/**
* The {@link DefectSeverity} of the Defect.
*/
private DefectSeverity severity;
/**
* List of {@link Defect} groups.
*/
private List groups;
@JsonProperty("isDefectList")
private Boolean isDefectList;
@Builder(builderMethodName = "defectBuilder")
public Defect(String id, String name, Color color, Group parent, List children,
String comments, String reference, DefectSeverity severity, List groups,
Boolean isDefectList) {
super(id, name, color, parent, children, comments, reference);
this.severity = severity;
this.groups = groups;
this.isDefectList = isDefectList;
}
protected Defect(String id, String name) {
super(id, name);
}
}