commonMain.aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping.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
/**
* Contains the names of the fields to which to map information about the vector store.
*/
public class PineconeFieldMapping private constructor(builder: Builder) {
/**
* The name of the field in which Amazon Bedrock stores metadata about the vector store.
*/
public val metadataField: kotlin.String = requireNotNull(builder.metadataField) { "A non-null value must be provided for metadataField" }
/**
* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
*/
public val textField: kotlin.String = requireNotNull(builder.textField) { "A non-null value must be provided for textField" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PineconeFieldMapping(")
append("metadataField=$metadataField,")
append("textField=$textField")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metadataField.hashCode()
result = 31 * result + (textField.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 PineconeFieldMapping
if (metadataField != other.metadataField) return false
if (textField != other.textField) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping = Builder(this).apply(block).build()
public class Builder {
/**
* The name of the field in which Amazon Bedrock stores metadata about the vector store.
*/
public var metadataField: kotlin.String? = null
/**
* The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.
*/
public var textField: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping) : this() {
this.metadataField = x.metadataField
this.textField = x.textField
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping = PineconeFieldMapping(this)
internal fun correctErrors(): Builder {
if (metadataField == null) metadataField = ""
if (textField == null) textField = ""
return this
}
}
}