commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailContentBlock.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockruntime-jvm Show documentation
Show all versions of bedrockruntime-jvm Show documentation
The AWS Kotlin client for Bedrock Runtime
// 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