/** * <p> * One or more inbound rules associated with the security group. * </p> * * @param ipPermissions * One or more inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityGroup withIpPermissions(java.util.Collection<IpPermission> ipPermissions) { setIpPermissions(ipPermissions); return this; }
/** * <p> * One or more inbound rules associated with the security group. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setIpPermissions(java.util.Collection)} or {@link #withIpPermissions(java.util.Collection)} if you want * to override the existing values. * </p> * * @param ipPermissions * One or more inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityGroup withIpPermissions(IpPermission... ipPermissions) { if (this.ipPermissions == null) { setIpPermissions(new com.amazonaws.internal.SdkInternalList<IpPermission>(ipPermissions.length)); } for (IpPermission ele : ipPermissions) { this.ipPermissions.add(ele); } return this; }
/** * One or more inbound rules associated with the security group. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param ipPermissions One or more inbound rules associated with the security group. * * @return A reference to this updated object so that method calls can be chained * together. */ public SecurityGroup withIpPermissions(IpPermission... ipPermissions) { if (getIpPermissions() == null) setIpPermissions(new java.util.ArrayList<IpPermission>(ipPermissions.length)); for (IpPermission value : ipPermissions) { getIpPermissions().add(value); } return this; }
/** * <p> * One or more inbound rules associated with the security group. * </p> * * @param ipPermissions * One or more inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityGroup withIpPermissions(java.util.Collection<IpPermission> ipPermissions) { setIpPermissions(ipPermissions); return this; }
/** * <p> * One or more inbound rules associated with the security group. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setIpPermissions(java.util.Collection)} or {@link #withIpPermissions(java.util.Collection)} if you want * to override the existing values. * </p> * * @param ipPermissions * One or more inbound rules associated with the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public SecurityGroup withIpPermissions(IpPermission... ipPermissions) { if (this.ipPermissions == null) { setIpPermissions(new com.amazonaws.internal.SdkInternalList<IpPermission>(ipPermissions.length)); } for (IpPermission ele : ipPermissions) { this.ipPermissions.add(ele); } return this; }