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 Summary
ConstructorsConstructorDescriptionKeyboardButton(String text, @Nullable String iconCustomEmojiId, @Nullable KeyboardButtonStyle style, KeyboardButtonRequestUsers requestUsers, KeyboardButtonRequestChat requestChat, boolean requestContact, boolean requestLocation, KeyboardButtonPollType requestPoll, WebAppInfo webApp) Creates an instance of aKeyboardButtonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theiconCustomEmojiIdrecord component.Returns the value of therequestChatrecord component.booleanReturns the value of therequestContactrecord component.booleanReturns the value of therequestLocationrecord component.Returns the value of therequestPollrecord component.Returns the value of therequestUsersrecord component.@Nullable KeyboardButtonStylestyle()Returns the value of thestylerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.webApp()Returns the value of thewebApprecord component.
-
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 aKeyboardButtonrecord class.- Parameters:
text- the value for thetextrecord componenticonCustomEmojiId- the value for theiconCustomEmojiIdrecord componentstyle- the value for thestylerecord componentrequestUsers- the value for therequestUsersrecord componentrequestChat- the value for therequestChatrecord componentrequestContact- the value for therequestContactrecord componentrequestLocation- the value for therequestLocationrecord componentrequestPoll- the value for therequestPollrecord componentwebApp- the value for thewebApprecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
iconCustomEmojiId
Returns the value of theiconCustomEmojiIdrecord component.- Returns:
- the value of the
iconCustomEmojiIdrecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
requestUsers
Returns the value of therequestUsersrecord component.- Returns:
- the value of the
requestUsersrecord component
-
requestChat
Returns the value of therequestChatrecord component.- Returns:
- the value of the
requestChatrecord component
-
requestContact
public boolean requestContact()Returns the value of therequestContactrecord component.- Returns:
- the value of the
requestContactrecord component
-
requestLocation
public boolean requestLocation()Returns the value of therequestLocationrecord component.- Returns:
- the value of the
requestLocationrecord component
-
requestPoll
Returns the value of therequestPollrecord component.- Returns:
- the value of the
requestPollrecord component
-
webApp
Returns the value of thewebApprecord component.- Returns:
- the value of the
webApprecord component
-