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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.Tool.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 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
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy