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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.RedisEnterpriseCloudFieldMapping.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 RedisEnterpriseCloudFieldMapping 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" }
    /**
     * The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
     */
    public val vectorField: kotlin.String = requireNotNull(builder.vectorField) { "A non-null value must be provided for vectorField" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.RedisEnterpriseCloudFieldMapping = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RedisEnterpriseCloudFieldMapping(")
        append("metadataField=$metadataField,")
        append("textField=$textField,")
        append("vectorField=$vectorField")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = metadataField.hashCode()
        result = 31 * result + (textField.hashCode())
        result = 31 * result + (vectorField.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 RedisEnterpriseCloudFieldMapping

        if (metadataField != other.metadataField) return false
        if (textField != other.textField) return false
        if (vectorField != other.vectorField) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.RedisEnterpriseCloudFieldMapping = 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
        /**
         * The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.
         */
        public var vectorField: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.RedisEnterpriseCloudFieldMapping) : this() {
            this.metadataField = x.metadataField
            this.textField = x.textField
            this.vectorField = x.vectorField
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.RedisEnterpriseCloudFieldMapping = RedisEnterpriseCloudFieldMapping(this)

        internal fun correctErrors(): Builder {
            if (metadataField == null) metadataField = ""
            if (textField == null) textField = ""
            if (vectorField == null) vectorField = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy