commonMain.aws.sdk.kotlin.services.signer.model.HashAlgorithm.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.signer.model
import kotlin.collections.List
public sealed class HashAlgorithm {
public abstract val value: kotlin.String
public object Sha1 : aws.sdk.kotlin.services.signer.model.HashAlgorithm() {
override val value: kotlin.String = "SHA1"
override fun toString(): kotlin.String = "Sha1"
}
public object Sha256 : aws.sdk.kotlin.services.signer.model.HashAlgorithm() {
override val value: kotlin.String = "SHA256"
override fun toString(): kotlin.String = "Sha256"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.signer.model.HashAlgorithm() {
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.signer.model.HashAlgorithm = when (value) {
"SHA1" -> Sha1
"SHA256" -> Sha256
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
Sha1,
Sha256,
)
}
}