commonMain.aws.sdk.kotlin.services.glue.model.RedshiftSource.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 an Amazon Redshift data store.
*/
public class RedshiftSource private constructor(builder: Builder) {
/**
* The database to read from.
*/
public val database: kotlin.String = requireNotNull(builder.database) { "A non-null value must be provided for database" }
/**
* The name of the Amazon Redshift data store.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The Amazon S3 path where temporary data can be staged when copying out of the database.
*/
public val redshiftTmpDir: kotlin.String? = builder.redshiftTmpDir
/**
* The database table to read from.
*/
public val table: kotlin.String = requireNotNull(builder.table) { "A non-null value must be provided for table" }
/**
* The IAM role with permissions.
*/
public val tmpDirIamRole: kotlin.String? = builder.tmpDirIamRole
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.RedshiftSource = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RedshiftSource(")
append("database=$database,")
append("name=$name,")
append("redshiftTmpDir=$redshiftTmpDir,")
append("table=$table,")
append("tmpDirIamRole=$tmpDirIamRole")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = database.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (redshiftTmpDir?.hashCode() ?: 0)
result = 31 * result + (table.hashCode())
result = 31 * result + (tmpDirIamRole?.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 RedshiftSource
if (database != other.database) return false
if (name != other.name) return false
if (redshiftTmpDir != other.redshiftTmpDir) return false
if (table != other.table) return false
if (tmpDirIamRole != other.tmpDirIamRole) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.RedshiftSource = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The database to read from.
*/
public var database: kotlin.String? = null
/**
* The name of the Amazon Redshift data store.
*/
public var name: kotlin.String? = null
/**
* The Amazon S3 path where temporary data can be staged when copying out of the database.
*/
public var redshiftTmpDir: kotlin.String? = null
/**
* The database table to read from.
*/
public var table: kotlin.String? = null
/**
* The IAM role with permissions.
*/
public var tmpDirIamRole: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.RedshiftSource) : this() {
this.database = x.database
this.name = x.name
this.redshiftTmpDir = x.redshiftTmpDir
this.table = x.table
this.tmpDirIamRole = x.tmpDirIamRole
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.RedshiftSource = RedshiftSource(this)
internal fun correctErrors(): Builder {
if (database == null) database = ""
if (name == null) name = ""
if (table == null) table = ""
return this
}
}
}