All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.IcebergCompactionMetrics.kt Maven / Gradle / Ivy

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

/**
 * Compaction metrics for Iceberg for the optimizer run.
 */
public class IcebergCompactionMetrics private constructor(builder: Builder) {
    /**
     * The duration of the job in hours.
     */
    public val jobDurationInHour: kotlin.Double = builder.jobDurationInHour
    /**
     * The number of bytes removed by the compaction job run.
     */
    public val numberOfBytesCompacted: kotlin.Long = builder.numberOfBytesCompacted
    /**
     * The number of DPU hours consumed by the job.
     */
    public val numberOfDpus: kotlin.Int = builder.numberOfDpus
    /**
     * The number of files removed by the compaction job run.
     */
    public val numberOfFilesCompacted: kotlin.Long = builder.numberOfFilesCompacted

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.IcebergCompactionMetrics = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("IcebergCompactionMetrics(")
        append("jobDurationInHour=$jobDurationInHour,")
        append("numberOfBytesCompacted=$numberOfBytesCompacted,")
        append("numberOfDpus=$numberOfDpus,")
        append("numberOfFilesCompacted=$numberOfFilesCompacted")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = jobDurationInHour.hashCode()
        result = 31 * result + (numberOfBytesCompacted.hashCode())
        result = 31 * result + (numberOfDpus)
        result = 31 * result + (numberOfFilesCompacted.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 IcebergCompactionMetrics

        if (!(jobDurationInHour?.equals(other.jobDurationInHour) ?: (other.jobDurationInHour == null))) return false
        if (numberOfBytesCompacted != other.numberOfBytesCompacted) return false
        if (numberOfDpus != other.numberOfDpus) return false
        if (numberOfFilesCompacted != other.numberOfFilesCompacted) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.IcebergCompactionMetrics = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The duration of the job in hours.
         */
        public var jobDurationInHour: kotlin.Double = 0.0
        /**
         * The number of bytes removed by the compaction job run.
         */
        public var numberOfBytesCompacted: kotlin.Long = 0L
        /**
         * The number of DPU hours consumed by the job.
         */
        public var numberOfDpus: kotlin.Int = 0
        /**
         * The number of files removed by the compaction job run.
         */
        public var numberOfFilesCompacted: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.IcebergCompactionMetrics) : this() {
            this.jobDurationInHour = x.jobDurationInHour
            this.numberOfBytesCompacted = x.numberOfBytesCompacted
            this.numberOfDpus = x.numberOfDpus
            this.numberOfFilesCompacted = x.numberOfFilesCompacted
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.IcebergCompactionMetrics = IcebergCompactionMetrics(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy