export declare const Kind = "Core#HostRule";
/**
 * API Client host rule definition.
 */
export interface IHostRule {
    /**
     * The key of the rule.
     */
    key: string;
    kind?: typeof Kind;
    /**
     * The from rule (may contain asterisks)
     */
    from: string;
    /**
     * The replacement value
     */
    to: string;
    /**
     * When false the rule is ignored
     */
    enabled?: boolean;
    /**
     * optional rule description
     */
    comment?: string;
}
export declare class HostRule {
    /**
     * The key of the rule.
     */
    key: string;
    kind: string;
    /**
     * The from rule (may contain asterisks)
     */
    from: string;
    /**
     * replacement value
     */
    to: string;
    /**
     * if false the rule is ignored
     */
    enabled?: boolean;
    /**
     * optional rule description
     */
    comment?: string;
    static fromValues(from: string, to: string): HostRule;
    /**
     * @param input The thing definition used to restore the state.
     */
    constructor(input?: string | IHostRule);
    /**
     * Creates a new thing clearing anything that is so far defined.
     *
     * Note, this throws an error when the server is not an API Client thing.
     */
    new(init: IHostRule): void;
    /**
     * Checks whether the input is a definition of a host rule.
     */
    static isHostRule(input: unknown): boolean;
    toJSON(): IHostRule;
    /**
     * Applies `hosts` rules to the URL.
     *
     * @param value An URL to apply the rules to
     * @param rules List of host rules. It is a list of objects containing `from` and `to` properties.
     * @return Evaluated URL with hosts rules.
     */
    static applyHosts(value: string, rules: HostRule[]): string;
    /**
     * Evaluates hosts rule and applies it to the `url`.
     * @param {string} url The URL to evaluate
     * @param {HostRule} rule The host rule definition
     * @return {string} Processed url.
     */
    static evaluateRule(url: string, rule: HostRule): string | undefined;
    /**
     * @param input Rule body
     * @return Regular expression for the rule.
     */
    static createRuleRe(input: string): RegExp;
}
//# sourceMappingURL=HostRule.d.ts.map