Class Update

java.lang.Object
io.micronaut.chatbots.telegram.api.Update

public class Update extends Object
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 Details

    • Update

      public Update()
  • Method Details

    • getUpdateId

      @NonNull public @NonNull Integer getUpdateId()
      Returns:
      The update‘s unique identifier.
    • setUpdateId

      public void setUpdateId(@NonNull @NonNull Integer updateId)
      Parameters:
      updateId - The update‘s unique identifier.
    • getMessage

      @Nullable public @Nullable Message getMessage()
      Returns:
      New incoming message of any kind — text, photo, sticker, etc.
    • setMessage

      public void setMessage(@Nullable @Nullable Message message)
      Parameters:
      message - New incoming message of any kind — text, photo, sticker, etc.
    • getEditedMessage

      @Nullable public @Nullable Message getEditedMessage()
      Returns:
      New version of a message that is known to the bot and was edited.
    • setEditedMessage

      public void setEditedMessage(@Nullable @Nullable Message editedMessage)
      Parameters:
      editedMessage - New version of a message that is known to the bot and was edited.
    • getChannelPost

      @Nullable public @Nullable Message getChannelPost()
      Returns:
      New incoming channel post of any kind — text, photo, sticker, etc.
    • setChannelPost

      public void setChannelPost(@Nullable @Nullable Message channelPost)
      Parameters:
      channelPost - New incoming channel post of any kind — text, photo, sticker, etc.
    • getEditedChannelPost

      @Nullable public @Nullable Message getEditedChannelPost()
      Returns:
      New version of a channel post that is known to the bot and was edited.
    • setEditedChannelPost

      public void setEditedChannelPost(@Nullable @Nullable Message editedChannelPost)
      Parameters:
      editedChannelPost - New version of a channel post that is known to the bot and was edited.
    • getInlineQuery

      @Nullable public @Nullable InlineQuery getInlineQuery()
      Returns:
      New incoming inline query.
    • setInlineQuery

      public void setInlineQuery(@Nullable @Nullable InlineQuery inlineQuery)
      Parameters:
      inlineQuery - New incoming inline query.
    • getChosenInlineResult

      @Nullable public @Nullable ChosenInlineResult getChosenInlineResult()
      Returns:
      The result of an inline query that was chosen by a user and sent to their chat partner
    • setChosenInlineResult

      public void setChosenInlineResult(@Nullable @Nullable ChosenInlineResult chosenInlineResult)
      Parameters:
      chosenInlineResult - The result of an inline query that was chosen by a user and sent to their chat partner
    • getCallbackQuery

      @Nullable public @Nullable CallbackQuery getCallbackQuery()
      Returns:
      New incoming callback query.
    • setCallbackQuery

      public void setCallbackQuery(@Nullable @Nullable CallbackQuery callbackQuery)
      Parameters:
      callbackQuery - New incoming callback query.
    • getShippingQuery

      @Nullable public @Nullable ShippingQuery getShippingQuery()
      Returns:
      New incoming shipping query. Only for invoices with flexible price.
    • setShippingQuery

      public void setShippingQuery(@Nullable @Nullable ShippingQuery shippingQuery)
      Parameters:
      shippingQuery - New incoming shipping query. Only for invoices with flexible price.
    • getPreCheckoutQuery

      @Nullable public @Nullable PreCheckoutQuery getPreCheckoutQuery()
      Returns:
      New incoming pre-checkout query. Contains full information about checkout.
    • setPreCheckoutQuery

      public void setPreCheckoutQuery(@Nullable @Nullable PreCheckoutQuery preCheckoutQuery)
      Parameters:
      preCheckoutQuery - New incoming pre-checkout query. Contains full information about checkout.
    • getPoll

      @Nullable public @Nullable Poll getPoll()
      Returns:
      New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
    • setPoll

      public void setPoll(@Nullable @Nullable Poll poll)
      Parameters:
      poll - New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot.
    • getPollAnswer

      @Nullable public @Nullable PollAnswer 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

      public void setPollAnswer(@Nullable @Nullable PollAnswer pollAnswer)
      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

      public String toString()
      Overrides:
      toString in class Object