added toString() method for all serializable classes

This commit is contained in:
schors 2016-03-08 22:17:07 +03:00
parent cc38a3c149
commit 5db2f3ddeb
40 changed files with 464 additions and 0 deletions

View File

@ -135,4 +135,15 @@ public class AnswerInlineQuery extends BotApiMethod<Boolean> {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "AnswerInlineQuery{" +
"inlineQueryId='" + inlineQueryId + '\'' +
", results=" + results +
", cacheTime=" + cacheTime +
", isPersonal=" + isPersonal +
", nextOffset='" + nextOffset + '\'' +
'}';
}
}

View File

@ -89,4 +89,13 @@ public class ForwardMessage extends BotApiMethod<Message> {
}
return null;
}
@Override
public String toString() {
return "ForwardMessage{" +
"chatId='" + chatId + '\'' +
", fromChatId=" + fromChatId +
", messageId=" + messageId +
'}';
}
}

View File

@ -71,4 +71,11 @@ public class GetFile extends BotApiMethod<File> {
}
return null;
}
@Override
public String toString() {
return "GetFile{" +
"fileId='" + fileId + '\'' +
'}';
}
}

View File

@ -47,4 +47,6 @@ public class GetMe extends BotApiMethod<User> {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
}

View File

@ -74,4 +74,13 @@ public class GetUpdates implements IToJson {
}
return jsonObject;
}
@Override
public String toString() {
return "GetUpdates{" +
"offset=" + offset +
", limit=" + limit +
", timeout=" + timeout +
'}';
}
}

View File

@ -99,4 +99,13 @@ public class GetUserProfilePhotos extends BotApiMethod<UserProfilePhotos> {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "GetUserProfilePhotos{" +
"userId=" + userId +
", offset=" + offset +
", limit=" + limit +
'}';
}
}

View File

@ -101,4 +101,18 @@ public class SendAudio {
public String getAudioName() {
return audioName;
}
@Override
public String toString() {
return "SendAudio{" +
"chatId='" + chatId + '\'' +
", audio='" + audio + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", performer='" + performer + '\'' +
", title='" + title + '\'' +
", isNewAudio=" + isNewAudio +
", audioName='" + audioName + '\'' +
'}';
}
}

View File

@ -83,4 +83,12 @@ public class SendChatAction extends BotApiMethod<Boolean>{
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "SendChatAction{" +
"chatId='" + chatId + '\'' +
", action='" + action + '\'' +
'}';
}
}

View File

@ -73,4 +73,16 @@ public class SendDocument {
public void setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup;
}
@Override
public String toString() {
return "SendDocument{" +
"chatId='" + chatId + '\'' +
", document='" + document + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", isNewDocument=" + isNewDocument +
", documentName='" + documentName + '\'' +
'}';
}
}

View File

@ -120,4 +120,15 @@ public class SendLocation extends BotApiMethod<Message> {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "SendLocation{" +
"chatId='" + chatId + '\'' +
", latitude=" + latitude +
", longitude=" + longitude +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
'}';
}
}

View File

@ -153,4 +153,16 @@ public class SendMessage extends BotApiMethod<Message> {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "SendMessage{" +
"chatId='" + chatId + '\'' +
", text='" + text + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
'}';
}
}

View File

@ -84,4 +84,17 @@ public class SendPhoto {
this.isNewPhoto = true;
this.photoName = photoName;
}
@Override
public String toString() {
return "SendPhoto{" +
"chatId='" + chatId + '\'' +
", photo='" + photo + '\'' +
", caption='" + caption + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", isNewPhoto=" + isNewPhoto +
", photoName='" + photoName + '\'' +
'}';
}
}

View File

@ -73,4 +73,16 @@ public class SendSticker {
public String getStickerName() {
return stickerName;
}
@Override
public String toString() {
return "SendSticker{" +
"chatId='" + chatId + '\'' +
", sticker='" + sticker + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", isNewSticker=" + isNewSticker +
", stickerName='" + stickerName + '\'' +
'}';
}
}

View File

@ -95,4 +95,18 @@ public class SendVideo {
this.isNewVideo = true;
this.videoName = videoName;
}
@Override
public String toString() {
return "SendVideo{" +
"chatId='" + chatId + '\'' +
", video='" + video + '\'' +
", duration=" + duration +
", caption='" + caption + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", isNewVideo=" + isNewVideo +
", videoName='" + videoName + '\'' +
'}';
}
}

View File

@ -28,4 +28,15 @@ public class SendVoice {
public SendVoice() {
super();
}
@Override
public String toString() {
return "SendVoice{" +
"chatId='" + chatId + '\'' +
", audio='" + audio + '\'' +
", replayToMessageId=" + replayToMessageId +
", replayMarkup=" + replayMarkup +
", duration=" + duration +
'}';
}
}

View File

@ -36,4 +36,12 @@ public class SetWebhook {
public void setCertificateFile(String certificateFile) {
this.certificateFile = certificateFile;
}
@Override
public String toString() {
return "SetWebhook{" +
"url='" + url + '\'' +
", certificateFile='" + certificateFile + '\'' +
'}';
}
}

View File

@ -131,4 +131,16 @@ public class Audio implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Audio{" +
"fileId='" + fileId + '\'' +
", duration=" + duration +
", mimeType='" + mimeType + '\'' +
", fileSize=" + fileSize +
", title='" + title + '\'' +
", performer='" + performer + '\'' +
'}';
}
}

View File

@ -126,4 +126,16 @@ public class Chat implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Chat{" +
"id=" + id +
", type='" + type + '\'' +
", title='" + title + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", userName='" + userName + '\'' +
'}';
}
}

View File

@ -63,4 +63,13 @@ public class ChosenInlineQuery implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "ChosenInlineQuery{" +
"resultId='" + resultId + '\'' +
", from=" + from +
", query='" + query + '\'' +
'}';
}
}

View File

@ -65,4 +65,14 @@ public class Contact implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Contact{" +
"phoneNumber='" + phoneNumber + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", userID=" + userID +
'}';
}
}

View File

@ -116,4 +116,15 @@ public class Document implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Document{" +
"fileId='" + fileId + '\'' +
", thumb=" + thumb +
", fileName='" + fileName + '\'' +
", mimeType='" + mimeType + '\'' +
", fileSize=" + fileSize +
'}';
}
}

View File

@ -83,4 +83,13 @@ public class File implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "File{" +
"fileId='" + fileId + '\'' +
", fileSize=" + fileSize +
", filePath='" + filePath + '\'' +
'}';
}
}

View File

@ -91,4 +91,12 @@ public class ForceReplyKeyboard implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "ForceReplyKeyboard{" +
"forceReply=" + forceReply +
", selective=" + selective +
'}';
}
}

View File

@ -73,4 +73,15 @@ public class InlineQuery implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQuery{" +
"id='" + id + '\'' +
", from=" + from +
", query='" + query + '\'' +
", offset='" + offset + '\'' +
'}';
}
}

View File

@ -238,4 +238,22 @@ public class InlineQueryResultArticle implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQueryResultArticle{" +
"type='" + type + '\'' +
", id='" + id + '\'' +
", title='" + title + '\'' +
", messageText='" + messageText + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
", url='" + url + '\'' +
", hideUrl=" + hideUrl +
", description='" + description + '\'' +
", thumbUrl='" + thumbUrl + '\'' +
", thumbWidth=" + thumbWidth +
", thumbHeight=" + thumbHeight +
'}';
}
}

View File

@ -222,4 +222,21 @@ public class InlineQueryResultGif implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQueryResultGif{" +
"type='" + type + '\'' +
", id='" + id + '\'' +
", gifUrl='" + gifUrl + '\'' +
", gifWidth=" + gifWidth +
", gifHeight=" + gifHeight +
", thumbUrl='" + thumbUrl + '\'' +
", title='" + title + '\'' +
", caption='" + caption + '\'' +
", messageText='" + messageText + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
'}';
}
}

View File

@ -223,4 +223,21 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQueryResultMpeg4Gif{" +
"type='" + type + '\'' +
", id='" + id + '\'' +
", mpeg4Url='" + mpeg4Url + '\'' +
", mpeg4Width=" + mpeg4Width +
", mpeg4Height=" + mpeg4Height +
", thumbUrl='" + thumbUrl + '\'' +
", title='" + title + '\'' +
", caption='" + caption + '\'' +
", messageText='" + messageText + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
'}';
}
}

View File

@ -258,4 +258,23 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQueryResultPhoto{" +
"type='" + type + '\'' +
", id='" + id + '\'' +
", photoUrl='" + photoUrl + '\'' +
", mimeType='" + mimeType + '\'' +
", photoWidth=" + photoWidth +
", photoHeight=" + photoHeight +
", thumbUrl='" + thumbUrl + '\'' +
", title='" + title + '\'' +
", description='" + description + '\'' +
", caption='" + caption + '\'' +
", messageText='" + messageText + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
'}';
}
}

