commonMain.aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connect.model
import kotlin.collections.List
public sealed class PropertyValidationExceptionReason {
public abstract val value: kotlin.String
public object InvalidFormat : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "INVALID_FORMAT"
override fun toString(): kotlin.String = "InvalidFormat"
}
public object NotSupported : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "NOT_SUPPORTED"
override fun toString(): kotlin.String = "NotSupported"
}
public object ReferencedResourceNotFound : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "REFERENCED_RESOURCE_NOT_FOUND"
override fun toString(): kotlin.String = "ReferencedResourceNotFound"
}
public object RequiredPropertyMissing : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "REQUIRED_PROPERTY_MISSING"
override fun toString(): kotlin.String = "RequiredPropertyMissing"
}
public object ResourceNameAlreadyExists : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "RESOURCE_NAME_ALREADY_EXISTS"
override fun toString(): kotlin.String = "ResourceNameAlreadyExists"
}
public object UniqueConstraintViolated : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
override val value: kotlin.String = "UNIQUE_CONSTRAINT_VIOLATED"
override fun toString(): kotlin.String = "UniqueConstraintViolated"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.connect.model.PropertyValidationExceptionReason() {
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.connect.model.PropertyValidationExceptionReason = when (value) {
"INVALID_FORMAT" -> InvalidFormat
"NOT_SUPPORTED" -> NotSupported
"REFERENCED_RESOURCE_NOT_FOUND" -> ReferencedResourceNotFound
"REQUIRED_PROPERTY_MISSING" -> RequiredPropertyMissing
"RESOURCE_NAME_ALREADY_EXISTS" -> ResourceNameAlreadyExists
"UNIQUE_CONSTRAINT_VIOLATED" -> UniqueConstraintViolated
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
InvalidFormat,
NotSupported,
ReferencedResourceNotFound,
RequiredPropertyMissing,
ResourceNameAlreadyExists,
UniqueConstraintViolated,
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy