Package it.astromark.chat.dto
Record Class MessageResponse
java.lang.Object
java.lang.Record
it.astromark.chat.dto.MessageResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachment
record component.dateTime()
Returns the value of thedateTime
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.id()
Returns the value of theid
record component.Returns the value of theisSecretary
record component.Returns the value of thesenderName
record component.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MessageResponse
public MessageResponse(UUID id, String senderName, Boolean isSecretary, Instant dateTime, String text, String attachment) Creates an instance of aMessageResponse
record class.- Parameters:
id
- the value for theid
record componentsenderName
- the value for thesenderName
record componentisSecretary
- the value for theisSecretary
record componentdateTime
- the value for thedateTime
record componenttext
- the value for thetext
record componentattachment
- the value for theattachment
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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
senderName
Returns the value of thesenderName
record component.- Returns:
- the value of the
senderName
record component
-
isSecretary
Returns the value of theisSecretary
record component.- Returns:
- the value of the
isSecretary
record component
-
dateTime
Returns the value of thedateTime
record component.- Returns:
- the value of the
dateTime
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
attachment
Returns the value of theattachment
record component.- Returns:
- the value of the
attachment
record component
-