commonMain.aws.sdk.kotlin.services.computeoptimizer.model.InstanceState.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of computeoptimizer-jvm Show documentation
Show all versions of computeoptimizer-jvm Show documentation
The AWS SDK for Kotlin client for Compute Optimizer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.computeoptimizer.model
import kotlin.collections.List
public sealed class InstanceState {
public abstract val value: kotlin.String
public object Pending : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "pending"
override fun toString(): kotlin.String = "Pending"
}
public object Running : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "running"
override fun toString(): kotlin.String = "Running"
}
public object ShuttingDown : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "shutting-down"
override fun toString(): kotlin.String = "ShuttingDown"
}
public object Stopped : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "stopped"
override fun toString(): kotlin.String = "Stopped"
}
public object Stopping : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "stopping"
override fun toString(): kotlin.String = "Stopping"
}
public object Terminated : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
override val value: kotlin.String = "terminated"
override fun toString(): kotlin.String = "Terminated"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.computeoptimizer.model.InstanceState() {
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.computeoptimizer.model.InstanceState = when (value) {
"pending" -> Pending
"running" -> Running
"shutting-down" -> ShuttingDown
"stopped" -> Stopped
"stopping" -> Stopping
"terminated" -> Terminated
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
Pending,
Running,
ShuttingDown,
Stopped,
Stopping,
Terminated,
)
}
}