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

commonMain.aws.sdk.kotlin.services.kafka.model.UpdateConnectivityRequest.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

/**
 * Request body for UpdateConnectivity.
 */
public class UpdateConnectivityRequest private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the configuration.
     */
    public val clusterArn: kotlin.String? = builder.clusterArn
    /**
     * Information about the broker access configuration.
     */
    public val connectivityInfo: aws.sdk.kotlin.services.kafka.model.ConnectivityInfo? = builder.connectivityInfo
    /**
     * The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.
     */
    public val currentVersion: kotlin.String? = builder.currentVersion

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

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

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

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

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the configuration.
         */
        public var clusterArn: kotlin.String? = null
        /**
         * Information about the broker access configuration.
         */
        public var connectivityInfo: aws.sdk.kotlin.services.kafka.model.ConnectivityInfo? = null
        /**
         * The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.
         */
        public var currentVersion: kotlin.String? = null

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy