package com.atlassian.bitbucket.scm.git.command.revlist;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.scm.CommandInputHandler;
import com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport;

import javax.annotation.Nonnull;

//Note: All of the overrides for methods on GitRevCoreBuilder are required for API compatibility. They should
//      be removed in 5.0.
public interface GitRevListBuilder extends GitRevCoreBuilder<GitRevListBuilder> {

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder all(boolean value);

    /**
     * {@inheritDoc}
     * Configures the command to use the provided repositories as alternates, allowing the rev-list to access
     * the objects in those repositories.
     *
     * @param value the alternates to configure for the command
     * @return {@code this}
     * @since 4.4
     */
    @Nonnull
    GitRevListBuilder alternates(@Nonnull Iterable<Repository> value);

    /**
     * Controls use of {@code --boundary}. When a range of commits is provided (whether symmetric or not), "boundary"
     * commits are where the walk reaches the first excluded commit as it does its traversal. Even for a simple range
     * like "master..feature-branch" (or "feature-branch ^master", written another way), multiple boundary commits may
     * exist. Boundary commits are prefixed with a {@code -}, to differentiate them from reachable commits.
     *
     * @param value {@code true} to output boundary commits, which are the first
     * @return {@code this}
     * @see #leftRight(boolean) --left-right
     */
    @Nonnull
    @Override
    GitRevListBuilder boundary(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder branches(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder clearFiles();

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder clearRevs();

    /**
     * @param value {@code true} to return a count; otherwise, {@code false} to return commits
     * @return {@code this}
     */
    @Nonnull
    GitRevListBuilder count(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder file(String value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder files(Iterable<String> values);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder files(String value, String... values);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder format(String value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder ignoreMissing(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder inputHandler(CommandInputHandler inputHandler);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder leftOnly(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder leftRight(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder limit(int value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder order(@Nonnull GitRevListOrder value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder parents(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder rev(String value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder revs(Iterable<String> values);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder revs(String value, String... values);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder rightOnly(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder tags(boolean value);

    /**
     * {@inheritDoc}
     */
    @Nonnull
    @Override
    GitRevListBuilder walk(@Nonnull GitRevListWalk value);
}
