2018-12-26 08:07:24 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
|
|
|
|
|
2019-01-17 02:43:51 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
|
2018-12-26 08:07:24 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
|
2020-01-22 22:23:06 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
|
2020-01-15 05:17:53 +00:00
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
|
2018-12-26 08:07:24 +00:00
|
|
|
import kotlinx.serialization.*
|
|
|
|
|
2020-01-15 05:17:53 +00:00
|
|
|
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
|
|
|
|
|
2018-12-26 08:07:24 +00:00
|
|
|
@Serializable
|
|
|
|
data class EditChatMessageLiveLocation(
|
|
|
|
@SerialName(chatIdField)
|
|
|
|
override val chatId: ChatIdentifier,
|
|
|
|
@SerialName(messageIdField)
|
|
|
|
override val messageId: MessageIdentifier,
|
|
|
|
@SerialName(latitudeField)
|
|
|
|
override val latitude: Double,
|
|
|
|
@SerialName(longitudeField)
|
|
|
|
override val longitude: Double,
|
|
|
|
@SerialName(replyMarkupField)
|
|
|
|
override val replyMarkup: InlineKeyboardMarkup? = null
|
2020-01-15 05:17:53 +00:00
|
|
|
) : EditChatMessage<LocationContent>, EditReplyMessage, EditLocationMessage {
|
2018-12-26 08:07:24 +00:00
|
|
|
override fun method(): String = "editMessageLiveLocation"
|
2020-01-15 05:17:53 +00:00
|
|
|
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
|
|
|
|
get() = commonResultDeserializer
|
2019-12-02 08:35:37 +00:00
|
|
|
override val requestSerializer: SerializationStrategy<*>
|
|
|
|
get() = serializer()
|
2018-12-26 08:07:24 +00:00
|
|
|
}
|