All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockruntime.model.PromptVariableValues.kt Maven / Gradle / Ivy

There is a newer version: 1.3.80
Show newest version
// 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