Package dev.tobee.telegram.model.message
Record Class Message
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.message.Message
public record Message(OptionalLong messageId, Optional<User> user, Optional<Chat> senderChat, long date, Chat chat, Optional<User> forwardFrom, Optional<Chat> forwardFromChat, OptionalInt forwardFromMessageId, Optional<String> forwardSignature, Optional<String> forwardSenderName, OptionalInt forwardDate, boolean isAutomaticForward, Optional<Message> replyToMessage, Optional<User> viaBot, OptionalInt editDate, boolean hasProtectedContent, Optional<String> mediaGroupId, Optional<String> authorSignature, Optional<String> text, Optional<List<MessageEntity>> entities, Optional<Animation> animation, Optional<Audio> audio, Optional<Document> document, Optional<List<PhotoSize>> photo, Optional<Sticker> sticker, Optional<Video> video, Optional<VideoNote> video_note, Optional<Voice> voice, Optional<String> caption, Optional<List<MessageEntity>> captionEntities, Optional<Contact> contact, Optional<Dice> dice, Optional<Game> game, Optional<Poll> poll, Optional<Location> location, Optional<List<User>> newChatMembers, Optional<User> leftChatMember, Optional<String> newChatTitle, Optional<List<PhotoSize>> newChatPhoto, Optional<Boolean> deleteChatPhoto, Optional<Boolean> groupChatCreated, Optional<Boolean> supergroupChatCreated, Optional<MessageAutoDeleteTimerChanged> messageAutoDeleteTimerChanged, OptionalInt migrateToChatId, OptionalInt migrateFromChatId, Optional<Message> pinnedMessage, Optional<Invoice> invoice, Optional<SuccessfulPayment> successfulPayment, Optional<String> connectedWebsite, Optional<PassportData> passportData, Optional<ProximityAlertTriggered> proximityAlertTriggered, Optional<VoiceChatScheduled> voiceChatScheduled, Optional<VoiceChatEnded> voiceChatEnded, Optional<VoiceChatParticipantsInvited> voiceChatParticipantsInvited, Optional<InlineKeyboardMarkup> replyMarkup)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMessage(OptionalLong messageId, Optional<User> user, Optional<Chat> senderChat, long date, Chat chat, Optional<User> forwardFrom, Optional<Chat> forwardFromChat, OptionalInt forwardFromMessageId, Optional<String> forwardSignature, Optional<String> forwardSenderName, OptionalInt forwardDate, boolean isAutomaticForward, Optional<Message> replyToMessage, Optional<User> viaBot, OptionalInt editDate, boolean hasProtectedContent, Optional<String> mediaGroupId, Optional<String> authorSignature, Optional<String> text, Optional<List<MessageEntity>> entities, Optional<Animation> animation, Optional<Audio> audio, Optional<Document> document, Optional<List<PhotoSize>> photo, Optional<Sticker> sticker, Optional<Video> video, Optional<VideoNote> video_note, Optional<Voice> voice, Optional<String> caption, Optional<List<MessageEntity>> captionEntities, Optional<Contact> contact, Optional<Dice> dice, Optional<Game> game, Optional<Poll> poll, Optional<Location> location, Optional<List<User>> newChatMembers, Optional<User> leftChatMember, Optional<String> newChatTitle, Optional<List<PhotoSize>> newChatPhoto, Optional<Boolean> deleteChatPhoto, Optional<Boolean> groupChatCreated, Optional<Boolean> supergroupChatCreated, Optional<MessageAutoDeleteTimerChanged> messageAutoDeleteTimerChanged, OptionalInt migrateToChatId, OptionalInt migrateFromChatId, Optional<Message> pinnedMessage, Optional<Invoice> invoice, Optional<SuccessfulPayment> successfulPayment, Optional<String> connectedWebsite, Optional<PassportData> passportData, Optional<ProximityAlertTriggered> proximityAlertTriggered, Optional<VoiceChatScheduled> voiceChatScheduled, Optional<VoiceChatEnded> voiceChatEnded, Optional<VoiceChatParticipantsInvited> voiceChatParticipantsInvited, Optional<InlineKeyboardMarkup> replyMarkup) Creates an instance of aMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanimationrecord component.audio()Returns the value of theaudiorecord component.Returns the value of theauthorSignaturerecord component.caption()Returns the value of thecaptionrecord component.Returns the value of thecaptionEntitiesrecord component.chat()Returns the value of thechatrecord component.Returns the value of theconnectedWebsiterecord component.contact()Returns the value of thecontactrecord component.longdate()Returns the value of thedaterecord component.Returns the value of thedeleteChatPhotorecord component.dice()Returns the value of thedicerecord component.document()Returns the value of thedocumentrecord component.editDate()Returns the value of theeditDaterecord component.entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theforwardDaterecord component.Returns the value of theforwardFromrecord component.Returns the value of theforwardFromChatrecord component.Returns the value of theforwardFromMessageIdrecord component.Returns the value of theforwardSenderNamerecord component.Returns the value of theforwardSignaturerecord component.game()Returns the value of thegamerecord component.Returns the value of thegroupChatCreatedrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasProtectedContentrecord component.invoice()Returns the value of theinvoicerecord component.booleanReturns the value of theisAutomaticForwardrecord component.Returns the value of theleftChatMemberrecord component.location()Returns the value of thelocationrecord component.Returns the value of themediaGroupIdrecord component.Returns the value of themessageAutoDeleteTimerChangedrecord component.Returns the value of themessageIdrecord component.Returns the value of themigrateFromChatIdrecord component.Returns the value of themigrateToChatIdrecord component.Returns the value of thenewChatMembersrecord component.Returns the value of thenewChatPhotorecord component.Returns the value of thenewChatTitlerecord component.Returns the value of thepassportDatarecord component.photo()Returns the value of thephotorecord component.Returns the value of thepinnedMessagerecord component.poll()Returns the value of thepollrecord component.Returns the value of theproximityAlertTriggeredrecord component.Returns the value of thereplyMarkuprecord component.Returns the value of thereplyToMessagerecord component.Returns the value of thesenderChatrecord component.sticker()Returns the value of thestickerrecord component.Returns the value of thesuccessfulPaymentrecord component.Returns the value of thesupergroupChatCreatedrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.viaBot()Returns the value of theviaBotrecord component.video()Returns the value of thevideorecord component.Returns the value of thevideo_noterecord component.voice()Returns the value of thevoicerecord component.Returns the value of thevoiceChatEndedrecord component.Returns the value of thevoiceChatParticipantsInvitedrecord component.Returns the value of thevoiceChatScheduledrecord component.
-
Constructor Details
-
Message
public Message(OptionalLong messageId, Optional<User> user, Optional<Chat> senderChat, long date, Chat chat, Optional<User> forwardFrom, Optional<Chat> forwardFromChat, OptionalInt forwardFromMessageId, Optional<String> forwardSignature, Optional<String> forwardSenderName, OptionalInt forwardDate, boolean isAutomaticForward, Optional<Message> replyToMessage, Optional<User> viaBot, OptionalInt editDate, boolean hasProtectedContent, Optional<String> mediaGroupId, Optional<String> authorSignature, Optional<String> text, Optional<List<MessageEntity>> entities, Optional<Animation> animation, Optional<Audio> audio, Optional<Document> document, Optional<List<PhotoSize>> photo, Optional<Sticker> sticker, Optional<Video> video, Optional<VideoNote> video_note, Optional<Voice> voice, Optional<String> caption, Optional<List<MessageEntity>> captionEntities, Optional<Contact> contact, Optional<Dice> dice, Optional<Game> game, Optional<Poll> poll, Optional<Location> location, Optional<List<User>> newChatMembers, Optional<User> leftChatMember, Optional<String> newChatTitle, Optional<List<PhotoSize>> newChatPhoto, Optional<Boolean> deleteChatPhoto, Optional<Boolean> groupChatCreated, Optional<Boolean> supergroupChatCreated, Optional<MessageAutoDeleteTimerChanged> messageAutoDeleteTimerChanged, OptionalInt migrateToChatId, OptionalInt migrateFromChatId, Optional<Message> pinnedMessage, Optional<Invoice> invoice, Optional<SuccessfulPayment> successfulPayment, Optional<String> connectedWebsite, Optional<PassportData> passportData, Optional<ProximityAlertTriggered> proximityAlertTriggered, Optional<VoiceChatScheduled> voiceChatScheduled, Optional<VoiceChatEnded> voiceChatEnded, Optional<VoiceChatParticipantsInvited> voiceChatParticipantsInvited, Optional<InlineKeyboardMarkup> replyMarkup) Creates an instance of aMessagerecord class.- Parameters:
messageId- the value for themessageIdrecord componentuser- the value for theuserrecord componentsenderChat- the value for thesenderChatrecord componentdate- the value for thedaterecord componentchat- the value for thechatrecord componentforwardFrom- the value for theforwardFromrecord componentforwardFromChat- the value for theforwardFromChatrecord componentforwardFromMessageId- the value for theforwardFromMessageIdrecord componentforwardSignature- the value for theforwardSignaturerecord componentforwardSenderName- the value for theforwardSenderNamerecord componentforwardDate- the value for theforwardDaterecord componentisAutomaticForward- the value for theisAutomaticForwardrecord componentreplyToMessage- the value for thereplyToMessagerecord componentviaBot- the value for theviaBotrecord componenteditDate- the value for theeditDaterecord componenthasProtectedContent- the value for thehasProtectedContentrecord componentmediaGroupId- the value for themediaGroupIdrecord componentauthorSignature- the value for theauthorSignaturerecord componenttext- the value for thetextrecord componententities- the value for theentitiesrecord componentanimation- the value for theanimationrecord componentaudio- the value for theaudiorecord componentdocument- the value for thedocumentrecord componentphoto- the value for thephotorecord componentsticker- the value for thestickerrecord componentvideo- the value for thevideorecord componentvideo_note- the value for thevideo_noterecord componentvoice- the value for thevoicerecord componentcaption- the value for thecaptionrecord componentcaptionEntities- the value for thecaptionEntitiesrecord componentcontact- the value for thecontactrecord componentdice- the value for thedicerecord componentgame- the value for thegamerecord componentpoll- the value for thepollrecord componentlocation- the value for thelocationrecord componentnewChatMembers- the value for thenewChatMembersrecord componentleftChatMember- the value for theleftChatMemberrecord componentnewChatTitle- the value for thenewChatTitlerecord componentnewChatPhoto- the value for thenewChatPhotorecord componentdeleteChatPhoto- the value for thedeleteChatPhotorecord componentgroupChatCreated- the value for thegroupChatCreatedrecord componentsupergroupChatCreated- the value for thesupergroupChatCreatedrecord componentmessageAutoDeleteTimerChanged- the value for themessageAutoDeleteTimerChangedrecord componentmigrateToChatId- the value for themigrateToChatIdrecord componentmigrateFromChatId- the value for themigrateFromChatIdrecord componentpinnedMessage- the value for thepinnedMessagerecord componentinvoice- the value for theinvoicerecord componentsuccessfulPayment- the value for thesuccessfulPaymentrecord componentconnectedWebsite- the value for theconnectedWebsiterecord componentpassportData- the value for thepassportDatarecord componentproximityAlertTriggered- the value for theproximityAlertTriggeredrecord componentvoiceChatScheduled- the value for thevoiceChatScheduledrecord componentvoiceChatEnded- the value for thevoiceChatEndedrecord componentvoiceChatParticipantsInvited- the value for thevoiceChatParticipantsInvitedrecord componentreplyMarkup- the value for thereplyMarkuprecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
messageId
Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
senderChat
Returns the value of thesenderChatrecord component.- Returns:
- the value of the
senderChatrecord component
-
date
public long 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
-
forwardFrom
Returns the value of theforwardFromrecord component.- Returns:
- the value of the
forwardFromrecord component
-
forwardFromChat
Returns the value of theforwardFromChatrecord component.- Returns:
- the value of the
forwardFromChatrecord component
-
forwardFromMessageId
Returns the value of theforwardFromMessageIdrecord component.- Returns:
- the value of the
forwardFromMessageIdrecord component
-
forwardSignature
Returns the value of theforwardSignaturerecord component.- Returns:
- the value of the
forwardSignaturerecord component
-
forwardSenderName
Returns the value of theforwardSenderNamerecord component.- Returns:
- the value of the
forwardSenderNamerecord component
-
forwardDate
Returns the value of theforwardDaterecord component.- Returns:
- the value of the
forwardDaterecord component
-
isAutomaticForward
public boolean isAutomaticForward()Returns the value of theisAutomaticForwardrecord component.- Returns:
- the value of the
isAutomaticForwardrecord component
-
replyToMessage
Returns the value of thereplyToMessagerecord component.- Returns:
- the value of the
replyToMessagerecord component
-
viaBot
Returns the value of theviaBotrecord component.- Returns:
- the value of the
viaBotrecord component
-
editDate
Returns the value of theeditDaterecord component.- Returns:
- the value of the
editDaterecord component
-
hasProtectedContent
public boolean hasProtectedContent()Returns the value of thehasProtectedContentrecord component.- Returns:
- the value of the
hasProtectedContentrecord component
-
mediaGroupId
Returns the value of themediaGroupIdrecord component.- Returns:
- the value of the
mediaGroupIdrecord component
-
authorSignature
Returns the value of theauthorSignaturerecord component.- Returns:
- the value of the
authorSignaturerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
entities
Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-
animation
Returns the value of theanimationrecord component.- Returns:
- the value of the
animationrecord component
-
audio
Returns the value of theaudiorecord component.- Returns:
- the value of the
audiorecord component
-
document
Returns the value of thedocumentrecord component.- Returns:
- the value of the
documentrecord component
-
photo
Returns the value of thephotorecord component.- Returns:
- the value of the
photorecord component
-
sticker
Returns the value of thestickerrecord component.- Returns:
- the value of the
stickerrecord component
-
video
Returns the value of thevideorecord component.- Returns:
- the value of the
videorecord component
-
video_note
Returns the value of thevideo_noterecord component.- Returns:
- the value of the
video_noterecord component
-
voice
Returns the value of thevoicerecord component.- Returns:
- the value of the
voicerecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
captionEntities
Returns the value of thecaptionEntitiesrecord component.- Returns:
- the value of the
captionEntitiesrecord component
-
contact
Returns the value of thecontactrecord component.- Returns:
- the value of the
contactrecord component
-
dice
Returns the value of thedicerecord component.- Returns:
- the value of the
dicerecord component
-
game
Returns the value of thegamerecord component.- Returns:
- the value of the
gamerecord component
-
poll
Returns the value of thepollrecord component.- Returns:
- the value of the
pollrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
newChatMembers
Returns the value of thenewChatMembersrecord component.- Returns:
- the value of the
newChatMembersrecord component
-
leftChatMember
Returns the value of theleftChatMemberrecord component.- Returns:
- the value of the
leftChatMemberrecord component
-
newChatTitle
Returns the value of thenewChatTitlerecord component.- Returns:
- the value of the
newChatTitlerecord component
-
newChatPhoto
Returns the value of thenewChatPhotorecord component.- Returns:
- the value of the
newChatPhotorecord component
-
deleteChatPhoto
Returns the value of thedeleteChatPhotorecord component.- Returns:
- the value of the
deleteChatPhotorecord component
-
groupChatCreated
Returns the value of thegroupChatCreatedrecord component.- Returns:
- the value of the
groupChatCreatedrecord component
-
supergroupChatCreated
Returns the value of thesupergroupChatCreatedrecord component.- Returns:
- the value of the
supergroupChatCreatedrecord component
-
messageAutoDeleteTimerChanged
Returns the value of themessageAutoDeleteTimerChangedrecord component.- Returns:
- the value of the
messageAutoDeleteTimerChangedrecord component
-
migrateToChatId
Returns the value of themigrateToChatIdrecord component.- Returns:
- the value of the
migrateToChatIdrecord component
-
migrateFromChatId
Returns the value of themigrateFromChatIdrecord component.- Returns:
- the value of the
migrateFromChatIdrecord component
-
pinnedMessage
Returns the value of thepinnedMessagerecord component.- Returns:
- the value of the
pinnedMessagerecord component
-
invoice
Returns the value of theinvoicerecord component.- Returns:
- the value of the
invoicerecord component
-
successfulPayment
Returns the value of thesuccessfulPaymentrecord component.- Returns:
- the value of the
successfulPaymentrecord component
-
connectedWebsite
Returns the value of theconnectedWebsiterecord component.- Returns:
- the value of the
connectedWebsiterecord component
-
passportData
Returns the value of thepassportDatarecord component.- Returns:
- the value of the
passportDatarecord component
-
proximityAlertTriggered
Returns the value of theproximityAlertTriggeredrecord component.- Returns:
- the value of the
proximityAlertTriggeredrecord component
-
voiceChatScheduled
Returns the value of thevoiceChatScheduledrecord component.- Returns:
- the value of the
voiceChatScheduledrecord component
-
voiceChatEnded
Returns the value of thevoiceChatEndedrecord component.- Returns:
- the value of the
voiceChatEndedrecord component
-
voiceChatParticipantsInvited
Returns the value of thevoiceChatParticipantsInvitedrecord component.- Returns:
- the value of the
voiceChatParticipantsInvitedrecord component
-
replyMarkup
Returns the value of thereplyMarkuprecord component.- Returns:
- the value of the
replyMarkuprecord component
-