commonMain.aws.sdk.kotlin.services.bedrockruntime.model.StopReason.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockruntime-jvm Show documentation
Show all versions of bedrockruntime-jvm Show documentation
The AWS Kotlin client for Bedrock Runtime
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import kotlin.collections.List
public sealed class StopReason {
public abstract val value: kotlin.String
public object ContentFiltered : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "content_filtered"
override fun toString(): kotlin.String = "ContentFiltered"
}
public object EndTurn : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "end_turn"
override fun toString(): kotlin.String = "EndTurn"
}
public object GuardrailIntervened : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "guardrail_intervened"
override fun toString(): kotlin.String = "GuardrailIntervened"
}
public object MaxTokens : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "max_tokens"
override fun toString(): kotlin.String = "MaxTokens"
}
public object StopSequence : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "stop_sequence"
override fun toString(): kotlin.String = "StopSequence"
}
public object ToolUse : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
override val value: kotlin.String = "tool_use"
override fun toString(): kotlin.String = "ToolUse"
}
public data class SdkUnknown(override val value: kotlin.String) : aws.sdk.kotlin.services.bedrockruntime.model.StopReason() {
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.bedrockruntime.model.StopReason = when (value) {
"content_filtered" -> ContentFiltered
"end_turn" -> EndTurn
"guardrail_intervened" -> GuardrailIntervened
"max_tokens" -> MaxTokens
"stop_sequence" -> StopSequence
"tool_use" -> ToolUse
else -> SdkUnknown(value)
}
/**
* Get a list of all possible variants
*/
public fun values(): kotlin.collections.List = values
private val values: kotlin.collections.List = listOf(
ContentFiltered,
EndTurn,
GuardrailIntervened,
MaxTokens,
StopSequence,
ToolUse,
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy