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

commonMain.aws.sdk.kotlin.services.s3.model.PolicyStatus.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 policy status.
 */
public class PolicyStatus private constructor(builder: Builder) {
    /**
     * The policy status for this bucket. `TRUE` indicates that this bucket is public. `FALSE` indicates that the bucket is not public.
     */
    public val isPublic: kotlin.Boolean? = builder.isPublic

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

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

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

        if (isPublic != other.isPublic) return false

        return true
    }

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

    public class Builder {
        /**
         * The policy status for this bucket. `TRUE` indicates that this bucket is public. `FALSE` indicates that the bucket is not public.
         */
        public var isPublic: kotlin.Boolean? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy