package be.iminds.ilabt.jfed.lowlevel.fedmon;

/**
 * TestResult from fedmon
 */
public class TestResult {
    public final String id;
    public final String summary;
    public final String fixedNodeName;
    public final String fixedNodeUrn;
    public final String county;
    public final String latitude;
    public final String longitude;
    public final Boolean testInstanceEnabled;


    public TestResult(String id, String summary, String fixedNodeName, String fixedNodeUrn, String county, String latitude, String longitude, Boolean testInstanceEnabled) {
        this.id = id;
        this.summary = summary;
        this.fixedNodeName = fixedNodeName;
        this.fixedNodeUrn = fixedNodeUrn;
        this.county = county;
        this.latitude = latitude;
        this.longitude = longitude;
        this.testInstanceEnabled = testInstanceEnabled;
    }

    public String getId() {
        return id;
    }

    public String getSummary() {
        return summary;
    }

    public boolean isSuccessSummary() {
        return summary != null && summary.equalsIgnoreCase("success");
    }

    public String getFixedNodeName() {
        return fixedNodeName;
    }

    public String getFixedNodeUrn() {
        return fixedNodeUrn;
    }

    public String getCounty() {
        return county;
    }

    public String getLatitude() {
        return latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public Boolean getTestInstanceEnabled() {
        return testInstanceEnabled;
    }

    @Override
    public String toString() {
        return "TestResult{" +
                "id='" + id + '\'' +
                ", summary='" + summary + '\'' +
                ", fixedNodeName='" + fixedNodeName + '\'' +
                ", fixedNodeUrn='" + fixedNodeUrn + '\'' +
                ", county='" + county + '\'' +
                ", latitude='" + latitude + '\'' +
                ", longitude='" + longitude + '\'' +
                ", testInstanceEnabled=" + testInstanceEnabled +
                '}';
    }
}
