commonMain.chat.bsky.moderation.getMessageContext.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.moderation
import kotlin.Any
import kotlin.Long
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmInline
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.JsonContent
import sh.christian.ozone.api.runtime.valueClassSerializer
@Serializable
public sealed interface GetMessageContextResponseMessageUnion {
public class MessageViewSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#messageView",
constructor = ::MessageView,
valueProvider = MessageView::value,
valueSerializerProvider = { chat.bsky.convo.MessageView.serializer() },
)
@JvmInline
@Serializable(with = MessageViewSerializer::class)
@SerialName("chat.bsky.convo.defs#messageView")
public value class MessageView(
public val `value`: chat.bsky.convo.MessageView,
) : GetMessageContextResponseMessageUnion
public class DeletedMessageViewSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#deletedMessageView",
constructor = ::DeletedMessageView,
valueProvider = DeletedMessageView::value,
valueSerializerProvider = { chat.bsky.convo.DeletedMessageView.serializer() },
)
@JvmInline
@Serializable(with = DeletedMessageViewSerializer::class)
@SerialName("chat.bsky.convo.defs#deletedMessageView")
public value class DeletedMessageView(
public val `value`: chat.bsky.convo.DeletedMessageView,
) : GetMessageContextResponseMessageUnion
@JvmInline
@Serializable
public value class Unknown(
public val `value`: JsonContent,
) : GetMessageContextResponseMessageUnion
}
/**
* @param convoId Conversation that the message is from. NOTE: this field will eventually be
* required.
*/
@Serializable
public data class GetMessageContextQueryParams(
/**
* Conversation that the message is from. NOTE: this field will eventually be required.
*/
public val convoId: String? = null,
public val messageId: String,
public val before: Long? = 5,
public val after: Long? = 5,
) {
public fun asList(): List> = buildList {
add("convoId" to convoId)
add("messageId" to messageId)
add("before" to before)
add("after" to after)
}
}
@Serializable
public data class GetMessageContextResponse(
public val messages: List,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy