Package dev.tobee.telegram.model.message
Record Class Update
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.message.Update
public record Update(OptionalLong updateId, Optional<Message> message, Optional<Message> editedMessage, Optional<Message> channelPost, Optional<Message> editedChannelPost, Optional<InlineQuery> inlineQuery, Optional<ChosenInlineResult> chosenInlineResult, Optional<CallbackQuery> callbackQuery, Optional<ShippingQuery> shippingQuery, Optional<PreCheckoutQuery> preCheckoutQuery, Optional<Poll> poll, Optional<PollAnswer> pollAnswer, Optional<ChatMemberUpdated> myChatMember, Optional<ChatMemberUpdated> chatMember, Optional<ChatJoinRequest> chatJoinRequest)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionUpdate(OptionalLong updateId, Optional<Message> message, Optional<Message> editedMessage, Optional<Message> channelPost, Optional<Message> editedChannelPost, Optional<InlineQuery> inlineQuery, Optional<ChosenInlineResult> chosenInlineResult, Optional<CallbackQuery> callbackQuery, Optional<ShippingQuery> shippingQuery, Optional<PreCheckoutQuery> preCheckoutQuery, Optional<Poll> poll, Optional<PollAnswer> pollAnswer, Optional<ChatMemberUpdated> myChatMember, Optional<ChatMemberUpdated> chatMember, Optional<ChatJoinRequest> chatJoinRequest) Creates an instance of aUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecallbackQueryrecord component.Returns the value of thechannelPostrecord component.Returns the value of thechatJoinRequestrecord component.Returns the value of thechatMemberrecord component.Returns the value of thechosenInlineResultrecord component.Returns the value of theeditedChannelPostrecord component.Returns the value of theeditedMessagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinlineQueryrecord component.booleanmessage()Returns the value of themessagerecord component.Returns the value of themyChatMemberrecord component.poll()Returns the value of thepollrecord component.Returns the value of thepollAnswerrecord component.Returns the value of thepreCheckoutQueryrecord component.Returns the value of theshippingQueryrecord component.final StringtoString()Returns a string representation of this record class.updateId()Returns the value of theupdateIdrecord component.
-
Constructor Details
-
Update
public Update(OptionalLong updateId, Optional<Message> message, Optional<Message> editedMessage, Optional<Message> channelPost, Optional<Message> editedChannelPost, Optional<InlineQuery> inlineQuery, Optional<ChosenInlineResult> chosenInlineResult, Optional<CallbackQuery> callbackQuery, Optional<ShippingQuery> shippingQuery, Optional<PreCheckoutQuery> preCheckoutQuery, Optional<Poll> poll, Optional<PollAnswer> pollAnswer, Optional<ChatMemberUpdated> myChatMember, Optional<ChatMemberUpdated> chatMember, Optional<ChatJoinRequest> chatJoinRequest) 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 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 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 component
-
-
Method Details
-
isCallBackQuery
public boolean isCallBackQuery() -
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). -
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
-
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
-
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
-