Record Class LoginRequestDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.login.LoginRequestDTO
- Record Components:
email- String referente ao email do usuáriopassword- String referente a senha do usuário
public record LoginRequestDTO(@NotBlank(message="email is required") @Email String email, @NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") String password)
extends Record
Dados referentes ao Login do Usuário na aplicação
-
Constructor Summary
ConstructorsConstructorDescriptionLoginRequestDTO(@NotBlank(message="email is required") @Email String email, @NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") String password) Creates an instance of aLoginRequestDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank(message="email is required") @Email Stringemail()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LoginRequestDTO
public LoginRequestDTO(@NotBlank(message="email is required") @Email @NotBlank(message="email is required") @Email String email, @NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") @NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") String password) Creates an instance of aLoginRequestDTOrecord class.
-
-
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). -
email
@NotBlank(message="email is required") @Email public @NotBlank(message="email is required") @Email String email()Returns the value of theemailrecord component.- Returns:
- the value of the
emailrecord component
-
password
@NotBlank @Size(min=8, max=12, message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") public @NotBlank @Size(min=8,max=12,message="Senha deve ter pelo menos 8 caracteres e no m\u00c3\u00a1ximo 12") String password()Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-