/** * <p> * One or more security group and AWS account ID pairs. * </p> * * @param userIdGroupPairs * One or more security group and AWS account ID pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withUserIdGroupPairs(java.util.Collection<UserIdGroupPair> userIdGroupPairs) { setUserIdGroupPairs(userIdGroupPairs); return this; }
/** * <p> * One or more security group and AWS account ID pairs. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setUserIdGroupPairs(java.util.Collection)} or {@link #withUserIdGroupPairs(java.util.Collection)} if you * want to override the existing values. * </p> * * @param userIdGroupPairs * One or more security group and AWS account ID pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs) { if (this.userIdGroupPairs == null) { setUserIdGroupPairs(new com.amazonaws.internal.SdkInternalList<UserIdGroupPair>(userIdGroupPairs.length)); } for (UserIdGroupPair ele : userIdGroupPairs) { this.userIdGroupPairs.add(ele); } return this; }
/** * One or more security group and AWS account ID pairs. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param userIdGroupPairs One or more security group and AWS account ID pairs. * * @return A reference to this updated object so that method calls can be chained * together. */ public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs) { if (getUserIdGroupPairs() == null) setUserIdGroupPairs(new java.util.ArrayList<UserIdGroupPair>(userIdGroupPairs.length)); for (UserIdGroupPair value : userIdGroupPairs) { getUserIdGroupPairs().add(value); } return this; }
/** * <p> * One or more security group and AWS account ID pairs. * </p> * * @param userIdGroupPairs * One or more security group and AWS account ID pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withUserIdGroupPairs(java.util.Collection<UserIdGroupPair> userIdGroupPairs) { setUserIdGroupPairs(userIdGroupPairs); return this; }
/** * <p> * One or more security group and AWS account ID pairs. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setUserIdGroupPairs(java.util.Collection)} or {@link #withUserIdGroupPairs(java.util.Collection)} if you * want to override the existing values. * </p> * * @param userIdGroupPairs * One or more security group and AWS account ID pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs) { if (this.userIdGroupPairs == null) { setUserIdGroupPairs(new com.amazonaws.internal.SdkInternalList<UserIdGroupPair>(userIdGroupPairs.length)); } for (UserIdGroupPair ele : userIdGroupPairs) { this.userIdGroupPairs.add(ele); } return this; }
.stream() .map(p -> { p.setUserIdGroupPairs(p.getUserIdGroupPairs().stream().map(UserIdGroupPair::clone).collect(Collectors.toList())); return p; })