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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a UsuarioUpdateDto record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the endereco record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    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
    Returns the value of the nome record component.
    @NotBlank(message="{senha.obrigatorio}") String
    Returns the value of the senha record component.
    @NotBlank(message="{telefone.obrigatorio}") @Pattern(regexp="^(\\+\\d{1,2}\\s?)?(\\(\\d{2}\\)\\s?)?(\\d{4,5}-?\\d{4})$",message="{campo.numeros}") String
    Returns the value of the telefone record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a UsuarioUpdateDto record class.
      Parameters:
      nome - the value for the nome record component
      senha - the value for the senha record component
      telefone - the value for the telefone record component
      endereco - the value for the endereco record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • 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 the nome 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 the senha 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 the telefone record component.
      Returns:
      the value of the telefone record component
    • endereco

      @Valid public @Valid EnderecoDto endereco()
      Returns the value of the endereco record component.
      Returns:
      the value of the endereco record component