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

commonMain.com.atproto.repo.putRecordToken.kt Maven / Gradle / Ivy

The newest version!
package com.atproto.repo

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 PutRecordValidationStatusSerializer : KSerializer by 
    stringEnumSerializer(PutRecordValidationStatus::safeValueOf)

@Serializable(with = PutRecordValidationStatusSerializer::class)
public sealed class PutRecordValidationStatus(
  override val `value`: String,
) : AtpEnum() {
  public data object Valid : PutRecordValidationStatus("valid")

  public data object Unknown : PutRecordValidationStatus("unknown")

  public data class _Unknown(
    public val rawValue: String,
  ) : PutRecordValidationStatus(rawValue)

  public companion object {
    public fun safeValueOf(`value`: String): PutRecordValidationStatus = when (value) {
      "valid" -> Valid
      "unknown" -> Unknown
      else -> _Unknown(value)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy