Record Class AuthResponseDTO
java.lang.Object
java.lang.Record
tech.lastbox.lastshield.basicauth.dto.AuthResponseDTO
public record AuthResponseDTO(Long id, String token, String message, LocalDateTime timestamp)
extends Record
Data Transfer Object (DTO) representing the response after authentication.
This DTO contains the details of the authentication response, including
the user's ID, the generated token, a message, and the timestamp of the response.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthResponseDTO(Long id, String token, String message, LocalDateTime timestamp) Creates an instance of aAuthResponseDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.message()Returns the value of themessagerecord component.Returns the value of thetimestamprecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthResponseDTO
Creates an instance of aAuthResponseDTOrecord class.- Parameters:
id- the value for theidrecord componenttoken- the value for thetokenrecord componentmessage- the value for themessagerecord componenttimestamp- the value for thetimestamprecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-