commonMain.aws.sdk.kotlin.services.bedrockagent.model.S3DataSourceConfiguration.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
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The configuration information to connect to Amazon S3 as your data source.
*/
public class S3DataSourceConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
*/
public val bucketArn: kotlin.String = requireNotNull(builder.bucketArn) { "A non-null value must be provided for bucketArn" }
/**
* The account ID for the owner of the S3 bucket.
*/
public val bucketOwnerAccountId: kotlin.String? = builder.bucketOwnerAccountId
/**
* A list of S3 prefixes to include certain files or content. For more information, see [Organizing objects using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html).
*/
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("bucketOwnerAccountId=$bucketOwnerAccountId,")
append("inclusionPrefixes=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bucketArn.hashCode()
result = 31 * result + (bucketOwnerAccountId?.hashCode() ?: 0)
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 (bucketOwnerAccountId != other.bucketOwnerAccountId) 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()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
*/
public var bucketArn: kotlin.String? = null
/**
* The account ID for the owner of the S3 bucket.
*/
public var bucketOwnerAccountId: kotlin.String? = null
/**
* A list of S3 prefixes to include certain files or content. For more information, see [Organizing objects using prefixes](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html).
*/
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.bucketOwnerAccountId = x.bucketOwnerAccountId
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
}
}
}