commonMain.aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscaling.model
import kotlin.collections.List
public sealed class CapacityReservationPreference {
public abstract val value: kotlin.String
public object CapacityReservationsFirst : aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference() {
override val value: kotlin.String = "capacity-reservations-first"
override fun toString(): kotlin.String = "CapacityReservationsFirst"
}
public object CapacityReservationsOnly : aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference() {
override val value: kotlin.String = "capacity-reservations-only"
override fun toString(): kotlin.String = "CapacityReservationsOnly"
}
public object Default : aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference() {
override val value: kotlin.String = "default"
override fun toString(): kotlin.String = "Default"
}
public object None : aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference() {
override val value: kotlin.String = "none"
override fun toString(): kotlin.String = "None"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.autoscaling.model.CapacityReservationPreference() {
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.autoscaling.model.CapacityReservationPreference = when (value) {
"capacity-reservations-first" -> CapacityReservationsFirst
"capacity-reservations-only" -> CapacityReservationsOnly
"default" -> Default
"none" -> None
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
CapacityReservationsFirst,
CapacityReservationsOnly,
Default,
None,
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy