commonMain.aws.sdk.kotlin.services.bedrockruntime.model.PromptVariableValues.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
/**
* Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see [How Prompt management works](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-how.html).
*/
public sealed class PromptVariableValues {
/**
* The text value that the variable maps to.
*/
public data class Text(val value: kotlin.String) : aws.sdk.kotlin.services.bedrockruntime.model.PromptVariableValues() {
}
public object SdkUnknown : aws.sdk.kotlin.services.bedrockruntime.model.PromptVariableValues() {
}
/**
* Casts this [PromptVariableValues] as a [Text] and retrieves its [kotlin.String] value. Throws an exception if the [PromptVariableValues] is not a
* [Text].
*/
public fun asText(): kotlin.String = (this as PromptVariableValues.Text).value
/**
* Casts this [PromptVariableValues] as a [Text] and retrieves its [kotlin.String] value. Returns null if the [PromptVariableValues] is not a [Text].
*/
public fun asTextOrNull(): kotlin.String? = (this as? PromptVariableValues.Text)?.value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy