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

import javax.annotation.Nonnull;

public interface GitConfig {

    @Nonnull
    GitConfigGetBuilder get(@Nonnull String name);

    /**
     * @param name the name of the key to get all values for
     * @return a builder for retrieving all values set for a given key
     */
    @Nonnull
    GitConfigGetAllBuilder getAll(@Nonnull String name);

    /**
     * @return a builder for listing all configured values
     */
    @Nonnull
    GitConfigListBuilder list();

    /**
     * @param name the name of the section to remove
     * @return a builder for removing a configuration section
     */
    @Nonnull
    GitConfigRemoveSectionBuilder removeSection(@Nonnull String name);

    /**
     * @param oldSectionName the old config section name
     * @param newSectionName the new config section name
     * @return a builder for renaming a configuration section
     */
    @Nonnull
    GitConfigRenameSectionBuilder renameSection(@Nonnull String oldSectionName, @Nonnull String newSectionName);

    @Nonnull
    GitConfigSetBuilder set(@Nonnull String name, @Nonnull String value);

    @Nonnull
    GitConfigUnsetBuilder unset(@Nonnull String name);

    @Nonnull
    GitConfigUnsetAllBuilder unsetAll(@Nonnull String name);
}
