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 aResetPasswordRequestrecord 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.@NotNull(message="New password cannot be null") @NotBlank(message="New password cannot be blank") StringReturns the value of thenewPasswordrecord component.@NotNull(message="Reset ID cannot be null") @NotBlank(message="Reset ID cannot be blank") StringresetID()Returns the value of theresetIDrecord component.final StringtoString()Returns a string representation of this record class.@NotNull(message="User ID cannot be null") LonguserID()Returns the value of theuserIDrecord 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 aResetPasswordRequestrecord class.- Parameters:
resetID- the value for theresetIDrecord componentuserID- the value for theuserIDrecord componentnewPassword- the value for thenewPasswordrecord 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 theresetIDrecord component.- Returns:
- the value of the
resetIDrecord component
-
userID
@NotNull(message="User ID cannot be null") public @NotNull(message="User ID cannot be null") Long userID()Returns the value of theuserIDrecord component.- Returns:
- the value of the
userIDrecord 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 thenewPasswordrecord component.- Returns:
- the value of the
newPasswordrecord component
-