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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptTemplateConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model



/**
 * Contains the message for a prompt. For more information, see [Prompt management in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html).
 */
public sealed class PromptTemplateConfiguration {
    /**
     * Contains configurations for the text in a message for a prompt.
     */
    public data class Text(val value: aws.sdk.kotlin.services.bedrockagent.model.TextPromptTemplateConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.PromptTemplateConfiguration() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.PromptTemplateConfiguration() {
    }

    /**
     * Casts this [PromptTemplateConfiguration] as a [Text] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.TextPromptTemplateConfiguration] value. Throws an exception if the [PromptTemplateConfiguration] is not a
     * [Text].
     */
    public fun asText(): aws.sdk.kotlin.services.bedrockagent.model.TextPromptTemplateConfiguration = (this as PromptTemplateConfiguration.Text).value

    /**
     * Casts this [PromptTemplateConfiguration] as a [Text] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.TextPromptTemplateConfiguration] value. Returns null if the [PromptTemplateConfiguration] is not a [Text].
     */
    public fun asTextOrNull(): aws.sdk.kotlin.services.bedrockagent.model.TextPromptTemplateConfiguration? = (this as? PromptTemplateConfiguration.Text)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy