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

commonMain.aws.sdk.kotlin.services.kafkaconnect.model.ApacheKafkaCluster.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kafkaconnect.model



/**
 * The details of the Apache Kafka cluster to which the connector is connected.
 */
public class ApacheKafkaCluster private constructor(builder: Builder) {
    /**
     * The bootstrap servers of the cluster.
     */
    public val bootstrapServers: kotlin.String = requireNotNull(builder.bootstrapServers) { "A non-null value must be provided for bootstrapServers" }
    /**
     * Details of an Amazon VPC which has network connectivity to the Apache Kafka cluster.
     */
    public val vpc: aws.sdk.kotlin.services.kafkaconnect.model.Vpc? = builder.vpc

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

    override fun toString(): kotlin.String = buildString {
        append("ApacheKafkaCluster(")
        append("bootstrapServers=$bootstrapServers,")
        append("vpc=$vpc")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bootstrapServers.hashCode()
        result = 31 * result + (vpc?.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 ApacheKafkaCluster

        if (bootstrapServers != other.bootstrapServers) return false
        if (vpc != other.vpc) return false

        return true
    }

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

    public class Builder {
        /**
         * The bootstrap servers of the cluster.
         */
        public var bootstrapServers: kotlin.String? = null
        /**
         * Details of an Amazon VPC which has network connectivity to the Apache Kafka cluster.
         */
        public var vpc: aws.sdk.kotlin.services.kafkaconnect.model.Vpc? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kafkaconnect.model.ApacheKafkaCluster) : this() {
            this.bootstrapServers = x.bootstrapServers
            this.vpc = x.vpc
        }

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

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

        internal fun correctErrors(): Builder {
            if (bootstrapServers == null) bootstrapServers = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy