/** * <p> * The status of the assignment. * </p> * * @param assignmentStatus * The status of the assignment. * @return Returns a reference to this object so that method calls can be chained together. * @see AssignmentStatus */ public Assignment withAssignmentStatus(AssignmentStatus assignmentStatus) { this.assignmentStatus = assignmentStatus.toString(); return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return AssignmentStatus corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static AssignmentStatus fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (AssignmentStatus enumEntry : AssignmentStatus.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * The status of the assignments to return: Submitted | Approved | Rejected * </p> * * @param assignmentStatuses * The status of the assignments to return: Submitted | Approved | Rejected * @return Returns a reference to this object so that method calls can be chained together. * @see AssignmentStatus */ public ListAssignmentsForHITRequest withAssignmentStatuses(AssignmentStatus... assignmentStatuses) { java.util.ArrayList<String> assignmentStatusesCopy = new java.util.ArrayList<String>(assignmentStatuses.length); for (AssignmentStatus value : assignmentStatuses) { assignmentStatusesCopy.add(value.toString()); } if (getAssignmentStatuses() == null) { setAssignmentStatuses(assignmentStatusesCopy); } else { getAssignmentStatuses().addAll(assignmentStatusesCopy); } return this; }