public GitPullRequestFilter withEvents(String... events) {
        if (this.events == null) {
            setEvents(new java.util.ArrayList<String>(events.length));
        }
        for (String ele : events) {
            this.events.add(ele);
        }
        return this;
    }
<p>
The field that specifies which pull request events to filter on (opened, updated, closed) for the trigger
configuration.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setEvents(java.util.Collection)} or {@link #withEvents(java.util.Collection)} if you want to override the
existing values.
</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