Record Class MessageOriginChat
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.MessageOriginChat
- All Implemented Interfaces:
Serializable,ApiResult,MessageOrigin
public record MessageOriginChat(@NotNull Date date, @NotNull Chat senderChat, @NotNull String senderSignature)
extends Record
implements MessageOrigin
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.MessageOrigin
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMessageOriginChat(@NotNull Date date, @NotNull Chat senderChat, @NotNull String senderSignature) Creates an instance of aMessageOriginChatrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Datedate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull ChatReturns the value of thesenderChatrecord component.@NotNull StringReturns the value of thesenderSignaturerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
MessageOriginChat
public MessageOriginChat(@NotNull @NotNull Date date, @NotNull @NotNull Chat senderChat, @NotNull @NotNull String senderSignature) Creates an instance of aMessageOriginChatrecord class.- Parameters:
date- the value for thedaterecord componentsenderChat- the value for thesenderChatrecord componentsenderSignature- the value for thesenderSignaturerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceMessageOrigin
-
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). -
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
senderChat
Returns the value of thesenderChatrecord component.- Returns:
- the value of the
senderChatrecord component
-
senderSignature
Returns the value of thesenderSignaturerecord component.- Returns:
- the value of the
senderSignaturerecord component
-