public DetachInstancesResult withActivities(Activity... activities) {
        if (this.activities == null) {
            setActivities(new com.amazonaws.internal.SdkInternalList<Activity>(activities.length));
        }
        for (Activity ele : activities) {
            this.activities.add(ele);
        }
        return this;
    }
<p>
The activities related to detaching the instances from the Auto Scaling group.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setActivities(java.util.Collection)} or {@link #withActivities(java.util.Collection)} if you want to
override the existing values.
</p>

@param activities
       The activities related to detaching the instances from the Auto Scaling group.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-autoscaling/src/main/java/com/amazonaws/services/autoscaling/model/DetachInstancesResult.java