
commonMain.aws.sdk.kotlin.services.s3.model.OwnershipControls.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
/**
* The container element for a bucket's ownership controls.
*/
public class OwnershipControls private constructor(builder: Builder) {
/**
* The container element for an ownership control rule.
*/
public val rules: List = requireNotNull(builder.rules) { "A non-null value must be provided for rules" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.OwnershipControls = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OwnershipControls(")
append("rules=$rules")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = rules.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 OwnershipControls
if (rules != other.rules) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.OwnershipControls = Builder(this).apply(block).build()
public class Builder {
/**
* The container element for an ownership control rule.
*/
public var rules: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.OwnershipControls) : this() {
this.rules = x.rules
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.OwnershipControls = OwnershipControls(this)
internal fun correctErrors(): Builder {
if (rules == null) rules = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy