commonMain.aws.sdk.kotlin.services.bedrockagent.model.ToolChoice.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
/**
* Defines which tools the model should request when invoked. 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 ToolChoice {
/**
* Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.
*/
public data class Any(val value: aws.sdk.kotlin.services.bedrockagent.model.AnyToolChoice) : aws.sdk.kotlin.services.bedrockagent.model.ToolChoice() {
override fun toString(): kotlin.String = "ToolChoice(*** Sensitive Data Redacted ***)"
}
/**
* Defines tools. The model automatically decides whether to call a tool or to generate text instead.
*/
public data class Auto(val value: aws.sdk.kotlin.services.bedrockagent.model.AutoToolChoice) : aws.sdk.kotlin.services.bedrockagent.model.ToolChoice() {
override fun toString(): kotlin.String = "ToolChoice(*** Sensitive Data Redacted ***)"
}
/**
* Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.
*/
public data class Tool(val value: aws.sdk.kotlin.services.bedrockagent.model.SpecificToolChoice) : aws.sdk.kotlin.services.bedrockagent.model.ToolChoice() {
override fun toString(): kotlin.String = "ToolChoice(*** Sensitive Data Redacted ***)"
}
public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.ToolChoice() {
override fun toString(): kotlin.String = "ToolChoice(*** Sensitive Data Redacted ***)"
}
/**
* Casts this [ToolChoice] as a [Any] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AnyToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Any].
*/
public fun asAny(): aws.sdk.kotlin.services.bedrockagent.model.AnyToolChoice = (this as ToolChoice.Any).value
/**
* Casts this [ToolChoice] as a [Any] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AnyToolChoice] value. Returns null if the [ToolChoice] is not a [Any].
*/
public fun asAnyOrNull(): aws.sdk.kotlin.services.bedrockagent.model.AnyToolChoice? = (this as? ToolChoice.Any)?.value
/**
* Casts this [ToolChoice] as a [Auto] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AutoToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Auto].
*/
public fun asAuto(): aws.sdk.kotlin.services.bedrockagent.model.AutoToolChoice = (this as ToolChoice.Auto).value
/**
* Casts this [ToolChoice] as a [Auto] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.AutoToolChoice] value. Returns null if the [ToolChoice] is not a [Auto].
*/
public fun asAutoOrNull(): aws.sdk.kotlin.services.bedrockagent.model.AutoToolChoice? = (this as? ToolChoice.Auto)?.value
/**
* Casts this [ToolChoice] as a [Tool] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.SpecificToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Tool].
*/
public fun asTool(): aws.sdk.kotlin.services.bedrockagent.model.SpecificToolChoice = (this as ToolChoice.Tool).value
/**
* Casts this [ToolChoice] as a [Tool] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.SpecificToolChoice] value. Returns null if the [ToolChoice] is not a [Tool].
*/
public fun asToolOrNull(): aws.sdk.kotlin.services.bedrockagent.model.SpecificToolChoice? = (this as? ToolChoice.Tool)?.value
}