commonMain.aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlockStart.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockruntime-jvm Show documentation
Show all versions of bedrockruntime-jvm Show documentation
The AWS Kotlin client for Bedrock Runtime
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The start of a tool use block.
*/
public class ToolUseBlockStart private constructor(builder: Builder) {
/**
* The name of the tool that the model is requesting to use.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The ID for the tool request.
*/
public val toolUseId: kotlin.String = requireNotNull(builder.toolUseId) { "A non-null value must be provided for toolUseId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlockStart = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ToolUseBlockStart(")
append("name=$name,")
append("toolUseId=$toolUseId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name.hashCode()
result = 31 * result + (toolUseId.hashCode())
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as ToolUseBlockStart
if (name != other.name) return false
if (toolUseId != other.toolUseId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlockStart = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the tool that the model is requesting to use.
*/
public var name: kotlin.String? = null
/**
* The ID for the tool request.
*/
public var toolUseId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlockStart) : this() {
this.name = x.name
this.toolUseId = x.toolUseId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlockStart = ToolUseBlockStart(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
if (toolUseId == null) toolUseId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy