Package br.com.pawsoncloud.dtos
Record Class UsuarioUpdateDto
java.lang.Object
java.lang.Record
br.com.pawsoncloud.dtos.UsuarioUpdateDto
public record UsuarioUpdateDto(@NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") String nome, @NotBlank(message="{senha.obrigatorio}") String senha, @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String telefone, @Valid EnderecoDto endereco)
extends Record
Representa um objeto de transferência de dados (DTO) para informações de usuário.
Este DTO é usado para validar e transportar dados de usuário para a API.
- Author:
- Edielson Assis
-
Constructor Summary
ConstructorsConstructorDescriptionUsuarioUpdateDto
(@NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") String nome, @NotBlank(message="{senha.obrigatorio}") String senha, @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String telefone, @Valid EnderecoDto endereco) Creates an instance of aUsuarioUpdateDto
record class. -
Method Summary
Modifier and TypeMethodDescription@Valid EnderecoDto
endereco()
Returns the value of theendereco
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="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") String
nome()
Returns the value of thenome
record component.@NotBlank(message="{senha.obrigatorio}") String
senha()
Returns the value of thesenha
record component.@NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String
telefone()
Returns the value of thetelefone
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
UsuarioUpdateDto
public UsuarioUpdateDto(@NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") @NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") String nome, @NotBlank(message="{senha.obrigatorio}") @NotBlank(message="{senha.obrigatorio}") String senha, @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String telefone, @Valid @Valid EnderecoDto endereco) Creates an instance of aUsuarioUpdateDto
record class.- Parameters:
nome
- the value for thenome
record componentsenha
- the value for thesenha
record componenttelefone
- the value for thetelefone
record componentendereco
- the value for theendereco
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)
. -
nome
@NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$", message="{campo.letras}") @Size(min=3, message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") public @NotBlank(message="{nome.obrigatorio}") @Pattern(regexp="^[a-zA-Z\u00c0-\u00ff\\s]+$",message="{campo.letras}") @Size(min=3,message="\'${validatedValue}\' precisa ter, pelo menos, {min} caracteres.") String nome()Returns the value of thenome
record component.- Returns:
- the value of the
nome
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
-
telefone
@NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$", message="{campo.numeros}") public @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String telefone()Returns the value of thetelefone
record component.- Returns:
- the value of the
telefone
record component
-
endereco
Returns the value of theendereco
record component.- Returns:
- the value of the
endereco
record component
-