package com.atlassian.bitbucket.internal.importer;

import java.util.concurrent.TimeUnit;

public class ImporterConstants {

    public static final String GIT_SCM_ID = "git";
    public static final String GITHUB_ENTERPRISE_API_EXT = "/api/v3";

    public static final String PROPERTY_PREFIX = "plugin.importer.";
    public static final String PROPERTY_BITBUCKET_CLOUD_API_URL = PROPERTY_PREFIX + "bitbucketcloud.api.url";
    public static final String PROPERTY_EXTERNAL_SOURCE_REQUEST_SO_TIMEOUT = PROPERTY_PREFIX + "external.source.request.socket.timeout";
    public static final String PROPERTY_EXTERNAL_SOURCE_REQUEST_TIMEOUT = PROPERTY_PREFIX + "external.source.request.timeout";
    public static final String PROPERTY_GITHUB_API_URL = PROPERTY_PREFIX + "github.api.url";
    public static final String PROPERTY_MAX_IMPORT_REPOSITORY_THREAD = PROPERTY_PREFIX + "import.repository.thread.max";
    public static final String PROPERTY_REPO_FETCH_TIMEOUT_EXEC = PROPERTY_PREFIX + "repository.fetch.timeout.execution";
    public static final String PROPERTY_REPO_FETCH_TIMEOUT_IDLE = PROPERTY_PREFIX + "repository.fetch.timeout.idle";

    public static final String PROPERTY_BITBUCKET_CLOUD_API_URL_DEFAULT = "https://api.bitbucket.org/2.0";
    public static final int PROPERTY_EXTERNAL_SOURCE_REQUEST_SO_TIMEOUT_DEFAULT = 30;
    public static final int PROPERTY_EXTERNAL_SOURCE_REQUEST_TIMEOUT_DEFAULT = 30;
    public static final String PROPERTY_GITHUB_API_URL_DEFAULT = "https://api.github.com";
    public static final int PROPERTY_MAX_IMPORT_REPOSITORY_THREAD_DEFAULT = 8;
    public static final long PROPERTY_REPO_FETCH_TIMEOUT_EXEC_DEFAULT = TimeUnit.HOURS.toMinutes(6);
    public static final long PROPERTY_REPO_FETCH_TIMEOUT_IDLE_DEFAULT = TimeUnit.HOURS.toMinutes(1);
    public static final int REPO_PAGE_MAX = 100;

    private ImporterConstants() {
        throw new UnsupportedOperationException("ImporterConstants is a utility class");
    }
}
