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

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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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



/**
 * Configures an S3 data source location.
 */
public class S3DataSourceConfiguration private constructor(builder: Builder) {
    /**
     * A S3 bucket ARN
     */
    public val bucketArn: kotlin.String = requireNotNull(builder.bucketArn) { "A non-null value must be provided for bucketArn" }
    /**
     * A list of S3 prefixes.
     */
    public val inclusionPrefixes: List? = builder.inclusionPrefixes

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

    override fun toString(): kotlin.String = buildString {
        append("S3DataSourceConfiguration(")
        append("bucketArn=$bucketArn,")
        append("inclusionPrefixes=$inclusionPrefixes")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucketArn.hashCode()
        result = 31 * result + (inclusionPrefixes?.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 S3DataSourceConfiguration

        if (bucketArn != other.bucketArn) return false
        if (inclusionPrefixes != other.inclusionPrefixes) return false

        return true
    }

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

    public class Builder {
        /**
         * A S3 bucket ARN
         */
        public var bucketArn: kotlin.String? = null
        /**
         * A list of S3 prefixes.
         */
        public var inclusionPrefixes: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.S3DataSourceConfiguration) : this() {
            this.bucketArn = x.bucketArn
            this.inclusionPrefixes = x.inclusionPrefixes
        }

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

        internal fun correctErrors(): Builder {
            if (bucketArn == null) bucketArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy