Class Update
java.lang.Object
io.micronaut.chatbots.telegram.api.Update
Represents an incoming update.
At most one of the optional parameters can be present in any given update.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable CallbackQuery@Nullable Message@Nullable ChosenInlineResult@Nullable Message@Nullable Message@Nullable InlineQuery@Nullable Message@Nullable PollgetPoll()@Nullable PollAnswer@Nullable PreCheckoutQuery@Nullable ShippingQuery@NonNull IntegervoidsetCallbackQuery(@Nullable CallbackQuery callbackQuery) voidsetChannelPost(@Nullable Message channelPost) voidsetChosenInlineResult(@Nullable ChosenInlineResult chosenInlineResult) voidsetEditedChannelPost(@Nullable Message editedChannelPost) voidsetEditedMessage(@Nullable Message editedMessage) voidsetInlineQuery(@Nullable InlineQuery inlineQuery) voidsetMessage(@Nullable Message message) voidvoidsetPollAnswer(@Nullable PollAnswer pollAnswer) voidsetPreCheckoutQuery(@Nullable PreCheckoutQuery preCheckoutQuery) voidsetShippingQuery(@Nullable ShippingQuery shippingQuery) voidsetUpdateId(@NonNull Integer updateId) toString()
-
Constructor Details
-
Update
public Update()
-
-
Method Details
-
getUpdateId
- Returns:
- The update‘s unique identifier.
-
setUpdateId
- Parameters:
updateId- The update‘s unique identifier.
-
getMessage
- Returns:
- New incoming message of any kind — text, photo, sticker, etc.
-
setMessage
- Parameters:
message- New incoming message of any kind — text, photo, sticker, etc.
-
getEditedMessage
- Returns:
- New version of a message that is known to the bot and was edited.
-
setEditedMessage
- Parameters:
editedMessage- New version of a message that is known to the bot and was edited.
-
getChannelPost
- Returns:
- New incoming channel post of any kind — text, photo, sticker, etc.
-
setChannelPost
- Parameters:
channelPost- New incoming channel post of any kind — text, photo, sticker, etc.
-
getEditedChannelPost
- Returns:
- New version of a channel post that is known to the bot and was edited.
-
setEditedChannelPost
- Parameters:
editedChannelPost- New version of a channel post that is known to the bot and was edited.
-
getInlineQuery
- Returns:
- New incoming inline query.
-
setInlineQuery
- Parameters:
inlineQuery- New incoming inline query.
-
getChosenInlineResult
- Returns:
- The result of an inline query that was chosen by a user and sent to their chat partner
-
setChosenInlineResult
- Parameters:
chosenInlineResult- The result of an inline query that was chosen by a user and sent to their chat partner
-
getCallbackQuery
- Returns:
- New incoming callback query.
-
setCallbackQuery
- Parameters:
callbackQuery- New incoming callback query.
-
getShippingQuery
- Returns:
- New incoming shipping query. Only for invoices with flexible price.
-
setShippingQuery
- Parameters:
shippingQuery- New incoming shipping query. Only for invoices with flexible price.
-
getPreCheckoutQuery
- Returns:
- New incoming pre-checkout query. Contains full information about checkout.
-
setPreCheckoutQuery
- Parameters:
preCheckoutQuery- New incoming pre-checkout query. Contains full information about checkout.
-
getPoll
- Returns:
- New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
-
setPoll
- Parameters:
poll- New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
-
getPollAnswer
- Returns:
- A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
-
setPollAnswer
- Parameters:
pollAnswer- A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.
-
toString
-