diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt index 7b2733b247..a76cd5f48c 100644 --- a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/Common.kt @@ -65,14 +65,19 @@ const val photoSizeField = "photo_size" const val photoFileIdField = "photo_file_id" const val gifUrlField = "gif_url" const val gifFileIdField = "gif_file_id" +const val gifWidthField = "gif_width" +const val gifHeightField = "gif_height" +const val gifDurationField = "gif_duration" +const val mpeg4GifUrlField = "mpeg4_url" +const val mpeg4GifFileIdField = "mpeg4_file_id" +const val mpeg4GifWidthField = "mpeg4_width" +const val mpeg4GifHeightField = "mpeg4_height" +const val mpeg4GifDurationField = "mpeg4_duration" const val thumbUrlField = "thumb_url" const val thumbWidthField = "thumb_width" const val thumbHeightField = "thumb_height" const val photoWidthField = "photo_width" const val photoHeightField = "photo_height" -const val gifWidthField = "gif_width" -const val gifHeightField = "gif_height" -const val gifDurationField = "gif_duration" const val inputMessageContentField = "input_message_content" const val hideUrlField = "hide_url" const val gameShortNameField = "game_short_name" diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt new file mode 100644 index 0000000000..274e513286 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifCachedImpl.kt @@ -0,0 +1,35 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult + +import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent +import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode +import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup +import com.github.insanusmokrassar.TelegramBotAPI.types.* +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGifCached +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4GifCached +import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField +import kotlinx.serialization.Optional +import kotlinx.serialization.SerialName + +data class InlineQueryResultMpeg4GifCachedImpl( + @SerialName(idField) + override val id: String, + @SerialName(mpeg4GifFileIdField) + override val fileId: FileId, + @SerialName(titleField) + @Optional + override val title: String? = null, + @SerialName(captionField) + @Optional + override val caption: String? = null, + @SerialName(parseModeField) + @Optional + override val parseMode: ParseMode? = null, + @SerialName(replyMarkupField) + @Optional + override val replyMarkup: InlineKeyboardMarkup? = null, + @SerialName(inputMessageContentField) + @Optional + override val inputMessageContent: InputMessageContent? = null +) : InlineQueryResultMpeg4GifCached diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt new file mode 100644 index 0000000000..f21d08871a --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultMpeg4GifImpl.kt @@ -0,0 +1,43 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult + +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.abstracts.InputMessageContent +import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode +import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup +import com.github.insanusmokrassar.TelegramBotAPI.types.* +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif.InlineQueryResultMpeg4Gif +import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField +import kotlinx.serialization.Optional +import kotlinx.serialization.SerialName + +data class InlineQueryResultMpeg4GifImpl( + @SerialName(idField) + override val id: String, + @SerialName(mpeg4GifUrlField) + override val url: String, + @SerialName(thumbUrlField) + override val thumbUrl: String, + @SerialName(mpeg4GifWidthField) + @Optional + override val width: Int? = null, + @SerialName(mpeg4GifHeightField) + @Optional + override val height: Int? = null, + @SerialName(mpeg4GifDurationField) + @Optional + override val duration: Int? = null, + @SerialName(titleField) + @Optional + override val title: String? = null, + @SerialName(captionField) + @Optional + override val caption: String? = null, + @SerialName(parseModeField) + @Optional + override val parseMode: ParseMode? = null, + @SerialName(replyMarkupField) + @Optional + override val replyMarkup: InlineKeyboardMarkup? = null, + @SerialName(inputMessageContentField) + @Optional + override val inputMessageContent: InputMessageContent? = null +) : InlineQueryResultMpeg4Gif diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt new file mode 100644 index 0000000000..ffb42e5274 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4Gif.kt @@ -0,0 +1,5 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif + +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.* + +interface InlineQueryResultMpeg4Gif : InlineQueryResultMpeg4GifCommon, UrlInlineQueryResult, ThumbedInlineQueryResult, SizedInlineQueryResult, DuratedInlineResultQuery \ No newline at end of file diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt new file mode 100644 index 0000000000..96023e0210 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCached.kt @@ -0,0 +1,5 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif + +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.* + +interface InlineQueryResultMpeg4GifCached : InlineQueryResultMpeg4GifCommon, WithFileIdInlineQueryResult diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt new file mode 100644 index 0000000000..0e0f86c3c7 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/abstracts/results/mpeg4gif/InlineQueryResultMpeg4GifCommon.kt @@ -0,0 +1,13 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.mpeg4gif + +import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Captioned +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.* + +interface InlineQueryResultMpeg4GifCommon : InlineQueryResult, + TitledInlineQueryResult, + Captioned, + WithInputMessageContentInlineQueryResult +{ + override val type: String + get() = "mpeg4_gif" +} \ No newline at end of file