
commonMain.aws.sdk.kotlin.services.s3.model.ObjectLockRetention.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A Retention configuration for an object.
*/
public class ObjectLockRetention private constructor(builder: Builder) {
/**
* Indicates the Retention mode for the specified object.
*/
public val mode: aws.sdk.kotlin.services.s3.model.ObjectLockRetentionMode? = builder.mode
/**
* The date on which this Object Lock Retention will expire.
*/
public val retainUntilDate: aws.smithy.kotlin.runtime.time.Instant? = builder.retainUntilDate
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.ObjectLockRetention = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ObjectLockRetention(")
append("mode=$mode,")
append("retainUntilDate=$retainUntilDate")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = mode?.hashCode() ?: 0
result = 31 * result + (retainUntilDate?.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 ObjectLockRetention
if (mode != other.mode) return false
if (retainUntilDate != other.retainUntilDate) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.ObjectLockRetention = Builder(this).apply(block).build()
public class Builder {
/**
* Indicates the Retention mode for the specified object.
*/
public var mode: aws.sdk.kotlin.services.s3.model.ObjectLockRetentionMode? = null
/**
* The date on which this Object Lock Retention will expire.
*/
public var retainUntilDate: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.ObjectLockRetention) : this() {
this.mode = x.mode
this.retainUntilDate = x.retainUntilDate
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.ObjectLockRetention = ObjectLockRetention(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy