commonMain.org.jellyfin.sdk.model.api.UnratedItem.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
/**
* An enum representing an unrated item.
*/
@Serializable
public enum class UnratedItem(
public val serialName: String,
) {
@SerialName("Movie")
MOVIE("Movie"),
@SerialName("Trailer")
TRAILER("Trailer"),
@SerialName("Series")
SERIES("Series"),
@SerialName("Music")
MUSIC("Music"),
@SerialName("Book")
BOOK("Book"),
@SerialName("LiveTvChannel")
LIVE_TV_CHANNEL("LiveTvChannel"),
@SerialName("LiveTvProgram")
LIVE_TV_PROGRAM("LiveTvProgram"),
@SerialName("ChannelContent")
CHANNEL_CONTENT("ChannelContent"),
@SerialName("Other")
OTHER("Other"),
;
/**
* 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): UnratedItem? = when (serialName) {
"Movie" -> MOVIE
"Trailer" -> TRAILER
"Series" -> SERIES
"Music" -> MUSIC
"Book" -> BOOK
"LiveTvChannel" -> LIVE_TV_CHANNEL
"LiveTvProgram" -> LIVE_TV_PROGRAM
"ChannelContent" -> CHANNEL_CONTENT
"Other" -> OTHER
else -> null
}
/**
* Find the enum member by the serial name or throw.
*/
public fun fromName(serialName: String): UnratedItem =
requireNotNull(fromNameOrNull(serialName)) { """Unknown value $serialName""" }
}
}