commonMain.org.jellyfin.sdk.model.api.PlayQueueUpdateReason.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jellyfin-model-jvm Show documentation
Show all versions of jellyfin-model-jvm Show documentation
Official Kotlin/Java SDK for Jellyfin. org.jellyfin.sdk:jellyfin-model-jvm
// !! WARNING
// !! DO NOT EDIT THIS FILE
//
// This file is generated by the openapi-generator module and is not meant for manual changes.
// Please read the README.md file in the openapi-generator module for additional information.
package org.jellyfin.sdk.model.api
import kotlin.String
import kotlin.requireNotNull
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
/**
* Enum PlayQueueUpdateReason.
*/
@Serializable
public enum class PlayQueueUpdateReason(
public val serialName: String,
) {
@SerialName("NewPlaylist")
NEW_PLAYLIST("NewPlaylist"),
@SerialName("SetCurrentItem")
SET_CURRENT_ITEM("SetCurrentItem"),
@SerialName("RemoveItems")
REMOVE_ITEMS("RemoveItems"),
@SerialName("MoveItem")
MOVE_ITEM("MoveItem"),
@SerialName("Queue")
QUEUE("Queue"),
@SerialName("QueueNext")
QUEUE_NEXT("QueueNext"),
@SerialName("NextItem")
NEXT_ITEM("NextItem"),
@SerialName("PreviousItem")
PREVIOUS_ITEM("PreviousItem"),
@SerialName("RepeatMode")
REPEAT_MODE("RepeatMode"),
@SerialName("ShuffleMode")
SHUFFLE_MODE("ShuffleMode"),
;
/**
* Get the serial name of the enum member.
*/
override fun toString(): String = serialName
public companion object {
/**
* Find the enum member by the serial name or return null.
*/
public fun fromNameOrNull(serialName: String): PlayQueueUpdateReason? = when (serialName) {
"NewPlaylist" -> NEW_PLAYLIST
"SetCurrentItem" -> SET_CURRENT_ITEM
"RemoveItems" -> REMOVE_ITEMS
"MoveItem" -> MOVE_ITEM
"Queue" -> QUEUE
"QueueNext" -> QUEUE_NEXT
"NextItem" -> NEXT_ITEM
"PreviousItem" -> PREVIOUS_ITEM
"RepeatMode" -> REPEAT_MODE
"ShuffleMode" -> SHUFFLE_MODE
else -> null
}
/**
* Find the enum member by the serial name or throw.
*/
public fun fromName(serialName: String): PlayQueueUpdateReason =
requireNotNull(fromNameOrNull(serialName)) { """Unknown value $serialName""" }
}
}