commonMain.aws.sdk.kotlin.services.bedrockagent.model.UpdateKnowledgeBaseRequest.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
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateKnowledgeBaseRequest private constructor(builder: Builder) {
/**
* Specifies a new description for the knowledge base.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created.
*/
public val knowledgeBaseConfiguration: aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseConfiguration? = builder.knowledgeBaseConfiguration
/**
* The unique identifier of the knowledge base to update.
*/
public val knowledgeBaseId: kotlin.String? = builder.knowledgeBaseId
/**
* Specifies a new name for the knowledge base.
*/
public val name: kotlin.String? = builder.name
/**
* Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
*/
public val roleArn: kotlin.String? = builder.roleArn
/**
* Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created.
*/
public val storageConfiguration: aws.sdk.kotlin.services.bedrockagent.model.StorageConfiguration? = builder.storageConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.UpdateKnowledgeBaseRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateKnowledgeBaseRequest(")
append("description=$description,")
append("knowledgeBaseConfiguration=$knowledgeBaseConfiguration,")
append("knowledgeBaseId=$knowledgeBaseId,")
append("name=$name,")
append("roleArn=$roleArn,")
append("storageConfiguration=$storageConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (knowledgeBaseConfiguration?.hashCode() ?: 0)
result = 31 * result + (knowledgeBaseId?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (roleArn?.hashCode() ?: 0)
result = 31 * result + (storageConfiguration?.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 UpdateKnowledgeBaseRequest
if (description != other.description) return false
if (knowledgeBaseConfiguration != other.knowledgeBaseConfiguration) return false
if (knowledgeBaseId != other.knowledgeBaseId) return false
if (name != other.name) return false
if (roleArn != other.roleArn) return false
if (storageConfiguration != other.storageConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.UpdateKnowledgeBaseRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies a new description for the knowledge base.
*/
public var description: kotlin.String? = null
/**
* Specifies the configuration for the embeddings model used for the knowledge base. You must use the same configuration as when the knowledge base was created.
*/
public var knowledgeBaseConfiguration: aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseConfiguration? = null
/**
* The unique identifier of the knowledge base to update.
*/
public var knowledgeBaseId: kotlin.String? = null
/**
* Specifies a new name for the knowledge base.
*/
public var name: kotlin.String? = null
/**
* Specifies a different Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.
*/
public var roleArn: kotlin.String? = null
/**
* Specifies the configuration for the vector store used for the knowledge base. You must use the same configuration as when the knowledge base was created.
*/
public var storageConfiguration: aws.sdk.kotlin.services.bedrockagent.model.StorageConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.UpdateKnowledgeBaseRequest) : this() {
this.description = x.description
this.knowledgeBaseConfiguration = x.knowledgeBaseConfiguration
this.knowledgeBaseId = x.knowledgeBaseId
this.name = x.name
this.roleArn = x.roleArn
this.storageConfiguration = x.storageConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.UpdateKnowledgeBaseRequest = UpdateKnowledgeBaseRequest(this)
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseConfiguration] inside the given [block]
*/
public fun knowledgeBaseConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseConfiguration.Builder.() -> kotlin.Unit) {
this.knowledgeBaseConfiguration = aws.sdk.kotlin.services.bedrockagent.model.KnowledgeBaseConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.StorageConfiguration] inside the given [block]
*/
public fun storageConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.StorageConfiguration.Builder.() -> kotlin.Unit) {
this.storageConfiguration = aws.sdk.kotlin.services.bedrockagent.model.StorageConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}