commonMain.chat.bsky.convo.ConvoView.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package chat.bsky.convo
import chat.bsky.actor.ProfileViewBasic
import kotlin.Boolean
import kotlin.Long
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.ReadOnlyList
import sh.christian.ozone.api.runtime.valueClassSerializer
@Serializable
public sealed interface ConvoViewLastMessageUnion {
public class MessageViewSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#messageView",
constructor = ::MessageView,
valueProvider = MessageView::value,
valueSerializerProvider = { chat.bsky.convo.MessageView.serializer() },
)
@Serializable(with = MessageViewSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#messageView")
public value class MessageView(
public val `value`: chat.bsky.convo.MessageView,
) : ConvoViewLastMessageUnion
public class DeletedMessageViewSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#deletedMessageView",
constructor = ::DeletedMessageView,
valueProvider = DeletedMessageView::value,
valueSerializerProvider = { chat.bsky.convo.DeletedMessageView.serializer() },
)
@Serializable(with = DeletedMessageViewSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#deletedMessageView")
public value class DeletedMessageView(
public val `value`: chat.bsky.convo.DeletedMessageView,
) : ConvoViewLastMessageUnion
}
@Serializable
public data class ConvoView(
public val id: String,
public val rev: String,
public val members: ReadOnlyList,
public val lastMessage: ConvoViewLastMessageUnion? = null,
public val muted: Boolean,
public val opened: Boolean? = null,
public val unreadCount: Long,
)