commonMain.aws.sdk.kotlin.services.glue.model.DirectJdbcSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the direct JDBC source connection.
*/
public class DirectJdbcSource private constructor(builder: Builder) {
/**
* The connection name of the JDBC source.
*/
public val connectionName: kotlin.String = requireNotNull(builder.connectionName) { "A non-null value must be provided for connectionName" }
/**
* The connection type of the JDBC source.
*/
public val connectionType: aws.sdk.kotlin.services.glue.model.JdbcConnectionType = requireNotNull(builder.connectionType) { "A non-null value must be provided for connectionType" }
/**
* The database of the JDBC source connection.
*/
public val database: kotlin.String = requireNotNull(builder.database) { "A non-null value must be provided for database" }
/**
* The name of the JDBC source connection.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The temp directory of the JDBC Redshift source.
*/
public val redshiftTmpDir: kotlin.String? = builder.redshiftTmpDir
/**
* The table of the JDBC source connection.
*/
public val table: kotlin.String = requireNotNull(builder.table) { "A non-null value must be provided for table" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.DirectJdbcSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DirectJdbcSource(")
append("connectionName=$connectionName,")
append("connectionType=$connectionType,")
append("database=$database,")
append("name=$name,")
append("redshiftTmpDir=$redshiftTmpDir,")
append("table=$table")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = connectionName.hashCode()
result = 31 * result + (connectionType.hashCode())
result = 31 * result + (database.hashCode())
result = 31 * result + (name.hashCode())
result = 31 * result + (redshiftTmpDir?.hashCode() ?: 0)
result = 31 * result + (table.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 DirectJdbcSource
if (connectionName != other.connectionName) return false
if (connectionType != other.connectionType) return false
if (database != other.database) return false
if (name != other.name) return false
if (redshiftTmpDir != other.redshiftTmpDir) return false
if (table != other.table) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.DirectJdbcSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The connection name of the JDBC source.
*/
public var connectionName: kotlin.String? = null
/**
* The connection type of the JDBC source.
*/
public var connectionType: aws.sdk.kotlin.services.glue.model.JdbcConnectionType? = null
/**
* The database of the JDBC source connection.
*/
public var database: kotlin.String? = null
/**
* The name of the JDBC source connection.
*/
public var name: kotlin.String? = null
/**
* The temp directory of the JDBC Redshift source.
*/
public var redshiftTmpDir: kotlin.String? = null
/**
* The table of the JDBC source connection.
*/
public var table: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.DirectJdbcSource) : this() {
this.connectionName = x.connectionName
this.connectionType = x.connectionType
this.database = x.database
this.name = x.name
this.redshiftTmpDir = x.redshiftTmpDir
this.table = x.table
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.DirectJdbcSource = DirectJdbcSource(this)
internal fun correctErrors(): Builder {
if (connectionName == null) connectionName = ""
if (connectionType == null) connectionType = JdbcConnectionType.SdkUnknown("no value provided")
if (database == null) database = ""
if (name == null) name = ""
if (table == null) table = ""
return this
}
}
}