package org.ccguyka.slacker;


import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;

public class Message {

    private final String destination;
    private final String messageText;
    private String color = "warning";
    private String author;
    private String title;
    private String titleLink;

    public Message(String destination, String messageText) {
        this.destination = destination;
        this.messageText = messageText;
    }

    public String getDestination() {
        return destination;
    }

    public String getMessageText() {
        return messageText;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getAuthor() {
        return author;
    }

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

    public String getTitle() {
        return title;
    }

    public void setTitleLink(String titleLink) {
        this.titleLink = titleLink;
    }

    public String getTitleLink() {
        return titleLink;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Message message = (Message) o;
        return Objects.equal(destination, message.destination) &&
                Objects.equal(messageText, message.messageText) &&
                Objects.equal(color, message.color) &&
                Objects.equal(author, message.author) &&
                Objects.equal(title, message.title) &&
                Objects.equal(titleLink, message.titleLink);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(destination, messageText, color, author, title, titleLink);
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("destination", destination)
                .add("messageText", messageText)
                .add("color", color)
                .add("author", author)
                .add("title", title)
                .add("titleLink", titleLink)
                .toString();
    }
}

@@ -28,51 +28,8 @@
 ;%0A%0A%0A
-import com.google.common.base.MoreObjects;%0A
 impo
@@ -1905,392 +1905,7 @@
    %7D
-%0A%0A    @Override%0A    public String toString() %7B%0A        return MoreObjects.toStringHelper(this)%0A                .add(%22destination%22, destination)%0A                .add(%22messageText%22, messageText)%0A                .add(%22color%22, color)%0A                .add(%22author%22, author)%0A                .add(%22title%22, title)%0A                .add(%22titleLink%22, titleLink)%0A                .toString();%0A    %7D
 %0A%7D%0A

remove toString method