public GitPullRequestFilter withEvents(GitPullRequestEventType... events) {
        java.util.ArrayList<String> eventsCopy = new java.util.ArrayList<String>(events.length);
        for (GitPullRequestEventType value : events) {
            eventsCopy.add(value.toString());
        }
        if (getEvents() == null) {
            setEvents(eventsCopy);
        } else {
            getEvents().addAll(eventsCopy);
        }
        return this;
    }
<p>
The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger
configuration.
</p>

@param events
       The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger
       configuration.
@return Returns a reference to this object so that method calls can be chained together.
@see GitPullRequestEventType
aws-java-sdk-codepipeline/src/main/java/com/amazonaws/services/codepipeline/model/GitPullRequestFilter.java