commonMain.aws.sdk.kotlin.services.codeartifact.model.HashAlgorithm.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
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 HashAlgorithm {
public abstract val value: kotlin.String
public object Md5 : aws.sdk.kotlin.services.codeartifact.model.HashAlgorithm() {
override val value: kotlin.String = "MD5"
override fun toString(): kotlin.String = "Md5"
}
public object Sha1 : aws.sdk.kotlin.services.codeartifact.model.HashAlgorithm() {
override val value: kotlin.String = "SHA-1"
override fun toString(): kotlin.String = "Sha1"
}
public object Sha256 : aws.sdk.kotlin.services.codeartifact.model.HashAlgorithm() {
override val value: kotlin.String = "SHA-256"
override fun toString(): kotlin.String = "Sha256"
}
public object Sha512 : aws.sdk.kotlin.services.codeartifact.model.HashAlgorithm() {
override val value: kotlin.String = "SHA-512"
override fun toString(): kotlin.String = "Sha512"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.codeartifact.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.codeartifact.model.HashAlgorithm = when (value) {
"MD5" -> Md5
"SHA-1" -> Sha1
"SHA-256" -> Sha256
"SHA-512" -> Sha512
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
Md5,
Sha1,
Sha256,
Sha512,
)
}
}