commonMain.aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import kotlin.collections.List
public sealed class PackageVersionErrorCode {
public abstract val value: kotlin.String
public object AlreadyExists : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "ALREADY_EXISTS"
override fun toString(): kotlin.String = "AlreadyExists"
}
public object MismatchedRevision : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "MISMATCHED_REVISION"
override fun toString(): kotlin.String = "MismatchedRevision"
}
public object MismatchedStatus : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "MISMATCHED_STATUS"
override fun toString(): kotlin.String = "MismatchedStatus"
}
public object NotAllowed : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "NOT_ALLOWED"
override fun toString(): kotlin.String = "NotAllowed"
}
public object NotFound : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "NOT_FOUND"
override fun toString(): kotlin.String = "NotFound"
}
public object Skipped : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
override val value: kotlin.String = "SKIPPED"
override fun toString(): kotlin.String = "Skipped"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode() {
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.codeartifact.model.PackageVersionErrorCode = when (value) {
"ALREADY_EXISTS" -> AlreadyExists
"MISMATCHED_REVISION" -> MismatchedRevision
"MISMATCHED_STATUS" -> MismatchedStatus
"NOT_ALLOWED" -> NotAllowed
"NOT_FOUND" -> NotFound
"SKIPPED" -> Skipped
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
AlreadyExists,
MismatchedRevision,
MismatchedStatus,
NotAllowed,
NotFound,
Skipped,
)
}
}