package com.atlassian.bitbucket.notification.pull;

import com.atlassian.bitbucket.comment.Comment;
import com.atlassian.bitbucket.pull.PullRequest;
import com.atlassian.bitbucket.user.ApplicationUser;

import javax.annotation.Nonnull;
import java.util.Date;

public class CommentRepliedPullRequestNotification extends AbstractPullRequestNotification implements PullRequestCommentNotification {

    private final Comment comment;
    private final Comment parent;

    public CommentRepliedPullRequestNotification(@Nonnull PullRequest pullRequest,
                                                 @Nonnull Date whenActivityPerformed,
                                                 @Nonnull ApplicationUser activityPerformer,
                                                 @Nonnull Comment comment,
                                                 @Nonnull Comment parent) {
        super(pullRequest, whenActivityPerformed, activityPerformer);
        this.comment = comment;
        this.parent = parent;
    }

    @Override
    public Comment getComment() {
        return comment;
    }

    public Comment getParent() {
        return parent;
    }

    @Override
    public String toString() {
        return "CommentRepliedPullRequestNotification{" +
                super.toString() +
               ", comment=" + comment +
               ", parent=" + parent +
               '}';
    }

}
