package com.sagacloud.utils.jsonHelper.infoPoint;


import org.apache.htrace.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * Created by wo on 8/21/17.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class InfoPoint {
    /*private String note;

    public String getNote() { return this.note; }

    public void setNote(String note) { this.note = note; }

    private String secondTag;

    public String getSecondTag() { return this.secondTag; }

    public void setSecondTag(String secondTag) { this.secondTag = secondTag; }



    private String firstTag;

    public String getFirstTag() { return this.firstTag; }

    public void setFirstTag(String firstTag) { this.firstTag = firstTag; }





    private String dataType;

    public String getDataType() { return this.dataType; }

    public void setDataType(String dataType) { this.dataType = dataType; }*/

    private String unit;

    public String getUnit() { return this.unit; }

    public void setUnit(String unit) { this.unit = unit; }

    private Object dataSource;

    public String getDataSource() { return dataSource == null ? null : this.dataSource.toString(); }

    public void setDataSource(Object dataSource) { this.dataSource = dataSource; }

    private String inputMode;

    public String getInputMode() { return this.inputMode; }

    public void setInputMode(String inputMode) { this.inputMode = inputMode; }

    private String infoPointName;

    public String getInfoPointName() { return this.infoPointName; }

    public void setInfoPointName(String infoPointName) { this.infoPointName = infoPointName; }

    private String infoPointCode;

    public String getInfoPointCode() { return this.infoPointCode; }

    public void setInfoPointCode(String infoPointCode) { this.infoPointCode = infoPointCode; }

    @Override
    public boolean equals(Object info)
    {
        if(info instanceof String)
        {
            if(this.infoPointCode.equals(infoPointCode))
                return true;
        }else if(info instanceof InfoPoint) {
            if (((InfoPoint)info).infoPointCode.equals(this.infoPointCode))
                return true;
        }
        return  false;
    }
}
