public ConsumerGroupReplicationUpdate withConsumerGroupsToReplicate(String... consumerGroupsToReplicate) {
        if (this.consumerGroupsToReplicate == null) {
            setConsumerGroupsToReplicate(new java.util.ArrayList<String>(consumerGroupsToReplicate.length));
        }
        for (String ele : consumerGroupsToReplicate) {
            this.consumerGroupsToReplicate.add(ele);
        }
        return this;
    }
<p>
List of regular expression patterns indicating the consumer groups to copy.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setConsumerGroupsToReplicate(java.util.Collection)} or
{@link #withConsumerGroupsToReplicate(java.util.Collection)} if you want to override the existing values.
</p>

@param consumerGroupsToReplicate
       List of regular expression patterns indicating the consumer groups to copy.
@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/ConsumerGroupReplicationUpdate.java