commonMain.aws.sdk.kotlin.services.glue.model.TableOptimizerRun.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Contains details for a table optimizer run.
*/
public class TableOptimizerRun private constructor(builder: Builder) {
/**
* Represents the epoch timestamp at which the compaction job ended.
*/
public val endTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.endTimestamp
/**
* An error that occured during the optimizer run.
*/
public val error: kotlin.String? = builder.error
/**
* An event type representing the status of the table optimizer run.
*/
public val eventType: aws.sdk.kotlin.services.glue.model.TableOptimizerEventType? = builder.eventType
/**
* A `RunMetrics` object containing metrics for the optimizer run.
*/
public val metrics: aws.sdk.kotlin.services.glue.model.RunMetrics? = builder.metrics
/**
* Represents the epoch timestamp at which the compaction job was started within Lake Formation.
*/
public val startTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.startTimestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.TableOptimizerRun = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TableOptimizerRun(")
append("endTimestamp=$endTimestamp,")
append("error=$error,")
append("eventType=$eventType,")
append("metrics=$metrics,")
append("startTimestamp=$startTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endTimestamp?.hashCode() ?: 0
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (eventType?.hashCode() ?: 0)
result = 31 * result + (metrics?.hashCode() ?: 0)
result = 31 * result + (startTimestamp?.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 TableOptimizerRun
if (endTimestamp != other.endTimestamp) return false
if (error != other.error) return false
if (eventType != other.eventType) return false
if (metrics != other.metrics) return false
if (startTimestamp != other.startTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.TableOptimizerRun = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Represents the epoch timestamp at which the compaction job ended.
*/
public var endTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* An error that occured during the optimizer run.
*/
public var error: kotlin.String? = null
/**
* An event type representing the status of the table optimizer run.
*/
public var eventType: aws.sdk.kotlin.services.glue.model.TableOptimizerEventType? = null
/**
* A `RunMetrics` object containing metrics for the optimizer run.
*/
public var metrics: aws.sdk.kotlin.services.glue.model.RunMetrics? = null
/**
* Represents the epoch timestamp at which the compaction job was started within Lake Formation.
*/
public var startTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.TableOptimizerRun) : this() {
this.endTimestamp = x.endTimestamp
this.error = x.error
this.eventType = x.eventType
this.metrics = x.metrics
this.startTimestamp = x.startTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.TableOptimizerRun = TableOptimizerRun(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.RunMetrics] inside the given [block]
*/
public fun metrics(block: aws.sdk.kotlin.services.glue.model.RunMetrics.Builder.() -> kotlin.Unit) {
this.metrics = aws.sdk.kotlin.services.glue.model.RunMetrics.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}