commonMain.aws.sdk.kotlin.services.backup.model.LegalHoldStatus.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.backup.model
import kotlin.collections.List
public sealed class LegalHoldStatus {
public abstract val value: kotlin.String
public object Active : aws.sdk.kotlin.services.backup.model.LegalHoldStatus() {
override val value: kotlin.String = "ACTIVE"
override fun toString(): kotlin.String = "Active"
}
public object Canceled : aws.sdk.kotlin.services.backup.model.LegalHoldStatus() {
override val value: kotlin.String = "CANCELED"
override fun toString(): kotlin.String = "Canceled"
}
public object Canceling : aws.sdk.kotlin.services.backup.model.LegalHoldStatus() {
override val value: kotlin.String = "CANCELING"
override fun toString(): kotlin.String = "Canceling"
}
public object Creating : aws.sdk.kotlin.services.backup.model.LegalHoldStatus() {
override val value: kotlin.String = "CREATING"
override fun toString(): kotlin.String = "Creating"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.backup.model.LegalHoldStatus() {
override fun toString(): kotlin.String = "SdkUnknown($value)"
}
public companion object {
/**
* Convert a raw value to one of the sealed variants or [SdkUnknown]
*/
public fun fromValue(value: kotlin.String): aws.sdk.kotlin.services.backup.model.LegalHoldStatus = when (value) {
"ACTIVE" -> Active
"CANCELED" -> Canceled
"CANCELING" -> Canceling
"CREATING" -> Creating
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
Active,
Canceled,
Canceling,
Creating,
)
}
}