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

commonMain.tools.ozone.setting.removeOptionsToken.kt Maven / Gradle / Ivy

The newest version!
package tools.ozone.setting

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 RemoveOptionsScopeSerializer : KSerializer by stringEnumSerializer(RemoveOptionsScope::safeValueOf)

@Serializable(with = RemoveOptionsScopeSerializer::class)
public sealed class RemoveOptionsScope(
  override val `value`: String,
) : AtpEnum() {
  public data object Instance : RemoveOptionsScope("instance")

  public data object Personal : RemoveOptionsScope("personal")

  public data class Unknown(
    public val rawValue: String,
  ) : RemoveOptionsScope(rawValue)

  public companion object {
    public fun safeValueOf(`value`: String): RemoveOptionsScope = when (value) {
      "instance" -> Instance
      "personal" -> Personal
      else -> Unknown(value)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy