package com.cpic.xim.notify.disaster;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
//import com.fasterxml.jackson.annotation.JsonIgnore;

public class QWeatherDisasterWarningItem
{
    public QWeatherDisasterWarningItem() {}
    public QWeatherDisasterWarningItem( String id,
                                        String sender,
                                        String pubTime,
                                        String title,
                                        String status,
                                        String level,
                                        String type,
                                        String typeName,
                                        String text,
                                        String related,
                                        String urgency, String certainty )
    {
        this.id       = id;
        this.sender   = sender;
        this.pubTime  = pubTime;
        this.title    = title;
        this.status   = status;
        this.level    = level;
        this.type     = type;
        this.typeName = typeName;
        this.text     = text;
        this.related  = related;
        this.urgency   = urgency;
        this.certainty = certainty;
    }

    @Override
    public boolean equals( Object o )
    {
        if ( this == o )
        {
            return true;
        }
        if ( o == null || getClass() != o.getClass() )
        {
            return false;
        }
        QWeatherDisasterWarningItem that = (QWeatherDisasterWarningItem) o;
        return id.equals( that.id ) && Objects.equals( sender, that.sender ) && Objects.equals( pubTime,
                                                                                                that.pubTime ) && Objects.equals(
                title,
                that.title ) && Objects.equals( status, that.status ) && Objects.equals( level,
                                                                                         that.level ) && Objects.equals(
                type,
                that.type ) && Objects.equals( typeName, that.typeName ) && Objects.equals( text,
                                                                                            that.text ) && Objects.equals(
                related,
                that.related ) && Objects.equals( urgency, that.urgency ) && Objects.equals( certainty,
                                                                                             that.certainty );
    }

    @Override
    public int hashCode()
    {
        return Objects.hash( id,
                             sender,
                             pubTime,
                             title,
                             status,
                             level,
                             type,
                             typeName,
                             text,
                             related,
                             urgency,
                             certainty );
    }

    public String getId()
    {
        return id;
    }

    public void setId( String id )
    {
        this.id = id;
    }

    public String getSender()
    {
        return sender;
    }

    public void setSender( String sender )
    {
        this.sender = sender;
    }

    public String getPubTime()
    {
        return pubTime;
    }

    public void setPubTime( String pubTime )
    {
        this.pubTime = pubTime;
    }

    public String getTitle()
    {
        return title;
    }

    public void setTitle( String title )
    {
        this.title = title;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus( String status )
    {
        this.status = status;
    }

    public String getLevel()
    {
        return level;
    }

    public void setLevel( String level )
    {
        this.level = level;
    }

    public String getType()
    {
        return type;
    }

    public void setType( String type )
    {
        this.type = type;
    }

    public String getTypeName()
    {
        return typeName;
    }

    public void setTypeName( String typeName )
    {
        this.typeName = typeName;
    }

    public String getText()
    {
        return text;
    }

    public void setText( String text )
    {
        this.text = text;
    }

    public String getRelated()
    {
        return related;
    }

    public void setRelated( String related )
    {
        this.related = related;
    }

    public String getUrgency()
    {
        return urgency;
    }

    public void setUrgency( String urgency )
    {
        this.urgency = urgency;
    }

    public String getCertainty()
    {
        return certainty;
    }

    public void setCertainty( String certainty )
    {
        this.certainty = certainty;
    }

    private String id;
    private String sender;
    @JsonFormat(pattern="yyyy-MM-dd'T'HH:mm")
    private String pubTime;
    private String title;
    private String status;
    private String level;
    private String type;
    private String typeName;
    private String text;
    private String related;
    private String urgency;
    private String certainty;
}
