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

commonMain.aws.sdk.kotlin.services.kafka.model.UpdateBrokerCountRequest.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 UpdateBrokerCountRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) that uniquely identifies the cluster.
     */
    public val clusterArn: kotlin.String? = builder.clusterArn
    /**
     * The version of cluster to update from. A successful operation will then generate a new version.
     */
    public val currentVersion: kotlin.String? = builder.currentVersion
    /**
     * The number of broker nodes that you want the cluster to have after this operation completes successfully.
     */
    public val targetNumberOfBrokerNodes: kotlin.Int? = builder.targetNumberOfBrokerNodes

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

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

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

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

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafka.model.UpdateBrokerCountRequest = 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
        /**
         * The version of cluster to update from. A successful operation will then generate a new version.
         */
        public var currentVersion: kotlin.String? = null
        /**
         * The number of broker nodes that you want the cluster to have after this operation completes successfully.
         */
        public var targetNumberOfBrokerNodes: kotlin.Int? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy