commonMain.aws.sdk.kotlin.services.athena.model.Column.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athena-jvm Show documentation
Show all versions of athena-jvm Show documentation
The AWS SDK for Kotlin client for Athena
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.athena.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains metadata for a column in a table.
*/
public class Column private constructor(builder: Builder) {
/**
* Optional information about the column.
*/
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" }
/**
* 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.athena.model.Column = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Column(")
append("comment=$comment,")
append("name=$name,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = comment?.hashCode() ?: 0
result = 31 * result + (name.hashCode())
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 (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.Column = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Optional information about the column.
*/
public var comment: kotlin.String? = null
/**
* The name of the column.
*/
public var name: kotlin.String? = null
/**
* The data type of the column.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.athena.model.Column) : this() {
this.comment = x.comment
this.name = x.name
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.athena.model.Column = Column(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}