
commonMain.aws.sdk.kotlin.services.s3control.model.NoncurrentVersionExpiration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3control.model
/**
* The container of the noncurrent version expiration.
*/
public class NoncurrentVersionExpiration private constructor(builder: Builder) {
/**
* Specifies how many noncurrent versions S3 on Outposts will retain. If there are this many more recent noncurrent versions, S3 on Outposts will take the associated action. For more information about noncurrent versions, see [Lifecycle configuration elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide*.
*/
public val newerNoncurrentVersions: kotlin.Int? = builder.newerNoncurrentVersions
/**
* Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see [How Amazon S3 Calculates When an Object Became Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide*.
*/
public val noncurrentDays: kotlin.Int = builder.noncurrentDays
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3control.model.NoncurrentVersionExpiration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NoncurrentVersionExpiration(")
append("newerNoncurrentVersions=$newerNoncurrentVersions,")
append("noncurrentDays=$noncurrentDays")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = newerNoncurrentVersions ?: 0
result = 31 * result + (noncurrentDays)
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 NoncurrentVersionExpiration
if (newerNoncurrentVersions != other.newerNoncurrentVersions) return false
if (noncurrentDays != other.noncurrentDays) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3control.model.NoncurrentVersionExpiration = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies how many noncurrent versions S3 on Outposts will retain. If there are this many more recent noncurrent versions, S3 on Outposts will take the associated action. For more information about noncurrent versions, see [Lifecycle configuration elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide*.
*/
public var newerNoncurrentVersions: kotlin.Int? = null
/**
* Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see [How Amazon S3 Calculates When an Object Became Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide*.
*/
public var noncurrentDays: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3control.model.NoncurrentVersionExpiration) : this() {
this.newerNoncurrentVersions = x.newerNoncurrentVersions
this.noncurrentDays = x.noncurrentDays
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3control.model.NoncurrentVersionExpiration = NoncurrentVersionExpiration(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy