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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.ContentBlock.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 content for the message you pass to, or receive from a model. 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 ContentBlock {
    /**
     * The text in the message.
     */
    public data class Text(val value: kotlin.String) : aws.sdk.kotlin.services.bedrockagent.model.ContentBlock() {
        override fun toString(): kotlin.String = "ContentBlock(*** Sensitive Data Redacted ***)"
    }

    public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.ContentBlock() {
        override fun toString(): kotlin.String = "ContentBlock(*** Sensitive Data Redacted ***)"
    }

    /**
     * Casts this [ContentBlock] as a [Text] and retrieves its [kotlin.String] value. Throws an exception if the [ContentBlock] is not a
     * [Text].
     */
    public fun asText(): kotlin.String = (this as ContentBlock.Text).value

    /**
     * Casts this [ContentBlock] as a [Text] and retrieves its [kotlin.String] value. Returns null if the [ContentBlock] is not a [Text].
     */
    public fun asTextOrNull(): kotlin.String? = (this as? ContentBlock.Text)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy