commonMain.com.atproto.label.subscribeLabels.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky-jvm Show documentation
Show all versions of bluesky-jvm Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package com.atproto.label
import kotlin.Any
import kotlin.Long
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 SubscribeLabelsMessageUnion {
public class LabelsSerializer : KSerializer by valueClassSerializer(
serialName = "com.atproto.label.subscribeLabels#labels",
constructor = ::Labels,
valueProvider = Labels::value,
valueSerializerProvider = { SubscribeLabelsLabels.serializer() },
)
@Serializable(with = LabelsSerializer::class)
@JvmInline
@SerialName("com.atproto.label.subscribeLabels#labels")
public value class Labels(
public val `value`: SubscribeLabelsLabels,
) : SubscribeLabelsMessageUnion
public class InfoSerializer : KSerializer by valueClassSerializer(
serialName = "com.atproto.label.subscribeLabels#info",
constructor = ::Info,
valueProvider = Info::value,
valueSerializerProvider = { SubscribeLabelsInfo.serializer() },
)
@Serializable(with = InfoSerializer::class)
@JvmInline
@SerialName("com.atproto.label.subscribeLabels#info")
public value class Info(
public val `value`: SubscribeLabelsInfo,
) : SubscribeLabelsMessageUnion
}
/**
* @param cursor The last known event seq number to backfill from.
*/
@Serializable
public data class SubscribeLabelsQueryParams(
/**
* The last known event seq number to backfill from.
*/
public val cursor: Long? = null,
) {
public fun asList(): ReadOnlyList> = buildList {
add("cursor" to cursor)
}.toImmutableList()
}
public typealias SubscribeLabelsMessage = SubscribeLabelsMessageUnion