Record Class ResetPasswordRequest
java.lang.Object
java.lang.Record
org.ntnu.idi.idatt2106.sparesti.sparestibackend.dto.user.ResetPasswordRequest
- Record Components:
resetID
- ID of reset password entryuserID
- User IDnewPassword
- new password
- All Implemented Interfaces:
Serializable
public record ResetPasswordRequest(@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") String resetID, @NotNull(message="User ID cannot be null") Long userID, @NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") String newPassword)
extends Record
implements Serializable
DTO for resetting password
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResetPasswordRequest
(@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") String resetID, @NotNull(message="User ID cannot be null") Long userID, @NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") String newPassword) Creates an instance of aResetPasswordRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") String
Returns the value of thenewPassword
record component.@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") String
resetID()
Returns the value of theresetID
record component.final String
toString()
Returns a string representation of this record class.@NotNull(message="User ID cannot be null") Long
userID()
Returns the value of theuserID
record component.
-
Constructor Details
-
ResetPasswordRequest
public ResetPasswordRequest(@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") @NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") String resetID, @NotNull(message="User ID cannot be null") @NotNull(message="User ID cannot be null") Long userID, @NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") @NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") String newPassword) Creates an instance of aResetPasswordRequest
record class.- Parameters:
resetID
- the value for theresetID
record componentuserID
- the value for theuserID
record componentnewPassword
- the value for thenewPassword
record 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)
. -
resetID
@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") public @NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") String resetID()Returns the value of theresetID
record component.- Returns:
- the value of the
resetID
record component
-
userID
@NotNull(message="User ID cannot be null") public @NotNull(message="User ID cannot be null") Long userID()Returns the value of theuserID
record component.- Returns:
- the value of the
userID
record component
-
newPassword
@NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") public @NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") String newPassword()Returns the value of thenewPassword
record component.- Returns:
- the value of the
newPassword
record component
-