Class RepositoryTriggerOptions.Builder
java.lang.Object
software.amazon.awscdk.services.codecommit.RepositoryTriggerOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<RepositoryTriggerOptions>
- Enclosing interface:
RepositoryTriggerOptions
@Stability(Stable)
public static final class RepositoryTriggerOptions.Builder
extends Object
implements software.amazon.jsii.Builder<RepositoryTriggerOptions>
A builder for
RepositoryTriggerOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofRepositoryTriggerOptions.getBranches()
build()
Builds the configured instance.customData
(String customData) Sets the value ofRepositoryTriggerOptions.getCustomData()
events
(List<? extends RepositoryEventTrigger> events) Sets the value ofRepositoryTriggerOptions.getEvents()
Sets the value ofRepositoryTriggerOptions.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
branches
Sets the value ofRepositoryTriggerOptions.getBranches()
- Parameters:
branches
- 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.- Returns:
this
-
customData
Sets the value ofRepositoryTriggerOptions.getCustomData()
- Parameters:
customData
- When an event is triggered, additional information that AWS CodeCommit includes when it sends information to the target.- Returns:
this
-
events
@Stability(Stable) public RepositoryTriggerOptions.Builder events(List<? extends RepositoryEventTrigger> events) Sets the value ofRepositoryTriggerOptions.getEvents()
- Parameters:
events
- 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.- Returns:
this
-
name
Sets the value ofRepositoryTriggerOptions.getName()
- Parameters:
name
- A name for the trigger.Triggers on a repository must have unique names.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<RepositoryTriggerOptions>
- Returns:
- a new instance of
RepositoryTriggerOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-