All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codeartifact.model.PackageVersionErrorCode.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show 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,
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy