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

commonMain.app.bsky.feed.searchPostsToken.kt Maven / Gradle / Ivy

The newest version!
package app.bsky.feed

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 SearchPostsSortSerializer : KSerializer by 
    stringEnumSerializer(SearchPostsSort::safeValueOf)

@Serializable(with = SearchPostsSortSerializer::class)
public sealed class SearchPostsSort(
  override val `value`: String,
) : AtpEnum() {
  public data object Top : SearchPostsSort("top")

  public data object Latest : SearchPostsSort("latest")

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

  public companion object {
    public fun safeValueOf(`value`: String): SearchPostsSort = when (value) {
      "top" -> Top
      "latest" -> Latest
      else -> Unknown(value)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy