package com.atlassian.stash.internal.hook.repository;

import com.atlassian.bitbucket.hook.repository.RepositoryMergeRequestCheckContext;
import com.atlassian.bitbucket.scm.pull.MergeRequest;
import com.atlassian.bitbucket.setting.Settings;

import javax.annotation.Nonnull;

import static com.google.common.base.Preconditions.checkNotNull;

public class DefaultRepositoryMergeRequestCheckContext implements RepositoryMergeRequestCheckContext {

    private final MergeRequest mergeRequest;

    private final Settings settings;

    public DefaultRepositoryMergeRequestCheckContext(@Nonnull MergeRequest mergeRequest, @Nonnull Settings settings) {
        this.mergeRequest = checkNotNull(mergeRequest, "mergeRequest");
        this.settings = checkNotNull(settings, "settings");
    }

    @Nonnull
    @Override
    public MergeRequest getMergeRequest() {
        return mergeRequest;
    }

    @Nonnull
    @Override
    public Settings getSettings() {
        return settings;
    }
}
