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

commonMain.aws.sdk.kotlin.services.bedrockagent.model.VectorIngestionConfiguration.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 details about how to ingest the documents in a data source.
 */
public class VectorIngestionConfiguration private constructor(builder: Builder) {
    /**
     * Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
     */
    public val chunkingConfiguration: aws.sdk.kotlin.services.bedrockagent.model.ChunkingConfiguration? = builder.chunkingConfiguration
    /**
     * A custom document transformer for parsed data source documents.
     */
    public val customTransformationConfiguration: aws.sdk.kotlin.services.bedrockagent.model.CustomTransformationConfiguration? = builder.customTransformationConfiguration
    /**
     * A custom parser for data source documents.
     */
    public val parsingConfiguration: aws.sdk.kotlin.services.bedrockagent.model.ParsingConfiguration? = builder.parsingConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("VectorIngestionConfiguration(")
        append("chunkingConfiguration=$chunkingConfiguration,")
        append("customTransformationConfiguration=$customTransformationConfiguration,")
        append("parsingConfiguration=$parsingConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = chunkingConfiguration?.hashCode() ?: 0
        result = 31 * result + (customTransformationConfiguration?.hashCode() ?: 0)
        result = 31 * result + (parsingConfiguration?.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 VectorIngestionConfiguration

        if (chunkingConfiguration != other.chunkingConfiguration) return false
        if (customTransformationConfiguration != other.customTransformationConfiguration) return false
        if (parsingConfiguration != other.parsingConfiguration) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.VectorIngestionConfiguration = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Details about how to chunk the documents in the data source. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
         */
        public var chunkingConfiguration: aws.sdk.kotlin.services.bedrockagent.model.ChunkingConfiguration? = null
        /**
         * A custom document transformer for parsed data source documents.
         */
        public var customTransformationConfiguration: aws.sdk.kotlin.services.bedrockagent.model.CustomTransformationConfiguration? = null
        /**
         * A custom parser for data source documents.
         */
        public var parsingConfiguration: aws.sdk.kotlin.services.bedrockagent.model.ParsingConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.VectorIngestionConfiguration) : this() {
            this.chunkingConfiguration = x.chunkingConfiguration
            this.customTransformationConfiguration = x.customTransformationConfiguration
            this.parsingConfiguration = x.parsingConfiguration
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.bedrockagent.model.ChunkingConfiguration] inside the given [block]
         */
        public fun chunkingConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.ChunkingConfiguration.Builder.() -> kotlin.Unit) {
            this.chunkingConfiguration = aws.sdk.kotlin.services.bedrockagent.model.ChunkingConfiguration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.bedrockagent.model.CustomTransformationConfiguration] inside the given [block]
         */
        public fun customTransformationConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.CustomTransformationConfiguration.Builder.() -> kotlin.Unit) {
            this.customTransformationConfiguration = aws.sdk.kotlin.services.bedrockagent.model.CustomTransformationConfiguration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.bedrockagent.model.ParsingConfiguration] inside the given [block]
         */
        public fun parsingConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.ParsingConfiguration.Builder.() -> kotlin.Unit) {
            this.parsingConfiguration = aws.sdk.kotlin.services.bedrockagent.model.ParsingConfiguration.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy