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

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

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 ValidationExceptionReason {
    public abstract val value: kotlin.String

    public object CannotParse : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        override val value: kotlin.String = "CANNOT_PARSE"
        override fun toString(): kotlin.String = "CannotParse"
    }

    public object EncryptionKeyError : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        override val value: kotlin.String = "ENCRYPTION_KEY_ERROR"
        override fun toString(): kotlin.String = "EncryptionKeyError"
    }

    public object FieldValidationFailed : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        override val value: kotlin.String = "FIELD_VALIDATION_FAILED"
        override fun toString(): kotlin.String = "FieldValidationFailed"
    }

    public object Other : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        override val value: kotlin.String = "OTHER"
        override fun toString(): kotlin.String = "Other"
    }

    public object UnknownOperation : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        override val value: kotlin.String = "UNKNOWN_OPERATION"
        override fun toString(): kotlin.String = "UnknownOperation"
    }

    public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.codeartifact.model.ValidationExceptionReason() {
        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.ValidationExceptionReason = when (value) {
            "CANNOT_PARSE" -> CannotParse
            "ENCRYPTION_KEY_ERROR" -> EncryptionKeyError
            "FIELD_VALIDATION_FAILED" -> FieldValidationFailed
            "OTHER" -> Other
            "UNKNOWN_OPERATION" -> UnknownOperation
            else -> SdkUnknown(value)
        }

        /**
         * Get a list of all possible variants
         */
        public fun values(): kotlin.collections.List = values

        private val values: kotlin.collections.List = listOf(
            CannotParse,
            EncryptionKeyError,
            FieldValidationFailed,
            Other,
            UnknownOperation,
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy