Record Class InlineKeyboardButton

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.InlineKeyboardButton
All Implemented Interfaces:
Serializable, ApiResult

public record InlineKeyboardButton(@NotNull String text, @Nullable String iconCustomEmojiId, @Nullable KeyboardButtonStyle style, @Nullable String url, @Nullable String callbackData, @Nullable WebAppInfo webApp, @Nullable LoginUrl loginUrl, @Nullable String switchInlineQuery, @Nullable String switchInlineQueryCurrentChat, @Nullable SwitchInlineQueryChosenChat switchInlineQueryChosenChat, @Nullable CopyTextButton copyText, @Nullable CallbackGame callbackGame, boolean pay, Menu destinationMenu, BiConsumer<ButtonPressEvent,User> callback) extends Record implements ApiResult
See Also:
  • Constructor Details

    • InlineKeyboardButton

      public InlineKeyboardButton(@NotNull @NotNull String text, @Nullable @Nullable String iconCustomEmojiId, @Nullable @Nullable KeyboardButtonStyle style, @Nullable @Nullable String url, @Nullable @Nullable String callbackData, @Nullable @Nullable WebAppInfo webApp, @Nullable @Nullable LoginUrl loginUrl, @Nullable @Nullable String switchInlineQuery, @Nullable @Nullable String switchInlineQueryCurrentChat, @Nullable @Nullable SwitchInlineQueryChosenChat switchInlineQueryChosenChat, @Nullable @Nullable CopyTextButton copyText, @Nullable @Nullable CallbackGame callbackGame, boolean pay, Menu destinationMenu, BiConsumer<ButtonPressEvent,User> callback)
      Creates an instance of a InlineKeyboardButton record class.
      Parameters:
      text - the value for the text record component
      iconCustomEmojiId - the value for the iconCustomEmojiId record component
      style - the value for the style record component
      url - the value for the url record component
      callbackData - the value for the callbackData record component
      webApp - the value for the webApp record component
      loginUrl - the value for the loginUrl record component
      switchInlineQuery - the value for the switchInlineQuery record component
      switchInlineQueryCurrentChat - the value for the switchInlineQueryCurrentChat record component
      switchInlineQueryChosenChat - the value for the switchInlineQueryChosenChat record component
      copyText - the value for the copyText record component
      callbackGame - the value for the callbackGame record component
      pay - the value for the pay record component
      destinationMenu - the value for the destinationMenu record component
      callback - the value for the callback record component
  • Method Details

    • ofBuilder

      @NotNull public static @NotNull lombok.Builder ofBuilder(String text)
    • 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.
    • text

      @NotNull public @NotNull String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • iconCustomEmojiId

      @Nullable public @Nullable String iconCustomEmojiId()
      Returns the value of the iconCustomEmojiId record component.
      Returns:
      the value of the iconCustomEmojiId record component
    • style

      @Nullable public @Nullable KeyboardButtonStyle style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • url

      @Nullable public @Nullable String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • callbackData

      @Nullable public @Nullable String callbackData()
      Returns the value of the callbackData record component.
      Returns:
      the value of the callbackData record component
    • webApp

      @Nullable public @Nullable WebAppInfo webApp()
      Returns the value of the webApp record component.
      Returns:
      the value of the webApp record component
    • loginUrl

      @Nullable public @Nullable LoginUrl loginUrl()
      Returns the value of the loginUrl record component.
      Returns:
      the value of the loginUrl record component
    • switchInlineQuery

      @Nullable public @Nullable String switchInlineQuery()
      Returns the value of the switchInlineQuery record component.
      Returns:
      the value of the switchInlineQuery record component
    • switchInlineQueryCurrentChat

      @Nullable public @Nullable String switchInlineQueryCurrentChat()
      Returns the value of the switchInlineQueryCurrentChat record component.
      Returns:
      the value of the switchInlineQueryCurrentChat record component
    • switchInlineQueryChosenChat

      @Nullable public @Nullable SwitchInlineQueryChosenChat switchInlineQueryChosenChat()
      Returns the value of the switchInlineQueryChosenChat record component.
      Returns:
      the value of the switchInlineQueryChosenChat record component
    • copyText

      @Nullable public @Nullable CopyTextButton copyText()
      Returns the value of the copyText record component.
      Returns:
      the value of the copyText record component
    • callbackGame

      @Nullable public @Nullable CallbackGame callbackGame()
      Returns the value of the callbackGame record component.
      Returns:
      the value of the callbackGame record component
    • pay

      public boolean pay()
      Returns the value of the pay record component.
      Returns:
      the value of the pay record component
    • destinationMenu

      public Menu destinationMenu()
      Returns the value of the destinationMenu record component.
      Returns:
      the value of the destinationMenu record component
    • callback

      public BiConsumer<ButtonPressEvent,User> callback()
      Returns the value of the callback record component.
      Returns:
      the value of the callback record component