commonMain.aws.sdk.kotlin.services.glue.model.Column.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A column in a `Table`.
*/
public class Column private constructor(builder: Builder) {
/**
* A free-form text comment.
*/
public val comment: kotlin.String? = builder.comment
/**
* The name of the `Column`.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* These key-value pairs define properties associated with the column.
*/
public val parameters: Map? = builder.parameters
/**
* The data type of the `Column`.
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Column = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Column(")
append("comment=$comment,")
append("name=$name,")
append("parameters=$parameters,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (name.hashCode())
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (type?.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 Column
if (comment != other.comment) return false
if (name != other.name) return false
if (parameters != other.parameters) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Column = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A free-form text comment.
*/
public var comment: kotlin.String? = null
/**
* The name of the `Column`.
*/
public var name: kotlin.String? = null
/**
* These key-value pairs define properties associated with the column.
*/
public var parameters: Map? = null
/**
* The data type of the `Column`.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Column) : this() {
this.comment = x.comment
this.name = x.name
this.parameters = x.parameters
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Column = Column(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}