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

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

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

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



/**
 * Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.
 *
 * For information about the S3 Intelligent-Tiering storage class, see [Storage class for automatically optimizing frequently and infrequently accessed objects](https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
 */
public class IntelligentTieringConfiguration private constructor(builder: Builder) {
    /**
     * Specifies a bucket filter. The configuration only includes objects that meet the filter's criteria.
     */
    public val filter: aws.sdk.kotlin.services.s3.model.IntelligentTieringFilter? = builder.filter
    /**
     * The ID used to identify the S3 Intelligent-Tiering configuration.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * Specifies the status of the configuration.
     */
    public val status: aws.sdk.kotlin.services.s3.model.IntelligentTieringStatus = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
     */
    public val tierings: List = requireNotNull(builder.tierings) { "A non-null value must be provided for tierings" }

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

    override fun toString(): kotlin.String = buildString {
        append("IntelligentTieringConfiguration(")
        append("filter=$filter,")
        append("id=$id,")
        append("status=$status,")
        append("tierings=$tierings")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = filter?.hashCode() ?: 0
        result = 31 * result + (id.hashCode())
        result = 31 * result + (status.hashCode())
        result = 31 * result + (tierings.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 IntelligentTieringConfiguration

        if (filter != other.filter) return false
        if (id != other.id) return false
        if (status != other.status) return false
        if (tierings != other.tierings) return false

        return true
    }

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

    public class Builder {
        /**
         * Specifies a bucket filter. The configuration only includes objects that meet the filter's criteria.
         */
        public var filter: aws.sdk.kotlin.services.s3.model.IntelligentTieringFilter? = null
        /**
         * The ID used to identify the S3 Intelligent-Tiering configuration.
         */
        public var id: kotlin.String? = null
        /**
         * Specifies the status of the configuration.
         */
        public var status: aws.sdk.kotlin.services.s3.model.IntelligentTieringStatus? = null
        /**
         * Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
         */
        public var tierings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.IntelligentTieringConfiguration) : this() {
            this.filter = x.filter
            this.id = x.id
            this.status = x.status
            this.tierings = x.tierings
        }

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

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

        internal fun correctErrors(): Builder {
            if (id == null) id = ""
            if (status == null) status = IntelligentTieringStatus.SdkUnknown("no value provided")
            if (tierings == null) tierings = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy