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

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

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public interface GitRepackBuilder extends GitProcessBuilderSupport<GitRepackBuilder> {

    @Nonnull
    GitRepackBuilder all(@Nonnull GitRepackAll value);

    @Nonnull
    GitRepackBuilder depth(int value);

    @Nonnull
    GitRepackBuilder local(boolean value);

    /**
     * When paired with {@link GitRepackAll#REACHABLE -a}, includes all <i>unreachable</i> objects in the new pack
     * with the reachable ones. When used with {@link #prune -d}, results in a single pack which includes <i>all</i>
     * objects, reachable or not.
     * <p>
     * This flag was introduced in Git 2.10, and is not available in earlier versions. Its use should be guarded
     * with a version check.
     *
     * @param value {@code true} to pack unreachable objects; otherwise, {@code false} to only pack reachable objects
     * @return {@code this}
     */
    @Nonnull
    GitRepackBuilder keepUnreachable(boolean value);

    @Nonnull
    GitRepackBuilder maxPackSize(@Nullable String value);

    @Nonnull
    GitRepackBuilder prune(boolean value);

    @Nonnull
    GitRepackBuilder quiet(boolean value);

    @Nonnull
    GitRepackBuilder reuseDeltas(boolean value);

    @Nonnull
    GitRepackBuilder reuseObjects(boolean value);

    @Nonnull
    GitRepackBuilder unpackUnreachable(@Nullable String value);

    @Nonnull
    GitRepackBuilder updateServerInfo(boolean value);

    @Nonnull
    GitRepackBuilder window(int value);

    @Nonnull
    GitRepackBuilder windowMemory(int value);

    @Nonnull
    GitRepackBuilder writeBitmapIndex(boolean value);
}
