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

commonMain.aws.sdk.kotlin.services.s3control.model.PutBucketVersioningRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.s3control.model



public class PutBucketVersioningRequest private constructor(builder: Builder) {
    /**
     * The Amazon Web Services account ID of the S3 on Outposts bucket.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The S3 on Outposts bucket to set the versioning state for.
     */
    public val bucket: kotlin.String? = builder.bucket
    /**
     * The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
     */
    public val mfa: kotlin.String? = builder.mfa
    /**
     * The root-level tag for the `VersioningConfiguration` parameters.
     */
    public val versioningConfiguration: aws.sdk.kotlin.services.s3control.model.VersioningConfiguration? = builder.versioningConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("PutBucketVersioningRequest(")
        append("accountId=$accountId,")
        append("bucket=$bucket,")
        append("mfa=$mfa,")
        append("versioningConfiguration=$versioningConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (bucket?.hashCode() ?: 0)
        result = 31 * result + (mfa?.hashCode() ?: 0)
        result = 31 * result + (versioningConfiguration?.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 PutBucketVersioningRequest

        if (accountId != other.accountId) return false
        if (bucket != other.bucket) return false
        if (mfa != other.mfa) return false
        if (versioningConfiguration != other.versioningConfiguration) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon Web Services account ID of the S3 on Outposts bucket.
         */
        public var accountId: kotlin.String? = null
        /**
         * The S3 on Outposts bucket to set the versioning state for.
         */
        public var bucket: kotlin.String? = null
        /**
         * The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
         */
        public var mfa: kotlin.String? = null
        /**
         * The root-level tag for the `VersioningConfiguration` parameters.
         */
        public var versioningConfiguration: aws.sdk.kotlin.services.s3control.model.VersioningConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3control.model.PutBucketVersioningRequest) : this() {
            this.accountId = x.accountId
            this.bucket = x.bucket
            this.mfa = x.mfa
            this.versioningConfiguration = x.versioningConfiguration
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy