public JobFlowInstancesDetail withInstanceGroups(InstanceGroupDetail... instanceGroups) {
        if (this.instanceGroups == null) {
            setInstanceGroups(new com.amazonaws.internal.SdkInternalList<InstanceGroupDetail>(instanceGroups.length));
        }
        for (InstanceGroupDetail ele : instanceGroups) {
            this.instanceGroups.add(ele);
        }
        return this;
    }
<p>
Details about the instance groups in a cluster.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setInstanceGroups(java.util.Collection)} or {@link #withInstanceGroups(java.util.Collection)} if you want
to override the existing values.
</p>

@param instanceGroups
       Details about the instance groups in a 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/JobFlowInstancesDetail.java