Record Class KeyboardButton

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

public record KeyboardButton(String text, @Nullable String iconCustomEmojiId, @Nullable KeyboardButtonStyle style, KeyboardButtonRequestUsers requestUsers, KeyboardButtonRequestChat requestChat, boolean requestContact, boolean requestLocation, KeyboardButtonPollType requestPoll, WebAppInfo webApp) extends Record implements ApiResult
See Also:
  • Constructor Details

    • KeyboardButton

      public KeyboardButton(String text, @Nullable @Nullable String iconCustomEmojiId, @Nullable @Nullable KeyboardButtonStyle style, KeyboardButtonRequestUsers requestUsers, KeyboardButtonRequestChat requestChat, boolean requestContact, boolean requestLocation, KeyboardButtonPollType requestPoll, WebAppInfo webApp)
      Creates an instance of a KeyboardButton 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
      requestUsers - the value for the requestUsers record component
      requestChat - the value for the requestChat record component
      requestContact - the value for the requestContact record component
      requestLocation - the value for the requestLocation record component
      requestPoll - the value for the requestPoll record component
      webApp - the value for the webApp 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. 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

      public 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
    • requestUsers

      public KeyboardButtonRequestUsers requestUsers()
      Returns the value of the requestUsers record component.
      Returns:
      the value of the requestUsers record component
    • requestChat

      public KeyboardButtonRequestChat requestChat()
      Returns the value of the requestChat record component.
      Returns:
      the value of the requestChat record component
    • requestContact

      public boolean requestContact()
      Returns the value of the requestContact record component.
      Returns:
      the value of the requestContact record component
    • requestLocation

      public boolean requestLocation()
      Returns the value of the requestLocation record component.
      Returns:
      the value of the requestLocation record component
    • requestPoll

      public KeyboardButtonPollType requestPoll()
      Returns the value of the requestPoll record component.
      Returns:
      the value of the requestPoll record component
    • webApp

      public WebAppInfo webApp()
      Returns the value of the webApp record component.
      Returns:
      the value of the webApp record component