commonMain.aws.sdk.kotlin.services.glue.model.SqlAlias.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
/**
* Represents a single entry in the list of values for `SqlAliases`.
*/
public class SqlAlias private constructor(builder: Builder) {
/**
* A temporary name given to a table, or a column in a table.
*/
public val alias: kotlin.String = requireNotNull(builder.alias) { "A non-null value must be provided for alias" }
/**
* A table, or a column in a table.
*/
public val from: kotlin.String = requireNotNull(builder.from) { "A non-null value must be provided for from" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.SqlAlias = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SqlAlias(")
append("alias=$alias,")
append("from=$from")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = alias.hashCode()
result = 31 * result + (from.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 SqlAlias
if (alias != other.alias) return false
if (from != other.from) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SqlAlias = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A temporary name given to a table, or a column in a table.
*/
public var alias: kotlin.String? = null
/**
* A table, or a column in a table.
*/
public var from: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SqlAlias) : this() {
this.alias = x.alias
this.from = x.from
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SqlAlias = SqlAlias(this)
internal fun correctErrors(): Builder {
if (alias == null) alias = ""
if (from == null) from = ""
return this
}
}
}