/** * <p> * The instances. * </p> * * @param autoScalingInstances * The instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAutoScalingInstancesResult withAutoScalingInstances(java.util.Collection<AutoScalingInstanceDetails> autoScalingInstances) { setAutoScalingInstances(autoScalingInstances); return this; }
/** * <p> * The instances. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setAutoScalingInstances(java.util.Collection)} or {@link #withAutoScalingInstances(java.util.Collection)} * if you want to override the existing values. * </p> * * @param autoScalingInstances * The instances. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeAutoScalingInstancesResult withAutoScalingInstances(AutoScalingInstanceDetails... autoScalingInstances) { if (this.autoScalingInstances == null) { setAutoScalingInstances(new com.amazonaws.internal.SdkInternalList<AutoScalingInstanceDetails>(autoScalingInstances.length)); } for (AutoScalingInstanceDetails ele : autoScalingInstances) { this.autoScalingInstances.add(ele); } return this; }
/** * <p> * The instances. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param autoScalingInstances <p> * The instances. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DescribeAutoScalingInstancesResult withAutoScalingInstances( java.util.Collection<AutoScalingInstanceDetails> autoScalingInstances) { setAutoScalingInstances(autoScalingInstances); return this; }