public ConsumerGroupReplication withConsumerGroupsToExclude(String... consumerGroupsToExclude) {
        if (this.consumerGroupsToExclude == null) {
            setConsumerGroupsToExclude(new java.util.ArrayList<String>(consumerGroupsToExclude.length));
        }
        for (String ele : consumerGroupsToExclude) {
            this.consumerGroupsToExclude.add(ele);
        }
        return this;
    }
<p>
List of regular expression patterns indicating the consumer groups that should not be replicated.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setConsumerGroupsToExclude(java.util.Collection)} or
{@link #withConsumerGroupsToExclude(java.util.Collection)} if you want to override the existing values.
</p>

@param consumerGroupsToExclude
       List of regular expression patterns indicating the consumer groups that should not be replicated.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-kafka/src/main/java/com/amazonaws/services/kafka/model/ConsumerGroupReplication.java