Record Class CriarUsuarioDTO
java.lang.Object
java.lang.Record
br.com.selfmaintenance.app.records.usuario.CriarUsuarioDTO
public record CriarUsuarioDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelDTO usuarioAutenticavel, @CPF(message="CPF inv\u00e1lido") String cpf, @CNPJ(message="CNPJ inv\u00e1lido") String cnpj, String sexo)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCriarUsuarioDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelDTO usuarioAutenticavel, @CPF(message="CPF inv\u00e1lido") String cpf, @CNPJ(message="CNPJ inv\u00e1lido") String cnpj, String sexo) Creates an instance of aCriarUsuarioDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@CNPJ(message="CNPJ inv\u00e1lido") Stringcnpj()Returns the value of thecnpjrecord component.@CPF(message="CPF inv\u00e1lido") Stringcpf()Returns the value of thecpfrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sexo()Returns the value of thesexorecord component.final StringtoString()Returns a string representation of this record class.@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelDTOReturns the value of theusuarioAutenticavelrecord component.
-
Constructor Details
-
CriarUsuarioDTO
public CriarUsuarioDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid @NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelDTO usuarioAutenticavel, @CPF(message="CPF inv\u00e1lido") @CPF(message="CPF inv\u00e1lido") String cpf, @CNPJ(message="CNPJ inv\u00e1lido") @CNPJ(message="CNPJ inv\u00e1lido") String cnpj, String sexo) Creates an instance of aCriarUsuarioDTOrecord class.- Parameters:
usuarioAutenticavel- the value for theusuarioAutenticavelrecord componentcpf- the value for thecpfrecord componentcnpj- the value for thecnpjrecord componentsexo- the value for thesexorecord 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). -
usuarioAutenticavel
@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid public @NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelDTO usuarioAutenticavel()Returns the value of theusuarioAutenticavelrecord component.- Returns:
- the value of the
usuarioAutenticavelrecord component
-
cpf
Returns the value of thecpfrecord component.- Returns:
- the value of the
cpfrecord component
-
cnpj
Returns the value of thecnpjrecord component.- Returns:
- the value of the
cnpjrecord component
-
sexo
Returns the value of thesexorecord component.- Returns:
- the value of the
sexorecord component
-