commonMain.com.atproto.sync.listReposToken.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 com.atproto.sync
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 ListReposStatusSerializer : KSerializer by
stringEnumSerializer(ListReposStatus::safeValueOf)
@Serializable(with = ListReposStatusSerializer::class)
public sealed class ListReposStatus(
override val `value`: String,
) : AtpEnum() {
public data object Takendown : ListReposStatus("takendown")
public data object Suspended : ListReposStatus("suspended")
public data object Deactivated : ListReposStatus("deactivated")
public data class Unknown(
public val rawValue: String,
) : ListReposStatus(rawValue)
public companion object {
public fun safeValueOf(`value`: String): ListReposStatus = when (value) {
"takendown" -> Takendown
"suspended" -> Suspended
"deactivated" -> Deactivated
else -> Unknown(value)
}
}
}