com.github.stormbit.vksdk.objects.models.Chat.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vk-bot-sdk-kotlin Show documentation
Show all versions of vk-bot-sdk-kotlin Show documentation
The Kotlin library for working with VK api
The newest version!
package com.github.stormbit.vksdk.objects.models
import com.github.stormbit.vksdk.utils.BooleanInt
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Suppress("unused")
@Serializable
data class Chat(
@SerialName("id") val id: Int,
@SerialName("type") val type: String,
@SerialName("title") val title: String,
@SerialName("admin_id") val adminId: Int,
@SerialName("users") val users: List,
@SerialName("push_settings") val pushSettings: PushSettings? = null,
@SerialName("photo_50") val photo50: String? = null,
@SerialName("photo_100") val photo100: String? = null,
@SerialName("photo_200") val photo200: String? = null,
@SerialName("left") private val wasLeft: BooleanInt = BooleanInt(false),
@SerialName("kicked") private val wasKicked: BooleanInt = BooleanInt(false)
) {
val photoMax: String? get() = photo200 ?: photo100 ?: photo50
@Serializable
data class PushSettings(
@SerialName("sound") val isSoundEnabled: BooleanInt? = null,
@SerialName("disabled_until") val disabledUntil: Int? = null) {
val isNotificationDisabledForever get() = disabledUntil == -1
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy