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

import com.atlassian.bitbucket.mesh.git.builder.GitProcessBuilderSupport;
import com.atlassian.bitbucket.mesh.repository.Repository;

import javax.annotation.Nonnull;

public interface GitPushBuilder extends GitProcessBuilderSupport<GitPushBuilder> {

    @Nonnull
    GitPushBuilder atomic(boolean value);

    /**
     * Clears any {@link #refspecs refspecs} which have been added, allowing the same builder to be reused
     * when constructing multiple fetches for different refs.
     *
     * @return {@code this}
     */
    @Nonnull
    GitPushBuilder clearRefspecs();

    @Nonnull
    GitPushBuilder force(boolean value);

    @Nonnull
    GitPushBuilder porcelain(boolean value);

    @Nonnull
    GitPushBuilder progress(boolean value);

    @Nonnull
    GitPushBuilder prune(boolean value);

    @Nonnull
    GitPushBuilder refspec(String value);

    @Nonnull
    GitPushBuilder refspecs(Iterable<String> values);

    @Nonnull
    GitPushBuilder refspecs(String value, String... values);

    /**
     * Specifies the repository to push to.
     *
     * @param value the repository to push to
     * @return {@code this}
     */
    @Nonnull
    GitPushBuilder repository(Repository value);

    @Nonnull
    GitPushBuilder repository(String value);
}
