All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.s3.model.GetBucketOwnershipControlsResponse.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.s3.model



public class GetBucketOwnershipControlsResponse private constructor(builder: Builder) {
    /**
     * The `OwnershipControls` (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) currently in effect for this Amazon S3 bucket.
     */
    public val ownershipControls: aws.sdk.kotlin.services.s3.model.OwnershipControls? = builder.ownershipControls

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.GetBucketOwnershipControlsResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetBucketOwnershipControlsResponse(")
        append("ownershipControls=$ownershipControls")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = ownershipControls?.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 GetBucketOwnershipControlsResponse

        if (ownershipControls != other.ownershipControls) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.GetBucketOwnershipControlsResponse = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The `OwnershipControls` (BucketOwnerEnforced, BucketOwnerPreferred, or ObjectWriter) currently in effect for this Amazon S3 bucket.
         */
        public var ownershipControls: aws.sdk.kotlin.services.s3.model.OwnershipControls? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.GetBucketOwnershipControlsResponse) : this() {
            this.ownershipControls = x.ownershipControls
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.s3.model.GetBucketOwnershipControlsResponse = GetBucketOwnershipControlsResponse(this)

        /**
         * construct an [aws.sdk.kotlin.services.s3.model.OwnershipControls] inside the given [block]
         */
        public fun ownershipControls(block: aws.sdk.kotlin.services.s3.model.OwnershipControls.Builder.() -> kotlin.Unit) {
            this.ownershipControls = aws.sdk.kotlin.services.s3.model.OwnershipControls.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy