/** * <p> * Zero or more reservations. * </p> * * @param reservations * Zero or more reservations. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeInstancesResult withReservations(java.util.Collection<Reservation> reservations) { setReservations(reservations); return this; }
/** * <p> * Zero or more reservations. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setReservations(java.util.Collection)} or {@link #withReservations(java.util.Collection)} if you want to * override the existing values. * </p> * * @param reservations * Zero or more reservations. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeInstancesResult withReservations(Reservation... reservations) { if (this.reservations == null) { setReservations(new com.amazonaws.internal.SdkInternalList<Reservation>(reservations.length)); } for (Reservation ele : reservations) { this.reservations.add(ele); } return this; }
/** * Zero or more reservations. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param reservations Zero or more reservations. * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeInstancesResult withReservations(Reservation... reservations) { if (getReservations() == null) setReservations(new java.util.ArrayList<Reservation>(reservations.length)); for (Reservation value : reservations) { getReservations().add(value); } return this; }
/** * <p> * Zero or more reservations. * </p> * * @param reservations * Zero or more reservations. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeInstancesResult withReservations(java.util.Collection<Reservation> reservations) { setReservations(reservations); return this; }
/** * <p> * Zero or more reservations. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setReservations(java.util.Collection)} or {@link #withReservations(java.util.Collection)} if you want to * override the existing values. * </p> * * @param reservations * Zero or more reservations. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeInstancesResult withReservations(Reservation... reservations) { if (this.reservations == null) { setReservations(new com.amazonaws.internal.SdkInternalList<Reservation>(reservations.length)); } for (Reservation ele : reservations) { this.reservations.add(ele); } return this; }