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

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



/**
 * Information about a tool that you can use with the Converse API. For more information, see [Tool use (function calling)](https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html) in the Amazon Bedrock User Guide.
 */
public sealed class Tool {
    /**
     * The specfication for the tool.
     */
    public data class ToolSpec(val value: aws.sdk.kotlin.services.bedrockruntime.model.ToolSpecification) : aws.sdk.kotlin.services.bedrockruntime.model.Tool() {
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy