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

commonMain.aws.sdk.kotlin.services.finspace.model.ErrorDetails.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.finspace.model

import kotlin.collections.List

public sealed class ErrorDetails {
    public abstract val value: kotlin.String

    public object AccessDenied : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "Missing required permission to perform this request."
        override fun toString(): kotlin.String = "AccessDenied"
    }

    public object Cancelled : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "Cancelled"
        override fun toString(): kotlin.String = "Cancelled"
    }

    public object InternalServiceException : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "An internal error has occurred."
        override fun toString(): kotlin.String = "InternalServiceException"
    }

    public object ResourceNotFound : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "One or more inputs to this request were not found."
        override fun toString(): kotlin.String = "ResourceNotFound"
    }

    public object ServiceQuotaExceeded : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "Service limits have been exceeded."
        override fun toString(): kotlin.String = "ServiceQuotaExceeded"
    }

    public object Throttling : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "The system temporarily lacks sufficient resources to process the request."
        override fun toString(): kotlin.String = "Throttling"
    }

    public object UserRecoverable : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "A user recoverable error has occurred"
        override fun toString(): kotlin.String = "UserRecoverable"
    }

    public object Validation : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        override val value: kotlin.String = "The inputs to this request are invalid."
        override fun toString(): kotlin.String = "Validation"
    }

    public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.finspace.model.ErrorDetails() {
        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.finspace.model.ErrorDetails = when (value) {
            "Missing required permission to perform this request." -> AccessDenied
            "Cancelled" -> Cancelled
            "An internal error has occurred." -> InternalServiceException
            "One or more inputs to this request were not found." -> ResourceNotFound
            "Service limits have been exceeded." -> ServiceQuotaExceeded
            "The system temporarily lacks sufficient resources to process the request." -> Throttling
            "A user recoverable error has occurred" -> UserRecoverable
            "The inputs to this request are invalid." -> Validation
            else -> SdkUnknown(value)
        }

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

        private val values: kotlin.collections.List = listOf(
            AccessDenied,
            Cancelled,
            InternalServiceException,
            ResourceNotFound,
            ServiceQuotaExceeded,
            Throttling,
            UserRecoverable,
            Validation,
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy