Fix InlineQueryResults serialisation

This commit is contained in:
limitium 2016-11-17 17:52:18 +03:00
parent 777c800a9d
commit 1225488e8a
21 changed files with 42 additions and 42 deletions

View File

@ -7,7 +7,7 @@
<groupId>org.telegram</groupId> <groupId>org.telegram</groupId>
<artifactId>Bots</artifactId> <artifactId>Bots</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>2.4.2</version> <version>2.4.3</version>
<modules> <modules>
<module>telegrambots</module> <module>telegrambots</module>
@ -24,6 +24,6 @@
<properties> <properties>
<maven.deploy.skip>true</maven.deploy.skip> <maven.deploy.skip>true</maven.deploy.skip>
<bots.version>2.4.2</bots.version> <bots.version>2.4.3</bots.version>
</properties> </properties>
</project> </project>

View File

@ -27,7 +27,7 @@ public class InlineQueryResultArticle implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height"; private static final String THUMBHEIGHT_FIELD = "thumb_height";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "article"; ///< Type of the result, must be article private final String type = "article"; ///< Type of the result, must be article
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD) @JsonProperty(TITLE_FIELD)
@ -53,7 +53,7 @@ public class InlineQueryResultArticle implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -29,7 +29,7 @@ public class InlineQueryResultAudio implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption"; private static final String CAPTION_FIELD = "caption";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "audio"; ///< Type of the result, must be "audio" private final String type = "audio"; ///< Type of the result, must be "audio"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result private String id; ///< Unique identifier of this result
@JsonProperty(AUDIOURL_FIELD) @JsonProperty(AUDIOURL_FIELD)
@ -51,7 +51,7 @@ public class InlineQueryResultAudio implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -30,7 +30,7 @@ public class InlineQueryResultContact implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height"; private static final String THUMBHEIGHT_FIELD = "thumb_height";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "contact"; ///< Type of the result, must be "contact" private final String type = "contact"; ///< Type of the result, must be "contact"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(PHONE_NUMBER_FIELD) @JsonProperty(PHONE_NUMBER_FIELD)
@ -54,7 +54,7 @@ public class InlineQueryResultContact implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -33,7 +33,7 @@ public class InlineQueryResultDocument implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height"; private static final String THUMBHEIGHT_FIELD = "thumb_height";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "document"; ///< Type of the result, must be "document" private final String type = "document"; ///< Type of the result, must be "document"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD) @JsonProperty(TITLE_FIELD)
@ -61,7 +61,7 @@ public class InlineQueryResultDocument implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -37,7 +37,7 @@ public class InlineQueryResultGame implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "game"; ///< Type of the result, must be "game" private final String type = "game"; ///< Type of the result, must be "game"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(GAMESHORTNAME_FIELD) @JsonProperty(GAMESHORTNAME_FIELD)
@ -49,7 +49,7 @@ public class InlineQueryResultGame implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -28,7 +28,7 @@ public class InlineQueryResultGif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "gif"; ///< Type of the result, must be "gif" private final String type = "gif"; ///< Type of the result, must be "gif"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(GIFURL_FIELD) @JsonProperty(GIFURL_FIELD)
@ -52,7 +52,7 @@ public class InlineQueryResultGif implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -30,7 +30,7 @@ public class InlineQueryResultLocation implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height"; private static final String THUMBHEIGHT_FIELD = "thumb_height";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "location"; ///< Type of the result, must be "location" private final String type = "location"; ///< Type of the result, must be "location"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD) @JsonProperty(TITLE_FIELD)
@ -54,7 +54,7 @@ public class InlineQueryResultLocation implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -28,7 +28,7 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif" private final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(MPEG4URL_FIELD) @JsonProperty(MPEG4URL_FIELD)
@ -52,7 +52,7 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -30,7 +30,7 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "photo"; ///< Type of the result, must be photo private final String type = "photo"; ///< Type of the result, must be photo
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(PHOTOURL_FIELD) @JsonProperty(PHOTOURL_FIELD)
@ -58,7 +58,7 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -31,7 +31,7 @@ public class InlineQueryResultVenue implements InlineQueryResult {
private static final String THUMBHEIGHT_FIELD = "thumb_height"; private static final String THUMBHEIGHT_FIELD = "thumb_height";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "venue"; ///< Type of the result, must be "venue" private final String type = "venue"; ///< Type of the result, must be "venue"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD) @JsonProperty(TITLE_FIELD)
@ -59,7 +59,7 @@ public class InlineQueryResultVenue implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -31,7 +31,7 @@ public class InlineQueryResultVideo implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "video"; ///< Type of the result, must be "video" private final String type = "video"; ///< Type of the result, must be "video"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result private String id; ///< Unique identifier of this result
@JsonProperty(MIMETYPE_FIELD) @JsonProperty(MIMETYPE_FIELD)
@ -61,7 +61,7 @@ public class InlineQueryResultVideo implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -28,7 +28,7 @@ public class InlineQueryResultVoice implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption"; private static final String CAPTION_FIELD = "caption";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "voice"; ///< Type of the result, must be "voice" private final String type = "voice"; ///< Type of the result, must be "voice"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(VOICEURL_FIELD) @JsonProperty(VOICEURL_FIELD)
@ -48,7 +48,7 @@ public class InlineQueryResultVoice implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -27,7 +27,7 @@ public class InlineQueryResultCachedAudio implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption"; private static final String CAPTION_FIELD = "caption";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "audio"; ///< Type of the result, must be "audio" private final String type = "audio"; ///< Type of the result, must be "audio"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result private String id; ///< Unique identifier of this result
@JsonProperty(AUDIO_FILE_ID_FIELD) @JsonProperty(AUDIO_FILE_ID_FIELD)
@ -43,7 +43,7 @@ public class InlineQueryResultCachedAudio implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -30,7 +30,7 @@ public class InlineQueryResultCachedDocument implements InlineQueryResult {
private static final String INPUTMESSAGECONTENT_FIELD = "input_message_content"; private static final String INPUTMESSAGECONTENT_FIELD = "input_message_content";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "document"; ///< Type of the result, must be "document" private final String type = "document"; ///< Type of the result, must be "document"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(TITLE_FIELD) @JsonProperty(TITLE_FIELD)
@ -50,7 +50,7 @@ public class InlineQueryResultCachedDocument implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -26,7 +26,7 @@ public class InlineQueryResultCachedGif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "gif"; ///< Type of the result, must be "gif" private final String type = "gif"; ///< Type of the result, must be "gif"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(GIF_FILE_ID_FIELD) @JsonProperty(GIF_FILE_ID_FIELD)
@ -44,7 +44,7 @@ public class InlineQueryResultCachedGif implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -26,7 +26,7 @@ public class InlineQueryResultCachedMpeg4Gif implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif" private final String type = "mpeg4_gif"; ///< Type of the result, must be "mpeg4_gif"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(MPEG4_FILE_ID_FIELD) @JsonProperty(MPEG4_FILE_ID_FIELD)
@ -44,7 +44,7 @@ public class InlineQueryResultCachedMpeg4Gif implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -27,7 +27,7 @@ public class InlineQueryResultCachedPhoto implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "photo"; ///< Type of the result, must be photo private final String type = "photo"; ///< Type of the result, must be photo
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(PHOTOFILEID_FIELD) @JsonProperty(PHOTOFILEID_FIELD)
@ -47,7 +47,7 @@ public class InlineQueryResultCachedPhoto implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -26,7 +26,7 @@ public class InlineQueryResultCachedSticker implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "sticker"; ///< Type of the result, must be "sticker" private final String type = "sticker"; ///< Type of the result, must be "sticker"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(STICKER_FILE_ID_FIELD) @JsonProperty(STICKER_FILE_ID_FIELD)
@ -40,7 +40,7 @@ public class InlineQueryResultCachedSticker implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -27,7 +27,7 @@ public class InlineQueryResultCachedVideo implements InlineQueryResult {
private static final String REPLY_MARKUP_FIELD = "reply_markup"; private static final String REPLY_MARKUP_FIELD = "reply_markup";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "video"; ///< Type of the result, must be "video" private final String type = "video"; ///< Type of the result, must be "video"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result private String id; ///< Unique identifier of this result
@JsonProperty(VIDEO_FILE_ID_FIELD) @JsonProperty(VIDEO_FILE_ID_FIELD)
@ -47,7 +47,7 @@ public class InlineQueryResultCachedVideo implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }

View File

@ -28,7 +28,7 @@ public class InlineQueryResultCachedVoice implements InlineQueryResult {
private static final String CAPTION_FIELD = "caption"; private static final String CAPTION_FIELD = "caption";
@JsonProperty(TYPE_FIELD) @JsonProperty(TYPE_FIELD)
private static final String type = "voice"; ///< Type of the result, must be "voice" private final String type = "voice"; ///< Type of the result, must be "voice"
@JsonProperty(ID_FIELD) @JsonProperty(ID_FIELD)
private String id; ///< Unique identifier of this result, 1-64 bytes private String id; ///< Unique identifier of this result, 1-64 bytes
@JsonProperty(VOICE_FILE_ID_FIELD) @JsonProperty(VOICE_FILE_ID_FIELD)
@ -46,7 +46,7 @@ public class InlineQueryResultCachedVoice implements InlineQueryResult {
super(); super();
} }
public static String getType() { public String getType() {
return type; return type;
} }