Record Class CoursesController.ApiCourseKeyView
java.lang.Object
java.lang.Record
edu.ucsb.cs156.frontiers.controllers.CoursesController.ApiCourseKeyView
- Enclosing class:
CoursesController
public static record CoursesController.ApiCourseKeyView(Long id, String keySuffix, Long createdById, ZonedDateTime createdAt, ZonedDateTime expiresAt, boolean revoked, long usageCount, ZonedDateTime lastUsedAt)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionApiCourseKeyView(Long id, String keySuffix, Long createdById, ZonedDateTime createdAt, ZonedDateTime expiresAt, boolean revoked, long usageCount, ZonedDateTime lastUsedAt) Creates an instance of aApiCourseKeyViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.Returns the value of thecreatedByIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thekeySuffixrecord component.Returns the value of thelastUsedAtrecord component.booleanrevoked()Returns the value of therevokedrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theusageCountrecord component.
-
Constructor Details
-
ApiCourseKeyView
-
ApiCourseKeyView
public ApiCourseKeyView(Long id, String keySuffix, Long createdById, ZonedDateTime createdAt, ZonedDateTime expiresAt, boolean revoked, long usageCount, ZonedDateTime lastUsedAt) Creates an instance of aApiCourseKeyViewrecord class.- Parameters:
id- the value for theidrecord componentkeySuffix- the value for thekeySuffixrecord componentcreatedById- the value for thecreatedByIdrecord componentcreatedAt- the value for thecreatedAtrecord componentexpiresAt- the value for theexpiresAtrecord componentrevoked- the value for therevokedrecord componentusageCount- the value for theusageCountrecord componentlastUsedAt- the value for thelastUsedAtrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
keySuffix
Returns the value of thekeySuffixrecord component.- Returns:
- the value of the
keySuffixrecord component
-
createdById
Returns the value of thecreatedByIdrecord component.- Returns:
- the value of the
createdByIdrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-
revoked
public boolean revoked()Returns the value of therevokedrecord component.- Returns:
- the value of the
revokedrecord component
-
usageCount
public long usageCount()Returns the value of theusageCountrecord component.- Returns:
- the value of the
usageCountrecord component
-
lastUsedAt
Returns the value of thelastUsedAtrecord component.- Returns:
- the value of the
lastUsedAtrecord component
-