commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptGenAiResource.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 specifications for a generative AI resource with which to use the prompt. For more information, see [Create a prompt using Prompt management](https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-create.html).
*/
public sealed class PromptGenAiResource {
/**
* Specifies an Amazon Bedrock agent with which to use the prompt.
*/
public data class Agent(val value: aws.sdk.kotlin.services.bedrockagent.model.PromptAgentResource) : aws.sdk.kotlin.services.bedrockagent.model.PromptGenAiResource() {
override fun toString(): kotlin.String = "PromptGenAiResource(*** Sensitive Data Redacted ***)"
}
public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.PromptGenAiResource() {
override fun toString(): kotlin.String = "PromptGenAiResource(*** Sensitive Data Redacted ***)"
}
/**
* Casts this [PromptGenAiResource] as a [Agent] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.PromptAgentResource] value. Throws an exception if the [PromptGenAiResource] is not a
* [Agent].
*/
public fun asAgent(): aws.sdk.kotlin.services.bedrockagent.model.PromptAgentResource = (this as PromptGenAiResource.Agent).value
/**
* Casts this [PromptGenAiResource] as a [Agent] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.PromptAgentResource] value. Returns null if the [PromptGenAiResource] is not a [Agent].
*/
public fun asAgentOrNull(): aws.sdk.kotlin.services.bedrockagent.model.PromptAgentResource? = (this as? PromptGenAiResource.Agent)?.value
}