commonMain.aws.sdk.kotlin.services.glue.model.PartitionIndex.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
/**
* A structure for a partition index.
*/
public class PartitionIndex private constructor(builder: Builder) {
/**
* The name of the partition index.
*/
public val indexName: kotlin.String = requireNotNull(builder.indexName) { "A non-null value must be provided for indexName" }
/**
* The keys for the partition index.
*/
public val keys: List = requireNotNull(builder.keys) { "A non-null value must be provided for keys" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.PartitionIndex = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PartitionIndex(")
append("indexName=$indexName,")
append("keys=$keys")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = indexName.hashCode()
result = 31 * result + (keys.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 PartitionIndex
if (indexName != other.indexName) return false
if (keys != other.keys) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.PartitionIndex = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the partition index.
*/
public var indexName: kotlin.String? = null
/**
* The keys for the partition index.
*/
public var keys: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.PartitionIndex) : this() {
this.indexName = x.indexName
this.keys = x.keys
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.PartitionIndex = PartitionIndex(this)
internal fun correctErrors(): Builder {
if (indexName == null) indexName = ""
if (keys == null) keys = emptyList()
return this
}
}
}