Record Class CriarPrestadorDTO
java.lang.Object
java.lang.Record
br.com.selfmaintenance.app.records.prestador.CriarPrestadorDTO
public record CriarPrestadorDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelPrestadorDTO usuarioAutenticavelPrestador, @NotBlank @CPF(message="CPF inv\u00e1lido") String cpf, String sexo)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCriarPrestadorDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelPrestadorDTO usuarioAutenticavelPrestador, @NotBlank @CPF(message="CPF inv\u00e1lido") String cpf, String sexo) Creates an instance of aCriarPrestadorDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank @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 UsuarioAutenticavelPrestadorDTOReturns the value of theusuarioAutenticavelPrestadorrecord component.
-
Constructor Details
-
CriarPrestadorDTO
public CriarPrestadorDTO(@NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid @NotNull(message="Usu\u00e1rio autentic\u00e1vel n\u00e3o pode ser nulo") @Valid UsuarioAutenticavelPrestadorDTO usuarioAutenticavelPrestador, @NotBlank @CPF(message="CPF inv\u00e1lido") @NotBlank @CPF(message="CPF inv\u00e1lido") String cpf, String sexo) Creates an instance of aCriarPrestadorDTOrecord class.- Parameters:
usuarioAutenticavelPrestador- the value for theusuarioAutenticavelPrestadorrecord componentcpf- the value for thecpfrecord 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). -
usuarioAutenticavelPrestador
@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 UsuarioAutenticavelPrestadorDTO usuarioAutenticavelPrestador()Returns the value of theusuarioAutenticavelPrestadorrecord component.- Returns:
- the value of the
usuarioAutenticavelPrestadorrecord component
-
cpf
@NotBlank @CPF(message="CPF inv\u00e1lido") public @NotBlank @CPF(message="CPF inv\u00e1lido") String cpf()Returns the value of thecpfrecord component.- Returns:
- the value of the
cpfrecord component
-
sexo
Returns the value of thesexorecord component.- Returns:
- the value of the
sexorecord component
-