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