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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PromptGenAiResource.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 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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy