Package br.com.pawsoncloud.dtos
Record Class UsuarioAutenticado
java.lang.Object
java.lang.Record
br.com.pawsoncloud.dtos.UsuarioAutenticado
public record UsuarioAutenticado(@NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") String email, @NotBlank(message="{senha.obrigatorio}") String senha)
extends Record
Record que representa o dto de autenticação do usuário. É utilizado nas requisições do tipo request.
- Author:
- Edielson Assis
-
Constructor Summary
ConstructorsConstructorDescriptionUsuarioAutenticado
(@NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") String email, @NotBlank(message="{senha.obrigatorio}") String senha) Creates an instance of aUsuarioAutenticado
record class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") String
email()
Returns the value of theemail
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotBlank(message="{senha.obrigatorio}") String
senha()
Returns the value of thesenha
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
UsuarioAutenticado
public UsuarioAutenticado(@NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") @NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") String email, @NotBlank(message="{senha.obrigatorio}") @NotBlank(message="{senha.obrigatorio}") String senha) Creates an instance of aUsuarioAutenticado
record class.- Parameters:
email
- the value for theemail
record componentsenha
- the value for thesenha
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)
. -
email
@NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") public @NotBlank(message="{email.obrigatorio}") @Email(message="{email.invalido}") String email()Returns the value of theemail
record component.- Returns:
- the value of the
email
record component
-
senha
@NotBlank(message="{senha.obrigatorio}") public @NotBlank(message="{senha.obrigatorio}") String senha()Returns the value of thesenha
record component.- Returns:
- the value of the
senha
record component
-