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 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) extends Record implements ApiResult
See Also:
  • 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 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)
      Creates an instance of a Update record class.
      Parameters:
      updateId - the value for the updateId record component
      message - the value for the message record component
      editedMessage - the value for the editedMessage record component
      channelPost - the value for the channelPost record component
      editedChannelPost - the value for the editedChannelPost record component
      businessConnection - the value for the businessConnection record component
      businessMessage - the value for the businessMessage record component
      editedBusinessMessage - the value for the editedBusinessMessage record component
      deletedBusinessMessages - the value for the deletedBusinessMessages record component
      messageReaction - the value for the messageReaction record component
      messageReactionCount - the value for the messageReactionCount record component
      inlineQuery - the value for the inlineQuery record component
      chosenInlineResult - the value for the chosenInlineResult record component
      callbackQuery - the value for the callbackQuery record component
      shippingQuery - the value for the shippingQuery record component
      preCheckoutQuery - the value for the preCheckoutQuery record component
      purchasedPaidMedia - the value for the purchasedPaidMedia record component
      poll - the value for the poll record component
      pollAnswer - the value for the pollAnswer record component
      myChatMember - the value for the myChatMember record component
      chatMember - the value for the chatMember record component
      chatJoinRequest - the value for the chatJoinRequest record component
      chatBoost - the value for the chatBoost record component
      removedChatBoost - the value for the removedChatBoost record component
  • Method Details

    • parseResponse

      public static Update parseResponse(@NotNull @NotNull String responseJson) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • updateId

      public int updateId()
      Returns the value of the updateId record component.
      Returns:
      the value of the updateId record component
    • message

      @Nullable public @Nullable Message message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • editedMessage

      @Nullable public @Nullable Message editedMessage()
      Returns the value of the editedMessage record component.
      Returns:
      the value of the editedMessage record component
    • channelPost

      @Nullable public @Nullable Message channelPost()
      Returns the value of the channelPost record component.
      Returns:
      the value of the channelPost record component
    • editedChannelPost

      @Nullable public @Nullable Message editedChannelPost()
      Returns the value of the editedChannelPost record component.
      Returns:
      the value of the editedChannelPost record component
    • businessConnection

      @Nullable public @Nullable BusinessConnection businessConnection()
      Returns the value of the businessConnection record component.
      Returns:
      the value of the businessConnection record component
    • businessMessage

      @Nullable public @Nullable Message businessMessage()
      Returns the value of the businessMessage record component.
      Returns:
      the value of the businessMessage record component
    • editedBusinessMessage

      @Nullable public @Nullable Message editedBusinessMessage()
      Returns the value of the editedBusinessMessage record component.
      Returns:
      the value of the editedBusinessMessage record component
    • deletedBusinessMessages

      @Nullable public @Nullable BusinessMessagesDeleted deletedBusinessMessages()
      Returns the value of the deletedBusinessMessages record component.
      Returns:
      the value of the deletedBusinessMessages record component
    • messageReaction

      @Nullable public @Nullable MessageReactionUpdated messageReaction()
      Returns the value of the messageReaction record component.
      Returns:
      the value of the messageReaction record component
    • messageReactionCount

      @Nullable public @Nullable MessageReactionCountUpdated messageReactionCount()
      Returns the value of the messageReactionCount record component.
      Returns:
      the value of the messageReactionCount record component
    • inlineQuery

      @Nullable public @Nullable InlineQuery inlineQuery()
      Returns the value of the inlineQuery record component.
      Returns:
      the value of the inlineQuery record component
    • chosenInlineResult

      @Nullable public @Nullable ChosenInlineResult chosenInlineResult()
      Returns the value of the chosenInlineResult record component.
      Returns:
      the value of the chosenInlineResult record component
    • callbackQuery

      @Nullable public @Nullable CallbackQuery callbackQuery()
      Returns the value of the callbackQuery record component.
      Returns:
      the value of the callbackQuery record component
    • shippingQuery

      @Nullable public @Nullable ShippingQuery shippingQuery()
      Returns the value of the shippingQuery record component.
      Returns:
      the value of the shippingQuery record component
    • preCheckoutQuery

      @Nullable public @Nullable PreCheckoutQuery preCheckoutQuery()
      Returns the value of the preCheckoutQuery record component.
      Returns:
      the value of the preCheckoutQuery record component
    • purchasedPaidMedia

      @Nullable public @Nullable PaidMediaPurchased purchasedPaidMedia()
      Returns the value of the purchasedPaidMedia record component.
      Returns:
      the value of the purchasedPaidMedia record component
    • poll

      @Nullable public @Nullable Poll poll()
      Returns the value of the poll record component.
      Returns:
      the value of the poll record component
    • pollAnswer

      @Nullable public @Nullable PollAnswer pollAnswer()
      Returns the value of the pollAnswer record component.
      Returns:
      the value of the pollAnswer record component
    • myChatMember

      @Nullable public @Nullable ChatMemberUpdated myChatMember()
      Returns the value of the myChatMember record component.
      Returns:
      the value of the myChatMember record component
    • chatMember

      @Nullable public @Nullable ChatMemberUpdated chatMember()
      Returns the value of the chatMember record component.
      Returns:
      the value of the chatMember record component
    • chatJoinRequest

      @Nullable public @Nullable ChatJoinRequest chatJoinRequest()
      Returns the value of the chatJoinRequest record component.
      Returns:
      the value of the chatJoinRequest record component
    • chatBoost

      @Nullable public @Nullable ChatBoostUpdated chatBoost()
      Returns the value of the chatBoost record component.
      Returns:
      the value of the chatBoost record component
    • removedChatBoost

      @Nullable public @Nullable ChatBoostRemoved removedChatBoost()
      Returns the value of the removedChatBoost record component.
      Returns:
      the value of the removedChatBoost record component