commonMain.aws.sdk.kotlin.services.transfer.model.State.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer.model
import kotlin.collections.List
/**
* Describes the condition of a file transfer protocol-enabled server with respect to its ability to perform file operations. There are six possible states: `OFFLINE`, `ONLINE`, `STARTING`, `STOPPING`, `START_FAILED`, and `STOP_FAILED`.
*
* `OFFLINE` indicates that the server exists, but that it is not available for file operations. `ONLINE` indicates that the server is available to perform file operations. `STARTING` indicates that the server's was instantiated, but the server is not yet available to perform file operations. Under normal conditions, it can take a couple of minutes for the server to be completely operational. Both `START_FAILED` and `STOP_FAILED` are error conditions.
*/
public sealed class State {
public abstract val value: kotlin.String
public object Offline : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "OFFLINE"
override fun toString(): kotlin.String = "Offline"
}
public object Online : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "ONLINE"
override fun toString(): kotlin.String = "Online"
}
public object Starting : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "STARTING"
override fun toString(): kotlin.String = "Starting"
}
public object StartFailed : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "START_FAILED"
override fun toString(): kotlin.String = "StartFailed"
}
public object Stopping : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "STOPPING"
override fun toString(): kotlin.String = "Stopping"
}
public object StopFailed : aws.sdk.kotlin.services.transfer.model.State() {
override val value: kotlin.String = "STOP_FAILED"
override fun toString(): kotlin.String = "StopFailed"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.transfer.model.State() {
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.transfer.model.State = when (value) {
"OFFLINE" -> Offline
"ONLINE" -> Online
"STARTING" -> Starting
"START_FAILED" -> StartFailed
"STOPPING" -> Stopping
"STOP_FAILED" -> StopFailed
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
Offline,
Online,
Starting,
StartFailed,
Stopping,
StopFailed,
)
}
}