Record Class CreateAssignmentRequest
java.lang.Object
java.lang.Record
com.nicholasalfonso.lato.dto.request.CreateAssignmentRequest
- Record Components:
courseId- optional course ID; when omitted, the manual assignments course is usedtitle- the assignment titledueDate- optional custom due datedueTime- optional custom due timedescription- optional assignment descriptionpriority- optional assignment priority level
public record CreateAssignmentRequest(Long courseId, @NotBlank String title, LocalDate dueDate, LocalTime dueTime, String description, Assignment.AssignmentPriority priority)
extends Record
Request body for creating a manually entered assignment.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateAssignmentRequest(Long courseId, @NotBlank String title, LocalDate dueDate, LocalTime dueTime, String description, Assignment.AssignmentPriority priority) Creates an instance of aCreateAssignmentRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncourseId()Returns the value of thecourseIdrecord component.Returns the value of thedescriptionrecord component.dueDate()Returns the value of thedueDaterecord component.dueTime()Returns the value of thedueTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.priority()Returns the value of thepriorityrecord component.@NotBlank Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CreateAssignmentRequest
public CreateAssignmentRequest(Long courseId, @NotBlank @NotBlank String title, LocalDate dueDate, LocalTime dueTime, String description, Assignment.AssignmentPriority priority) Creates an instance of aCreateAssignmentRequestrecord class.- Parameters:
courseId- the value for thecourseIdrecord componenttitle- the value for thetitlerecord componentdueDate- the value for thedueDaterecord componentdueTime- the value for thedueTimerecord componentdescription- the value for thedescriptionrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
courseId
Returns the value of thecourseIdrecord component.- Returns:
- the value of the
courseIdrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
dueDate
Returns the value of thedueDaterecord component.- Returns:
- the value of the
dueDaterecord component
-
dueTime
Returns the value of thedueTimerecord component.- Returns:
- the value of the
dueTimerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-