
com.pengrad.telegrambot.model.Update Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-telegram-bot-api Show documentation
Show all versions of java-telegram-bot-api Show documentation
Java API for Telegram Bot API
package com.pengrad.telegrambot.model;
/**
* stas
* 8/4/15.
*/
public class Update {
private Integer update_id;
private Message message;
private Message edited_message;
private InlineQuery inline_query;
private ChosenInlineResult chosen_inline_result;
private CallbackQuery callback_query;
public Integer updateId() {
return update_id;
}
public Message message() {
return message;
}
public Message editedMessage() {
return edited_message;
}
public InlineQuery inlineQuery() {
return inline_query;
}
public ChosenInlineResult chosenInlineResult() {
return chosen_inline_result;
}
public CallbackQuery callbackQuery() {
return callback_query;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Update update = (Update) o;
if (update_id != null ? !update_id.equals(update.update_id) : update.update_id != null) return false;
if (message != null ? !message.equals(update.message) : update.message != null) return false;
if (edited_message != null ? !edited_message.equals(update.edited_message) : update.edited_message != null)
return false;
if (inline_query != null ? !inline_query.equals(update.inline_query) : update.inline_query != null) return false;
if (chosen_inline_result != null ? !chosen_inline_result.equals(update.chosen_inline_result) : update.chosen_inline_result != null)
return false;
return callback_query != null ? callback_query.equals(update.callback_query) : update.callback_query == null;
}
@Override
public int hashCode() {
return update_id != null ? update_id.hashCode() : 0;
}
@Override
public String toString() {
return "Update{" +
"update_id=" + update_id +
", message=" + message +
", edited_message=" + edited_message +
", inline_query=" + inline_query +
", chosen_inline_result=" + chosen_inline_result +
", callback_query=" + callback_query +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy