commonMain.aws.sdk.kotlin.services.bedrockagent.model.Tool.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
/**
* Contains configurations for a tool that a model can use when generating a response. For more information, see [Use a tool to complete an Amazon Bedrock model response](https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html).
*/
public sealed class Tool {
/**
* The specification for the tool.
*/
public data class ToolSpec(val value: aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification) : aws.sdk.kotlin.services.bedrockagent.model.Tool() {
}
public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.Tool() {
}
/**
* Casts this [Tool] as a [ToolSpec] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification] value. Throws an exception if the [Tool] is not a
* [ToolSpec].
*/
public fun asToolSpec(): aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification = (this as Tool.ToolSpec).value
/**
* Casts this [Tool] as a [ToolSpec] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification] value. Returns null if the [Tool] is not a [ToolSpec].
*/
public fun asToolSpecOrNull(): aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification? = (this as? Tool.ToolSpec)?.value
}