Record Class Update
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Update
- All Implemented Interfaces:
Serializable, ApiResult
public record Update(int updateId, @Nullable Message message, @Nullable Message editedMessage, @Nullable Message channelPost, @Nullable Message editedChannelPost, @Nullable BusinessConnection businessConnection, @Nullable Message businessMessage, @Nullable Message editedBusinessMessage, @Nullable BusinessMessagesDeleted deletedBusinessMessages, @Nullable Message guestMessage, @Nullable MessageReactionUpdated messageReaction, @Nullable MessageReactionCountUpdated messageReactionCount, @Nullable InlineQuery inlineQuery, @Nullable ChosenInlineResult chosenInlineResult, @Nullable CallbackQuery callbackQuery, @Nullable ShippingQuery shippingQuery, @Nullable PreCheckoutQuery preCheckoutQuery, @Nullable PaidMediaPurchased purchasedPaidMedia, @Nullable Poll poll, @Nullable PollAnswer pollAnswer, @Nullable ChatMemberUpdated myChatMember, @Nullable ChatMemberUpdated chatMember, @Nullable ChatJoinRequest chatJoinRequest, @Nullable ChatBoostUpdated chatBoost, @Nullable ChatBoostRemoved removedChatBoost, @Nullable ManagedBotUpdated managedBotUpdated)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUpdate(int updateId, @Nullable Message message, @Nullable Message editedMessage, @Nullable Message channelPost, @Nullable Message editedChannelPost, @Nullable BusinessConnection businessConnection, @Nullable Message businessMessage, @Nullable Message editedBusinessMessage, @Nullable BusinessMessagesDeleted deletedBusinessMessages, @Nullable Message guestMessage, @Nullable MessageReactionUpdated messageReaction, @Nullable MessageReactionCountUpdated messageReactionCount, @Nullable InlineQuery inlineQuery, @Nullable ChosenInlineResult chosenInlineResult, @Nullable CallbackQuery callbackQuery, @Nullable ShippingQuery shippingQuery, @Nullable PreCheckoutQuery preCheckoutQuery, @Nullable PaidMediaPurchased purchasedPaidMedia, @Nullable Poll poll, @Nullable PollAnswer pollAnswer, @Nullable ChatMemberUpdated myChatMember, @Nullable ChatMemberUpdated chatMember, @Nullable ChatJoinRequest chatJoinRequest, @Nullable ChatBoostUpdated chatBoost, @Nullable ChatBoostRemoved removedChatBoost, @Nullable ManagedBotUpdated managedBotUpdated) Creates an instance of aUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BusinessConnectionReturns the value of thebusinessConnectionrecord component.@Nullable MessageReturns the value of thebusinessMessagerecord component.@Nullable CallbackQueryReturns the value of thecallbackQueryrecord component.@Nullable MessageReturns the value of thechannelPostrecord component.@Nullable ChatBoostUpdatedReturns the value of thechatBoostrecord component.@Nullable ChatJoinRequestReturns the value of thechatJoinRequestrecord component.@Nullable ChatMemberUpdatedReturns the value of thechatMemberrecord component.@Nullable ChosenInlineResultReturns the value of thechosenInlineResultrecord component.@Nullable BusinessMessagesDeletedReturns the value of thedeletedBusinessMessagesrecord component.@Nullable MessageReturns the value of theeditedBusinessMessagerecord component.@Nullable MessageReturns the value of theeditedChannelPostrecord component.@Nullable MessageReturns the value of theeditedMessagerecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable MessageReturns the value of theguestMessagerecord component.final inthashCode()Returns a hash code value for this object.@Nullable InlineQueryReturns the value of theinlineQueryrecord component.@Nullable ManagedBotUpdatedReturns the value of themanagedBotUpdatedrecord component.@Nullable Messagemessage()Returns the value of themessagerecord component.@Nullable MessageReactionUpdatedReturns the value of themessageReactionrecord component.@Nullable MessageReactionCountUpdatedReturns the value of themessageReactionCountrecord component.@Nullable ChatMemberUpdatedReturns the value of themyChatMemberrecord component.static UpdateparseResponse(@NotNull String responseJson) @Nullable Pollpoll()Returns the value of thepollrecord component.@Nullable PollAnswerReturns the value of thepollAnswerrecord component.@Nullable PreCheckoutQueryReturns the value of thepreCheckoutQueryrecord component.@Nullable PaidMediaPurchasedReturns the value of thepurchasedPaidMediarecord component.@Nullable ChatBoostRemovedReturns the value of theremovedChatBoostrecord component.@Nullable ShippingQueryReturns the value of theshippingQueryrecord component.final StringtoString()Returns a string representation of this record class.intupdateId()Returns the value of theupdateIdrecord component.
-
Constructor Details
-
Update
public Update(int updateId, @Nullable @Nullable Message message, @Nullable @Nullable Message editedMessage, @Nullable @Nullable Message channelPost, @Nullable @Nullable Message editedChannelPost, @Nullable @Nullable BusinessConnection businessConnection, @Nullable @Nullable Message businessMessage, @Nullable @Nullable Message editedBusinessMessage, @Nullable @Nullable BusinessMessagesDeleted deletedBusinessMessages, @Nullable @Nullable Message guestMessage, @Nullable @Nullable MessageReactionUpdated messageReaction, @Nullable @Nullable MessageReactionCountUpdated messageReactionCount, @Nullable @Nullable InlineQuery inlineQuery, @Nullable @Nullable ChosenInlineResult chosenInlineResult, @Nullable @Nullable CallbackQuery callbackQuery, @Nullable @Nullable ShippingQuery shippingQuery, @Nullable @Nullable PreCheckoutQuery preCheckoutQuery, @Nullable @Nullable PaidMediaPurchased purchasedPaidMedia, @Nullable @Nullable Poll poll, @Nullable @Nullable PollAnswer pollAnswer, @Nullable @Nullable ChatMemberUpdated myChatMember, @Nullable @Nullable ChatMemberUpdated chatMember, @Nullable @Nullable ChatJoinRequest chatJoinRequest, @Nullable @Nullable ChatBoostUpdated chatBoost, @Nullable @Nullable ChatBoostRemoved removedChatBoost, @Nullable @Nullable ManagedBotUpdated managedBotUpdated) Creates an instance of aUpdaterecord class.- Parameters:
updateId- the value for theupdateIdrecord componentmessage- the value for themessagerecord componenteditedMessage- the value for theeditedMessagerecord componentchannelPost- the value for thechannelPostrecord componenteditedChannelPost- the value for theeditedChannelPostrecord componentbusinessConnection- the value for thebusinessConnectionrecord componentbusinessMessage- the value for thebusinessMessagerecord componenteditedBusinessMessage- the value for theeditedBusinessMessagerecord componentdeletedBusinessMessages- the value for thedeletedBusinessMessagesrecord componentguestMessage- the value for theguestMessagerecord componentmessageReaction- the value for themessageReactionrecord componentmessageReactionCount- the value for themessageReactionCountrecord componentinlineQuery- the value for theinlineQueryrecord componentchosenInlineResult- the value for thechosenInlineResultrecord componentcallbackQuery- the value for thecallbackQueryrecord componentshippingQuery- the value for theshippingQueryrecord componentpreCheckoutQuery- the value for thepreCheckoutQueryrecord componentpurchasedPaidMedia- the value for thepurchasedPaidMediarecord componentpoll- the value for thepollrecord componentpollAnswer- the value for thepollAnswerrecord componentmyChatMember- the value for themyChatMemberrecord componentchatMember- the value for thechatMemberrecord componentchatJoinRequest- the value for thechatJoinRequestrecord componentchatBoost- the value for thechatBoostrecord componentremovedChatBoost- the value for theremovedChatBoostrecord componentmanagedBotUpdated- the value for themanagedBotUpdatedrecord component
-
-
Method Details
-
parseResponse
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
updateId
public int updateId()Returns the value of theupdateIdrecord component.- Returns:
- the value of the
updateIdrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
editedMessage
Returns the value of theeditedMessagerecord component.- Returns:
- the value of the
editedMessagerecord component
-
channelPost
Returns the value of thechannelPostrecord component.- Returns:
- the value of the
channelPostrecord component
-
editedChannelPost
Returns the value of theeditedChannelPostrecord component.- Returns:
- the value of the
editedChannelPostrecord component
-
businessConnection
Returns the value of thebusinessConnectionrecord component.- Returns:
- the value of the
businessConnectionrecord component
-
businessMessage
Returns the value of thebusinessMessagerecord component.- Returns:
- the value of the
businessMessagerecord component
-
editedBusinessMessage
Returns the value of theeditedBusinessMessagerecord component.- Returns:
- the value of the
editedBusinessMessagerecord component
-
deletedBusinessMessages
Returns the value of thedeletedBusinessMessagesrecord component.- Returns:
- the value of the
deletedBusinessMessagesrecord component
-
guestMessage
Returns the value of theguestMessagerecord component.- Returns:
- the value of the
guestMessagerecord component
-
messageReaction
Returns the value of themessageReactionrecord component.- Returns:
- the value of the
messageReactionrecord component
-
messageReactionCount
Returns the value of themessageReactionCountrecord component.- Returns:
- the value of the
messageReactionCountrecord component
-
inlineQuery
Returns the value of theinlineQueryrecord component.- Returns:
- the value of the
inlineQueryrecord component
-
chosenInlineResult
Returns the value of thechosenInlineResultrecord component.- Returns:
- the value of the
chosenInlineResultrecord component
-
callbackQuery
Returns the value of thecallbackQueryrecord component.- Returns:
- the value of the
callbackQueryrecord component
-
shippingQuery
Returns the value of theshippingQueryrecord component.- Returns:
- the value of the
shippingQueryrecord component
-
preCheckoutQuery
Returns the value of thepreCheckoutQueryrecord component.- Returns:
- the value of the
preCheckoutQueryrecord component
-
purchasedPaidMedia
Returns the value of thepurchasedPaidMediarecord component.- Returns:
- the value of the
purchasedPaidMediarecord component
-
poll
Returns the value of thepollrecord component.- Returns:
- the value of the
pollrecord component
-
pollAnswer
Returns the value of thepollAnswerrecord component.- Returns:
- the value of the
pollAnswerrecord component
-
myChatMember
Returns the value of themyChatMemberrecord component.- Returns:
- the value of the
myChatMemberrecord component
-
chatMember
Returns the value of thechatMemberrecord component.- Returns:
- the value of the
chatMemberrecord component
-
chatJoinRequest
Returns the value of thechatJoinRequestrecord component.- Returns:
- the value of the
chatJoinRequestrecord component
-
chatBoost
Returns the value of thechatBoostrecord component.- Returns:
- the value of the
chatBoostrecord component
-
removedChatBoost
Returns the value of theremovedChatBoostrecord component.- Returns:
- the value of the
removedChatBoostrecord component
-
managedBotUpdated
Returns the value of themanagedBotUpdatedrecord component.- Returns:
- the value of the
managedBotUpdatedrecord component
-