All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pengrad.telegrambot.model.request.InlineQueryResult Maven / Gradle / Ivy

There is a newer version: 7.2.1
Show newest version
package com.pengrad.telegrambot.model.request;

import com.pengrad.telegrambot.model.MessageEntity;

import java.io.Serializable;

/**
 * stas
 * 1/12/16.
 */
public abstract class InlineQueryResult> implements Serializable {
    private final static long serialVersionUID = 0L;

    @SuppressWarnings("unchecked")
    private final T thisAsT = (T) this;

    private String type;
    private String id;
    private MessageEntity[] caption_entities;
    private InputMessageContent input_message_content;
    private InlineKeyboardMarkup reply_markup;

    public InlineQueryResult(String type, String id) {
        this.type = type;
        this.id = id;
    }

    public T captionEntities(MessageEntity... entities) {
        this.caption_entities = entities;
        return thisAsT;
    }

    public T inputMessageContent(InputMessageContent inputMessageContent) {
        this.input_message_content = inputMessageContent;
        return thisAsT;
    }

    public T replyMarkup(InlineKeyboardMarkup replyMarkup) {
        this.reply_markup = replyMarkup;
        return thisAsT;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy