import events = require('@aws-cdk/aws-events');
import iam = require('@aws-cdk/aws-iam');
import s3 = require('@aws-cdk/aws-s3');
import cdk = require('@aws-cdk/cdk');
/**
 * The ARN of a pipeline
 */
export declare class PipelineArn extends cdk.Arn {
}
/**
 * The name of the pipeline.
 */
export declare class PipelineName extends cdk.Token {
}
/**
 * The pipeline version.
 */
export declare class PipelineVersion extends cdk.Token {
}
export interface PipelineProps {
    /**
     * The S3 bucket used by this Pipeline to store artifacts.
     * If not specified, a new S3 bucket will be created.
     */
    artifactBucket?: s3.BucketRef;
    /**
     * Indicates whether to rerun the AWS CodePipeline pipeline after you update it.
     */
    restartExecutionOnUpdate?: boolean;
    /**
     * Name of the pipeline. If you don't specify a name,  AWS CloudFormation generates an ID
     * and uses that for the pipeline name.
     */
    pipelineName?: string;
}
/**
 * An AWS CodePipeline pipeline with its associated IAM role and S3 bucket.
 *
 * @example
 * // create a pipeline
 * const pipeline = new Pipeline(this, 'Pipeline');
 *
 * // add a stage
 * const sourceStage = new Stage(pipeline, 'Source');
 *
 * // add a source action to the stage
 * new codecommit.PipelineSource(sourceStage, 'Source', {
 *     artifactName: 'SourceArtifact',
 *     repository: repo,
 * });
 *
 * // ... add more stages
 */
export declare class Pipeline extends cdk.Construct implements events.IEventRuleTarget {
    /**
     * The IAM role AWS CodePipeline will use to perform actions or assume roles for actions with
     * a more specific IAM role.
     */
    readonly role: iam.Role;
    /**
     * ARN of this pipeline
     */
    readonly pipelineArn: PipelineArn;
    /**
     * The name of the pipeline
     */
    readonly pipelineName: PipelineName;
    /**
     * The version of the pipeline
     */
    readonly pipelineVersion: PipelineVersion;
    /**
     * Bucket used to store output artifacts
     */
    readonly artifactBucket: s3.BucketRef;
    private readonly stages;
    private eventsRole?;
    constructor(parent: cdk.Construct, name: string, props?: PipelineProps);
    /**
     * Adds a statement to the pipeline role.
     */
    addToRolePolicy(statement: cdk.PolicyStatement): void;
    /**
     * Allows the pipeline to be used as a CloudWatch event rule target.
     *
     * Usage:
     *
     *      const pipeline = new Pipeline(this, 'MyPipeline');
     *      const rule = new EventRule(this, 'MyRule', { schedule: 'rate(1 minute)' });
     *      rule.addTarget(pipeline);
     *
     */
    asEventRuleTarget(_ruleArn: events.RuleArn, _ruleId: string): events.EventRuleTargetProps;
    /**
     * Defines an event rule triggered by the "CodePipeline Pipeline Execution
     * State Change" event emitted from this pipeline.
     *
     * @param target Initial target to add to the event rule. You can also add
     * targets and customize target inputs by calling `rule.addTarget(target[,
     * options])` after the rule was created.
     *
     * @param options Additional options to pass to the event rule
     *
     * @param name The name of the event rule construct. If you wish to define
     * more than a single onStateChange event, you will need to explicitly
     * specify a name.
     */
    onStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Validate the pipeline structure
     *
     * Validation happens according to the rules documented at
     *
     * https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#pipeline-requirements
     * @override
     */
    validate(): string[];
    /**
     * If a stage is added as a child, add it to the list of stages.
     * TODO: This is a hack that should be removed once the CDK has an
     *       onChildAdded type hook.
     * @override
     */
    protected addChild(child: cdk.Construct, name: string): void;
    private appendStage;
    private validateSourceActionLocations;
    private validateHasStages;
    private renderArtifactStore;
    private renderStages;
}
