commonMain.chat.bsky.convo.getLog.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 kotlin.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.collections.immutable.toImmutableList
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 GetLogResponseLogUnion {
public class BeginConvoSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#logBeginConvo",
constructor = ::BeginConvo,
valueProvider = BeginConvo::value,
valueSerializerProvider = { LogBeginConvo.serializer() },
)
@Serializable(with = BeginConvoSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#logBeginConvo")
public value class BeginConvo(
public val `value`: LogBeginConvo,
) : GetLogResponseLogUnion
public class LeaveConvoSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#logLeaveConvo",
constructor = ::LeaveConvo,
valueProvider = LeaveConvo::value,
valueSerializerProvider = { LogLeaveConvo.serializer() },
)
@Serializable(with = LeaveConvoSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#logLeaveConvo")
public value class LeaveConvo(
public val `value`: LogLeaveConvo,
) : GetLogResponseLogUnion
public class CreateMessageSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#logCreateMessage",
constructor = ::CreateMessage,
valueProvider = CreateMessage::value,
valueSerializerProvider = { LogCreateMessage.serializer() },
)
@Serializable(with = CreateMessageSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#logCreateMessage")
public value class CreateMessage(
public val `value`: LogCreateMessage,
) : GetLogResponseLogUnion
public class DeleteMessageSerializer : KSerializer by valueClassSerializer(
serialName = "chat.bsky.convo.defs#logDeleteMessage",
constructor = ::DeleteMessage,
valueProvider = DeleteMessage::value,
valueSerializerProvider = { LogDeleteMessage.serializer() },
)
@Serializable(with = DeleteMessageSerializer::class)
@JvmInline
@SerialName("chat.bsky.convo.defs#logDeleteMessage")
public value class DeleteMessage(
public val `value`: LogDeleteMessage,
) : GetLogResponseLogUnion
}
@Serializable
public data class GetLogQueryParams(
public val cursor: String? = null,
) {
public fun asList(): ReadOnlyList> = buildList {
add("cursor" to cursor)
}.toImmutableList()
}
@Serializable
public data class GetLogResponse(
public val cursor: String? = null,
public val logs: ReadOnlyList,
)