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

commonMain.aws.sdk.kotlin.services.glue.model.IcebergRetentionMetrics.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

/**
 * Snapshot retention metrics for Iceberg for the optimizer run.
 */
public class IcebergRetentionMetrics private constructor(builder: Builder) {
    /**
     * The duration of the job in hours.
     */
    public val jobDurationInHour: kotlin.Double = builder.jobDurationInHour
    /**
     * The number of data files deleted by the retention job run.
     */
    public val numberOfDataFilesDeleted: kotlin.Long = builder.numberOfDataFilesDeleted
    /**
     * The number of DPU hours consumed by the job.
     */
    public val numberOfDpus: kotlin.Int = builder.numberOfDpus
    /**
     * The number of manifest files deleted by the retention job run.
     */
    public val numberOfManifestFilesDeleted: kotlin.Long = builder.numberOfManifestFilesDeleted
    /**
     * The number of manifest lists deleted by the retention job run.
     */
    public val numberOfManifestListsDeleted: kotlin.Long = builder.numberOfManifestListsDeleted

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

    override fun toString(): kotlin.String = buildString {
        append("IcebergRetentionMetrics(")
        append("jobDurationInHour=$jobDurationInHour,")
        append("numberOfDataFilesDeleted=$numberOfDataFilesDeleted,")
        append("numberOfDpus=$numberOfDpus,")
        append("numberOfManifestFilesDeleted=$numberOfManifestFilesDeleted,")
        append("numberOfManifestListsDeleted=$numberOfManifestListsDeleted")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = jobDurationInHour.hashCode()
        result = 31 * result + (numberOfDataFilesDeleted.hashCode())
        result = 31 * result + (numberOfDpus)
        result = 31 * result + (numberOfManifestFilesDeleted.hashCode())
        result = 31 * result + (numberOfManifestListsDeleted.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 IcebergRetentionMetrics

        if (!(jobDurationInHour?.equals(other.jobDurationInHour) ?: (other.jobDurationInHour == null))) return false
        if (numberOfDataFilesDeleted != other.numberOfDataFilesDeleted) return false
        if (numberOfDpus != other.numberOfDpus) return false
        if (numberOfManifestFilesDeleted != other.numberOfManifestFilesDeleted) return false
        if (numberOfManifestListsDeleted != other.numberOfManifestListsDeleted) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.IcebergRetentionMetrics = 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 data files deleted by the retention job run.
         */
        public var numberOfDataFilesDeleted: kotlin.Long = 0L
        /**
         * The number of DPU hours consumed by the job.
         */
        public var numberOfDpus: kotlin.Int = 0
        /**
         * The number of manifest files deleted by the retention job run.
         */
        public var numberOfManifestFilesDeleted: kotlin.Long = 0L
        /**
         * The number of manifest lists deleted by the retention job run.
         */
        public var numberOfManifestListsDeleted: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.IcebergRetentionMetrics) : this() {
            this.jobDurationInHour = x.jobDurationInHour
            this.numberOfDataFilesDeleted = x.numberOfDataFilesDeleted
            this.numberOfDpus = x.numberOfDpus
            this.numberOfManifestFilesDeleted = x.numberOfManifestFilesDeleted
            this.numberOfManifestListsDeleted = x.numberOfManifestListsDeleted
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy