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

commonMain.aws.sdk.kotlin.services.kafka.model.UpdateClusterConfigurationRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kafka.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateClusterConfigurationRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) that uniquely identifies the cluster.
     */
    public val clusterArn: kotlin.String? = builder.clusterArn
    /**
     * Represents the configuration that you want MSK to use for the brokers in a cluster.
     */
    public val configurationInfo: aws.sdk.kotlin.services.kafka.model.ConfigurationInfo? = builder.configurationInfo
    /**
     * The version of the cluster that needs to be updated.
     */
    public val currentVersion: kotlin.String? = builder.currentVersion

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateClusterConfigurationRequest(")
        append("clusterArn=$clusterArn,")
        append("configurationInfo=$configurationInfo,")
        append("currentVersion=$currentVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterArn?.hashCode() ?: 0
        result = 31 * result + (configurationInfo?.hashCode() ?: 0)
        result = 31 * result + (currentVersion?.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 UpdateClusterConfigurationRequest

        if (clusterArn != other.clusterArn) return false
        if (configurationInfo != other.configurationInfo) return false
        if (currentVersion != other.currentVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) that uniquely identifies the cluster.
         */
        public var clusterArn: kotlin.String? = null
        /**
         * Represents the configuration that you want MSK to use for the brokers in a cluster.
         */
        public var configurationInfo: aws.sdk.kotlin.services.kafka.model.ConfigurationInfo? = null
        /**
         * The version of the cluster that needs to be updated.
         */
        public var currentVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafka.model.UpdateClusterConfigurationRequest) : this() {
            this.clusterArn = x.clusterArn
            this.configurationInfo = x.configurationInfo
            this.currentVersion = x.currentVersion
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy