Record Class MessageOriginChannel
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.MessageOriginChannel
- All Implemented Interfaces:
Serializable,ApiResult,MessageOrigin
public record MessageOriginChannel(@NotNull Date date, @NotNull Chat chat, int messageId, @Nullable String senderSignature)
extends Record
implements MessageOrigin
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.MessageOrigin
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionMessageOriginChannel(@NotNull Date date, @NotNull Chat chat, int messageId, @Nullable String senderSignature) Creates an instance of aMessageOriginChannelrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Chatchat()Returns the value of thechatrecord component.@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.intReturns the value of themessageIdrecord component.@Nullable StringReturns the value of thesenderSignaturerecord component.final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
MessageOriginChannel
public MessageOriginChannel(@NotNull @NotNull Date date, @NotNull @NotNull Chat chat, int messageId, @Nullable @Nullable String senderSignature) Creates an instance of aMessageOriginChannelrecord class.- Parameters:
date- the value for thedaterecord componentchat- the value for thechatrecord componentmessageId- the value for themessageIdrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
date
Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
chat
Returns the value of thechatrecord component.- Returns:
- the value of the
chatrecord component
-
messageId
public int messageId()Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
senderSignature
Returns the value of thesenderSignaturerecord component.- Returns:
- the value of the
senderSignaturerecord component
-