View File

@ -254,4 +254,23 @@ public class InlineQueryResultVideo implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "InlineQueryResultVideo{" +
"type='" + type + '\'' +
", id='" + id + '\'' +
", mimeType='" + mimeType + '\'' +
", videoUrl='" + videoUrl + '\'' +
", videoWidth=" + videoWidth +
", videoHeight=" + videoHeight +
", videoDuration=" + videoDuration +
", thumbUrl='" + thumbUrl + '\'' +
", title='" + title + '\'' +
", description='" + description + '\'' +
", messageText='" + messageText + '\'' +
", parseMode='" + parseMode + '\'' +
", disableWebPagePreview=" + disableWebPagePreview +
'}';
}
}

View File

@ -63,4 +63,12 @@ public class Location implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Location{" +
"longitude=" + longitude +
", latitude=" + latitude +
'}';
}
}

View File

@ -525,4 +525,36 @@ public class Message implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Message{" +
"messageId=" + messageId +
", from=" + from +
", date=" + date +
", chat=" + chat +
", forwardFrom=" + forwardFrom +
", forwardDate=" + forwardDate +
", text='" + text + '\'' +
", audio=" + audio +
", document=" + document +
", photo=" + photo +
", sticker=" + sticker +
", video=" + video +
", contact=" + contact +
", location=" + location +
", newChatParticipant=" + newChatParticipant +
", leftChatParticipant=" + leftChatParticipant +
", newChatTitle='" + newChatTitle + '\'' +
", newChatPhoto=" + newChatPhoto +
", deleteChatPhoto=" + deleteChatPhoto +
", groupchatCreated=" + groupchatCreated +
", replyToMessage=" + replyToMessage +
", voice=" + voice +
", superGroupCreated=" + superGroupCreated +
", channelChatCreated=" + channelChatCreated +
", migrateToChatId=" + migrateToChatId +
", migrateFromChatId=" + migrateFromChatId +
'}';
}
}

View File

@ -93,4 +93,14 @@ public class PhotoSize implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "PhotoSize{" +
"fileId='" + fileId + '\'' +
", width=" + width +
", height=" + height +
", fileSize=" + fileSize +
'}';
}
}

View File

@ -85,4 +85,12 @@ public class ReplyKeyboardHide implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "ReplyKeyboardHide{" +
"hideKeyboard=" + hideKeyboard +
", selective=" + selective +
'}';
}
}

View File

@ -153,4 +153,14 @@ public class ReplyKeyboardMarkup implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "ReplyKeyboardMarkup{" +
"keyboard=" + keyboard +
", resizeKeyboard=" + resizeKeyboard +
", oneTimeKeyboad=" + oneTimeKeyboad +
", selective=" + selective +
'}';
}
}

View File

@ -70,4 +70,15 @@ public class Sticker implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Sticker{" +
"fileId='" + fileId + '\'' +
", width=" + width +
", height=" + height +
", thumb=" + thumb +
", fileSize=" + fileSize +
'}';
}
}

View File

@ -101,4 +101,14 @@ public class Update implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Update{" +
"updateId=" + updateId +
", message=" + message +
", inlineQuery=" + inlineQuery +
", chosenInlineQuery=" + chosenInlineQuery +
'}';
}
}

View File

@ -81,4 +81,14 @@ public class User implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", userName='" + userName + '\'' +
'}';
}
}

View File

@ -87,4 +87,12 @@ public class UserProfilePhotos implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "UserProfilePhotos{" +
"totalCount=" + totalCount +
", photos=" + photos +
'}';
}
}

View File

@ -139,4 +139,17 @@ public class Video implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Video{" +
"fileId='" + fileId + '\'' +
", width=" + width +
", height=" + height +
", duration=" + duration +
", thumb=" + thumb +
", mimeType='" + mimeType + '\'' +
", fileSize=" + fileSize +
'}';
}
}

View File

@ -96,4 +96,14 @@ public class Voice implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
@Override
public String toString() {
return "Voice{" +
"fileId='" + fileId + '\'' +
", duration=" + duration +
", mimeType='" + mimeType + '\'' +
", fileSize=" + fileSize +
'}';
}
}