import { Value } from '../../../cloudformation/Value';
/**
  <code>WebhookFilter</code> is a structure of the <code>FilterGroups</code> property on the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html">AWS CodeBuild Project ProjectTriggers</a> property type that specifies which webhooks trigger an AWS CodeBuild build.
  For full documentation go to <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html">the AWS Docs</a>
*/
export interface WebhookFilterProps {
    /** <code>Pattern</code>  <a name="cfn-codebuild-project-webhookfilter-pattern"></a>
  For a <code>WebHookFilter</code> that uses <code>EVENT</code> type, a comma-separated string that specifies one or more events. For example, the webhook filter <code>PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED</code> allows all push, pull request created, and pull request updated events to trigger a build.<br />
  For a <code>WebHookFilter</code> that uses any of the other filter types, a regular expression pattern. For example, a <code>WebHookFilter</code> that uses <code>HEAD_REF</code> for its <code>type</code> and the pattern <code>^refs/heads/</code> triggers a build when the head reference is a branch with a reference name <code>refs/heads/branch-name</code>.<br />
  
  Required: Yes<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    pattern: Value<string>;
    /** <code>Type</code>  <a name="cfn-codebuild-project-webhookfilter-type"></a>
  The type of webhook filter. There are six webhook filter types: <code>EVENT</code>, <code>ACTOR_ACCOUNT_ID</code>, <code>HEAD_REF</code>, <code>BASE_REF</code>, <code>FILE_PATH</code>, and <code>COMMIT_MESSAGE</code>.<br />
  EVENT<br />
  A webhook event triggers a build when the provided <code>pattern</code> matches one of five event types: <code>PUSH</code>, <code>PULL_REQUEST_CREATED</code>, <code>PULL_REQUEST_UPDATED</code>, <code>PULL_REQUEST_REOPENED</code>, and <code>PULL_REQUEST_MERGED</code>. The <code>EVENT</code> patterns are specified as a comma-separated string. For example, <code>PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED</code> filters all push, pull request created, and pull request updated events.<br />
  The <code>PULL_REQUEST_REOPENED</code> works with GitHub and GitHub Enterprise only.<br />
  ACTOR_ACCOUNT_ID<br />
  A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression <code>pattern</code>.<br />
  HEAD_REF<br />
  A webhook event triggers a build when the head reference matches the regular expression <code>pattern</code>. For example, <code>refs/heads/branch-name</code> and <code>refs/tags/tag-name</code>.<br />
  Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events.<br />
  BASE_REF<br />
  A webhook event triggers a build when the base reference matches the regular expression <code>pattern</code>. For example, <code>refs/heads/branch-name</code>.<br />
  Works with pull request events only.<br />
  FILE_PATH<br />
  A webhook triggers a build when the path of a changed file matches the regular expression <code>pattern</code>.<br />
  Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.<br />
  COMMIT_MESSAGE<br />
  A webhook triggers a build when the head commit message matches the regular expression <code>pattern</code>.<br />
  Works with GitHub and Bitbucket events push and pull requests events. Also works with GitHub Enterprise push events, but does not work with GitHub Enterprise pull request events.
  
  Required: Yes<br />
  
  Allowed values: <code>ACTOR_ACCOUNT_ID | BASE_REF | COMMIT_MESSAGE | EVENT | FILE_PATH | HEAD_REF</code><br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    type: Value<'ACTOR_ACCOUNT_ID' | 'BASE_REF' | 'COMMIT_MESSAGE' | 'EVENT' | 'FILE_PATH' | 'HEAD_REF'>;
    /** <code>ExcludeMatchedPattern</code>  <a name="cfn-codebuild-project-webhookfilter-excludematchedpattern"></a>
  Used to indicate that the <code>pattern</code> determines which webhook events do not trigger a build. If true, then a webhook event that does not match the <code>pattern</code> triggers a build. If false, then a webhook event that matches the <code>pattern</code> triggers a build.<br />
  
  Required: No<br />
  
  Update requires: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt">No interruption</a> */
    excludeMatchedPattern?: Value<boolean>;
}
