commonMain.com.atproto.sync.subscribeReposToken.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 SubscribeReposStatusSerializer : KSerializer by stringEnumSerializer(SubscribeReposStatus::safeValueOf)
/**
* If active=false, this optional field indicates a reason for why the account is not active.
*/
@Serializable(with = SubscribeReposStatusSerializer::class)
public sealed class SubscribeReposStatus(
override val `value`: String,
) : AtpEnum() {
public data object Takendown : SubscribeReposStatus("takendown")
public data object Suspended : SubscribeReposStatus("suspended")
public data object Deleted : SubscribeReposStatus("deleted")
public data object Deactivated : SubscribeReposStatus("deactivated")
public data class Unknown(
public val rawValue: String,
) : SubscribeReposStatus(rawValue)
public companion object {
public fun safeValueOf(`value`: String): SubscribeReposStatus = when (value) {
"takendown" -> Takendown
"suspended" -> Suspended
"deleted" -> Deleted
"deactivated" -> Deactivated
else -> Unknown(value)
}
}
}
public class SubscribeReposNameSerializer : KSerializer by stringEnumSerializer(SubscribeReposName::safeValueOf)
@Serializable(with = SubscribeReposNameSerializer::class)
public sealed class SubscribeReposName(
override val `value`: String,
) : AtpEnum() {
public data object OutdatedCursor : SubscribeReposName("OutdatedCursor")
public data class Unknown(
public val rawValue: String,
) : SubscribeReposName(rawValue)
public companion object {
public fun safeValueOf(`value`: String): SubscribeReposName = when (value) {
"OutdatedCursor" -> OutdatedCursor
else -> Unknown(value)
}
}
}
public class SubscribeReposActionSerializer : KSerializer by stringEnumSerializer(SubscribeReposAction::safeValueOf)
@Serializable(with = SubscribeReposActionSerializer::class)
public sealed class SubscribeReposAction(
override val `value`: String,
) : AtpEnum() {
public data object Create : SubscribeReposAction("create")
public data object Update : SubscribeReposAction("update")
public data object Delete : SubscribeReposAction("delete")
public data class Unknown(
public val rawValue: String,
) : SubscribeReposAction(rawValue)
public companion object {
public fun safeValueOf(`value`: String): SubscribeReposAction = when (value) {
"create" -> Create
"update" -> Update
"delete" -> Delete
else -> Unknown(value)
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy