mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-01 23:45:25 +00:00
27 lines
703 B
Kotlin
27 lines
703 B
Kotlin
|
package com.github.insanusmokrassar.TelegramBotAPI.types.InlineQueries.query
|
||
|
|
||
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||
|
import kotlinx.serialization.*
|
||
|
|
||
|
@Serializable
|
||
|
data class RawInlineQuery(
|
||
|
@SerialName(idField)
|
||
|
val id: InlineQueryIdentifier,
|
||
|
@SerialName(fromField)
|
||
|
val from: User,
|
||
|
@SerialName(queryField)
|
||
|
val query: String,
|
||
|
@SerialName(offsetField)
|
||
|
val offset: Long,
|
||
|
@SerialName(locationField)
|
||
|
@Optional
|
||
|
val location: Location? = null
|
||
|
) {
|
||
|
@Transient
|
||
|
val asInlineQuery by lazy {
|
||
|
location ?.let {
|
||
|
LocationInlineQuery(id, from, query, offset, location)
|
||
|
} ?: BaseInlineQuery(id, from, query, offset)
|
||
|
}
|
||
|
}
|