/** * <p> * The role associated with the instance profile. * </p> * * @param roles * The role associated with the instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceProfile withRoles(java.util.Collection<Role> roles) { setRoles(roles); return this; }
/** * <p> * The role associated with the instance profile. * </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 * The role associated with the instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceProfile 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> * The role associated with the instance profile. * </p> * * @param roles * The role associated with the instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceProfile withRoles(java.util.Collection<Role> roles) { setRoles(roles); return this; }
/** * <p> * The role associated with the instance profile. * </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 * The role associated with the instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceProfile 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; }