All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.chat.bsky.actor.declarationToken.kt Maven / Gradle / Ivy

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)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy