commonMain.aws.sdk.kotlin.services.bedrockagent.model.AssociateAgentKnowledgeBaseResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
public class AssociateAgentKnowledgeBaseResponse private constructor(builder: Builder) {
/**
* Contains details about the knowledge base that has been associated with the agent.
*/
public val agentKnowledgeBase: aws.sdk.kotlin.services.bedrockagent.model.AgentKnowledgeBase? = builder.agentKnowledgeBase
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.AssociateAgentKnowledgeBaseResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssociateAgentKnowledgeBaseResponse(")
append("agentKnowledgeBase=$agentKnowledgeBase")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = agentKnowledgeBase?.hashCode() ?: 0
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 AssociateAgentKnowledgeBaseResponse
if (agentKnowledgeBase != other.agentKnowledgeBase) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.AssociateAgentKnowledgeBaseResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains details about the knowledge base that has been associated with the agent.
*/
public var agentKnowledgeBase: aws.sdk.kotlin.services.bedrockagent.model.AgentKnowledgeBase? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.AssociateAgentKnowledgeBaseResponse) : this() {
this.agentKnowledgeBase = x.agentKnowledgeBase
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.AssociateAgentKnowledgeBaseResponse = AssociateAgentKnowledgeBaseResponse(this)
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.AgentKnowledgeBase] inside the given [block]
*/
public fun agentKnowledgeBase(block: aws.sdk.kotlin.services.bedrockagent.model.AgentKnowledgeBase.Builder.() -> kotlin.Unit) {
this.agentKnowledgeBase = aws.sdk.kotlin.services.bedrockagent.model.AgentKnowledgeBase.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}