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

commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseContentBlock.kt Maven / Gradle / Ivy

There is a newer version: 1.3.80
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockruntime.model



/**
 * A content block for selective guarding with the [Converse](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html) or [ConverseStream](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html) API operations.
 */
public sealed class GuardrailConverseContentBlock {
    /**
     * The text to guard.
     */
    public data class Text(val value: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseTextBlock) : aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseContentBlock() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseContentBlock() {
    }

    /**
     * Casts this [GuardrailConverseContentBlock] as a [Text] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseTextBlock] value. Throws an exception if the [GuardrailConverseContentBlock] is not a
     * [Text].
     */
    public fun asText(): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseTextBlock = (this as GuardrailConverseContentBlock.Text).value

    /**
     * Casts this [GuardrailConverseContentBlock] as a [Text] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseTextBlock] value. Returns null if the [GuardrailConverseContentBlock] is not a [Text].
     */
    public fun asTextOrNull(): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseTextBlock? = (this as? GuardrailConverseContentBlock.Text)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy