package com.atlassian.bitbucket.hook.repository;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.setting.Settings;

import javax.annotation.Nonnull;

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

public class RepositoryHookContext {

    @Nonnull
    private final Repository repository;

    @Nonnull
    private final Settings settings;

    public RepositoryHookContext(@Nonnull Repository repository, @Nonnull Settings settings) {
        this.repository = checkNotNull(repository, "repository");
        this.settings = checkNotNull(settings, "settings");
    }

    @Nonnull
    public Repository getRepository() {
        return repository;
    }

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