Record Class Update

java.lang.Object
java.lang.Record
dev.tobee.telegram.model.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) extends Record
  • 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)
      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
      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
      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
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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 OptionalLong updateId()
      Returns the value of the updateId record component.
      Returns:
      the value of the updateId record component
    • message

      public Optional<Message> message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • editedMessage

      public Optional<Message> editedMessage()
      Returns the value of the editedMessage record component.
      Returns:
      the value of the editedMessage record component
    • channelPost

      public Optional<Message> channelPost()
      Returns the value of the channelPost record component.
      Returns:
      the value of the channelPost record component
    • editedChannelPost

      public Optional<Message> editedChannelPost()
      Returns the value of the editedChannelPost record component.
      Returns:
      the value of the editedChannelPost record component
    • inlineQuery

      public Optional<InlineQuery> inlineQuery()
      Returns the value of the inlineQuery record component.
      Returns:
      the value of the inlineQuery record component
    • chosenInlineResult

      public Optional<ChosenInlineResult> chosenInlineResult()
      Returns the value of the chosenInlineResult record component.
      Returns:
      the value of the chosenInlineResult record component
    • callbackQuery

      public Optional<CallbackQuery> callbackQuery()
      Returns the value of the callbackQuery record component.
      Returns:
      the value of the callbackQuery record component
    • shippingQuery

      public Optional<ShippingQuery> shippingQuery()
      Returns the value of the shippingQuery record component.
      Returns:
      the value of the shippingQuery record component
    • preCheckoutQuery

      public Optional<PreCheckoutQuery> preCheckoutQuery()
      Returns the value of the preCheckoutQuery record component.
      Returns:
      the value of the preCheckoutQuery record component
    • poll

      public Optional<Poll> poll()
      Returns the value of the poll record component.
      Returns:
      the value of the poll record component
    • pollAnswer

      public Optional<PollAnswer> pollAnswer()
      Returns the value of the pollAnswer record component.
      Returns:
      the value of the pollAnswer record component
    • myChatMember

      public Optional<ChatMemberUpdated> myChatMember()
      Returns the value of the myChatMember record component.
      Returns:
      the value of the myChatMember record component
    • chatMember

      public Optional<ChatMemberUpdated> chatMember()
      Returns the value of the chatMember record component.
      Returns:
      the value of the chatMember record component