/** * <p> * [EC2-Classic only] One or more security groups. * </p> * * @param groups * [EC2-Classic only] One or more security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(java.util.Collection<GroupIdentifier> groups) { setGroups(groups); return this; }
/** * <p> * [EC2-Classic only] One or more security groups. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the * existing values. * </p> * * @param groups * [EC2-Classic only] One or more security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(GroupIdentifier... groups) { if (this.groups == null) { setGroups(new com.amazonaws.internal.SdkInternalList<GroupIdentifier>(groups.length)); } for (GroupIdentifier ele : groups) { this.groups.add(ele); } return this; }
/** * [EC2-Classic only] One or more security groups. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param groups [EC2-Classic only] One or more security groups. * * @return A reference to this updated object so that method calls can be chained * together. */ public Reservation withGroups(GroupIdentifier... groups) { if (getGroups() == null) setGroups(new java.util.ArrayList<GroupIdentifier>(groups.length)); for (GroupIdentifier value : groups) { getGroups().add(value); } return this; }
/** * <p> * [EC2-Classic only] One or more security groups. * </p> * * @param groups * [EC2-Classic only] One or more security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(java.util.Collection<GroupIdentifier> groups) { setGroups(groups); return this; }
/** * <p> * [EC2-Classic only] One or more security groups. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the * existing values. * </p> * * @param groups * [EC2-Classic only] One or more security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroups(GroupIdentifier... groups) { if (this.groups == null) { setGroups(new com.amazonaws.internal.SdkInternalList<GroupIdentifier>(groups.length)); } for (GroupIdentifier ele : groups) { this.groups.add(ele); } return this; }