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

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

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

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



/**
 * Specifies the information about the bucket that will be created. For more information about directory buckets, see [Directory buckets](https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html) in the *Amazon S3 User Guide*.
 *
 * This functionality is only supported by directory buckets.
 */
public class BucketInfo private constructor(builder: Builder) {
    /**
     * The number of Availability Zone that's used for redundancy for the bucket.
     */
    public val dataRedundancy: aws.sdk.kotlin.services.s3.model.DataRedundancy? = builder.dataRedundancy
    /**
     * The type of bucket.
     */
    public val type: aws.sdk.kotlin.services.s3.model.BucketType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("BucketInfo(")
        append("dataRedundancy=$dataRedundancy,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataRedundancy?.hashCode() ?: 0
        result = 31 * result + (type?.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 BucketInfo

        if (dataRedundancy != other.dataRedundancy) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The number of Availability Zone that's used for redundancy for the bucket.
         */
        public var dataRedundancy: aws.sdk.kotlin.services.s3.model.DataRedundancy? = null
        /**
         * The type of bucket.
         */
        public var type: aws.sdk.kotlin.services.s3.model.BucketType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.BucketInfo) : this() {
            this.dataRedundancy = x.dataRedundancy
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy