
commonMain.aws.sdk.kotlin.services.kendra.model.DatabaseConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* Provides the configuration information to an [Amazon Kendra supported database](https://docs.aws.amazon.com/kendra/latest/dg/data-source-database.html).
*/
public class DatabaseConfiguration private constructor(builder: Builder) {
/**
* Information about the database column that provides information for user context filtering.
*/
public val aclConfiguration: aws.sdk.kotlin.services.kendra.model.AclConfiguration? = builder.aclConfiguration
/**
* Information about where the index should get the document information from the database.
*/
public val columnConfiguration: aws.sdk.kotlin.services.kendra.model.ColumnConfiguration? = builder.columnConfiguration
/**
* Configuration information that's required to connect to a database.
*/
public val connectionConfiguration: aws.sdk.kotlin.services.kendra.model.ConnectionConfiguration? = builder.connectionConfiguration
/**
* The type of database engine that runs the database.
*/
public val databaseEngineType: aws.sdk.kotlin.services.kendra.model.DatabaseEngineType = requireNotNull(builder.databaseEngineType) { "A non-null value must be provided for databaseEngineType" }
/**
* Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
*/
public val sqlConfiguration: aws.sdk.kotlin.services.kendra.model.SqlConfiguration? = builder.sqlConfiguration
/**
* Provides the configuration information to connect to an Amazon VPC.
*/
public val vpcConfiguration: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration? = builder.vpcConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.DatabaseConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DatabaseConfiguration(")
append("aclConfiguration=$aclConfiguration,")
append("columnConfiguration=$columnConfiguration,")
append("connectionConfiguration=$connectionConfiguration,")
append("databaseEngineType=$databaseEngineType,")
append("sqlConfiguration=$sqlConfiguration,")
append("vpcConfiguration=$vpcConfiguration")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = aclConfiguration?.hashCode() ?: 0
result = 31 * result + (columnConfiguration?.hashCode() ?: 0)
result = 31 * result + (connectionConfiguration?.hashCode() ?: 0)
result = 31 * result + (databaseEngineType.hashCode())
result = 31 * result + (sqlConfiguration?.hashCode() ?: 0)
result = 31 * result + (vpcConfiguration?.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 DatabaseConfiguration
if (aclConfiguration != other.aclConfiguration) return false
if (columnConfiguration != other.columnConfiguration) return false
if (connectionConfiguration != other.connectionConfiguration) return false
if (databaseEngineType != other.databaseEngineType) return false
if (sqlConfiguration != other.sqlConfiguration) return false
if (vpcConfiguration != other.vpcConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.DatabaseConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* Information about the database column that provides information for user context filtering.
*/
public var aclConfiguration: aws.sdk.kotlin.services.kendra.model.AclConfiguration? = null
/**
* Information about where the index should get the document information from the database.
*/
public var columnConfiguration: aws.sdk.kotlin.services.kendra.model.ColumnConfiguration? = null
/**
* Configuration information that's required to connect to a database.
*/
public var connectionConfiguration: aws.sdk.kotlin.services.kendra.model.ConnectionConfiguration? = null
/**
* The type of database engine that runs the database.
*/
public var databaseEngineType: aws.sdk.kotlin.services.kendra.model.DatabaseEngineType? = null
/**
* Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
*/
public var sqlConfiguration: aws.sdk.kotlin.services.kendra.model.SqlConfiguration? = null
/**
* Provides the configuration information to connect to an Amazon VPC.
*/
public var vpcConfiguration: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.DatabaseConfiguration) : this() {
this.aclConfiguration = x.aclConfiguration
this.columnConfiguration = x.columnConfiguration
this.connectionConfiguration = x.connectionConfiguration
this.databaseEngineType = x.databaseEngineType
this.sqlConfiguration = x.sqlConfiguration
this.vpcConfiguration = x.vpcConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.DatabaseConfiguration = DatabaseConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.kendra.model.AclConfiguration] inside the given [block]
*/
public fun aclConfiguration(block: aws.sdk.kotlin.services.kendra.model.AclConfiguration.Builder.() -> kotlin.Unit) {
this.aclConfiguration = aws.sdk.kotlin.services.kendra.model.AclConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kendra.model.ColumnConfiguration] inside the given [block]
*/
public fun columnConfiguration(block: aws.sdk.kotlin.services.kendra.model.ColumnConfiguration.Builder.() -> kotlin.Unit) {
this.columnConfiguration = aws.sdk.kotlin.services.kendra.model.ColumnConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kendra.model.ConnectionConfiguration] inside the given [block]
*/
public fun connectionConfiguration(block: aws.sdk.kotlin.services.kendra.model.ConnectionConfiguration.Builder.() -> kotlin.Unit) {
this.connectionConfiguration = aws.sdk.kotlin.services.kendra.model.ConnectionConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kendra.model.SqlConfiguration] inside the given [block]
*/
public fun sqlConfiguration(block: aws.sdk.kotlin.services.kendra.model.SqlConfiguration.Builder.() -> kotlin.Unit) {
this.sqlConfiguration = aws.sdk.kotlin.services.kendra.model.SqlConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration] inside the given [block]
*/
public fun vpcConfiguration(block: aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration.Builder.() -> kotlin.Unit) {
this.vpcConfiguration = aws.sdk.kotlin.services.kendra.model.DataSourceVpcConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
if (databaseEngineType == null) databaseEngineType = DatabaseEngineType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy