asTool

Casts this ToolChoice as a Tool and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice value. Throws an exception if the ToolChoice is not a Tool.