From 8369114d26fa238737a8e6f1c5af05db04f45915 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 7 Feb 2019 13:42:14 +0800 Subject: [PATCH] add Location InlineQueryResult --- .../InlineQueryResultLocation.kt | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt diff --git a/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt new file mode 100644 index 0000000000..ac9b23b390 --- /dev/null +++ b/src/main/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/InlineQueries/InlineQueryResult/InlineQueryResultLocation.kt @@ -0,0 +1,53 @@ +package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult + +import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Livable +import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Locationed +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.* +import com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.InlineQueryResult.abstracts.results.video.InlineQueryResultVideo +import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField +import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.mimeTypeField +import kotlinx.serialization.Optional +import kotlinx.serialization.SerialName + +data class InlineQueryResultLocation( + @SerialName(idField) + override val id: String, + @SerialName(latitudeField) + override val latitude: Double, + @SerialName(longitudeField) + override val longitude: Double, + @SerialName(livePeriodField) + @Optional + override val livePeriod: Int? = null, + @SerialName(thumbUrlField) + @Optional + override val thumbUrl: String? = null, + @SerialName(thumbWidthField) + @Optional + override val thumbWidth: Int? = null, + @SerialName(thumbHeightField) + @Optional + override val thumbHeight: Int? = null, + @SerialName(titleField) + @Optional + override val title: String? = null, + @SerialName(replyMarkupField) + @Optional + override val replyMarkup: InlineKeyboardMarkup? = null, + @SerialName(inputMessageContentField) + @Optional + override val inputMessageContent: InputMessageContent? = null +) : InlineQueryResult, + Locationed, + Livable, + TitledInlineQueryResult, + WithInputMessageContentInlineQueryResult, + ThumbedInlineQueryResult, + ThumbSizedInlineQueryResult +{ + override val type: String = "location" +}