commonMain.aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains details on the configuration of a table optimizer. You pass this configuration when creating or updating a table optimizer.
*/
public class TableOptimizerConfiguration private constructor(builder: Builder) {
/**
* Whether table optimization is enabled.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller's behalf.
*/
public val roleArn: kotlin.String? = builder.roleArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableOptimizerConfiguration(")
append("enabled=$enabled,")
append("roleArn=$roleArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled?.hashCode() ?: 0
result = 31 * result + (roleArn?.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 TableOptimizerConfiguration
if (enabled != other.enabled) return false
if (roleArn != other.roleArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Whether table optimization is enabled.
*/
public var enabled: kotlin.Boolean? = null
/**
* A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller's behalf.
*/
public var roleArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration) : this() {
this.enabled = x.enabled
this.roleArn = x.roleArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration = TableOptimizerConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}