2018-12-26 08:07:24 +00:00
|
|
|
package com.github.insanusmokrassar.TelegramBotAPI.types
|
|
|
|
|
|
|
|
import kotlinx.serialization.*
|
|
|
|
import org.joda.time.DateTime
|
|
|
|
import java.util.concurrent.TimeUnit
|
|
|
|
|
2019-02-05 04:40:29 +00:00
|
|
|
@Deprecated(
|
|
|
|
"Deprecated because incorrect name",
|
|
|
|
ReplaceWith("Response")
|
|
|
|
)
|
|
|
|
typealias ResponseParameters<T> = Response<T>
|
|
|
|
|
2018-12-26 08:07:24 +00:00
|
|
|
@Serializable
|
2019-02-05 04:40:29 +00:00
|
|
|
data class Response<T : Any>(
|
2018-12-26 08:07:24 +00:00
|
|
|
val ok: Boolean = false,
|
|
|
|
@Optional
|
|
|
|
val description: String? = null,
|
|
|
|
@SerialName("error_code")
|
|
|
|
@Optional
|
|
|
|
val errorCode: Int? = null,
|
|
|
|
@Optional
|
2019-02-05 04:51:52 +00:00
|
|
|
val result: T? = null,
|
|
|
|
@Optional
|
|
|
|
val parameters: ResponseParametersRaw? = null
|
|
|
|
)
|