package com.atlassian.bitbucket.mesh.git.builder.checkrefformat;

import com.atlassian.bitbucket.mesh.git.builder.AbstractGitProcessBuilder;
import com.atlassian.bitbucket.mesh.git.builder.GitProcessBuilder;

import javax.annotation.Nonnull;

public class DefaultGitCheckRefFormatBuilder
        extends AbstractGitProcessBuilder<GitCheckRefFormatBuilder>
        implements GitCheckRefFormatBuilder {

    private final String refName;

    public DefaultGitCheckRefFormatBuilder(@Nonnull String refName, @Nonnull GitProcessBuilder builder) {
        super(builder);

        this.refName = requireNonBlank(refName, "refName");
    }

    @Override
    protected void applyArguments() {
        builder.argument(refName);
    }

    @Nonnull
    @Override
    protected GitCheckRefFormatBuilder self() {
        return this;
    }
}
