commonMain.org.jellyfin.sdk.model.api.ImageOrientation.kt Maven / Gradle / Ivy
// !! 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
@Serializable
public enum class ImageOrientation(
public val serialName: String,
) {
@SerialName("TopLeft")
TOP_LEFT("TopLeft"),
@SerialName("TopRight")
TOP_RIGHT("TopRight"),
@SerialName("BottomRight")
BOTTOM_RIGHT("BottomRight"),
@SerialName("BottomLeft")
BOTTOM_LEFT("BottomLeft"),
@SerialName("LeftTop")
LEFT_TOP("LeftTop"),
@SerialName("RightTop")
RIGHT_TOP("RightTop"),
@SerialName("RightBottom")
RIGHT_BOTTOM("RightBottom"),
@SerialName("LeftBottom")
LEFT_BOTTOM("LeftBottom"),
;
/**
* 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): ImageOrientation? = when (serialName) {
"TopLeft" -> TOP_LEFT
"TopRight" -> TOP_RIGHT
"BottomRight" -> BOTTOM_RIGHT
"BottomLeft" -> BOTTOM_LEFT
"LeftTop" -> LEFT_TOP
"RightTop" -> RIGHT_TOP
"RightBottom" -> RIGHT_BOTTOM
"LeftBottom" -> LEFT_BOTTOM
else -> null
}
/**
* Find the enum member by the serial name or throw.
*/
public fun fromName(serialName: String): ImageOrientation =
requireNotNull(fromNameOrNull(serialName)) { """Unknown value $serialName""" }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy