commonMain.app.bsky.feed.Token.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!
package app.bsky.feed
import kotlin.String
import kotlinx.serialization.KSerializer
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.AtpEnum
import sh.christian.ozone.api.runtime.stringEnumSerializer
public class TokenSerializer : KSerializer by stringEnumSerializer(Token::safeValueOf)
@Serializable(with = TokenSerializer::class)
public sealed class Token(
override val `value`: String,
) : AtpEnum() {
public data object RequestLess : Token("app.bsky.feed.defs#requestLess")
public data object RequestMore : Token("app.bsky.feed.defs#requestMore")
public data object ClickthroughItem : Token("app.bsky.feed.defs#clickthroughItem")
public data object ClickthroughAuthor : Token("app.bsky.feed.defs#clickthroughAuthor")
public data object ClickthroughReposter : Token("app.bsky.feed.defs#clickthroughReposter")
public data object ClickthroughEmbed : Token("app.bsky.feed.defs#clickthroughEmbed")
public data object InteractionSeen : Token("app.bsky.feed.defs#interactionSeen")
public data object InteractionLike : Token("app.bsky.feed.defs#interactionLike")
public data object InteractionRepost : Token("app.bsky.feed.defs#interactionRepost")
public data object InteractionReply : Token("app.bsky.feed.defs#interactionReply")
public data object InteractionQuote : Token("app.bsky.feed.defs#interactionQuote")
public data object InteractionShare : Token("app.bsky.feed.defs#interactionShare")
public data class Unknown(
public val rawValue: String,
) : Token(rawValue)
public companion object {
public fun safeValueOf(`value`: String): Token = when (value) {
"app.bsky.feed.defs#requestLess" -> RequestLess
"app.bsky.feed.defs#requestMore" -> RequestMore
"app.bsky.feed.defs#clickthroughItem" -> ClickthroughItem
"app.bsky.feed.defs#clickthroughAuthor" -> ClickthroughAuthor
"app.bsky.feed.defs#clickthroughReposter" -> ClickthroughReposter
"app.bsky.feed.defs#clickthroughEmbed" -> ClickthroughEmbed
"app.bsky.feed.defs#interactionSeen" -> InteractionSeen
"app.bsky.feed.defs#interactionLike" -> InteractionLike
"app.bsky.feed.defs#interactionRepost" -> InteractionRepost
"app.bsky.feed.defs#interactionReply" -> InteractionReply
"app.bsky.feed.defs#interactionQuote" -> InteractionQuote
"app.bsky.feed.defs#interactionShare" -> InteractionShare
else -> Unknown(value)
}
}
}