commonMain.aws.sdk.kotlin.services.glue.model.IcebergRetentionConfiguration.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
/**
* The configuration for an Iceberg snapshot retention optimizer.
*/
public class IcebergRetentionConfiguration private constructor(builder: Builder) {
/**
* If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted.
*/
public val cleanExpiredFiles: kotlin.Boolean? = builder.cleanExpiredFiles
/**
* The number of Iceberg snapshots to retain within the retention period. If an input is not provided, the corresponding Iceberg table configuration field will be used or if not present, the default value 1 will be used.
*/
public val numberOfSnapshotsToRetain: kotlin.Int? = builder.numberOfSnapshotsToRetain
/**
* The number of days to retain the Iceberg snapshots. If an input is not provided, the corresponding Iceberg table configuration field will be used or if not present, the default value 5 will be used.
*/
public val snapshotRetentionPeriodInDays: kotlin.Int? = builder.snapshotRetentionPeriodInDays
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.IcebergRetentionConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("IcebergRetentionConfiguration(")
append("cleanExpiredFiles=$cleanExpiredFiles,")
append("numberOfSnapshotsToRetain=$numberOfSnapshotsToRetain,")
append("snapshotRetentionPeriodInDays=$snapshotRetentionPeriodInDays")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cleanExpiredFiles?.hashCode() ?: 0
result = 31 * result + (numberOfSnapshotsToRetain ?: 0)
result = 31 * result + (snapshotRetentionPeriodInDays ?: 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 IcebergRetentionConfiguration
if (cleanExpiredFiles != other.cleanExpiredFiles) return false
if (numberOfSnapshotsToRetain != other.numberOfSnapshotsToRetain) return false
if (snapshotRetentionPeriodInDays != other.snapshotRetentionPeriodInDays) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.IcebergRetentionConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* If set to false, snapshots are only deleted from table metadata, and the underlying data and metadata files are not deleted.
*/
public var cleanExpiredFiles: kotlin.Boolean? = null
/**
* The number of Iceberg snapshots to retain within the retention period. If an input is not provided, the corresponding Iceberg table configuration field will be used or if not present, the default value 1 will be used.
*/
public var numberOfSnapshotsToRetain: kotlin.Int? = null
/**
* The number of days to retain the Iceberg snapshots. If an input is not provided, the corresponding Iceberg table configuration field will be used or if not present, the default value 5 will be used.
*/
public var snapshotRetentionPeriodInDays: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.IcebergRetentionConfiguration) : this() {
this.cleanExpiredFiles = x.cleanExpiredFiles
this.numberOfSnapshotsToRetain = x.numberOfSnapshotsToRetain
this.snapshotRetentionPeriodInDays = x.snapshotRetentionPeriodInDays
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.IcebergRetentionConfiguration = IcebergRetentionConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}