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

commonMain.app.bsky.notification.listNotificationsToken.kt Maven / Gradle / Ivy

The newest version!
package app.bsky.notification

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 ListNotificationsReasonSerializer : KSerializer by stringEnumSerializer(ListNotificationsReason::safeValueOf)

/**
 * Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and
 * 'starterpack-joined'.
 */
@Serializable(with = ListNotificationsReasonSerializer::class)
public sealed class ListNotificationsReason(
  override val `value`: String,
) : AtpEnum() {
  public data object Like : ListNotificationsReason("like")

  public data object Repost : ListNotificationsReason("repost")

  public data object Follow : ListNotificationsReason("follow")

  public data object Mention : ListNotificationsReason("mention")

  public data object Reply : ListNotificationsReason("reply")

  public data object Quote : ListNotificationsReason("quote")

  public data object StarterpackJoined : ListNotificationsReason("starterpack-joined")

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

  public companion object {
    public fun safeValueOf(`value`: String): ListNotificationsReason = when (value) {
      "like" -> Like
      "repost" -> Repost
      "follow" -> Follow
      "mention" -> Mention
      "reply" -> Reply
      "quote" -> Quote
      "starterpack-joined" -> StarterpackJoined
      else -> Unknown(value)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy