org.telegram.telegrambots.api.objects.replykeyboard.buttons.KeyboardButton Maven / Gradle / Ivy
package org.telegram.telegrambots.api.objects.replykeyboard.buttons;
import org.telegram.telegrambots.api.objects.ApiObject;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* @author Lev Nadeinsky
* @author Ruben Bermudez
* @brief This object represents one button of the reply keyboard. For simple text buttons String
* can be used instead of this object to specify text of the button.
* @note Optional fields are mutually exclusive.
* @note request_contact and request_location options will only work in Telegram versions released
* after 9 April, 2016. Older clients will ignore them.
* @date 10 of April of 2016
*/
@Data
@EqualsAndHashCode(callSuper=true)
@ToString(callSuper=true)
public class KeyboardButton extends ApiObject{
/**
* Text of the button.
* If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
*/
@Getter @Setter String text;
/**
* Optional.
* If True, the user's phone number will be sent as a contact when the button is pressed.
* Available in chats only
*/
Boolean requestContact;
/**
* Optional.
* If True, the user's current location will be sent when the button is pressed.
* Available in chats only
*/
Boolean requestLocation;
}