import { IResource, Resource } from "../../core";
import { Construct } from 'constructs';
/**
 * (experimental) Represents the function's source code.
 *
 * @experimental
 */
export declare abstract class FunctionCode {
    /**
     * (experimental) Inline code for function.
     *
     * @param code The actual function code.
     * @returns code object with inline code.
     * @experimental
     */
    static fromInline(code: string): FunctionCode;
    /**
     * (experimental) Code from external file for function.
     *
     * @param options the options for the external file.
     * @returns code object with contents from file.
     * @experimental
     */
    static fromFile(options: FileCodeOptions): FunctionCode;
    /**
     * (experimental) renders the function code.
     *
     * @experimental
     */
    abstract render(): string;
}
/**
 * (experimental) Options when reading the function's code from an external file.
 *
 * @experimental
 */
export interface FileCodeOptions {
    /**
     * (experimental) The path of the file to read the code from.
     *
     * @experimental
     */
    readonly filePath: string;
}
/**
 * (experimental) Represents a CloudFront Function.
 *
 * @experimental
 */
export interface IFunction extends IResource {
    /**
     * (experimental) The name of the function.
     *
     * @experimental
     * @attribute true
     */
    readonly functionName: string;
    /**
     * (experimental) The ARN of the function.
     *
     * @experimental
     * @attribute true
     */
    readonly functionArn: string;
}
/**
 * (experimental) Attributes of an existing CloudFront Function to import it.
 *
 * @experimental
 */
export interface FunctionAttributes {
    /**
     * (experimental) The name of the function.
     *
     * @experimental
     */
    readonly functionName: string;
    /**
     * (experimental) The ARN of the function.
     *
     * @experimental
     */
    readonly functionArn: string;
}
/**
 * (experimental) Properties for creating a CloudFront Function.
 *
 * @experimental
 */
export interface FunctionProps {
    /**
     * (experimental) A name to identify the function.
     *
     * @default - generated from the `id`
     * @experimental
     */
    readonly functionName?: string;
    /**
     * (experimental) A comment to describe the function.
     *
     * @default - same as `functionName`
     * @experimental
     */
    readonly comment?: string;
    /**
     * (experimental) The source code of the function.
     *
     * @experimental
     */
    readonly code: FunctionCode;
}
/**
 * (experimental) A CloudFront Function.
 *
 * @experimental
 * @resource AWS::CloudFront::Function
 */
export declare class Function extends Resource implements IFunction {
    /**
     * (experimental) Imports a function by its name and ARN.
     *
     * @experimental
     */
    static fromFunctionAttributes(scope: Construct, id: string, attrs: FunctionAttributes): IFunction;
    /**
     * (experimental) the name of the CloudFront function.
     *
     * @experimental
     * @attribute true
     */
    readonly functionName: string;
    /**
     * (experimental) the ARN of the CloudFront function.
     *
     * @experimental
     * @attribute true
     */
    readonly functionArn: string;
    /**
     * (experimental) the deployment stage of the CloudFront function.
     *
     * @experimental
     * @attribute true
     */
    readonly functionStage: string;
    /**
     * @experimental
     */
    constructor(scope: Construct, id: string, props: FunctionProps);
    private generateName;
}
/**
 * (experimental) The type of events that a CloudFront function can be invoked in response to.
 *
 * @experimental
 */
export declare enum FunctionEventType {
    /**
     * (experimental) The viewer-request specifies the incoming request.
     *
     * @experimental
     */
    VIEWER_REQUEST = "viewer-request",
    /**
     * (experimental) The viewer-response specifies the outgoing response.
     *
     * @experimental
     */
    VIEWER_RESPONSE = "viewer-response"
}
/**
 * (experimental) Represents a CloudFront function and event type when using CF Functions.
 *
 * The type of the {@link AddBehaviorOptions.functionAssociations} property.
 *
 * @experimental
 */
export interface FunctionAssociation {
    /**
     * (experimental) The CloudFront function that will be invoked.
     *
     * @experimental
     */
    readonly function: IFunction;
    /**
     * (experimental) The type of event which should invoke the function.
     *
     * @experimental
     */
    readonly eventType: FunctionEventType;
}
