package com.atlassian.bitbucket.internal.mirroring.upstream;

import com.atlassian.bitbucket.user.ServiceUser;

import javax.annotation.Nonnull;

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

public class SimpleMirrorAddon implements MirrorAddon {

    private final String key;
    private final ServiceUser user;

    public SimpleMirrorAddon(String key, ServiceUser user) {
        this.key = checkNotNull(key, "key");
        this.user = checkNotNull(user, "user");
    }

    @Nonnull
    @Override
    public String getKey() {
        return key;
    }

    @Nonnull
    @Override
    public ServiceUser getServiceUser() {
        return user;
    }
}
