public Cluster withPlacementGroups(PlacementGroupConfig... placementGroups) {
        if (this.placementGroups == null) {
            setPlacementGroups(new com.amazonaws.internal.SdkInternalList<PlacementGroupConfig>(placementGroups.length));
        }
        for (PlacementGroupConfig ele : placementGroups) {
            this.placementGroups.add(ele);
        }
        return this;
    }
<p>
Placement group configured for an Amazon EMR cluster.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setPlacementGroups(java.util.Collection)} or {@link #withPlacementGroups(java.util.Collection)} if you
want to override the existing values.
</p>

@param placementGroups
       Placement group configured for an Amazon EMR cluster.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/model/Cluster.java