
commonMain.aws.sdk.kotlin.services.s3.model.GetObjectLegalHoldResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
public class GetObjectLegalHoldResponse private constructor(builder: Builder) {
/**
* The current legal hold status for the specified object.
*/
public val legalHold: aws.sdk.kotlin.services.s3.model.ObjectLockLegalHold? = builder.legalHold
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.GetObjectLegalHoldResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetObjectLegalHoldResponse(")
append("legalHold=$legalHold")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = legalHold?.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 GetObjectLegalHoldResponse
if (legalHold != other.legalHold) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.GetObjectLegalHoldResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The current legal hold status for the specified object.
*/
public var legalHold: aws.sdk.kotlin.services.s3.model.ObjectLockLegalHold? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.GetObjectLegalHoldResponse) : this() {
this.legalHold = x.legalHold
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.GetObjectLegalHoldResponse = GetObjectLegalHoldResponse(this)
/**
* construct an [aws.sdk.kotlin.services.s3.model.ObjectLockLegalHold] inside the given [block]
*/
public fun legalHold(block: aws.sdk.kotlin.services.s3.model.ObjectLockLegalHold.Builder.() -> kotlin.Unit) {
this.legalHold = aws.sdk.kotlin.services.s3.model.ObjectLockLegalHold.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy