commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptTemplateConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// 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
}