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

commonMain.aws.sdk.kotlin.services.bedrockruntime.model.ToolInputSchema.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockruntime.model

import aws.smithy.kotlin.runtime.content.Document

/**
 * The schema for the tool. The top level schema type must be `object`.
 */
public sealed class ToolInputSchema {
    /**
     * The JSON schema for the tool. For more information, see [JSON Schema Reference](https://json-schema.org/understanding-json-schema/reference).
     */
    public data class Json(val value: aws.smithy.kotlin.runtime.content.Document) : aws.sdk.kotlin.services.bedrockruntime.model.ToolInputSchema() {
    }

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

    /**
     * Casts this [ToolInputSchema] as a [Json] and retrieves its [aws.smithy.kotlin.runtime.content.Document] value. Throws an exception if the [ToolInputSchema] is not a
     * [Json].
     */
    public fun asJson(): aws.smithy.kotlin.runtime.content.Document = (this as ToolInputSchema.Json).value

    /**
     * Casts this [ToolInputSchema] as a [Json] and retrieves its [aws.smithy.kotlin.runtime.content.Document] value. Returns null if the [ToolInputSchema] is not a [Json].
     */
    public fun asJsonOrNull(): aws.smithy.kotlin.runtime.content.Document? = (this as? ToolInputSchema.Json)?.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy