import events = require('@aws-cdk/aws-events');
import cdk = require('@aws-cdk/cdk');
import { RepositoryArn, RepositoryName } from './codecommit.generated';
/**
 * Properties for the {@link RepositoryRef.import} method.
 */
export interface RepositoryRefProps {
    /**
     * The name of an existing CodeCommit Repository that we are referencing.
     * Must be in the same account and region as the root Stack.
     */
    repositoryName: RepositoryName;
}
/**
 * Represents a reference to a CodeCommit Repository.
 *
 * If you want to create a new Repository managed alongside your CDK code,
 * use the {@link Repository} class.
 *
 * If you want to reference an already existing Repository,
 * use the {@link RepositoryRef.import} method.
 */
export declare abstract class RepositoryRef extends cdk.Construct {
    /**
     * Import a Repository defined either outside the CDK, or in a different Stack
     * (exported with the {@link export} method).
     *
     * @param parent the parent Construct for the Repository
     * @param name the name of the Repository Construct
     * @param props the properties used to identify the existing Repository
     * @returns a reference to the existing Repository
     */
    static import(parent: cdk.Construct, name: string, props: RepositoryRefProps): RepositoryRef;
    /** The ARN of this Repository. */
    abstract readonly repositoryArn: RepositoryArn;
    /** The human-visible name of this Repository. */
    abstract readonly repositoryName: RepositoryName;
    /**
     * Exports this Repository. Allows the same Repository to be used in 2 different Stacks.
     *
     * @see import
     */
    export(): RepositoryRefProps;
    /**
     * Defines a CloudWatch event rule which triggers for repository events. Use
     * `rule.addEventPattern(pattern)` to specify a filter.
     */
    onEvent(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a "CodeCommit
     * Repository State Change" event occurs.
     */
    onStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a reference is
     * created (i.e. a new brach/tag is created) to the repository.
     */
    onReferenceCreated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a reference is
     * updated (i.e. a commit is pushed to an existig branch) from the repository.
     */
    onReferenceUpdated(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a reference is
     * delete (i.e. a branch/tag is deleted) from the repository.
     */
    onReferenceDeleted(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a pull request state is changed.
     */
    onPullRequestStateChange(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a comment is made on a pull request.
     */
    onCommentOnPullRequest(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a comment is made on a commit.
     */
    onCommentOnCommit(name: string, target?: events.IEventRuleTarget, options?: events.EventRuleProps): events.EventRule;
    /**
     * Defines a CloudWatch event rule which triggers when a commit is pushed to a branch.
     * @param target The target of the event
     * @param branch The branch to monitor. Defaults to all branches.
     */
    onCommit(name: string, target?: events.IEventRuleTarget, branch?: string): events.EventRule;
}
export interface RepositoryProps {
    /**
     * Name of the repository. This property is required for all repositories.
     */
    repositoryName: string;
    /**
     * A description of the repository. Use the description to identify the
     * purpose of the repository.
     */
    description?: string;
}
/**
 * Provides a CodeCommit Repository
 */
export declare class Repository extends RepositoryRef {
    private readonly repository;
    private readonly triggers;
    constructor(parent: cdk.Construct, name: string, props: RepositoryProps);
    readonly repositoryArn: RepositoryArn;
    readonly repositoryCloneUrlHttp: import("./codecommit.generated").RepositoryCloneUrlHttp;
    readonly repositoryCloneUrlSsh: import("./codecommit.generated").RepositoryCloneUrlSsh;
    readonly repositoryName: RepositoryName;
    /**
     * Create a trigger to notify another service to run actions on repository events.
     * @param arn     Arn of the resource that repository events will notify
     * @param options Trigger options to run actions
     */
    notify(arn: string, options?: RepositoryTriggerOptions): Repository;
}
/**
 * Creates for a repository trigger to an SNS topic or Lambda function.
 */
export interface RepositoryTriggerOptions {
    /**
     * A name for the trigger.Triggers on a repository must have unique names
     */
    name?: string;
    /**
     * The repository events for which AWS CodeCommit sends information to the
     * target, which you specified in the DestinationArn property.If you don't
     * specify events, the trigger runs for all repository events.
     */
    events?: RepositoryEventTrigger[];
    /**
     * The names of the branches in the AWS CodeCommit repository that contain
     * events that you want to include in the trigger. If you don't specify at
     * least one branch, the trigger applies to all branches.
     */
    branches?: string[];
    /**
     * When an event is triggered, additional information that AWS CodeCommit
     * includes when it sends information to the target.
     */
    customData?: string;
}
/**
 * Repository events that will cause the trigger to run actions in another service.
 */
export declare enum RepositoryEventTrigger {
    All = "all",
    UpdateRef = "updateReference",
    CreateRef = "createReference",
    DeleteRef = "deleteReference"
}
