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

commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailContentBlock.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



/**
 * The content block to be evaluated by the guardrail.
 */
public sealed class GuardrailContentBlock {
    /**
     * Text within content block to be evaluated by the guardrail.
     */
    public data class Text(val value: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextBlock) : aws.sdk.kotlin.services.bedrockruntime.model.GuardrailContentBlock() {
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy