Class InlineKeyboardButton
- java.lang.Object
-
- org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.InlineKeyboardButton
-
- All Implemented Interfaces:
Serializable,BotApiObject,InputBotApiObject,Validable
public class InlineKeyboardButton extends Object implements InputBotApiObject, Validable
- Version:
- 1.0 This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
- Author:
- Ruben Bermudez
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InlineKeyboardButton()InlineKeyboardButton(String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetCallbackData()CallbackGamegetCallbackGame()LoginUrlgetLoginUrl()BooleangetPay()StringgetSwitchInlineQuery()StringgetSwitchInlineQueryCurrentChat()StringgetText()StringgetUrl()inthashCode()InlineKeyboardButtonsetCallbackData(String callbackData)InlineKeyboardButtonsetCallbackGame(CallbackGame callbackGame)InlineKeyboardButtonsetLoginUrl(LoginUrl loginUrl)InlineKeyboardButtonsetPay(Boolean pay)InlineKeyboardButtonsetSwitchInlineQuery(String switchInlineQuery)InlineKeyboardButtonsetSwitchInlineQueryCurrentChat(String switchInlineQueryCurrentChat)InlineKeyboardButtonsetText(String text)InlineKeyboardButtonsetUrl(String url)StringtoString()voidvalidate()Validates that mandatory fields are filled and optional objects
-
-
-
Constructor Detail
-
InlineKeyboardButton
public InlineKeyboardButton()
-
InlineKeyboardButton
public InlineKeyboardButton(String text)
-
-
Method Detail
-
getText
public String getText()
-
setText
public InlineKeyboardButton setText(String text)
-
getUrl
public String getUrl()
-
setUrl
public InlineKeyboardButton setUrl(String url)
-
getCallbackData
public String getCallbackData()
-
setCallbackData
public InlineKeyboardButton setCallbackData(String callbackData)
-
getSwitchInlineQuery
public String getSwitchInlineQuery()
-
setSwitchInlineQuery
public InlineKeyboardButton setSwitchInlineQuery(String switchInlineQuery)
-
getCallbackGame
public CallbackGame getCallbackGame()
-
setCallbackGame
public InlineKeyboardButton setCallbackGame(CallbackGame callbackGame)
-
getSwitchInlineQueryCurrentChat
public String getSwitchInlineQueryCurrentChat()
-
setSwitchInlineQueryCurrentChat
public InlineKeyboardButton setSwitchInlineQueryCurrentChat(String switchInlineQueryCurrentChat)
-
getPay
public Boolean getPay()
-
setPay
public InlineKeyboardButton setPay(Boolean pay)
-
getLoginUrl
public LoginUrl getLoginUrl()
-
setLoginUrl
public InlineKeyboardButton setLoginUrl(LoginUrl loginUrl)
-
validate
public void validate() throws TelegramApiValidationExceptionDescription copied from interface:ValidableValidates that mandatory fields are filled and optional objects- Specified by:
validatein interfaceValidable- Throws:
TelegramApiValidationException- If any mandatory field is empty
-
-