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

There is a newer version: 1.3.77
Show newest version
// 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 [Construct and store reusable prompts with Prompt management in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html).
 */
public sealed class PromptTemplateConfiguration {
    /**
     * Contains configurations to use the prompt in a conversational format.
     */
    public data class Chat(val value: aws.sdk.kotlin.services.bedrockagent.model.ChatPromptTemplateConfiguration) : aws.sdk.kotlin.services.bedrockagent.model.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 [Chat] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.ChatPromptTemplateConfiguration] value. Throws an exception if the [PromptTemplateConfiguration] is not a
     * [Chat].
     */
    public fun asChat(): aws.sdk.kotlin.services.bedrockagent.model.ChatPromptTemplateConfiguration = (this as PromptTemplateConfiguration.Chat).value

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

    /**
     * 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