package com.atlassian.bitbucket.scm;

import com.atlassian.bitbucket.repository.Repository;

import javax.annotation.Nonnull;
import java.util.function.Function;

/**
 * An SCM available for creating new {@link Repository repositories}.
 */
public interface AvailableScm {

    /**
     * @deprecated in 4.0 for removal in 5.0. With Java 8, {@code AvailableScm::getId} can be used instead.
     */
    @Deprecated
    Function<AvailableScm, String> TO_ID = AvailableScm::getId;

    /**
     * @return the SCM's identifier, which is guaranteed to be unique across all available SCMs
     */
    @Nonnull
    String getId();

    /**
     * @return the SCM's human-readable name
     */
    @Nonnull
    String getName();
}
