commonMain.chat.bsky.actor.declarationToken.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!
package chat.bsky.actor
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 DeclarationAllowIncomingSerializer : KSerializer by
stringEnumSerializer(DeclarationAllowIncoming::safeValueOf)
@Serializable(with = DeclarationAllowIncomingSerializer::class)
public sealed class DeclarationAllowIncoming(
override val `value`: String,
) : AtpEnum() {
public data object All : DeclarationAllowIncoming("all")
public data object None : DeclarationAllowIncoming("none")
public data object Following : DeclarationAllowIncoming("following")
public data class Unknown(
public val rawValue: String,
) : DeclarationAllowIncoming(rawValue)
public companion object {
public fun safeValueOf(`value`: String): DeclarationAllowIncoming = when (value) {
"all" -> All
"none" -> None
"following" -> Following
else -> Unknown(value)
}
}
}