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

commonMain.aws.sdk.kotlin.services.wafv2.model.FailureReason.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.wafv2.model

import kotlin.collections.List

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

    public object TokenDomainMismatch : aws.sdk.kotlin.services.wafv2.model.FailureReason() {
        override val value: kotlin.String = "TOKEN_DOMAIN_MISMATCH"
        override fun toString(): kotlin.String = "TokenDomainMismatch"
    }

    public object TokenExpired : aws.sdk.kotlin.services.wafv2.model.FailureReason() {
        override val value: kotlin.String = "TOKEN_EXPIRED"
        override fun toString(): kotlin.String = "TokenExpired"
    }

    public object TokenInvalid : aws.sdk.kotlin.services.wafv2.model.FailureReason() {
        override val value: kotlin.String = "TOKEN_INVALID"
        override fun toString(): kotlin.String = "TokenInvalid"
    }

    public object TokenMissing : aws.sdk.kotlin.services.wafv2.model.FailureReason() {
        override val value: kotlin.String = "TOKEN_MISSING"
        override fun toString(): kotlin.String = "TokenMissing"
    }

    public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.wafv2.model.FailureReason() {
        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.wafv2.model.FailureReason = when (value) {
            "TOKEN_DOMAIN_MISMATCH" -> TokenDomainMismatch
            "TOKEN_EXPIRED" -> TokenExpired
            "TOKEN_INVALID" -> TokenInvalid
            "TOKEN_MISSING" -> TokenMissing
            else -> SdkUnknown(value)
        }

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

        private val values: kotlin.collections.List = listOf(
            TokenDomainMismatch,
            TokenExpired,
            TokenInvalid,
            TokenMissing,
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy