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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.PineconeFieldMapping.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * 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()

    @SdkDsl
    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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy