package com.vk.api.sdk.objects.messages;

import com.google.gson.annotations.SerializedName;

import java.util.Objects;

/**
 * Dialog object
 */
public class Dialog {
    /**
     * Information whether unread messages are in the dialog
     */
    @SerializedName("unread")
    private Integer unread;

    @SerializedName("message")
    private Message message;

    /**
     * ID of the last message read by current user
     */
    @SerializedName("in_read")
    private Integer inRead;

    /**
     * ID of the last message read by the others
     */
    @SerializedName("out_read")
    private Integer outRead;

    public Integer getUnread() {
        return unread;
    }

    public Message getMessage() {
        return message;
    }

    public Integer getInRead() {
        return inRead;
    }

    public Integer getOutRead() {
        return outRead;
    }

    @Override
    public int hashCode() {
        return Objects.hash(outRead, unread, inRead, message);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Dialog dialog = (Dialog) o;
        return Objects.equals(unread, dialog.unread) &&
                Objects.equals(message, dialog.message) &&
                Objects.equals(inRead, dialog.inRead) &&
                Objects.equals(outRead, dialog.outRead);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Dialog{");
        sb.append("unread=").append(unread);
        sb.append(", message=").append(message);
        sb.append(", inRead=").append(inRead);
        sb.append(", outRead=").append(outRead);
        sb.append('}');
        return sb.toString();
    }
}

@@ -608,24 +608,255 @@
 r outRead;%0A%0A
+    /**%0A     * Is it an important dialog%0A     */%0A    @SerializedName(%22important%22)%0A    private Boolean important;%0A%0A    /**%0A     * Is it an unanswered dialog%0A     */%0A    @SerializedName(%22unanswered%22)%0A    private Boolean unanswered;%0A%0A
     public I
@@ -868,32 +868,32 @@
 r getUnread() %7B%0A
-
         return u
@@ -1107,107 +1107,133 @@
     
-@Override%0A    public int hashCode() %7B%0A        return Objects.hash(outRead, unread, inRead, message)
+public Boolean isImportant() %7B%0A        return important;%0A    %7D%0A%0A    public Boolean isUnanswered() %7B%0A        return unanswered
 ;%0A  
@@ -1651,24 +1651,287 @@
 log.outRead)
+ &&%0A                Objects.equals(important, dialog.important) &&%0A                Objects.equals(unanswered, dialog.unanswered);%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hash(unread, message, inRead, outRead, important, unanswered)
 ;%0A    %7D%0A%0A   
@@ -2172,24 +2172,24 @@
 nd(inRead);%0A
-
         sb.a
@@ -2221,24 +2221,132 @@
 d(outRead);%0A
+        sb.append(%22, important=%22).append(important);%0A        sb.append(%22, unanswered=%22).append(unanswered);%0A
         sb.a

Add 'unanswered' and 'important' fields in Dialog