package com.atlassian.stash.internal.repository.sync.command;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.user.ApplicationUser;

import javax.annotation.Nonnull;

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

/**
 * @since 2.6
 */
public abstract class AbstractRefCommandParameters extends AbstractCommandParameters {

    private final String refId;

    protected AbstractRefCommandParameters(@Nonnull Repository repository, @Nonnull Repository upstream,
                                           @Nonnull ApplicationUser user, @Nonnull String refId) {
        super(repository, upstream, user);

        this.refId = checkNotNull(refId, "refId");
    }

    @Nonnull
    public String getRefId() {
        return refId;
    }
}
