/** * <p> * One or more security group names. * </p> * * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(java.util.Collection<String> groupNames) { setGroupNames(groupNames); return this; }
private void populateReservationSecurityGroupNames(Reservation reservation) { List<String> groupNames = new ArrayList<String>(); for (GroupIdentifier group : reservation.getGroups()) { groupNames.add(group.getGroupName()); } reservation.setGroupNames(groupNames); }
/** * <p> * One or more security group names. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setGroupNames(java.util.Collection)} or {@link #withGroupNames(java.util.Collection)} if you want to * override the existing values. * </p> * * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(String... groupNames) { if (this.groupNames == null) { setGroupNames(new com.amazonaws.internal.SdkInternalList<String>(groupNames.length)); } for (String ele : groupNames) { this.groupNames.add(ele); } return this; }
private void populateReservationSecurityGroupNames(Reservation reservation) { List<String> groupNames = new ArrayList<String>(); for (GroupIdentifier group : reservation.getGroups()) { groupNames.add(group.getGroupName()); } reservation.setGroupNames(groupNames); }
/** * [EC2-Classic only] One or more security groups. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param groupNames [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 withGroupNames(String... groupNames) { if (getGroupNames() == null) setGroupNames(new java.util.ArrayList<String>(groupNames.length)); for (String value : groupNames) { getGroupNames().add(value); } return this; }
/** * <p> * One or more security group names. * </p> * * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(java.util.Collection<String> groupNames) { setGroupNames(groupNames); return this; }
private void populateReservationSecurityGroupNames(Reservation reservation) { List<String> groupNames = new ArrayList<String>(); for (GroupIdentifier group : reservation.getGroups()) { groupNames.add(group.getGroupName()); } reservation.setGroupNames(groupNames); }
/** * <p> * One or more security group names. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setGroupNames(java.util.Collection)} or {@link #withGroupNames(java.util.Collection)} if you want to * override the existing values. * </p> * * @param groupNames * One or more security group names. * @return Returns a reference to this object so that method calls can be chained together. */ public Reservation withGroupNames(String... groupNames) { if (this.groupNames == null) { setGroupNames(new com.amazonaws.internal.SdkInternalList<String>(groupNames.length)); } for (String ele : groupNames) { this.groupNames.add(ele); } return this; }