public TargetInstances withAutoScalingGroups(String... autoScalingGroups) {
        if (this.autoScalingGroups == null) {
            setAutoScalingGroups(new com.amazonaws.internal.SdkInternalList<String>(autoScalingGroups.length));
        }
        for (String ele : autoScalingGroups) {
            this.autoScalingGroups.add(ele);
        }
        return this;
    }
<p>
The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAutoScalingGroups(java.util.Collection)} or {@link #withAutoScalingGroups(java.util.Collection)} if
you want to override the existing values.
</p>

@param autoScalingGroups
       The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green
       deployment.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-codedeploy/src/main/java/com/amazonaws/services/codedeploy/model/TargetInstances.java