/** * <p> * A list of roles. * </p> * * @param roles * A list of roles. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRolesResult withRoles(java.util.Collection<Role> roles) { setRoles(roles); return this; }
/** * <p> * A list of roles. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setRoles(java.util.Collection)} or {@link #withRoles(java.util.Collection)} if you want to override the * existing values. * </p> * * @param roles * A list of roles. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRolesResult withRoles(Role... roles) { if (this.roles == null) { setRoles(new com.amazonaws.internal.SdkInternalList<Role>(roles.length)); } for (Role ele : roles) { this.roles.add(ele); } return this; }
/** * <p> * A list of roles. * </p> * * @param roles * A list of roles. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRolesResult withRoles(java.util.Collection<Role> roles) { setRoles(roles); return this; }
/** * <p> * A list of roles. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setRoles(java.util.Collection)} or {@link #withRoles(java.util.Collection)} if you want to override the * existing values. * </p> * * @param roles * A list of roles. * @return Returns a reference to this object so that method calls can be chained together. */ public ListRolesResult withRoles(Role... roles) { if (this.roles == null) { setRoles(new com.amazonaws.internal.SdkInternalList<Role>(roles.length)); } for (Role ele : roles) { this.roles.add(ele); } return this; }