import { CdmHttpClient, CdmHttpRequest, CdmHttpResponse } from '../Utilities/Network';
import { configObjectType, StorageAdapterBase } from '../internal';
import { StorageAdapterConfigCallback } from './StorageAdapterConfigCallback';
/**
 * Network adapter is an abstract class that contains logic for adapters dealing with data across network.
 * Please see GithubAdapter, AdlsAdapter or RemoteAdapter for usage of this class.
 * When extending this class a user has to define CdmHttpClient with the specified endpoint and callback function in the constructor
 * and can then use the class helper methods to set up Cdm HTTP requests and read data.
 * If a user doesn't specify timeout, maximutimeout or number of retries in the config under 'httpConfig' property
 * default values will be used as specified in the class.
 */
export declare abstract class NetworkAdapter extends StorageAdapterBase {
    protected readonly defaultTimeout: number;
    protected readonly defaultMaximumTimeout: number;
    protected readonly defaultNumberOfRetries: number;
    protected readonly defaultShortestTimeWait: number;
    protected httpClient: CdmHttpClient;
    protected _timeout: number;
    protected _maximumTimeout: number;
    protected _numberOfRetries: number;
    protected _waitTimeCallback: StorageAdapterConfigCallback;
    /**
     * A set of HttpStatusCodes that will stop the retry logic if the HTTP response has one of these types.
     */
    avoidRetryCodes: Set<number>;
    get timeout(): number;
    set timeout(val: number);
    get maximumTimeout(): number;
    set maximumTimeout(val: number);
    get numberOfRetries(): number;
    set numberOfRetries(val: number);
    get waitTimeCallback(): StorageAdapterConfigCallback;
    set waitTimeCallback(val: StorageAdapterConfigCallback);
    updateNetworkConfig(config: string): void;
    fetchNetworkConfig(): configObjectType;
    protected executeRequest(httpRequest: CdmHttpRequest): Promise<CdmHttpResponse>;
    /**
     * Sets up a CDM request that can be used by CDM Http Client.
     * @param {string} path The partial or full path to a network location.
     * @param {number} numberOfRetries The number of retries.
     * @param {Map<string, string>} headers Optional headers.
     * @param {string} method The HTTP method.
     * @return {CdmHttpRequest}, representing the CDM HTTP request.
     */
    protected setUpCdmRequest(path: string, headers: Map<string, string>, method: string): CdmHttpRequest;
    /**
     * The callback function for CDM Http client, it does exponential backoff.
     * @param {CdmHttpResponse} response The response received by system's Http client.
     * @param {boolean} hasFailed Denotes whether the request has failed (usually an exception or 500 error).
     * @param {number} retryNumber The current retry number (starts from 1) up to the number of retries specified by a CDM request.
     * @return {number}, specifying the waiting time in milliseconds, or undefined if no wait time is necessary.
     */
    protected defaultWaitTimeCallback(response: CdmHttpResponse, hasFailed: boolean, retryNumber: number): number;
}
